tcpdump mailing list archives
Re: Thread safe?
From: "Lance Uyehara" <lance () verniernetworks com>
Date: Fri, 21 May 2004 14:32:47 -0700
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.
Current thread:
- Re: Thread safe? Lance Uyehara (May 21)