Remove advertising header from usr.bin/
[dragonfly.git] / usr.bin / systat / extern.h
1 /*-
2  * Copyright (c) 1991, 1993
3  *      The 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. Neither the name of the University nor the names of its contributors
14  *    may be used to endorse or promote products derived from this software
15  *    without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27  * SUCH DAMAGE.
28  *
29  *      @(#)extern.h    8.1 (Berkeley) 6/6/93
30  */
31
32 #include <fcntl.h>
33 #include <kvm.h>
34
35 extern struct   cmdtab *curcmd;
36 extern struct   cmdtab cmdtab[];
37 extern WINDOW   *wnd;
38 extern char     c, *namp, hostname[];
39 extern double   avenrun[3];
40 extern kvm_t    *kd;
41 extern long     ntext, textp;
42 extern int      CMDLINE;
43 extern int      hz, stathz;
44 extern double   hertz;          /* sampling frequency for cp_time and dk_time */
45 extern double   naptime;
46 extern int      col;
47 extern int      nhosts;
48 extern int      nports;
49 extern int      protos;
50 extern int      verbose;
51
52 struct inpcb;
53
54 extern struct device_selection *dev_select;
55 extern long                     generation;
56 extern int                      num_devices;
57 extern int                      num_selected;
58 extern int                      num_selections;
59 extern long                     select_generation;
60
61 int      checkhost(struct inpcb *);
62 int      checkport(struct inpcb *);
63 void     closeiostat(WINDOW *);
64 void     closeifstat(WINDOW *);
65 void     closealtqs(WINDOW *);
66 void     closeicmp(WINDOW *);
67 void     closeicmp6(WINDOW *);
68 void     closeip(WINDOW *);
69 void     closeip6(WINDOW *);
70 void     closekre(WINDOW *);
71 void     closembufs(WINDOW *);
72 void     closenetstat(WINDOW *);
73 void     closenetbw(WINDOW *);
74 void     closepftop(WINDOW *);
75 void     closepigs(WINDOW *);
76 void     closesensors(WINDOW *);
77 void     closeswap(WINDOW *);
78 void     closetcp(WINDOW *);
79 void     closevmm(WINDOW *);
80 int      cmdiostat(const char *, char *);
81 int      cmdifstat(const char *, char *);
82 int      cmdaltqs(const char *, char *);
83 int      cmdkre(const char *, char *);
84 int      cmdnetstat(const char *, char *);
85 int      cmdnetbw(const char *, char *);
86 int      cmdpftop(const char *, char *);
87 int      cmdsensors(const char *, char *);
88 struct   cmdtab *lookup(const char *);
89 void     command(const char *);
90 void     die(int);
91 void     display(int);
92 int      dkinit(void);
93 int      dkcmd(char *, char *);
94 void     error(const char *fmt, ...) __printflike(1, 2);
95 void     fetchicmp(void);
96 void     fetchicmp6(void);
97 void     fetchifstat(void);
98 void     fetchaltqs(void);
99 void     fetchip(void);
100 void     fetchip6(void);
101 void     fetchiostat(void);
102 void     fetchkre(void);
103 void     fetchmbufs(void);
104 void     fetchnetstat(void);
105 void     fetchnetbw(void);
106 void     fetchpftop(void);
107 void     fetchpigs(void);
108 void     fetchsensors(void);
109 void     fetchswap(void);
110 void     fetchtcp(void);
111 void     fetchvmm(void);
112 int      ifcmd(const char *, const char *);
113 int      initicmp(void);
114 int      initicmp6(void);
115 int      initifstat(void);
116 int      initaltqs(void);
117 int      initip(void);
118 int      initip6(void);
119 int      initiostat(void);
120 int      initkre(void);
121 int      initmbufs(void);
122 int      initnetstat(void);
123 int      initnetbw(void);
124 int      initpftop(void);
125 int      initpigs(void);
126 int      initsensors(void);
127 int      initswap(void);
128 int      inittcp(void);
129 int      initvmm(void);
130 int      keyboard(void);
131 int      kvm_ckread(void *, void *, int);
132 void     labelicmp(void);
133 void     labelicmp6(void);
134 void     labelifstat(void);
135 void     labelaltqs(void);
136 void     labelip(void);
137 void     labelip6(void);
138 void     labeliostat(void);
139 void     labelkre(void);
140 void     labelmbufs(void);
141 void     labelnetstat(void);
142 void     labelnetbw(void);
143 void     labelpftop(void);
144 void     labelpigs(void);
145 void     labels(void);
146 void     labelsensors(void);
147 void     labelswap(void);
148 void     labeltcp(void);
149 void     labelvmm(void);
150 void     load(void);
151 int      netcmd(const char *, char *);
152 void     nlisterr(struct nlist []);
153 WINDOW  *openicmp(void);
154 WINDOW  *openicmp6(void);
155 WINDOW  *openifstat(void);
156 WINDOW  *openaltqs(void);
157 WINDOW  *openip(void);
158 WINDOW  *openip6(void);
159 WINDOW  *openiostat(void);
160 WINDOW  *openkre(void);
161 WINDOW  *openmbufs(void);
162 WINDOW  *opennetstat(void);
163 WINDOW  *opennetbw(void);
164 WINDOW  *openpftop(void);
165 WINDOW  *openpigs(void);
166 WINDOW  *opensensors(void);
167 WINDOW  *openswap(void);
168 WINDOW  *opentcp(void);
169 WINDOW  *openvmm(void);
170 int      prefix(const char *, const char *);
171 void     reseticmp(void);
172 void     reseticmp6(void);
173 void     resetip(void);
174 void     resetip6(void);
175 void     resettcp(void);
176 void     showicmp(void);
177 void     showicmp6(void);
178 void     showifstat(void);
179 void     showaltqs(void);
180 void     showip(void);
181 void     showip6(void);
182 void     showiostat(void);
183 void     showkre(void);
184 void     showmbufs(void);
185 void     shownetstat(void);
186 void     shownetbw(void);
187 void     showpftop(void);
188 void     showpigs(void);
189 void     showsensors(void);
190 void     showswap(void);
191 void     showtcp(void);
192 void     showvmm(void);
193 void     status(void);
194 void     suspend(int);