Re: [tcpdump-workers] Multi process sniffing and dropped packets

2006-01-12 Thread Robert Lowe
Gianluca Varenni wrote: BUT..is pcap library able to manage safety multi process (or maybe multi thread) calls with the same pcap_t handle in each process ? No. The pcap_t handle is not guaranteed to be thread-safe. Specifically, every packet returned by pcap_next (or pcap_next_ex) is valid

Re: [tcpdump-workers] Multi process sniffing and dropped packets

2006-01-12 Thread Rick Jones
[EMAIL PROTECTED] wrote: 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

Re: [tcpdump-workers] Multi process sniffing and dropped packets

2006-01-12 Thread Guy Harris
On Jan 12, 2006, at 3:11 PM, computational_complex- [EMAIL PROTECTED] wrote: - every process executes an infinite loop in which pcap_next() is called. - every process executes a pcap_loop() call. So does each process execute a pcap_open_live() call? Or do you do that in the main process an

Re: [tcpdump-workers] Multi process sniffing and dropped packets

2006-01-12 Thread Guy Harris
On Jan 12, 2006, at 5:03 PM, Michael Richardson wrote: You could perhaps, do just load the filter and fork. You'd be sharing the same file descriptor, and if your kernel returns one-packet-per-read (some mmap'ed interfaces do not!), Some non-mmapped interfaces don't, either, e.g. BPF on v

Re: [tcpdump-workers] Multi process sniffing and dropped packets

2006-01-12 Thread Guy Harris
On Jan 12, 2006, at 3:29 PM, Gianluca Varenni wrote: BUT..is pcap library able to manage safety multi process (or maybe multi thread) calls with the same pcap_t handle in each process ? No. The pcap_t handle is not guaranteed to be thread-safe. Specifically, every packet returned by pcap_ne

Re: [tcpdump-workers] Multi process sniffing and dropped packets

2006-01-12 Thread Michael Richardson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > "computational" == computational complex-forthespam <[EMAIL PROTECTED]> > writes: computational> - every process executes an infinite loop in which computational> pcap_next() is called. - every process executes a computational>

Re: [tcpdump-workers] Multi process sniffing and dropped packets

2006-01-12 Thread Gianluca Varenni
- Original Message - From: <[EMAIL PROTECTED]> To: Sent: Thursday, January 12, 2006 3:11 PM Subject: [tcpdump-workers] Multi process sniffing and dropped packets Hi people! I'm writing a sniffer with libpcap 0.9.3 that gets packets and makes some cpu-intensive work with those. I wan

[tcpdump-workers] Multi process sniffing and dropped packets

2006-01-12 Thread computational_complex-forthespam
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

Re: [tcpdump-workers] where to get libpcap-ng?

2006-01-12 Thread Michael Richardson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > "Gianluca" == Gianluca Varenni <[EMAIL PROTECTED]> writes: >>> "Guy" == Guy Harris <[EMAIL PROTECTED]> writes: >> >> Are there any plans to implement this standard in libpcap? Guy> At some point I plan to implement support for r