Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Apr 2001 08:55:14 -0400 (EDT)
From:      Mike Wade <mwade@cdc.net>
To:        Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Is it possible to use some BPF filters in one process, in some threads?
Message-ID:  <Pine.BSF.4.21.0104040849190.24669-100000@fxp0.net-ninja.com>
In-Reply-To: <007801c0bcd6$90784c00$6d36120a@comsys.ntukpi.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0104040849190.24669-100000>