tcpdump mailing list archives

Re: Multi process sniffing and dropped packets


From: Guy Harris <guy () alum mit edu>
Date: Thu, 12 Jan 2006 17:17:59 -0800


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.

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


Current thread: