As the title said. I want to construct udp packets and send them to local process which has bound specific port. I want to make the process believe in that the packets are from other host(such as 8.8.8.8). What arguments should I pass to socket() and sendto()?
Asked
Active
Viewed 247 times
0
-
https://linux.die.net/man/8/packit might be helpful – Employed Russian Jun 21 '21 at 02:01
-
@EmployedRussian this is a commandline program. I want to use Raw Socket api – DannyLiu Jun 21 '21 at 06:36
-
"I want to use raw api" -- if you can achieve desired effect with an external program, it's easy to discover what APIs it uses by looking at `strace` or the source of that program. – Employed Russian Jun 21 '21 at 15:06