Annotation of src/usr.bin/systat/extern.h, Revision 1.13
1.13 ! itojun 1: /* $OpenBSD: extern.h,v 1.12 2004/04/14 19:53:04 deraadt 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;
1.13 ! itojun 58: extern int nflag;
1.1 deraadt 59:
60: struct inpcb;
61:
1.10 millert 62: int checkhost(struct inpcb *);
63: int checkport(struct inpcb *);
64: void closeiostat(WINDOW *);
65: void closekre(WINDOW *);
66: void closembufs(WINDOW *);
67: void closenetstat(WINDOW *);
68: void closepigs(WINDOW *);
69: void closeswap(WINDOW *);
70: int cmdiostat(char *, char *);
71: int cmdkre(char *, char *);
72: int cmdnetstat(char *, char *);
73: struct cmdtab *lookup(char *);
74: void command(char *);
75: void sigdie(int);
1.12 deraadt 76: void sigtstp(int);
1.10 millert 77: void die(void);
78: void sigdisplay(int);
79: void display(void);
80: int dkinit(int);
81: int dkcmd(char *, char *);
82: void error(const char *fmt, ...);
83: void fetchiostat(void);
84: void fetchkre(void);
85: void fetchmbufs(void);
86: void fetchnetstat(void);
87: void fetchpigs(void);
88: void fetchswap(void);
89: int initiostat(void);
90: int initkre(void);
91: int initmbufs(void);
92: int initnetstat(void);
93: int initpigs(void);
94: int initswap(void);
95: void keyboard(void);
96: int kvm_ckread(void *, void *, int);
97: void labeliostat(void);
98: void labelkre(void);
99: void labelmbufs(void);
100: void labelnetstat(void);
101: void labelpigs(void);
102: void labels(void);
103: void labelswap(void);
104: void load(void);
105: int netcmd(char *, char *);
106: void nlisterr(struct nlist []);
107: WINDOW *openiostat(void);
108: WINDOW *openkre(void);
109: WINDOW *openmbufs(void);
110: WINDOW *opennetstat(void);
111: WINDOW *openpigs(void);
112: WINDOW *openswap(void);
113: int prefix(char *, char *);
114: void sigwinch(int);
115: void showiostat(void);
116: void showkre(void);
117: void showmbufs(void);
118: void shownetstat(void);
119: void showpigs(void);
120: void showswap(void);
121: void status(void);
122: void gethz(void);
1.9 deraadt 123:
124: extern volatile sig_atomic_t gotdie;
125: extern volatile sig_atomic_t gotdisplay;
126: extern volatile sig_atomic_t gotwinch;
1.12 deraadt 127: extern volatile sig_atomic_t gottstp;
1.9 deraadt 128:
129: extern double dellave;
130: extern WINDOW *wload;