source: rtems-libbsd/freebsd/usr.bin/netstat/netstat.h @ e599318

4.115-freebsd-12freebsd-9.3
Last change on this file since e599318 was e599318, checked in by Sebastian Huber <sebastian.huber@…>, on Oct 9, 2013 at 8:52:54 PM

Update files to match FreeBSD layout

Add compatibility with Newlib header files. Some FreeBSD header files
are mapped by the translation script:

o rtems/bsd/sys/_types.h
o rtems/bsd/sys/errno.h
o rtems/bsd/sys/lock.h
o rtems/bsd/sys/param.h
o rtems/bsd/sys/resource.h
o rtems/bsd/sys/time.h
o rtems/bsd/sys/timespec.h
o rtems/bsd/sys/types.h
o rtems/bsd/sys/unistd.h

It is now possible to include <sys/socket.h> directly for example.

Generate one Makefile which builds everything including tests.

  • 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
39extern int      Aflag;  /* show addresses of protocol control block */
40extern int      aflag;  /* show all sockets (including servers) */
41extern int      bflag;  /* show i/f total bytes in/out */
42extern int      dflag;  /* show i/f dropped packets */
43extern int      gflag;  /* show group (multicast) routing or stats */
44extern int      hflag;  /* show counters in human readable format */
45extern int      iflag;  /* show interfaces */
46extern int      Lflag;  /* show size of listen queues */
47extern int      mflag;  /* show memory stats */
48extern int      noutputs;       /* how much outputs before we exit */
49extern int      numeric_addr;   /* show addresses numerically */
50extern int      numeric_port;   /* show ports numerically */
51extern int      rflag;  /* show routing tables (or routing stats) */
52extern int      sflag;  /* show protocol statistics */
53extern int      tflag;  /* show i/f watchdog timers */
54extern int      Wflag;  /* wide display */
55extern int      xflag;  /* extended display, includes all socket buffer info */
56extern int      zflag;  /* zero stats */
57
58extern int      interval; /* repeat interval for i/f stats */
59
60extern char     *interface; /* desired i/f for stats, or NULL for all i/fs */
61extern int      unit;   /* unit number for above */
62
63extern int      af;     /* address family */
64extern int      live;   /* true if we are examining a live system */
65
66int     kread(u_long addr, void *buf, size_t size);
67const char *plural(uintmax_t);
68const char *plurales(uintmax_t);
69const char *pluralies(uintmax_t);
70
71int     sotoxsocket(struct socket *, struct xsocket *);
72void    protopr(u_long, const char *, int, int);
73void    tcp_stats(u_long, const char *, int, int);
74void    udp_stats(u_long, const char *, int, int);
75#ifdef SCTP
76void    sctp_protopr(u_long, const char *, int, int);
77void    sctp_stats(u_long, const char *, int, int);
78#endif
79void    arp_stats(u_long, const char *, int, int);
80void    ip_stats(u_long, const char *, int, int);
81void    icmp_stats(u_long, const char *, int, int);
82void    igmp_stats(u_long, const char *, int, int);
83void    pim_stats(u_long, const char *, int, int);
84void    carp_stats(u_long, const char *, int, int);
85void    pfsync_stats(u_long, const char *, int, int);
86#ifdef IPSEC
87void    ipsec_stats(u_long, const char *, int, int);
88void    esp_stats(u_long, const char *, int, int);
89void    ah_stats(u_long, const char *, int, int);
90void    ipcomp_stats(u_long, const char *, int, int);
91#endif
92
93#ifdef INET6
94void    ip6_stats(u_long, const char *, int, int);
95void    ip6_ifstats(char *);
96void    icmp6_stats(u_long, const char *, int, int);
97void    icmp6_ifstats(char *);
98void    pim6_stats(u_long, const char *, int, int);
99void    rip6_stats(u_long, const char *, int, int);
100void    mroute6pr(u_long, u_long);
101void    mrt6_stats(u_long);
102
103struct sockaddr_in6;
104struct in6_addr;
105char *routename6(struct sockaddr_in6 *);
106const char *netname6(struct sockaddr_in6 *, struct in6_addr *);
107void    inet6print(struct in6_addr *, int, const char *, int);
108#endif /*INET6*/
109
110#ifdef IPSEC
111void    pfkey_stats(u_long, const char *, int, int);
112#endif
113
114void    mbpr(void *, u_long);
115
116void    hostpr(u_long, u_long);
117void    impstats(u_long, u_long);
118
119void    intpr(int, u_long, void (*)(char *));
120
121void    pr_rthdr(int);
122void    pr_family(int);
123void    rt_stats(u_long, u_long);
124char    *ipx_pnet(struct sockaddr *);
125char    *ipx_phost(struct sockaddr *);
126char    *ns_phost(struct sockaddr *);
127void    upHex(char *);
128
129#ifdef __rtems__
130#define rt_tables netstat_rt_tables
131#define routename rtems_shell_netstats_routername
132#define netname rtems_shell_netstats_netname
133#define sotoxsocket rtems_shell_netstats_sotoxsocket
134#endif
135
136char    *routename(in_addr_t);
137char    *netname(in_addr_t, u_long);
138char    *atalk_print(struct sockaddr *, int);
139char    *atalk_print2(struct sockaddr *, struct sockaddr *, int);
140char    *ipx_print(struct sockaddr *);
141char    *ns_print(struct sockaddr *);
142void    routepr(u_long);
143
144void    ipxprotopr(u_long, const char *, int, int);
145void    spx_stats(u_long, const char *, int, int);
146void    ipx_stats(u_long, const char *, int, int);
147void    ipxerr_stats(u_long, const char *, int, int);
148
149void    nsprotopr(u_long, const char *, int, int);
150void    spp_stats(u_long, const char *, int, int);
151void    idp_stats(u_long, const char *, int, int);
152void    nserr_stats(u_long, const char *, int, int);
153
154void    atalkprotopr(u_long, const char *, int, int);
155void    ddp_stats(u_long, const char *, int, int);
156
157#ifdef NETGRAPH
158void    netgraphprotopr(u_long, const char *, int, int);
159#endif
160
161void    unixpr(u_long, u_long, u_long, u_long);
162
163void    esis_stats(u_long, const char *, int, int);
164void    clnp_stats(u_long, const char *, int, int);
165void    cltp_stats(u_long, const char *, int, int);
166void    iso_protopr(u_long, const char *, int, int);
167void    iso_protopr1(u_long, int);
168void    tp_protopr(u_long, const char *, int, int);
169void    tp_inproto(u_long);
170void    tp_stats(caddr_t, caddr_t);
171
172void    mroutepr(u_long, u_long, u_long);
173void    mrt_stats(u_long);
174void    bpf_stats(char *);
Note: See TracBrowser for help on using the repository browser.