Annotation of src/usr.bin/systat/extern.h, Revision 1.11
1.11 ! millert 1: /* $OpenBSD: extern.h,v 1.10 2002/02/16 21:27:54 millert Exp $ */
1.2 deraadt 2: /* $NetBSD: extern.h,v 1.3 1996/05/10 23:16:34 thorpej Exp $ */
1.1 deraadt 3:
4: /*-
5: * Copyright (c) 1991, 1993
6: * The Regents of the University of California. All rights reserved.
7: *
8: * Redistribution and use in source and binary forms, with or without
9: * modification, are permitted provided that the following conditions
10: * are met:
11: * 1. Redistributions of source code must retain the above copyright
12: * notice, this list of conditions and the following disclaimer.
13: * 2. Redistributions in binary form must reproduce the above copyright
14: * notice, this list of conditions and the following disclaimer in the
15: * documentation and/or other materials provided with the distribution.
1.11 ! millert 16: * 3. Neither the name of the University nor the names of its contributors
1.1 deraadt 17: * may be used to endorse or promote products derived from this software
18: * without specific prior written permission.
19: *
20: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30: * SUCH DAMAGE.
31: *
32: * @(#)extern.h 8.1 (Berkeley) 6/6/93
33: */
34:
35: #include <sys/cdefs.h>
36: #include <fcntl.h>
37: #include <kvm.h>
38:
39: extern struct cmdtab *curcmd;
40: extern struct cmdtab cmdtab[];
41: extern struct text *xtext;
42: extern WINDOW *wnd;
43: extern char **dr_name;
44: extern char c, *namp, hostname[];
45: extern double avenrun[3];
46: extern float *dk_mspw;
47: extern kvm_t *kd;
48: extern long ntext, textp;
49: extern int *dk_select;
1.4 millert 50: extern long CMDLINE;
1.1 deraadt 51: extern int dk_ndrive;
52: extern int hz, stathz;
53: extern int naptime, col;
54: extern int nhosts;
55: extern int nports;
56: extern int protos;
57: extern int verbose;
58:
59: struct inpcb;
60:
1.10 millert 61: int checkhost(struct inpcb *);
62: int checkport(struct inpcb *);
63: void closeiostat(WINDOW *);
64: void closekre(WINDOW *);
65: void closembufs(WINDOW *);
66: void closenetstat(WINDOW *);
67: void closepigs(WINDOW *);
68: void closeswap(WINDOW *);
69: int cmdiostat(char *, char *);
70: int cmdkre(char *, char *);
71: int cmdnetstat(char *, char *);
72: struct cmdtab *lookup(char *);
73: void command(char *);
74: void sigdie(int);
75: void die(void);
76: void sigdisplay(int);
77: void display(void);
78: int dkinit(int);
79: int dkcmd(char *, char *);
80: void error(const char *fmt, ...);
81: void fetchiostat(void);
82: void fetchkre(void);
83: void fetchmbufs(void);
84: void fetchnetstat(void);
85: void fetchpigs(void);
86: void fetchswap(void);
87: int initiostat(void);
88: int initkre(void);
89: int initmbufs(void);
90: int initnetstat(void);
91: int initpigs(void);
92: int initswap(void);
93: void keyboard(void);
94: int kvm_ckread(void *, void *, int);
95: void labeliostat(void);
96: void labelkre(void);
97: void labelmbufs(void);
98: void labelnetstat(void);
99: void labelpigs(void);
100: void labels(void);
101: void labelswap(void);
102: void load(void);
103: int netcmd(char *, char *);
104: void nlisterr(struct nlist []);
105: WINDOW *openiostat(void);
106: WINDOW *openkre(void);
107: WINDOW *openmbufs(void);
108: WINDOW *opennetstat(void);
109: WINDOW *openpigs(void);
110: WINDOW *openswap(void);
111: int prefix(char *, char *);
112: void sigwinch(int);
113: void showiostat(void);
114: void showkre(void);
115: void showmbufs(void);
116: void shownetstat(void);
117: void showpigs(void);
118: void showswap(void);
119: void status(void);
120: void suspend(int);
121: void gethz(void);
1.9 deraadt 122:
123: extern volatile sig_atomic_t gotdie;
124: extern volatile sig_atomic_t gotdisplay;
125: extern volatile sig_atomic_t gotwinch;
126:
127: extern double dellave;
128: extern WINDOW *wload;