From owner-cvs-src@FreeBSD.ORG Wed Sep 7 17:35:17 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 3A56516A41F; Wed, 7 Sep 2005 17:35:17 +0000 (GMT) (envelope-from csjp@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD7AF43D49; Wed, 7 Sep 2005 17:35:16 +0000 (GMT) (envelope-from csjp@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j87HZGmA050208; Wed, 7 Sep 2005 17:35:16 GMT (envelope-from csjp@repoman.freebsd.org) Received: (from csjp@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j87HZGQB050207; Wed, 7 Sep 2005 17:35:16 GMT (envelope-from csjp) Message-Id: <200509071735.j87HZGQB050207@repoman.freebsd.org> From: "Christian S.J. Peron" Date: Wed, 7 Sep 2005 17:35:16 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/usr.bin/netstat Makefile bpf.c main.c netstat.1 netstat.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: Wed, 07 Sep 2005 17:35:17 -0000 csjp 2005-09-07 17:35:16 UTC FreeBSD src repository Modified files: usr.bin/netstat Makefile main.c netstat.1 netstat.h Added files: usr.bin/netstat bpf.c Log: Merge bpfstat's functionality into the netstat(1) utility. This adds a -B option which causes bpf peers to be printed. This option can be used in conjunction with -I if information about specific interfaces is desired. This is similar to what NetBSD added to their version of netstat. $ netstat -B Pid Netif Flags Recv Drop Match Sblen Hblen Command 1137 lo0 p--s-- 0 0 0 0 0 tcpdump 205 sis0 -ifs-l 37331 0 1 0 0 dhclient $ $ netstat -I lo0 -B Pid Netif Flags Recv Drop Match Sblen Hblen Command 1174 lo0 p--s-- 0 0 0 0 0 tcpdump $ -Add bpf.c which stores all the code for retrieving and parsing bpf related statistics. -Modify main.c to add support for the -B option and hook it into the program logic. -Add bpf.c to the build. -Document this new functionality in the man page and bump the revision date. -Add prototype for bpf_stats function. Revision Changes Path 1.30 +1 -1 src/usr.bin/netstat/Makefile 1.1 +119 -0 src/usr.bin/netstat/bpf.c (new) 1.76 +9 -1 src/usr.bin/netstat/main.c 1.53 +14 -1 src/usr.bin/netstat/netstat.1 1.44 +1 -0 src/usr.bin/netstat/netstat.h