From owner-freebsd-hackers Mon Jul 23 0:57:46 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from relay1.ntu-kpi.kiev.ua (www.ntu-kpi.kiev.ua [212.111.192.161]) by hub.freebsd.org (Postfix) with ESMTP id D223637B403 for ; Mon, 23 Jul 2001 00:57:40 -0700 (PDT) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from comsys.ntu-kpi.kiev.ua (eth0.comsys.ntu-kpi.kiev.ua [10.0.1.184]) by relay1.ntu-kpi.kiev.ua (Postfix) with ESMTP id EB7F32EF02; Mon, 23 Jul 2001 10:57:32 +0300 (EEST) Received: from pm5149 (pm514-9.comsys.ntu-kpi.kiev.ua [10.18.54.109]) by comsys.ntu-kpi.kiev.ua (8.11.3/8.11.3) with SMTP id f6N7vwt46298; Mon, 23 Jul 2001 10:58:00 +0300 (EEST) Message-ID: <002101c11344$531b81a0$6d36120a@comsys.ntukpi.kiev.ua> From: "Andrey Simonenko" To: , References: <012001c10f85$08ae6b40$6d36120a@comsys.ntukpi.kiev.ua> <20010719074735.H94236@cs.waikato.ac.nz> <20010719090240.R489@ricochet.net> Subject: Re: libpcap and pthreads Date: Mon, 23 Jul 2001 10:54:28 +0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thanks to all who answered my question about libpcap and pthreads. I forgot to say that I want to have the answer on the same question for OpenBSD and NetBSD (for all *BSD, which my port sysutils/ipa supports), but the answer for FreeBSD is enough. An idea to call pcap_dispatch() in a separate single-threaded process and communicate with multithreaded application via SysV IPC is good and probably can be used for my purpose. ----- Original Message ----- From: Brian O'Shea Newsgroups: lucky.freebsd.hackers Sent: Thursday, July 19, 2001 8:10 PM Subject: Re: libpcap and pthreads > 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. > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message