/*
 * $Header: /afs/athena/astaff/project/xmit/Xcluster/snmp/RCS/cmon.h,v 1.4 1996/02/20 14:51:06 tom Exp $
 *
 * $Log: cmon.h,v $
 * Revision 1.4  1996/02/20  14:51:06  tom
 * added SGI
 *
 * Revision 1.3  1993/08/11  14:17:09  tom
 * still trying
 *
 * Revision 1.2  93/08/03  13:05:14  tom
 * added sparc
 * 
 * Revision 1.1  93/08/03  12:58:13  tom
 * Initial revision
 * 
 * Revision 1.1  89/11/03  15:20:27  snmpdev
 * Initial revision
 * 
 */
/******************************************************************************
**
**			clustermon.h
**
** Header file for clustermon application
**
**
******************************************************************************/

/*---------------------------------DEFINES--------------------------------*/
/* index into output options array */
#define VERSION         "alpha-1.1"
#define GEN_ERR		-1		/* an error return value	*/
#define COMMUNITY       "public"        /* mit poll community           */
#define COMMUNITY_T	"mit-traps"	/* mit trap community		*/
#define MAX_SID_LEN     16		/* The max. size of session id */
#define RETRIES		1		/* Max times to re-poll agent */
#define TIMEOUT		5		/* timeout to recv a reply to poll */
#define MAXCLUSTERS	50		/* No. of clusters to look at */
#define MAXMACHTYPE	5 		/* No. of diff machtypes + unknown */
/*
 * UDP port numbers to be used if services are undefined

#define SNMPPORT        161
#define SNMPTRAPPORT    162
#define CMON_PORT       3705 
 */

#ifndef TRUE
#define TRUE   1
#endif

#ifndef FALSE
#define FALSE  0
#endif

/* #define HLEN                  32      max length of local host name */

#define C_DIVIDER   "\
           SPARC    VS-3100   DS-3100   DS-5000   RS/6000    TOTALS\n\
CLUSTER   fre/tot   fre/tot   fre/tot   fre/tot   fre/tot   fre/tot\n\
-----------------------------------------------------------------------------\n\
"

/*--------------------------------TYPEDEF's-----------------------------*/
typedef struct agent{
	char *		nm;		/* workstation name		*/
	short		nloc;		/* cluster number 0 to N-1 N=Unk*/
	struct in_addr	agnt;		/* address of workstation	*/
	short		status;		/* neg unknown, 0 unused, 1 used*/
	char *		type;		/* ws type vax,rt,pmax,ps2 etc	*/
	short		ntype;		/* type number 0 to M-1 M=Unk	*/
        struct agent *  nxt;            /* next agent cell */
} AGENT;

typedef struct _r {                     /* the list of requests */
        getreq          req;            /* a request */
        struct _r *     nxt;            /* successor */
} reqlist;
/*-------------------------------EXTERN's-------------------------------*/

extern AGENT *first_agent;
extern short cluster;
extern char s_id[MAX_SID_LEN];	        /* The session id */
extern char *progname;			/* name of program */
extern struct servent *sp;		/* service entry for SNMP */
extern char *clusters[];		/* valid clusters to query */

/* global variables */
extern int s;				/* socket file descriptor */
extern struct sockaddr_in local;	/* local communications information */
extern int errno;                       /* global errno */
extern char *machine[];			/* valid machine types 	   */

