/*
 * 5799-WZQ (C) COPYRIGHT = NONE
 * LICENSED MATERIALS - PROPERTY OF IBM
 */
/* $Header:systat.h 12.0$ */
/* $ACIS:systat.h 12.0$ */
/* $Source: /ibm/acis/usr/src/ucb/systat/RCS/systat.h,v $ */

#if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS)
static char *rcsidsystat = "$Header:systat.h 12.0$";
#endif

/*
 * Copyright (c) 1980 Regents of the University of California.
 * All rights reserved.  The Berkeley software License Agreement
 * specifies the terms and conditions for redistribution.
 *
 *	@(#)systat.h	5.1 (Berkeley) 5/30/85
 */

#include <netdb.h>
#include <nlist.h>
#include <signal.h>
#include <curses.h>

#include <sys/param.h>
#include <sys/file.h>
#include <sys/dk.h>
#include <sys/nfs_defines.h>

#include <netinet/in.h>
#include <arpa/inet.h>

struct p_times {
        short   pt_pid;
        float   pt_pctcpu;
        int     pt_uid;
        int     pt_paddr;
        struct  proc *pt_pp;
} *pt;
long    nproc, procp;
struct	proc *kprocp;

struct procs {
        int     pid;
        char    cmd[16];
} procs[200];
int     numprocs;

struct users {
        int     k_uid;
        char    k_name[16];
} known[30];
int     numknown;

struct  cmdtab {
        char    *c_name;		/* command name */
        int     (*c_refresh)();		/* display refresh */
        int     (*c_fetch)();		/* sets up data structures */
        int     (*c_label)();		/* label display */
	int	(*c_init)();		/* initialize namelist, etc. */
	WINDOW	*(*c_open)();		/* open display */
	int	(*c_close)();		/* close display */
	int	(*c_cmd)();		/* display command interpreter */
	char	c_flags;		/* see below */
};

#define	CF_INIT		0x1		/* been initialized */
#define	CF_LOADAV	0x2		/* display w/ load average */

struct	cmdtab *curcmd;
struct	cmdtab cmdtab[];
struct	cmdtab *lookup();

int     kmem, mem, swap;
int     naptime, col;

long	ntext, textp;
struct	text *xtext;

double  lccpu;
double	avenrun[3];

char    *kmemf, *memf, *swapf;
int	hz, phz;
char	**dr_name;
int	dk_ndrive;
int	*dk_select;
float	*dk_mspw;
char    c, *namp, hostname[32];

int	nports;
int	nhosts;
int	protos;
#define	TCP	0x1
#define	UDP	0x2

struct  pte *usrpt;
struct  pte *Usrptma;

WINDOW  *wnd;
int	CMDLINE;

char    *malloc(), *calloc(), *strncpy();
long    getw();
