* DECnet Network Services Protocol definitions,
* per Network Services Protocol Functional Specification,
* Version 3.2.0, October 1980.
#define NSP_DATA 0x00 /* data segment message */
#define NSP_LS 0x10 /* link service message */
#define NSP_INTR 0x30 /* interrupt message */
#define NSP_DATACK 0x04 /* data segment ack */
#define NSP_OTHACK 0x14 /* other data ack */
#define NSP_CONACK 0x24 /* connect ack */
#define NSP_NOP 0x08 /* no op */
#define NSP_CI 0x18 /* connect initiate */
#define NSP_CC 0x28 /* connect confirm */
#define NSP_DI 0x38 /* disconnect initiate */
#define NSP_DC 0x48 /* disconnect confirm */
/* flags for data segment messages */
#define NSP_BOM 0x20 /* beginning-of-message segment */
#define NSP_EOM 0x40 /* end-of-message segment */
char nsp_msgflg
; /* message type and flags */
d_short nsp_dstaddr
; /* destination address *
d_short nsp_srcaddr; /* source address */
d_short nsp_acknum
; /* number of ack'ed message */
d_short nsp_segnum
; /* this message's segment number */
char nsp_msgflg
; /* message type and flags */
d_short nsp_dstaddr
; /* destination address *
d_short nsp_srcaddr; /* source address */
d_short nsp_acknum
; /* number of ack'ed message */
d_short nsp_segnum
; /* this message's segment number */
/* optional data follows */
char nsp_msgflg
; /* message type and flags */
d_short nsp_dstaddr
; /* destination address *
d_short nsp_srcaddr; /* source address */
d_short nsp_acknum
; /* number of ack'ed message */
d_short nsp_segnum
; /* this message's segment number */
char nsp_lsflags
; /* link service flags */
char nsp_fcval
; /* flow control change value */
#define NSPLS_FCVALINT 0x0c /* fcval field interpretation: */
#define NSPLS_DATREQ 0x00 /* data segment request */
#define NSPLS_INTREQ 0x04 /* interrupt request */
#define NSPLS_FCMOD 0x03 /* flow control modification: */
#define NSPLS_NOCHANGE 0x00 /* no change */
#define NSPLS_OFF 0x01 /* do not send data */
#define NSPLS_ON 0x02 /* send data */
char nsp_msgflg
; /* message type and flags */
d_short nsp_dstaddr
; /* destination address *
d_short nsp_srcaddr; /* source address */
d_short nsp_acknum
; /* number of ack'ed message */
#define NSPA_ACK 0x8000 /* ack flag for acknum */
#define NSPA_NAK 0x9000 /* nak flag for acknum */
#define NSPA_QUAL 0xf000 /* qual field for acknum */
#define NSPA_NUM 0x0fff /* num field for acknum */
char nsp_msgflg
; /* message type and flags */
d_short nsp_dstaddr
; /* destination address *
char nsp_msgflg
; /* message type and flags */
* Connect Initiate message
char nsp_msgflg
; /* message type and flags */
d_short nsp_dstaddr
; /* destination address *
d_short nsp_srcaddr; /* source address */
char nsp_services
; /* flow control options */
char nsp_info
; /* NSP version info */
d_short nsp_segsize
; /* requested segment size */
/* connect data follows */
* Connect Confirm message
char nsp_msgflg
; /* message type and flags */
d_short nsp_dstaddr
; /* destination address *
d_short nsp_srcaddr; /* source address */
char nsp_services
; /* flow control options */
char nsp_info
; /* NSP version info */
d_short nsp_segsize
; /* requested segment size */
char nsp_cnt
; /* size of optional data field */
/* optional connect data follows */
* Disconnect Initiate message
char nsp_msgflg
; /* message type and flags */
d_short nsp_dstaddr
; /* destination address *
d_short nsp_srcaddr; /* source address */
d_short nsp_reason
; /* reason for disconnect */
char nsp_dcnt
; /* size of optional data field */
/* optional disconnect data follows */
* Disconnect Confirm message
char nsp_msgflg
; /* message type and flags */
d_short nsp_dstaddr
; /* destination address *
d_short nsp_srcaddr; /* source address */
d_short nsp_reason
; /* disconnect reason */