/* Copyright 1984 by the Massachusetts Institute of Technology */
/* See permission and disclaimer notice in file notice.h */
#include	"notice.h"

/* Various random ARPANet constants and things.
 */

/*
 *------------------------------------------------------------------
 *
 * $Source: /site/mit/cgw/gw/nets/RCS/arconst.h,v $
 * $Revision: 1.2 $
 * $Date: 87/11/08 17:22:02 $
 * $State: Exp $
 * $Author: jon $
 * $Locker: jon $
 *
 * $Log:	arconst.h,v $
 * Revision 1.2  87/11/08  17:22:02  jon
 * Pushes ARMAX to 1022 from 1020.  In conjuction with pushing the trailer
 * size from 4 to 0 (netcnf.c).  The goal is to get a MTU of 1006 (not 1004).
 * 
 * 
 *------------------------------------------------------------------
 */

#define	ARMAX	1022		/* Max message size in bytes */
#define ARCLEN	10		/* len of control msgs (&(mkar(0)->ar_len)) */
#define	ARMXO	8		/* num of msgs allowed outstanding per conn */
#define ARTMO	30		/* timeout for lost RFNM's */

#define ARL_INP	155		/* link number for Internet Protocol packets */


/* Values for Message Type field */

#define	MT_REG	0	/* regular message */
#define	MT_ERRL	1	/* error in leader */
#define MT_DOWN	2	/* imp or host going down */
#define	MT_NOP	4	/* nop message used in synchronizing */
#define	MT_RFNM	5	/* request for next message */
#define	MT_STAT 6	/* host dead status */
#define	MT_DEAD	7	/* destination host or imp dead */
#define	MT_ERRD	8	/* error in data, leader ok */
#define	MT_IT	9	/* incomplete transmission */
#define	MT_RSET	10	/* interface reset */
#define	MT_RTA	11	/* refused, try again */
#define	MT_RWN	12	/* refused, will notify */
#define	MT_RST	13	/* refused, still trying */
#define	MT_RDY	14	/* now ready */


/* Values for Sub-type field */

#define	STR_NR	0	/* sub-types for regular messages; non-refusable */
#define	STR_R	1	/* refusable */
#define	STR_GR	2	/* get ready */
#define STR_UNC	3	/* uncontrolled */
#define	STE_LEF	0	/* sub-types for leader err msgs; rdy line flop */
#define	STE_LL	1	/* message less that 80 bits */
#define	STE_LUT	2	/* unassigned type */
#define	STE_LWT	3	/* wrong leader type */
#define	STS_UN	0	/* sub-types for host status msgs; unused */
#define	STS_NR	1	/* ready line down */
#define	STS_TDY	2	/* tardy */
#define	STS_NSH	3	/* no such host */
#define	STS_PD	4	/* port disabled */
#define	STS_CU	15	/* coming up */
#define	STD_IU	0	/* sub-types for dest dead msgs; imp unreachable */
#define	STD_HD	1	/* host dead */
#define	STD_OL	2	/* using old leaders (!!) */
#define	STD_AP	3	/* 'administratively prohibited' - PLI */
#define	STI_DT	0	/* sub-types for incomp trans msgs; dest host slow */
#define	STI_TL	1	/* message too long for this connection */
#define	STI_ST	2	/* source took to long */
#define	STI_RL	3	/* random network lossage */
#define	STI_UR	4	/* unavailable resources */
#define	STI_IE	5	/* internal IMP failure */

/* Error codes from the device driver. */
#define ER_OFLN 1		/* Offline */
#define ER_FLSH 2		/* Flush packet */
#define ER_OVFL 3		/* Overflow */
