6b463eed3a
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.
29 lines
505 B
Makefile
29 lines
505 B
Makefile
# @(#)Makefile 8.1 (Berkeley) 6/12/93
|
|
# $FreeBSD$
|
|
|
|
PROG= netstat
|
|
SRCS= if.c inet.c inet6.c main.c mbuf.c mcast.c mroute.c route.c \
|
|
unix.c atalk.c netgraph.c mroute6.c ipsec.c bpf.c
|
|
|
|
WARNS?= 2
|
|
NO_WERROR=
|
|
|
|
CFLAGS+=-DIPSEC
|
|
.if !defined(NO_INET6)
|
|
CFLAGS+=-DINET6
|
|
.endif
|
|
|
|
BINGRP= kmem
|
|
BINMODE=2555
|
|
DPADD= ${LIBKVM} ${LIBMEMSTAT} ${LIBNETGRAPH} ${LIBUTIL}
|
|
LDADD= -lkvm -lmemstat -lnetgraph -lutil
|
|
|
|
.if !defined(NO_IPX)
|
|
SRCS+= ipx.c
|
|
DPADD+= ${LIBIPX}
|
|
LDADD+= -lipx
|
|
CFLAGS+=-DIPX
|
|
.endif
|
|
|
|
.include <bsd.prog.mk>
|