tcpdump mailing list archives

Re: any way to write datalink packets?


From: Guy Harris <guy () alum mit edu>
Date: Sun, 19 Feb 2006 22:26:13 -0800

kashif javed wrote:

As pointed out by Richard Stevens in the chapter 26 of
his book " UNIX Network Programming vol1: 2nd
edition", pcap supports packets while reading. I want to
ask is there any way to write datalink packets?

Libpcap 0.9.x has pcap_inject() and pcap_sendpacket() to send packets. WinPcap has had pcap_sendpacket() for a while.

I mean
if an application sends out a packet, can it be captured
by the pcap?

That's a completely different question.

Whether pcap will see the packets sent by pcap on the same machine might depend on the OS you're running. It should be able to see packets sent by pcap on machines on other machines, as those packets are indistinguishable from packets sent by other mechanisms.

Moreover , can i use pcap for capturing packets on
IEEE 802.11 or WLAN,

Yes, but it doesn't support it very well on OSes other than Linux and newer versions of the BSDs.
-
This is the tcpdump-workers list.
Visit https://lists.sandelman.ca/ to unsubscribe.


Current thread: