You could put the code that calls pcap_dispatch() in a separate single-
threaded process and communicate with your multithreaded application via
an IPC mechanism such as pipes or shared memory.

-brian


On Thu, Jul 19, 2001 at 07:47:35AM +1200, Joerg Micheel wrote:
> Privjet Andrey,
> 
> On Wed, Jul 18, 2001 at 04:27:39PM +0400, Andrey Simonenko wrote:
> > Is it possible to use libpcap with pthreads?
> > (I want to use just pcap_dispatch() function)
> 
> I very much doubt so. It's not possible to use it in any kind of
> multithreaded applications, even with select() scenarios. They
> implement the Highlander principle - there can be only one (pcap).
> Sad.
> 

-- 
Brian O'Shea
<[EMAIL PROTECTED]>

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to