1: /*
   2:  * Copyright (c) 1980 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)systat.h	5.1 (Berkeley) 5/30/85
   7:  */
   8: 
   9: #include <netdb.h>
  10: #include <nlist.h>
  11: #include <signal.h>
  12: #include <curses.h>
  13: 
  14: #include <sys/param.h>
  15: #include <sys/file.h>
  16: #include <sys/dk.h>
  17: 
  18: #include <netinet/in.h>
  19: #include <arpa/inet.h>
  20: 
  21: struct p_times {
  22:         short   pt_pid;
  23:         float   pt_pctcpu;
  24:         int     pt_uid;
  25:         int     pt_paddr;
  26:         struct  proc *pt_pp;
  27: } *pt;
  28: long    nproc, procp;
  29: struct  proc *kprocp;
  30: 
  31: struct procs {
  32:         int     pid;
  33:         char    cmd[16];
  34: } procs[200];
  35: int     numprocs;
  36: 
  37: struct users {
  38:         int     k_uid;
  39:         char    k_name[16];
  40: } known[30];
  41: int     numknown;
  42: 
  43: struct  cmdtab {
  44:         char    *c_name;        /* command name */
  45:         int     (*c_refresh)();     /* display refresh */
  46:         int     (*c_fetch)();       /* sets up data structures */
  47:         int     (*c_label)();       /* label display */
  48:     int (*c_init)();        /* initialize namelist, etc. */
  49:     WINDOW  *(*c_open)();       /* open display */
  50:     int (*c_close)();       /* close display */
  51:     int (*c_cmd)();     /* display command interpreter */
  52:     char    c_flags;        /* see below */
  53: };
  54: 
  55: #define CF_INIT     0x1     /* been initialized */
  56: #define CF_LOADAV   0x2     /* display w/ load average */
  57: 
  58: struct  cmdtab *curcmd;
  59: struct  cmdtab cmdtab[];
  60: struct  cmdtab *lookup();
  61: 
  62: int     kmem, mem, swap;
  63: int     naptime, col;
  64: 
  65: long    ntext, textp;
  66: struct  text *xtext;
  67: 
  68: double  lccpu;
  69: double  avenrun[3];
  70: 
  71: char    *kmemf, *memf, *swapf;
  72: int hz, phz;
  73: char    **dr_name;
  74: int dk_ndrive;
  75: int *dk_select;
  76: float   *dk_mspw;
  77: char    c, *namp, hostname[32];
  78: 
  79: int nports;
  80: int nhosts;
  81: int protos;
  82: #define TCP 0x1
  83: #define UDP 0x2
  84: 
  85: struct  pte *usrpt;
  86: struct  pte *Usrptma;
  87: 
  88: WINDOW  *wnd;
  89: int CMDLINE;
  90: 
  91: char    *malloc(), *calloc(), *strncpy();
  92: long    getw();

Defined variables

avenrun defined in line 69; used 15 times
c defined in line 77; used 40 times
cmdtab defined in line 59; used 3 times
col defined in line 63; used 48 times
curcmd defined in line 58; used 18 times
dk_mspw defined in line 76; used 12 times
dk_ndrive defined in line 74; used 40 times
dk_select defined in line 75; used 12 times
dr_name defined in line 73; used 14 times
hostname defined in line 77; used 3 times
kmemf defined in line 71; used 3 times
known defined in line 40; used 4 times
kprocp defined in line 29; used 16 times
lccpu defined in line 68; used 2 times
mem defined in line 62; used 6 times
memf defined in line 71; used 3 times
namp defined in line 77; used 8 times
naptime defined in line 63; used 8 times
nhosts defined in line 80; used 8 times
nports defined in line 79; used 8 times
nproc defined in line 28; used 16 times
ntext defined in line 65; used 6 times
numknown defined in line 41; used 5 times
numprocs defined in line 35; used 14 times
phz defined in line 72; used 3 times
procp defined in line 28; used 6 times
procs defined in line 34; used 4 times
protos defined in line 81; used 14 times
pt defined in line 27; used 21 times
swap defined in line 62; used 5 times
swapf defined in line 71; used 3 times
textp defined in line 65; used 2 times
usrpt defined in line 85; used 4 times
xtext defined in line 66; used 9 times

Defined struct's

cmdtab defined in line 43; used 26 times
p_times defined in line 21; used 18 times
procs defined in line 31; used 2 times
users defined in line 37; used 2 times

Defined macros

CF_INIT defined in line 55; used 3 times
CF_LOADAV defined in line 56; used 8 times
TCP defined in line 82; used 8 times
UDP defined in line 83; used 8 times

Usage of this include

Last modified: 1985-05-31
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1645
Valid CSS Valid XHTML 1.0 Strict