source: rtems-libbsd/freebsd-userspace/commands/usr.bin/netstat/netstat.h @ 5f600dd

4.1155-freebsd-126-freebsd-12freebsd-9.3
Last change on this file since 5f600dd was 5f600dd, checked in by Joel Sherrill <joel.sherrill@…>, on 10/24/12 at 20:40:19

netstat: Enable use of kvm again

The code committed has some debug information enabled. It ends with
an odd reference to address 0x1.

  • Property mode set to 100644
File size: 6.5 KB
Line 
1/*-
2 * Copyright (c) 1992, 1993
3 *      Regents of the University of California.  All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 *    notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 *    notice, this list of conditions and the following disclaimer in the
12 *    documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 *    must display the following acknowledgement:
15 *      This product includes software developed by the University of
16 *      California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
18 *    may be used to endorse or promote products derived from this software
19 *    without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 *      @(#)netstat.h   8.2 (Berkeley) 1/4/94
34 * $FreeBSD$
35 */
36
37#include <sys/cdefs.h>
38#ifdef __rtems__
39#define __BSD_VISIBLE 1
40#include <freebsd/sys/types.h>
41#endif
42
43extern int      Aflag;  /* show addresses of protocol control block */
44extern int      aflag;  /* show all sockets (including servers) */
45extern int      bflag;  /* show i/f total bytes in/out */
46extern int      dflag;  /* show i/f dropped packets */
47extern int      gflag;  /* show group (multicast) routing or stats */
48extern int      hflag;  /* show counters in human readable format */
49extern int      iflag;  /* show interfaces */
50extern int      Lflag;  /* show size of listen queues */
51extern int      mflag;  /* show memory stats */
52extern int      noutputs;       /* how much outputs before we exit */
53extern int      numeric_addr;   /* show addresses numerically */
54extern int      numeric_port;   /* show ports numerically */
55extern int      rflag;  /* show routing tables (or routing stats) */
56extern int      sflag;  /* show protocol statistics */
57extern int      tflag;  /* show i/f watchdog timers */
58extern int      Wflag;  /* wide display */
59extern int      xflag;  /* extended display, includes all socket buffer info */
60extern int      zflag;  /* zero stats */
61
62extern int      interval; /* repeat interval for i/f stats */
63
64extern char     *interface; /* desired i/f for stats, or NULL for all i/fs */
65extern int      unit;   /* unit number for above */
66
67extern int      af;     /* address family */
68extern int      live;   /* true if we are examining a live system */
69
70int     kread(u_long addr, void *buf, size_t size);
71const char *plural(uintmax_t);
72const char *plurales(uintmax_t);
73const char *pluralies(uintmax_t);
74
75int     sotoxsocket(struct socket *, struct xsocket *);
76void    protopr(u_long, const char *, int, int);
77void    tcp_stats(u_long, const char *, int, int);
78void    udp_stats(u_long, const char *, int, int);
79#ifdef SCTP
80void    sctp_protopr(u_long, const char *, int, int);
81void    sctp_stats(u_long, const char *, int, int);
82#endif
83void    arp_stats(u_long, const char *, int, int);
84void    ip_stats(u_long, const char *, int, int);
85void    icmp_stats(u_long, const char *, int, int);
86void    igmp_stats(u_long, const char *, int, int);
87void    pim_stats(u_long, const char *, int, int);
88void    carp_stats(u_long, const char *, int, int);
89void    pfsync_stats(u_long, const char *, int, int);
90#ifdef IPSEC
91void    ipsec_stats(u_long, const char *, int, int);
92void    esp_stats(u_long, const char *, int, int);
93void    ah_stats(u_long, const char *, int, int);
94void    ipcomp_stats(u_long, const char *, int, int);
95#endif
96
97#ifdef INET6
98void    ip6_stats(u_long, const char *, int, int);
99void    ip6_ifstats(char *);
100void    icmp6_stats(u_long, const char *, int, int);
101void    icmp6_ifstats(char *);
102void    pim6_stats(u_long, const char *, int, int);
103void    rip6_stats(u_long, const char *, int, int);
104void    mroute6pr(u_long, u_long);
105void    mrt6_stats(u_long);
106
107struct sockaddr_in6;
108struct in6_addr;
109char *routename6(struct sockaddr_in6 *);
110const char *netname6(struct sockaddr_in6 *, struct in6_addr *);
111void    inet6print(struct in6_addr *, int, const char *, int);
112#endif /*INET6*/
113
114#ifdef IPSEC
115void    pfkey_stats(u_long, const char *, int, int);
116#endif
117
118void    mbpr(void *, u_long);
119
120void    hostpr(u_long, u_long);
121void    impstats(u_long, u_long);
122
123void    intpr(int, u_long, void (*)(char *));
124
125void    pr_rthdr(int);
126void    pr_family(int);
127void    rt_stats(u_long, u_long);
128char    *ipx_pnet(struct sockaddr *);
129char    *ipx_phost(struct sockaddr *);
130char    *ns_phost(struct sockaddr *);
131void    upHex(char *);
132
133#ifdef __rtems__
134#define routename rtems_shell_netstats_routername
135#define netname rtems_shell_netstats_netname
136#define sotoxsocket rtems_shell_netstats_sotoxsocket
137#endif
138
139char    *routename(in_addr_t);
140char    *netname(in_addr_t, u_long);
141char    *atalk_print(struct sockaddr *, int);
142char    *atalk_print2(struct sockaddr *, struct sockaddr *, int);
143char    *ipx_print(struct sockaddr *);
144char    *ns_print(struct sockaddr *);
145void    routepr(u_long);
146
147void    ipxprotopr(u_long, const char *, int, int);
148void    spx_stats(u_long, const char *, int, int);
149void    ipx_stats(u_long, const char *, int, int);
150void    ipxerr_stats(u_long, const char *, int, int);
151
152void    nsprotopr(u_long, const char *, int, int);
153void    spp_stats(u_long, const char *, int, int);
154void    idp_stats(u_long, const char *, int, int);
155void    nserr_stats(u_long, const char *, int, int);
156
157void    atalkprotopr(u_long, const char *, int, int);
158void    ddp_stats(u_long, const char *, int, int);
159
160#ifdef NETGRAPH
161void    netgraphprotopr(u_long, const char *, int, int);
162#endif
163
164void    unixpr(u_long, u_long, u_long, u_long);
165
166void    esis_stats(u_long, const char *, int, int);
167void    clnp_stats(u_long, const char *, int, int);
168void    cltp_stats(u_long, const char *, int, int);
169void    iso_protopr(u_long, const char *, int, int);
170void    iso_protopr1(u_long, int);
171void    tp_protopr(u_long, const char *, int, int);
172void    tp_inproto(u_long);
173void    tp_stats(caddr_t, caddr_t);
174
175void    mroutepr(u_long, u_long, u_long);
176void    mrt_stats(u_long);
177void    bpf_stats(char *);
Note: See TracBrowser for help on using the repository browser.