/* Copyright 1984 by the Massachusetts Institute of Technology */

/* Fundamentals */

#define	NULL	0		/* NULL pointer for general use - typeless */
#define FALSE	0
#define TRUE	~FALSE


/* Address type codes for compare in netget n_get routines.
 * and destination address for network header construction routines.
 */

#define	NOHOST	-1		/* None, interface was idle */
#define	ANYHOST	0		/* Last message went to no specific host */


/* Interface type codes; there indicate whether or not the connection
 * is direct (through an interface on this machine), or indirect,
 * either though a fixed or floating bridge.
 */

#define	T_NONE	0		/* None */
#define	T_DIR	1		/* Direct */
#define	T_FIX	2		/* Fixed bridge */
#define	T_FLT	3		/* Subject to routing */


/* Network capability codes; used to show what networks can do.
 */
#define	C_BRD	01		/* Set if network support broadcast */


/* Packet dispatch completion codes */

#define	D_OK	0		/* Packet successfully accepted */
#define	D_ERR	1		/* Random error */
#define	D_OVFL	2		/* Pack not accepted for flow control rsns */
#define	D_NTDN	3		/* Likewise, network down */
#define	D_BRD	4		/* Dropped to avoid looping broadcasting */


/* Network state bits */

#define	N_UP	01		/* Network is up */
#define	N_IWT	02		/* Network I/P restart queued */
#define	N_OWT	04		/* Network O/P restart queued */
#define	N_DLY	010		/* Network being dallied */
#define N_IRWT	020		/* Network I/P restart queued on timer */


/* Logging message class definitions; at moment uses bit vector */

#define	L_PANIC	01		/* Fatal configuration error, unfixable */
#define	L_FATAL	02		/* Trashed, should cause reload */
#define	L_CHECK 04		/* Internal error, should cause restart */
#define	L_ERRU	010		/* Unusual external error */
#define	L_INFU	020		/* Unusual normal event */
#define	L_ERRC	040		/* Common external error */
#define	L_INFC	0100		/* Common normal event */
#define	L_TRCP	0200		/* Per packet trace */
#define	L_TRCO	0400		/* Complete operational trace */

/* Bit flag values for where to send logging messages.  [This is all a
 * crock and will soon be replaced by something involving pseudo
 * devices and JOBDEV (I hope).] */
#define LOG_CON 1		/* log to console */
#define LOG_NET 2		/* log to network */


/* Protocol process signal number for incoming packets. All other signals
 * are usually alloacted in a process private fashion with tasking.
 */

#define	S_PKT	0		/* Packet input */
