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
;
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 *);
93 int dkcmd(char *, char *);
94 void error(const char *fmt
, ...) __printflike(1, 2);
96 void fetchicmp6(void);
97 void fetchifstat(void);
98 void fetchaltqs(void);
101 void fetchiostat(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);
112 int ifcmd(const char *, const char *);
115 int initifstat(void);
119 int initiostat(void);
122 int initnetstat(void);
126 int initsensors(void);
131 int kvm_ckread(void *, void *, int);
132 void labelicmp(void);
133 void labelicmp6(void);
134 void labelifstat(void);
135 void labelaltqs(void);
138 void labeliostat(void);
140 void labelmbufs(void);
141 void labelnetstat(void);
142 void labelnetbw(void);
143 void labelpftop(void);
144 void labelpigs(void);
146 void labelsensors(void);
147 void labelswap(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);
177 void showicmp6(void);
178 void showifstat(void);
179 void showaltqs(void);
182 void showiostat(void);
184 void showmbufs(void);
185 void shownetstat(void);
186 void shownetbw(void);
187 void showpftop(void);
189 void showsensors(void);