PageRenderTime 50ms CodeModel.GetById 13ms app.highlight 33ms RepoModel.GetById 1ms app.codeStats 0ms

/usr.bin/systat/extern.h

https://bitbucket.org/freebsd/freebsd-head/
C++ Header | 171 lines | 134 code | 6 blank | 31 comment | 0 complexity | e77942e97564f2c7e8bc9884de85b33f MD5 | raw file
  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 * 4. 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.
 16 *
 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
 27 * SUCH DAMAGE.
 28 *
 29 *      @(#)extern.h	8.1 (Berkeley) 6/6/93
 30 * $FreeBSD$
 31 */
 32
 33#include <sys/cdefs.h>
 34#include <fcntl.h>
 35#include <kvm.h>
 36
 37extern struct	cmdtab *curcmd;
 38extern struct	cmdtab cmdtab[];
 39extern struct	text *xtext;
 40extern WINDOW	*wnd;
 41extern char	**dr_name;
 42extern char	c, *namp, hostname[];
 43extern double	avenrun[3];
 44extern float	*dk_mspw;
 45extern kvm_t	*kd;
 46extern long	ntext, textp;
 47extern int	*dk_select;
 48extern int	CMDLINE;
 49extern int	dk_ndrive;
 50extern int	hz, stathz;
 51extern double	hertz;		/* sampling frequency for cp_time and dk_time */
 52extern int	col;
 53extern int	nhosts;
 54extern int	nports;
 55extern int	protos;
 56extern int	verbose;
 57extern unsigned int	delay;
 58
 59struct inpcb;
 60
 61extern struct device_selection *dev_select;
 62extern long			generation;
 63extern int			num_devices;
 64extern int			num_selected;
 65extern int			num_selections;
 66extern long			select_generation;
 67
 68extern struct nlist		namelist[];
 69
 70int	 checkhost(struct inpcb *);
 71int	 checkport(struct inpcb *);
 72void	 closeicmp(WINDOW *);
 73void	 closeicmp6(WINDOW *);
 74void	 closeifstat(WINDOW *);
 75void	 closeiostat(WINDOW *);
 76void	 closeip(WINDOW *);
 77void	 closeip6(WINDOW *);
 78void	 closekre(WINDOW *);
 79void	 closembufs(WINDOW *);
 80void	 closenetstat(WINDOW *);
 81void	 closepigs(WINDOW *);
 82void	 closeswap(WINDOW *);
 83void	 closetcp(WINDOW *);
 84int	 cmdifstat(const char *, const char *);
 85int	 cmdiostat(const char *, const char *);
 86int	 cmdkre(const char *, const char *);
 87int	 cmdnetstat(const char *, const char *);
 88struct	 cmdtab *lookup(const char *);
 89void	 command(const char *);
 90void	 die(int);
 91void	 display(void);
 92int	 dkinit(void);
 93int	 dkcmd(char *, char *);
 94void	 error(const char *fmt, ...) __printflike(1, 2);
 95void	 fetchicmp(void);
 96void	 fetchicmp6(void);
 97void	 fetchifstat(void);
 98void	 fetchip(void);
 99void	 fetchip6(void);
100void	 fetchiostat(void);
101void	 fetchkre(void);
102void	 fetchmbufs(void);
103void	 fetchnetstat(void);
104void	 fetchpigs(void);
105void	 fetchswap(void);
106void	 fetchtcp(void);
107void	 getsysctl(const char *, void *, size_t);
108int	 ifcmd(const char *cmd, const char *args);
109int	 initicmp(void);
110int	 initicmp6(void);
111int	 initifstat(void);
112int	 initip(void);
113int	 initip6(void);
114int	 initiostat(void);
115int	 initkre(void);
116int	 initmbufs(void);
117int	 initnetstat(void);
118int	 initpigs(void);
119int	 initswap(void);
120int	 inittcp(void);
121int	 keyboard(void);
122int	 kvm_ckread(void *, void *, int);
123void	 labelicmp(void);
124void	 labelicmp6(void);
125void	 labelifstat(void);
126void	 labelip(void);
127void	 labelip6(void);
128void	 labeliostat(void);
129void	 labelkre(void);
130void	 labelmbufs(void);
131void	 labelnetstat(void);
132void	 labelpigs(void);
133void	 labels(void);
134void	 labelswap(void);
135void	 labeltcp(void);
136void	 load(void);
137int	 netcmd(const char *, const char *);
138void	 nlisterr(struct nlist []);
139WINDOW	*openicmp(void);
140WINDOW	*openicmp6(void);
141WINDOW	*openifstat(void);
142WINDOW	*openip(void);
143WINDOW	*openip6(void);
144WINDOW	*openiostat(void);
145WINDOW	*openkre(void);
146WINDOW	*openmbufs(void);
147WINDOW	*opennetstat(void);
148WINDOW	*openpigs(void);
149WINDOW	*openswap(void);
150WINDOW	*opentcp(void);
151int	 prefix(const char *, const char *);
152void	 reseticmp(void);
153void	 reseticmp6(void);
154void	 resetip(void);
155void	 resetip6(void);
156void	 resettcp(void);
157void	 showicmp(void);
158void	 showicmp6(void);
159void	 showifstat(void);
160void	 showip(void);
161void	 showip6(void);
162void	 showiostat(void);
163void	 showkre(void);
164void	 showmbufs(void);
165void	 shownetstat(void);
166void	 showpigs(void);
167void	 showswap(void);
168void	 showtcp(void);
169void	 status(void);
170void	 suspend(int);
171char	*sysctl_dynread(const char *, size_t *);