Re: [tcpdump-workers] pcap_stats
On Fri, May 21, 2004 at 02:06:57AM -0700, Guy Harris wrote: The DLPI code should *probably* add the dropped-packet count to the packets-received count, so as to reduce the differences between statistics (although it doesn't eliminate them - the right long-term fix is probably to introduce a new API that returns a set of tagged statistics values, so that if a given statistic can't be gotten from the packet capture mechanism it's not supplied by the API, so applications know what information they're getting). I've checked into the main and 0.8 branches of the libpcap CVS tree a change to do that. - This is the tcpdump-workers list. Visit https://lists.sandelman.ca/ to unsubscribe.
Re: [tcpdump-workers] Thread safe?
Is there a thread safe version of libpcap around? I have pcap programs which include hostnames, i.e dst host blahblah.com and if multiple pcap programs fail to resolve the hostname then I sometimes get a core. I've looked at the source and I believe the problem is there are so many static variables in libpcap that it really does not work multi-threaded. The compiler *definitely* doesn't work multi-threaded; are you implying that you have multiple threads doing pcap_compile()? I used to, but I'm now wrapping a mutex around the call. Thanks for the response, -Lance - This is the tcpdump-workers list. Visit https://lists.sandelman.ca/ to unsubscribe.