2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
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.
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
29 * @(#)extern.h 8.1 (Berkeley) 6/6/93
35 extern struct cmdtab *curcmd;
36 extern struct cmdtab cmdtab[];
38 extern char c, *namp, hostname[];
39 extern double avenrun[3];
41 extern long ntext, textp;
43 extern int hz, stathz;
44 extern double hertz; /* sampling frequency for cp_time and dk_time */
45 extern double naptime;
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 extern struct statinfo cur, last;
61 extern struct kinfo_cputime old_cp_time;
63 int checkhost(struct inpcb *);
64 int checkport(struct inpcb *);
65 void closeiostat(WINDOW *);
66 void closeifstat(WINDOW *);
67 void closealtqs(WINDOW *);
68 void closeicmp(WINDOW *);
69 void closeicmp6(WINDOW *);
70 void closeip(WINDOW *);
71 void closeip6(WINDOW *);
72 void closekre(WINDOW *);
73 void closembufs(WINDOW *);
74 void closenetstat(WINDOW *);
75 void closenetbw(WINDOW *);
76 void closepftop(WINDOW *);
77 void closepigs(WINDOW *);
78 void closesensors(WINDOW *);
79 void closeswap(WINDOW *);
80 void closetcp(WINDOW *);
81 void closevmm(WINDOW *);
82 int cmdiostat(const char *, char *);
83 int cmdifstat(const char *, char *);
84 int cmdaltqs(const char *, char *);
85 int cmdkre(const char *, char *);
86 int cmdnetstat(const char *, char *);
87 int cmdnetbw(const char *, char *);
88 int cmdpftop(const char *, char *);
89 int cmdsensors(const char *, char *);
90 struct cmdtab *lookup(const char *);
91 void command(const char *);
92 void die(int) __dead2;
95 int dkcmd(char *, char *);
96 void error(const char *fmt, ...) __printflike(1, 2);
98 void fetchicmp6(void);
99 void fetchifstat(void);
100 void fetchaltqs(void);
103 void fetchiostat(void);
105 void fetchmbufs(void);
106 void fetchnetstat(void);
107 void fetchnetbw(void);
108 void fetchpftop(void);
109 void fetchpigs(void);
110 void fetchsensors(void);
111 void fetchswap(void);
114 int ifcmd(const char *, const char *);
117 int initifstat(void);
121 int initiostat(void);
124 int initnetstat(void);
128 int initsensors(void);
132 int keyboard(void) __dead2;
133 int kvm_ckread(void *, void *, int);
134 void labelicmp(void);
135 void labelicmp6(void);
136 void labelifstat(void);
137 void labelaltqs(void);
140 void labeliostat(void);
142 void labelmbufs(void);
143 void labelnetstat(void);
144 void labelnetbw(void);
145 void labelpftop(void);
146 void labelpigs(void);
148 void labelsensors(void);
149 void labelswap(void);
153 int netcmd(const char *, char *);
154 void nlisterr(struct nlist []) __dead2;
155 WINDOW *openicmp(void);
156 WINDOW *openicmp6(void);
157 WINDOW *openifstat(void);
158 WINDOW *openaltqs(void);
159 WINDOW *openip(void);
160 WINDOW *openip6(void);
161 WINDOW *openiostat(void);
162 WINDOW *openkre(void);
163 WINDOW *openmbufs(void);
164 WINDOW *opennetstat(void);
165 WINDOW *opennetbw(void);
166 WINDOW *openpftop(void);
167 WINDOW *openpigs(void);
168 WINDOW *opensensors(void);
169 WINDOW *openswap(void);
170 WINDOW *opentcp(void);
171 WINDOW *openvmm(void);
172 int prefix(const char *, const char *);
173 void reseticmp(void);
174 void reseticmp6(void);
179 void showicmp6(void);
180 void showifstat(void);
181 void showaltqs(void);
184 void showiostat(void);
186 void showmbufs(void);
187 void shownetstat(void);
188 void shownetbw(void);
189 void showpftop(void);
191 void showsensors(void);