On Tue, Aug 16, 2011 at 5:10 AM, Doktor Bernd <doktorbe...@hotmail.com> wrote:
>
> Hi,
>
> I am trying to optimize my program by adjusting the parameters of 
> pcap_open_live().
>
> In my program, I am opening the same interface twice and use one handle in a 
> thread for capturing packets and the other handle in a second thread for 
> writing
>
> Two questions:
> - Do the two pcap_open_live() calls influence the hardware in anyway and have 
> side effects on each other or are they bound to the handle and I can rely on 
> the parameters I give to be set?
> - Do the parameters influence pcap_sendpacket() in any way? From the 
> documentation I assume that they are only for capturing from that interface.

I haven't seen any issues with reading & writing on the same interface
with libpcap.  The two handles operate independently with one caveat:
Packets you send are likely to been seen on the way out by the
listening pcap handle so you may want to filter them out (perhaps
filtering on source MAC).

-- 
Aaron Turner
http://synfin.net/         Twitter: @synfinatic
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
"carpe diem quam minimum credula postero"
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.

Reply via email to