[tcpdump-workers] Influence of pcap_open_live parameters on pcap_sendpacket

2011-08-16 Thread Doktor Bernd

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.
 
All the best,
Bernd -
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Re: [tcpdump-workers] Influence of pcap_open_live parameters on pcap_sendpacket

2011-08-16 Thread Aaron Turner
On Tue, Aug 16, 2011 at 5:10 AM, Doktor Bernd  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.


Re: [tcpdump-workers] Influence of pcap_open_live parameters on pcap_sendpacket

2011-08-16 Thread Guy Harris

On Aug 16, 2011, at 5:10 AM, Doktor Bernd wrote:

> 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?

For LAN hardware, the "promisc" argument to pcap_open_live() affects whether 
the interface is put in promiscuous mode; all handles will be in promiscuous 
mode if any are (or, for that matter, if any other process has turned on 
promiscuous mode directly rather than through libpcap).

> - Do the parameters influence pcap_sendpacket() in any way? From the 
> documentation I assume that they are only for capturing from that interface.

None of them should affect pcap_sendpacket() directly; perhaps running in 
promiscuous mode will, for example, cause the network adapter to be busier, 
which might slow down its sending of packets to some degree.-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Re: [tcpdump-workers] Running TCPDUMP over a web interface

2011-08-16 Thread Sanjay Sundaresan
web interface ? you can't SSH ?

On Sun, Aug 14, 2011 at 6:51 AM, Tek Bahadur Limbu  wrote:
> Hi all,
>
> I am not sure if this is a right list to post the following question.
>
> I need to run TCPDUMP on a Linux bridge with multiple network interfaces.
> However, instead of using a shell, I need to run it over a web interface.
>
> Any guide or suggestion will be highly appreciated.
>
>
> Thanking you...
> Best regards,
> Tek Bahadur Limbu
> -
> This is the tcpdump-workers list.
> Visit https://cod.sandelman.ca/ to unsubscribe.
>



-- 
Sanjay Sundaresan
Grad Student
Viterbi School of Engineering, USC
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.