ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] Query Regarding RAW SOCKET receiving

From: "sara vanan" <saravananbeitjj@xxxxxxxxx>
Date: Thu, 8 Mar 2007 15:13:44 +0900
 
 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