xref: /original-bsd/usr.bin/netstat/netstat.h (revision 68d9582f)
1 /*
2  * Copyright (c) 1992 Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)netstat.h	5.2 (Berkeley) 05/27/92
8  */
9 
10 #include <sys/cdefs.h>
11 
12 int	Aflag;		/* show addresses of protocol control block */
13 int	aflag;		/* show all sockets (including servers) */
14 int	dflag;		/* show i/f dropped packets */
15 int	hflag;		/* show IMP host table */
16 int	iflag;		/* show interfaces */
17 int	mflag;		/* show memory stats */
18 int	nflag;		/* show addresses numerically */
19 int	pflag;		/* show given protocol */
20 int	rflag;		/* show routing tables (or routing stats) */
21 int	sflag;		/* show protocol statistics */
22 int	tflag;		/* show i/f watchdog timers */
23 
24 int	interval;	/* repeat interval for i/f stats */
25 
26 char	*interface;	/* desired i/f for stats, or NULL for all i/fs */
27 int	unit;		/* unit number for above */
28 
29 int	af;		/* address family */
30 
31 char	*prog;		/* program name */
32 
33 
34 int	kread __P((off_t addr, char *buf, int size));
35 char	*plural __P((int));
36 
37 void	protopr __P((off_t, char *));
38 void	tcp_stats __P((off_t, char *));
39 void	udp_stats __P((off_t, char *));
40 void	ip_stats __P((off_t, char *));
41 void	icmp_stats __P((off_t, char *));
42 void	protopr __P((off_t, char *));
43 
44 void	mbpr(off_t);
45 
46 void	hostpr __P((off_t, off_t));
47 void	impstats __P((off_t, off_t));
48 
49 void	pr_rthdr __P(());
50 void	pr_family __P((int));
51 void	rt_stats __P((off_t));
52 char	*ns_phost __P((struct sockaddr *));
53 void	upHex __P((char *));
54 
55 char	*routename __P((u_long));
56 char	*netname __P((u_long, u_long));
57 char	*ns_print __P((struct sockaddr *));
58 void	routepr __P((off_t));
59 
60 void	nsprotopr __P((off_t, char *));
61 void	spp_stats __P((off_t, char *));
62 void	idp_stats __P((off_t, char *));
63 void	nserr_stats __P((off_t, char *));
64 void	ns_erputil __P((int, int));
65 
66 void	intpr __P((int, off_t));
67 
68 void	unixpr __P((struct protosw *));
69 
70 void	esis_stats __P((off_t, char *));
71 void	clnp_stats __P((off_t, char *));
72 void	cltp_stats __P((off_t, char *));
73 void	iso_protopr __P((off_t, char *));
74 void	tp_stats __P((caddr_t, caddr_t));
75