From owner-freebsd-hackers Thu Jul 19 9: 9:44 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mx01-a.netapp.com (mx01-a.netapp.com [198.95.226.53]) by hub.freebsd.org (Postfix) with ESMTP id 86BCB37B405 for ; Thu, 19 Jul 2001 09:09:41 -0700 (PDT) (envelope-from boshea@netapp.com) Received: from frejya.corp.netapp.com (frejya.corp.netapp.com [10.10.20.91]) by mx01-a.netapp.com (8.11.1/8.11.1/NTAP-1.2) with ESMTP id f6JG2gX26249; Thu, 19 Jul 2001 09:02:42 -0700 (PDT) Received: from shaolin.hq.netapp.com (localhost [127.0.0.1]) by frejya.corp.netapp.com (8.11.1/8.11.1/NTAP-1.2) with ESMTP id f6JG2fc12361; Thu, 19 Jul 2001 09:02:41 -0700 (PDT) Received: (from boshea@localhost) by shaolin.hq.netapp.com (8.9.3/8.9.3) id JAA17767; Thu, 19 Jul 2001 09:02:40 -0700 (PDT) (envelope-from boshea) Date: Thu, 19 Jul 2001 09:02:40 -0700 From: "Brian O'Shea" To: Joerg Micheel Cc: Andrey Simonenko , freebsd-hackers@FreeBSD.ORG Subject: Re: libpcap and pthreads Message-ID: <20010719090240.R489@ricochet.net> Reply-To: boshea@ricochet.net Mail-Followup-To: Brian O'Shea , Joerg Micheel , Andrey Simonenko , freebsd-hackers@FreeBSD.ORG References: <012001c10f85$08ae6b40$6d36120a@comsys.ntukpi.kiev.ua> <20010719074735.H94236@cs.waikato.ac.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <20010719074735.H94236@cs.waikato.ac.nz>; from joerg@cs.waikato.ac.nz on Thu, Jul 19, 2001 at 07:47:35AM +1200 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 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message