/*
 * Definitions for status packet.
 */

#define STAT_MAGIC 0x01020304
#define STAT_VERSION 1
#define STAT_NAME_LEN 16

#define statpkt struct _st_stpkt_
statpkt {			/* 72 bytes long */
    unsl magic;			/* Magic number for figuring out
				 * endianness (0x01020304) */
    unsb version;		/* Version of structure */
    unsb type;			/* Machine type */
    unss unused;
    char name[STAT_NAME_LEN];	/* Name of gateway */
    unsl uptime;		/* Seconds since last restart */
    unsl restarts;		/* Number of restarts this load has had */
    unsl free_mem;		/* Amount of memory not yet allocated */
    unsl num_tsks;		/* Number of tasks on queue */
    unsl max_tsks;		/* Maximum number of tasks on queue */
    unsl num_timers;		/* Number of timers on queue */
    unsl max_timers;		/* Maximum number of timers on queue */
    unsl load1;			/* Load average (1 minute) */
    unsl load5;			/* Load average (5 minutes) */
    unsl load15;		/* Load average (15 minutes) */
    unsl nnets;			/* Number of nets */
    unsl nprots;		/* Number of protocols */
/*  netinfo nets[];		/* net and device information */
/*  ptl ptl[];			/* protocol types and lengths */
/*  protinfo prots[];		/* protocol specific information */
};

/*
 * Net statistics
 */

#define netinfo struct _st_netinfo_
netinfo {			/* 44 bytes long */
    unsb type;			/* type of net */
    unsb intnum;		/* interface number */
    unsb netnum;		/* net index number */
    unsb unused;
    unsl pkti;			/* packets in */
    unsl pkto;			/*         out */
    unsl byti;			/* bytes in */
    unsl byto;			/*       out */
    unsl ioin;			/* I/O input errors */
    unsl ioout;			/* I/O output errors */
    unsl ovfin;			/* input overflow */
    unsl ovfout;		/* output overflow */
    unsl disc;			/* discards */
    unsl devlen;		/* length of device information */
/*  byte devinfo[devlen];	/* device specific info */
};

/*
 * Device specific statistics structures
 *
 * The first byte of all the device statistics must contain the device
 * type code.
 */

/* Device type numbers */
#define D_MAX 2			/* Smallest unassigned number */

#define D_PRONET10 0		/* 10 Mbit ProNet */
#define D_DEQNA 1		/* DEC's q-bus ethernet interface */


/* ProNet10 */
#define STAT_PRO10_VERSION 1
#define pro10_stat struct _st_p10stat_
pro10_stat {			/* 40 bytes long */
    unsb type;			/* Device type D_PRONET10 */
    unsb version;		/* Structure version */
    unss unused;
    unsl iovr;			/* Input overrun */
    unsl perr;			/* Parity error */
    unsl irnok;			/* Input ring not OK */
    unsl ibdf;			/* Input bad format */
    unsl ref;			/* Refused */
    unsl oovr;			/* Output overrun */
    unsl tmo;			/* Output timeout */
    unsl ornok;			/* Output ring not ok */
    unsl obdf;			/* Output bad format */
};

/* DEQNA */
#define STAT_DEQNA_VERSION 1
#define qna_stat struct _st_deqnastat_
qna_stat {			/* 32 bytes long */
    unsb type;			/* Device type D_DEQNA */
    unsb version;		/* Structure version */
    unss unused;
    unsl runt;			/* Runt packets */
    unsl frame;			/* Framing error */
    unsl crc;			/* CRC error */
    unsl ovf;			/* Overflow */
    unsl loss;			/* Lost carrier after start of transmission */
    unsl carr;			/* No carrier */
    unsl abort;			/* Abort due to 16 collisions */
    unsl restarts;		/* Device timeout restarts */
};
