On Nov 1, 2004, at 12:32 PM, Venkatramani, Bharath wrote:

Ok I have a question regarding sending packets. Basically, when I receive a
packet, I strip it down and get only the information that is important to me
- IP and (UDP or TCP) headers, the data, and the trailer (if there is any).
Now, if another application hands me this exact information (ie. IP and (UDP
or TCP) headers, the data, and the trailer) in 1 packet in binary format,
can I just use pcap_sendpacket() to send that packet out? Thanks.

No, you have to add a link-layer header appropriate for the type of network on which you're sending the packet. libpcap/WinPcap isn't oriented towards IP, it's oriented towards link-layer access to the network.




==================================================================
This is the WinPcap users list. It is archived at
http://www.mail-archive.com/[EMAIL PROTECTED]/

To unsubscribe use mailto: [EMAIL PROTECTED]
==================================================================

Reply via email to