I am injecting packets using sendto
and receiving packets using recvfrom
Is there a way to read the UDP headers which are used by the lower layer.
I don't really want to go into raw sockets to do that....
Printable View
I am injecting packets using sendto
and receiving packets using recvfrom
Is there a way to read the UDP headers which are used by the lower layer.
I don't really want to go into raw sockets to do that....
if this is just to check things, you can use a 3rd party tool to monitor the traffic like wireshark or tcpdump.
UDP headers are just [src port][dst port][lenght][checksum]. There pretty much isn't anything you already don't know, system calls don't give you, or you can't compute easily.