tcpdump mailing list archives

Re: pcap_inject displaying in pcap_loop


From: Eloy Paris <peloy () chapus net>
Date: Thu, 31 May 2007 15:41:57 -0400

On Tue, May 29, 2007 at 07:53:20PM -0600, David Vos wrote:

I am using libpcap-0.9.5 on Mac OS 10.4.9.

I have a pcap_loop() handler which displays the packets I receive.

If I call pcap_inject(), then shortly after call pcap_loop(), the
injected packet is displayed by pcap_loop.

I tried to get around this by using pcap_setdirection(PCAP_D_IN), and
while outgoing packets from the OS did not display in the pcap_loop(),
the injected packet still did.

Is there a way I can inject a packet with pcap_inject() and not see it
display from pcap_loop()?

Don't use promiscuous mode or use a PCAP filter that discards the
packets you're injecting.

Cheers,

Eloy.-
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: