tcpdump mailing list archives
Re: libpcap linux direction
From: Aaron Turner <synfinatic () gmail com>
Date: Fri, 27 Mar 2009 22:38:04 -0700
On Thu, Mar 26, 2009 at 7:35 AM, David H. Lynch Jr. <dhlii () dlasys net> wrote:
I am using libpcap under linux as a pseudo NIC for an embeded system emulator. I have no difficulty trapping a linux interface and sending and receiving packets to the outside net. However, I am unable to send/receive packets to the IP of the interface I am trapping. I have tried adding a pcap_setdirection(pd, PCAP_D_INOUT) which succeeds but changes nothing.
Correct. You can't send traffic out an interface and expect it to be delivered to the same host. It doesn't work that way. pcap_setdirection() is for limiting what packets are *read* by libpcap and has nothing with packet injection. -- Aaron Turner http://synfin.net/ http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- libpcap linux direction David H. Lynch Jr. (Mar 26)
- Re: libpcap linux direction Aaron Turner (Mar 27)
- Re: libpcap linux direction David H. Lynch Jr. (Mar 28)
- Re: libpcap linux direction Aaron Turner (Mar 30)
- Re: libpcap linux direction David H. Lynch Jr. (Mar 28)
- Re: libpcap linux direction Aaron Turner (Mar 27)