tcpdump mailing list archives

Multi process sniffing and dropped packets


From: <computational_complex-forthespam () yahoo it>
Date: Fri, 13 Jan 2006 00:11:20 +0100 (CET)

Hi people!
I'm writing a sniffer with libpcap 0.9.3 that gets
packets and makes some cpu-intensive work with those.
I want to use a multi process architecture (rather
than a multi thread one) because i want to distribute
work on multiple processor; so i thought two way to do
this:

- every process executes an infinite loop in which
pcap_next() is called.
- every process executes a pcap_loop() call.

BUT..is pcap library able to manage safety multi
process (or maybe multi thread) calls with the same
pcap_t handle in each process ?

Any suggestion?

Anyway, i would like to know how ps_drop in struct
pcap_stat is calculated;
is this the number of packets that the network card
drops? Or does it count pcap library dropped packets?
If it's in the latter case, why the lib drops 
packets? Is there a buffer full? Can i enlarge this
buffer?

Thanks to everyone.

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


Current thread: