Commit | Line | Data |
---|---|---|
f38bbc38 SL |
1 | |
2 | /* | |
3 | * DECnet Network Services Protocol definitions, | |
4 | * per Network Services Protocol Functional Specification, | |
5 | * Version 3.2.0, October 1980. | |
6 | */ | |
7 | ||
8 | /* | |
9 | * NSP message types | |
10 | */ | |
11 | #define NSP_DATA 0x00 /* data segment message */ | |
12 | #define NSP_LS 0x10 /* link service message */ | |
13 | #define NSP_INTR 0x30 /* interrupt message */ | |
14 | #define NSP_DATACK 0x04 /* data segment ack */ | |
15 | #define NSP_OTHACK 0x14 /* other data ack */ | |
16 | #define NSP_CONACK 0x24 /* connect ack */ | |
17 | #define NSP_NOP 0x08 /* no op */ | |
18 | #define NSP_CI 0x18 /* connect initiate */ | |
19 | #define NSP_CC 0x28 /* connect confirm */ | |
20 | #define NSP_DI 0x38 /* disconnect initiate */ | |
21 | #define NSP_DC 0x48 /* disconnect confirm */ | |
22 | ||
23 | /* flags for data segment messages */ | |
24 | #define NSP_BOM 0x20 /* beginning-of-message segment */ | |
25 | #define NSP_EOM 0x40 /* end-of-message segment */ | |
26 | ||
27 | /* | |
28 | * Data segment message | |
29 | */ | |
30 | struct nspd { | |
31 | char nsp_msgflg; /* message type and flags */ | |
32 | d_short nsp_dstaddr; /* destination address * | |
33 | d_short nsp_srcaddr; /* source address */ | |
34 | d_short nsp_acknum; /* number of ack'ed message */ | |
35 | d_short nsp_segnum; /* this message's segment number */ | |
36 | }; | |
37 | ||
38 | /* | |
39 | * Interrupt message | |
40 | */ | |
41 | struct nspi { | |
42 | char nsp_msgflg; /* message type and flags */ | |
43 | d_short nsp_dstaddr; /* destination address * | |
44 | d_short nsp_srcaddr; /* source address */ | |
45 | d_short nsp_acknum; /* number of ack'ed message */ | |
46 | d_short nsp_segnum; /* this message's segment number */ | |
47 | /* optional data follows */ | |
48 | }; | |
49 | ||
50 | /* | |
51 | * Link Service message | |
52 | */ | |
53 | struct nspls { | |
54 | char nsp_msgflg; /* message type and flags */ | |
55 | d_short nsp_dstaddr; /* destination address * | |
56 | d_short nsp_srcaddr; /* source address */ | |
57 | d_short nsp_acknum; /* number of ack'ed message */ | |
58 | d_short nsp_segnum; /* this message's segment number */ | |
59 | char nsp_lsflags; /* link service flags */ | |
60 | char nsp_fcval; /* flow control change value */ | |
61 | }; | |
62 | ||
63 | #define NSPLS_FCVALINT 0x0c /* fcval field interpretation: */ | |
64 | #define NSPLS_DATREQ 0x00 /* data segment request */ | |
65 | #define NSPLS_INTREQ 0x04 /* interrupt request */ | |
66 | #define NSPLS_FCMOD 0x03 /* flow control modification: */ | |
67 | #define NSPLS_NOCHANGE 0x00 /* no change */ | |
68 | #define NSPLS_OFF 0x01 /* do not send data */ | |
69 | #define NSPLS_ON 0x02 /* send data */ | |
70 | ||
71 | /* | |
72 | * Data or Other Data Ack | |
73 | */ | |
74 | struct nspack { | |
75 | char nsp_msgflg; /* message type and flags */ | |
76 | d_short nsp_dstaddr; /* destination address * | |
77 | d_short nsp_srcaddr; /* source address */ | |
78 | d_short nsp_acknum; /* number of ack'ed message */ | |
79 | }; | |
80 | ||
81 | #define NSPA_ACK 0x8000 /* ack flag for acknum */ | |
82 | #define NSPA_NAK 0x9000 /* nak flag for acknum */ | |
83 | #define NSPA_QUAL 0xf000 /* qual field for acknum */ | |
84 | #define NSPA_NUM 0x0fff /* num field for acknum */ | |
85 | ||
86 | /* | |
87 | * Connect Ack | |
88 | */ | |
89 | struct nspcack { | |
90 | char nsp_msgflg; /* message type and flags */ | |
91 | d_short nsp_dstaddr; /* destination address * | |
92 | }; | |
93 | ||
94 | /* | |
95 | * No Op message | |
96 | */ | |
97 | struct nspnop { | |
98 | char nsp_msgflg; /* message type and flags */ | |
99 | /* tstdata follows */ | |
100 | }; | |
101 | ||
102 | /* | |
103 | * Connect Initiate message | |
104 | */ | |
105 | struct nspci { | |
106 | char nsp_msgflg; /* message type and flags */ | |
107 | d_short nsp_dstaddr; /* destination address * | |
108 | d_short nsp_srcaddr; /* source address */ | |
109 | char nsp_services; /* flow control options */ | |
110 | char nsp_info; /* NSP version info */ | |
111 | d_short nsp_segsize; /* requested segment size */ | |
112 | /* connect data follows */ | |
113 | }; | |
114 | ||
115 | /* | |
116 | * Connect Confirm message | |
117 | */ | |
118 | struct nspcc { | |
119 | char nsp_msgflg; /* message type and flags */ | |
120 | d_short nsp_dstaddr; /* destination address * | |
121 | d_short nsp_srcaddr; /* source address */ | |
122 | char nsp_services; /* flow control options */ | |
123 | char nsp_info; /* NSP version info */ | |
124 | d_short nsp_segsize; /* requested segment size */ | |
125 | char nsp_cnt; /* size of optional data field */ | |
126 | /* optional connect data follows */ | |
127 | }; | |
128 | ||
129 | /* | |
130 | * Disconnect Initiate message | |
131 | */ | |
132 | struct nspdi { | |
133 | char nsp_msgflg; /* message type and flags */ | |
134 | d_short nsp_dstaddr; /* destination address * | |
135 | d_short nsp_srcaddr; /* source address */ | |
136 | d_short nsp_reason; /* reason for disconnect */ | |
137 | char nsp_dcnt; /* size of optional data field */ | |
138 | /* optional disconnect data follows */ | |
139 | }; | |
140 | ||
141 | /* | |
142 | * Disconnect Confirm message | |
143 | */ | |
144 | struct nspdc { | |
145 | char nsp_msgflg; /* message type and flags */ | |
146 | d_short nsp_dstaddr; /* destination address * | |
147 | d_short nsp_srcaddr; /* source address */ | |
148 | d_short nsp_reason; /* disconnect reason */ | |
149 | }; |