I am Saravanan working as a C programmer in India. Now Working in Socket programming under LINUX.
I want to receive the raw packet with the header inormation
programatically using C. With that RAW PACKET I want to get the
Destination IP address stored in header.
I had searched the internet but I could not able to find the exact information.
With this mail I had attached the files for RAW socket sending and receiving.
sock=socket(AF_INET, SOCK_RAW, IPPROTO_UDP);
for this the destination IP address is received. But instead of IPPROTO_UDP if I use IPPROTO_RAW there is no output for this.
It is my request and kindly help me regarding this.
Thanks
D. Saravanan
Attachment:
rawpacket.rar
Description: Binary data