DataMuseum.dk

Presents historical artifacts from the history of:

Regnecentalen RC-900

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Regnecentalen RC-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦6f735360f⟧ TextFile

    Length: 11696 (0x2db0)
    Types: TextFile
    Notes: UNIX file
    Names: »nihdr.h«

Derivation

└─⟦8c4f54e61⟧ Bits:30004068/disk2.imd Interactive TCP/IP v.1.2
└─⟦8c4f54e61⟧ UNIX Filesystem
    └─⟦this⟧ »hb/new/usr/include/sys/nihdr.h« 

TextFile

/*
 * Definitions for the Network Service Interface
 * This file is based looslely on the <sys/tihdr.h>
 * file from AT&T
 */
#ident "@(#)nihdr.h	1.1 - 88/04/06"

/* 
 *  Network Service Interface primitives - user originated
 */

#define	N_CONN_REQ	0	/* connection request     */
#define N_CONN_RES	1	/* connection response    */
#define N_DISCON_REQ	2	/* disconnect request     */
#define N_DATA_REQ	3	/* data request	          */
#define N_EXDATA_REQ	4	/* expedited data request */
#define N_INFO_REQ	5	/* information request    */
#define N_BIND_REQ	6	/* bind request		  */
#define N_UNBIND_REQ	7	/* unbind request	  */
#define N_UNITDATA_REQ	8	/* unitdata request       */
#define N_OPTMGMT_REQ   9	/* manage options req     */
#define N_ORDREL_REQ   10       /* orderly release req    */

/* 
 * Provider originated primitives
 */

#define N_CONN_IND	11	/* connection indication      */
#define N_CONN_CON	12	/* connection confirmation    */
#define N_DISCON_IND	13	/* disconnect indication      */
#define N_DATA_IND	14	/* data indication	      */
#define N_EXDATA_IND	15	/* expeditied data indication */
#define N_INFO_ACK	16	/* information acknowledgment */
#define N_BIND_ACK	17	/* bind acknowledment	      */
#define N_ERROR_ACK	18	/* error acknowledgment       */
#define N_OK_ACK	19	/* ok acknowledgment          */
#define N_UNITDATA_IND	20	/* unitdata indication	      */
#define N_UDERROR_IND	21	/* unitdata error indication  */
#define N_OPTMGMT_ACK   22      /* manage options ack         */
#define N_ORDREL_IND    23      /* orderly release ind 	      */

/*
 * State machine events
 */
/* Initialization events */
#define NE_BIND_REQ	0	/* bind request		  		*/
#define NE_UNBIND_REQ	1	/* unbind request	  		*/
#define NE_OPTMGMT_REQ  2	/* manage options req     		*/
#define NE_BIND_ACK	3	/* bind acknowledment	      		*/
#define NE_OPTMGMT_ACK  4       /* manage options ack         		*/
#define NE_ERROR_ACK	5	/* error acknowledgment       		*/
#define NE_OK_ACK1	6	/* ok ack  seqcnt == 0 		  	*/
#define NE_OK_ACK2	7	/* ok ack  seqcnt == 1, q == resq      	*/
#define NE_OK_ACK3	8	/* ok ack  seqcnt == 1, q != resq       */
#define NE_OK_ACK4	9	/* ok ack  seqcnt > 1        		*/

/* Connection oriented events */
#define	NE_CONN_REQ	10	/* connection request     		*/
#define NE_CONN_RES	11	/* connection response    		*/
#define NE_DISCON_REQ	12	/* disconnect request     		*/
#define NE_DATA_REQ	13	/* data request	          		*/
#define NE_EXDATA_REQ	14	/* expedited data request 		*/
#define NE_ORDREL_REQ   15      /* orderly release req    		*/
#define NE_CONN_IND	16	/* connection indication      		*/
#define NE_CONN_CON	17	/* connection confirmation    		*/
#define NE_DATA_IND	18	/* data indication	      		*/
#define NE_EXDATA_IND	19	/* expedited data indication 		*/
#define NE_ORDREL_IND   20      /* orderly release ind 	      		*/
#define NE_DISCON_IND1	21	/* disconnect indication seq == 0      	*/
#define NE_DISCON_IND2	22	/* disconnect indication seq == 1   	*/
#define NE_DISCON_IND3	23	/* disconnect indication seq > 1  	*/
#define NE_PASS_CONN	24	/* pass connection 	      		*/

/* Unit data events */
#define NE_UNITDATA_REQ	25	/* unitdata request       		*/
#define NE_UNITDATA_IND	26	/* unitdata indication	      		*/
#define NE_UDERROR_IND	27	/* unitdata error indication  		*/

#define NE_NOEVENTS	28
/*
 * The following are the possible states of the Network
 * Service Interface
 */

#define NS_UNBND		0	/* unbound	                */
#define	NS_WACK_BREQ		1	/* waiting ack of BIND_REQ      */
#define NS_WACK_UREQ		2	/* waiting ack of UNBIND_REQ    */
#define NS_IDLE			3	/* idle 		        */
#define NS_WACK_OPTREQ		4	/* wait ack options request     */
#define NS_WACK_CREQ		5	/* waiting ack of CONN_REQ      */
#define NS_WCON_CREQ		6	/* waiting confirm of CONN_REQ  */
#define	NS_WRES_CIND		7	/* waiting response of CONN_IND */
#define NS_WACK_CRES		8	/* waiting ack of CONN_RES      */
#define NS_DATA_XFER		9	/* data transfer		*/
#define NS_WIND_ORDREL	 	10	/* releasing rd but not wr      */
#define NS_WREQ_ORDREL		11      /* wait to release wr but not rd*/
#define NS_WACK_DREQ6		12	/* waiting ack of DISCON_REQ    */
#define NS_WACK_DREQ7		13	/* waiting ack of DISCON_REQ    */
#define NS_WACK_DREQ9		14	/* waiting ack of DISCON_REQ    */
#define NS_WACK_DREQ10		15	/* waiting ack of DISCON_REQ    */
#define NS_WACK_DREQ11		16	/* waiting ack of DISCON_REQ    */

#define NS_NOSTATES		17


/* 
 * data structures defining message format for all NPI requests
 */

/* connection request */

struct N_conn_req {
	long	PRIM_type;	/* always N_CONN_REQ  */
	long	DEST_length;	/* dest addr length   */
	long	DEST_offset;	/* dest addr offset   */
	long	OPT_length;	/* options length     */
	long	OPT_offset;	/* options offset     */
};

/* connect response */

struct N_conn_res {
	long    PRIM_type;	/* always N_CONN_RES       */
	queue_t *QUEUE_ptr;	/* responding queue ptr    */
	long    OPT_length;	/* options length          */
	long	OPT_offset;	/* options offset          */
	long    SEQ_number;	/* sequence number          */
};

/* disconnect request */

struct N_discon_req {
	long    PRIM_type;	/* always N_DISCON_REQ */
	long    SEQ_number;	/* sequnce number      */
};

/* data request */

struct N_data_req {
	long	PRIM_type;	/* always N_DATA_REQ */
	long	MORE_flag;	/* more data	     */
};

/* expedited data request */

struct N_exdata_req {
	long	PRIM_type;	/* always N_EXDATA_REQ */
	long	MORE_flag;	/* more data	       */
};

/* information request */

struct N_info_req {
	long	PRIM_type;	/* always N_INFO_REQ */
};

/* bind request */

struct N_bind_req {
	long		PRIM_type;	/* always N_BIND_REQ            */
	long		ADDR_length;	/* addr length	                */
	long		ADDR_offset;	/* addr offset	                */
	unsigned long	CONIND_number;	/*connect indications requested */
};

/* unbind request */

struct N_unbind_req {
	long	PRIM_type;	/* always N_UNBIND_REQ */
};

/* unitdata request */

struct N_unitdata_req {
	long	PRIM_type;	/* always N_UNITDATA_REQ  */
	long	DEST_length;	/* dest addr length       */
	long	DEST_offset;	/* dest addr offset       */
	long	OPT_length;	/* options length         */
	long	OPT_offset;	/* options offset         */
};

/* manage options request */

struct N_optmgmt_req {
	long	PRIM_type;	/* always T_OPTMGMT_REQ   */
	long	OPN_length;	/* options length         */
	long	OPT_offset;	/* options offset         */
	long    MGMT_flags;	/* options flags          */
};

/* orderly release request */

struct N_ordrel_req {
	long	PRIM_type;	/* always N_ORDREL_REQ */
};

/* connect indication */

struct N_conn_ind {
	long	PRIM_type;	/* always N_CONN_IND */
	long	SRC_length;	/* src addr length   */
	long	SRC_offset;	/* src addr offset   */
	long	OPT_length;	/* option length     */
	long    OPT_offset;	/* option offset     */
	long    SEQ_number;	/* sequnce number    */
};

/* connect confirmation */

struct N_conn_con {
	long	PRIM_type;	/* always N_CONN_CON      */
	long	RES_length;	/* responding addr length */
	long	RES_offset;	/* responding addr offset */
	long	OPT_length;	/* option length          */
	long    OPT_offset;	/* option offset          */
};

/* disconnect indication */

struct N_discon_ind {
	long	PRIM_type;	/* always N_DISCON_IND 	*/
	long	DISCON_reason;	/* disconnect reason	*/
	long    SEQ_number;	/* sequnce number       */
};

/* data indication */

struct N_data_ind {
	long 	PRIM_type;	/* always N_DATA_IND */
	long	MORE_flag;	/* more data 	     */
};

/* expedited data indication */

struct N_exdata_ind {
	long	PRIM_type;	/* always N_EXDATA_IND */
	long	MORE_type;	/* more data           */
};

/* information acknowledgment */

struct N_info_ack {
	long	PRIM_type;	/* always N_INFO_ACK     */
	long	NSDU_size;	/* max NSDU size         */
	long	ENSDU_size;	/* max ENSDU size        */
	long	CDATA_size;	/* max connect data size */
	long	DDATA_size;	/* max discon data size  */
	long	ADDR_size;	/* address size		 */
	long	OPT_size;	/* options size		 */
	long    NIDU_size;	/* max NIDU size         */
	long    SERV_type;	/* provider service type */
	long    CURRENT_state;  /* current state         */
};

/* bind acknowledgment */

struct N_bind_ack {
	long		PRIM_type;	/* always N_BIND_ACK        */
	long		ADDR_length;	/* addr length              */
	long		ADDR_offset;	/* addr offset              */
	unsigned long	CONIND_number;	/* connect ind to be queued */
};

/* error acknowledgment */

struct N_error_ack { 
	long 	PRIM_type;	/* always N_ERROR_ACK  */
	long	ERROR_prim;	/* primitive in error  */
	long	NPI_error;	/* NPI error code      */
	long	UNIX_error;	/* UNIX error code     */
};

/* ok acknowledgment */

struct N_ok_ack {
	long 	PRIM_type;	/* always N_OK_ACK   */
	long	CORRECT_prim;	/* correct primitive */
};

/* unitdata indication */

struct N_unitdata_ind {
	long	PRIM_type;	/* always N_UNITDATA_IND  */
	long	SRC_length;	/* source addr length     */
	long	SRC_offset;	/* source addr offset     */
	long	OPT_length;	/* options length         */
	long	OPT_offset;	/* options offset         */
};

/* unitdata error indication */

struct N_uderror_ind {
	long	PRIM_type;	/* always N_UDERROR_IND   */
	long	DEST_length;	/* dest addr length       */
	long	DEST_offset;	/* dest addr offset       */
	long	OPT_length;	/* options length         */
	long	OPT_offset;	/* options offset         */
	long	ERROR_type;	/* error type	          */
};

/* manage options ack */

struct N_optmgmt_ack {
	long	PRIM_type;	/* always N_OPTMGMT_ACK   */
	long	OPN_length;	/* options length         */
	long	OPT_offset;	/* options offset         */
	long    MGMT_flags;	/* managment flags        */
};

/* orderly release indication */

struct N_ordrel_ind {
	long	PRIM_type;	/* always N_ORDREL_IND */
};

/*
 * The following is a union of the primitives
 */
union N_primitives {
	long			prim_type; /* primitive type     */
	struct N_conn_req	conn_req;	/* connect request    */
	struct N_conn_res	conn_res;	/* connect response   */
	struct N_discon_req	discon_req;	/* disconnect request */
	struct N_data_req	data_req;	/* data request       */
	struct N_exdata_req	exdata_req;	/* expedited data req */
	struct N_info_req	info_req;	/* information req    */
	struct N_bind_req	bind_req;	/* bind request       */
	struct N_unbind_req	unbind_req;	/* unbind request     */
	struct N_unitdata_req	unitdata_req;	/* unitdata requset   */
	struct N_optmgmt_req	optmgmt_req;	/* manage opt req     */
	struct N_ordrel_req	ordrel_req;	/* orderly rel req    */
	struct N_conn_ind	conn_ind;	/* connect indication */
	struct N_conn_con	conn_con;	/* connect corfirm    */
	struct N_discon_ind	discon_ind;	/* discon indication  */
	struct N_data_ind	data_ind;	/* data indication    */
	struct N_exdata_ind	exdata_ind;	/* expedited data ind */
	struct N_info_ack	info_ack;	/* info ack	      */
	struct N_bind_ack	bind_ack;	/* bind ack	      */
	struct N_error_ack	error_ack;	/* error ack	      */
	struct N_ok_ack		ok_ack;		/* ok ack	      */
	struct N_unitdata_ind	unitdata_ind;	/* unitdata ind       */
	struct N_uderror_ind	uderror_ind;	/* unitdata error ind */
	struct N_optmgmt_ack	optmgmt_ack;	/* manage opt ack     */
	struct N_ordrel_ind	ordrel_ind;	/* orderly rel ind    */
};

#define N_BIND_ACK_SIZE		sizeof(struct N_bind_ack)
#define N_PRIMITIVES_SIZE	sizeof(union N_primitives)
#define N_OK_ACK_SIZE		sizeof(struct N_ok_ack)
#define N_INFO_ACK_SIZE		sizeof(struct N_info_ack)
#define N_ERROR_ACK_SIZE	sizeof(struct N_error_ack)
#define N_BIND_REQ_SIZE		sizeof(struct N_bind_req)
#define N_UNITDATA_REQ_SIZE	sizeof(struct N_unitdata_req)
#define N_UNITDATA_IND_SIZE	sizeof(struct N_unitdata_ind)
#define N_UDERROR_IND_SIZE	sizeof(struct N_uderror_ind)