cvs commit: src/usr.bin/netstat Makefile bpf.c main.c netstat.1 netstat.h

Christian S.J. Peron csjp at FreeBSD.org
Wed Sep 7 10:35:17 PDT 2005


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


More information about the cvs-all mailing list