tcpdump mailing list archives

Re: pcap_sendpacket() function implementation for


From: Guy Harris <guy () alum mit edu>
Date: Mon, 18 Feb 2008 10:41:41 -0800

Gaurav Garg wrote:

I am currently working on porting some of the packet driver code from Windows to Linux. I am left with the *pcap_sendpacket()* function. I searched through the archive on the website, but could not find the implementation of this function in pcap-linux.c file.

If you have libpcap 0.9.1 or later, pcap_sendpacket() is in pcap.c. It, and pcap_inject(), both just call the function pointed to by the inject_op member of the pcap_t structure.

That pointer is set, in pcap_open_live(), to point to the appropriate function. In the pcap_open_live() in pcap_linux.c, it's set to point to the pcap_inject_linux() function.
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: