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