From owner-freebsd-hackers Thu Jul 19 1:47:31 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from marine.sonic.net (marine.sonic.net [208.201.224.37]) by hub.freebsd.org (Postfix) with SMTP id 8853337B403 for ; Thu, 19 Jul 2001 01:47:28 -0700 (PDT) (envelope-from gharris@sonic.net) Received: (qmail 11673 invoked from network); 19 Jul 2001 08:47:28 -0000 Received: from buzz.sonic.net (208.201.224.78) by marine.sonic.net with SMTP; 19 Jul 2001 08:47:28 -0000 Received: from quadrajet.sonic.net (adsl-209-204-185-65.sonic.net [209.204.185.65]) by buzz.sonic.net (8.11.2/8.8.5) with ESMTP id f6J8lSJ10618; Thu, 19 Jul 2001 01:47:28 -0700 X-envelope-info: Received: (from guy@localhost) by quadrajet.sonic.net (8.9.3/8.9.3) id BAA00380; Thu, 19 Jul 2001 01:47:25 -0700 (PDT) (envelope-from gharris) Date: Thu, 19 Jul 2001 01:47:25 -0700 From: Guy Harris To: Joerg Micheel Cc: Andrey Simonenko , freebsd-hackers@freebsd.org Subject: Re: libpcap and pthreads Message-ID: <20010719014725.A344@quadrajet.sonic.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i 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 > > 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. That's a BPF problem, not a libpcap problem; see PR kern/22063 "bpf when used with the select system call with timeout doesn't forward packets on timeout", which includes a patch (although it's uuencoded and, at least when you view that PR over the Web, the uuencoded text doesn't appear to be valid). To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message