From owner-cvs-src@FreeBSD.ORG Mon Jul 25 17:23:01 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4689416A41F; Mon, 25 Jul 2005 17:23:01 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1C3C43D48; Mon, 25 Jul 2005 17:23:00 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j6PHMw30014412; Mon, 25 Jul 2005 10:22:58 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j6PHMwjX014411; Mon, 25 Jul 2005 10:22:58 -0700 Date: Mon, 25 Jul 2005 10:22:58 -0700 From: Brooks Davis To: Sam Leffler Message-ID: <20050725172258.GB7590@odin.ac.hmc.edu> References: <200507241721.j6OHLImZ032073@repoman.freebsd.org> <20050724172508.GA15547@freefall.freebsd.org> <42E3DB49.4070704@errno.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZfOjI3PrQbgiZnxM" Content-Disposition: inline In-Reply-To: <42E3DB49.4070704@errno.com> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, "Christian S.J. Peron" , cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/net bpf.c bpfdesc.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2005 17:23:01 -0000 --ZfOjI3PrQbgiZnxM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 24, 2005 at 11:17:45AM -0700, Sam Leffler wrote: > Christian S.J. Peron wrote: > >On Sun, Jul 24, 2005 at 05:21:18PM +0000, Christian S.J. Peron wrote: > > > >>csjp 2005-07-24 17:21:18 UTC > >> > >> FreeBSD src repository > >> > >> Modified files: > >> sys/net bpf.c bpfdesc.h=20 > >> Log: > >> Introduce new sysctl variable: net.bpf.stats. This sysctl variable can > >> be used to pass statistics regarding dropped, matched and received > >> packet counts from the kernel to user-space. While we are here > >> introduce a new counter for filtered or matched packets. We currently > >> keep track of packets received or dropped by the bpf device, but not > >> how many packets actually matched the bpf filter. > >>=20 > > > > > >I have a userspace program to display these stats: > > > >http://people.freebsd.org/~csjp/bpfstat.1122182321.shar > > > >An example of the output is: > > > >$ bpfstat > > pid netif flags recv drop match sblen hblen command > >10750 rl0 p--s- 260 0 260 2426 0 tcpdump > >$ > > > >I plan to move this into base, but I would like some people > >to test/review it first. > > >=20 > There are numerous little programs like this looking for a common home.= =20 > I suggest you stick your program in the tools area until we can=20 > resolve where to integrate them. I've wanted to overhaul netstats in a= =20 > manner similar to ifconfig so it's easy to add code like this and/or=20 > write these as modules that are dynamically loaded (e.g. so vendors can= =20 > distribute add-ons). Work is underway on cleaning up the libkvm bits of netstat at the moment so now is not the best time for major surgery. I do agree that a modular rewrite similar to ifconfig is the way to go. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --ZfOjI3PrQbgiZnxM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFC5R/xXY6L6fI4GtQRAqKeAJ4h9jA/RjSfSw0zYFm+vpFUp1oc5wCgxGlZ n2D0pvtCGI7PQUDNALymJTk= =oe5j -----END PGP SIGNATURE----- --ZfOjI3PrQbgiZnxM--