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

2006-01-21 Thread computational_complex-forthespam
--- Rick Jones <[EMAIL PROTECTED]> ha scritto: > _Clusters_?!? That is a rather important detail... > Somehow I seriously doubt that a libpcap application > can span nodes in a > computational cluster. At least not the stuff doing > the promiscuous mode bits. We used the pcaps for a prototype

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

2006-01-17 Thread Rick Jones
I would choose threads but my "boss" prefers processes; he said computation parallelizing mechanism (in his cluster) don't work well with threads as it does with processes; i don't know if is true, now i'll implement my software with processes and then with posix threads; so i'll "taste" performan

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

2006-01-14 Thread computational_complex-forthespam
Thanks everybody for replies! --- Gianluca Varenni <[EMAIL PROTECTED]> ha scritto: > Uhm, what is the problem with multithreading? I > think that all the modern > OSes schedule on a per thread basis (or better, at > least they schedule the > different threads of a process on different CPUs). I

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

2006-01-13 Thread Gianluca Varenni
- Original Message - From: "Guy Harris" <[EMAIL PROTECTED]> To: Sent: Thursday, January 12, 2006 5:17 PM Subject: Re: [tcpdump-workers] Multi process sniffing and dropped packets On Jan 12, 2006, at 3:29 PM, Gianluca Varenni wrote: BUT..is pcap library able

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 wi

[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