tcpdump mailing list archives

Re: Multi process sniffing and dropped packets


From: "Gianluca Varenni" <gianluca.varenni () cacetech com>
Date: Fri, 13 Jan 2006 08:42:16 -0800


----- Original Message ----- From: "Guy Harris" <guy () alum mit edu>
To: <tcpdump-workers () lists tcpdump org>
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 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 until the next call to pcap_next_ex, pcap_close (or pcap_loop/dispatch).

He's talking about multiple processes, not multiple threads, so each process would have its own pcap_t handle.

That's why I said "thread-safe". He was asking "multi process (or maybe multi thread)".

Maybe I was not clear enough.

GV



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


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


Current thread: