From owner-freebsd-hackers Wed Apr 4 5:57:28 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from cdc.net (server1.cdc.net [207.244.0.12]) by hub.freebsd.org (Postfix) with SMTP id 1649937B722 for ; Wed, 4 Apr 2001 05:57:21 -0700 (PDT) (envelope-from mwade@cdc.net) Received: (qmail 2383 invoked from network); 4 Apr 2001 12:55:16 -0000 Received: from unknown (HELO net-ninja.com) (207.244.6.200) by server1.cdc.net with SMTP; 4 Apr 2001 12:55:16 -0000 Received: by net-ninja.com (Postfix, from userid 1000) id 282506E8D0; Wed, 4 Apr 2001 08:55:14 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by net-ninja.com (Postfix) with ESMTP id D582A176020; Wed, 4 Apr 2001 08:55:14 -0400 (EDT) Date: Wed, 4 Apr 2001 08:55:14 -0400 (EDT) From: Mike Wade X-Sender: mwade@fxp0.net-ninja.com To: Andrey Simonenko Cc: freebsd-hackers@freebsd.org Subject: Re: Is it possible to use some BPF filters in one process, in some threads? In-Reply-To: <007801c0bcd6$90784c00$6d36120a@comsys.ntukpi.kiev.ua> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 4 Apr 2001, Andrey Simonenko wrote: > So, here is my question. Is it possible to use some pcap_dispatch(3) > functions in one process? I need to use pcap_dispatch(3) only for > counting number of bytes, I don't need to check network packets. Why not use ipfw's count command instead? Example: [root@net-ninja]:~> ipfw add 10 count ip from any to 192.168.1.1 in recv fxp0 [root@net-ninja]:~> ipfw add 11 count ip from 192.168.1.1 to any out xmit fxp0 [root@net-ninja]:~> ipfw show 10 11 00010 7 430 count ip from any to 192.168.1.1 in recv fxp0 00011 2 187 count ip from 192.168.1.1 to any out xmit fxp0 Second column reports packets xfered, thrid column reports bytes xfered. --- Mike Wade (mwade@cdc.net) Chief Technical Officer CDC Internet, Inc. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message