|
|
1.1 root 1: /*++
2:
3: Copyright (c) 1991 Microsoft Corporation
4:
5: Module Name:
6:
7: tihdr.h
8:
9: Abstract:
10:
11: Reverse Engineered Header for TPI.
12:
13: Author:
14:
15: sampa
16:
17: Revision History:
18:
19: --*/
20:
21: #ifndef SYS_TIHDR_INCLUDED
22: #define SYS_TIHDR_INCLUDED
23:
24:
25: //
26: // Primitive Types
27: //
28:
29: #define T_CONN_REQ 0
30: #define T_CONN_RES 1
31: #define T_DISCON_REQ 2
32: #define T_DATA_REQ 3
33: #define T_EXDATA_REQ 4
34: #define T_INFO_REQ 5
35: #define T_BIND_REQ 6
36: #define T_UNBIND_REQ 7
37: #define T_UNITDATA_REQ 8
38: #define T_OPTMGMT_REQ 9
39: #define T_ORDREL_REQ 10
40:
41: #define T_CONN_IND 11
42: #define T_CONN_CON 12
43: #define T_DISCON_IND 13
44: #define T_DATA_IND 14
45: #define T_EXDATA_IND 15
46: #define T_INFO_ACK 16
47: #define T_BIND_ACK 17
48: #define T_ERROR_ACK 18
49: #define T_OK_ACK 19
50: #define T_UNITDATA_IND 20
51: #define T_UDERROR_IND 21
52: #define T_OPTMGMT_ACK 22
53: #define T_ORDREL_IND 23
54: #define T_ASTAT_REQ 24
55: #define T_ASTAT_RES 25
56: #define T_SETSHDPUT_REQ 26
57: #define T_CONN_RES_ACK 27
58: #define T_CONN_RES_NACK 28
59:
60:
61: //
62: // Initialization Events
63: //
64:
65: #define TE_BIND_REQ 0
66: #define TE_UNBIND_REQ 1
67: #define TE_OPTMGMT_REQ 2
68: #define TE_BIND_ACK 3
69: #define TE_OPTMGMT_ACK 4
70: #define TE_ERROR_ACK 5
71: #define TE_OK_ACK1 6
72: #define TE_OK_ACK2 7
73: #define TE_OK_ACK3 8
74: #define TE_OK_ACK4 9
75:
76: //
77: // Connection Oriented Events
78: //
79:
80: #define TE_CONN_REQ 10
81: #define TE_CONN_RES 11
82: #define TE_DISCON_REQ 12
83: #define TE_DATA_REQ 13
84: #define TE_EXDATA_REQ 14
85: #define TE_ORDREL_REQ 15
86: #define TE_CONN_IND 16
87: #define TE_CONN_CON 17
88: #define TE_DATA_IND 18
89: #define TE_EXDATA_IND 19
90: #define TE_ORDREL_IND 20
91: #define TE_DISCON_IND1 21
92: #define TE_DISCON_IND2 22
93: #define TE_DISCON_IND3 23
94: #define TE_PASS_CONN 24
95:
96: //
97: // Connectionless events
98: //
99:
100: #define TE_UNITDATA_REQ 25
101: #define TE_UNITDATA_IND 26
102: #define TE_UDERROR_IND 27
103:
104: #define TE_NOEVENTS 28
105:
106: //
107: // States
108: //
109:
110: #define TS_UNBND 0
111: #define TS_WACK_BREQ 1
112: #define TS_WACK_UREQ 2
113: #define TS_IDLE 3
114: #define TS_WACK_OPTREQ 4
115: #define TS_WACK_CREQ 5
116: #define TS_WCON_CREQ 6
117: #define TS_WRES_CIND 7
118: #define TS_WACK_CRES 8
119: #define TS_DATA_XFER 9
120: #define TS_WIND_ORDREL 10
121: #define TS_WREQ_ORDREL 11
122: #define TS_WACK_DREQ6 12
123: #define TS_WACK_DREQ7 13
124: #define TS_WACK_DREQ9 14
125: #define TS_WACK_DREQ10 15
126: #define TS_WACK_DREQ11 16
127:
128: #define TS_NOSTATES 17
129:
130:
131: //
132: // Structure Definitions for M_PROTO Messages
133: //
134:
135: struct T_unitdata_req {
136: long PRIM_type; // T_UNITDATA_REQ
137: long DEST_length;
138: long DEST_offset;
139: long OPT_length;
140: long OPT_offset;
141: };
142:
143: struct T_uderror_ind {
144: long PRIM_type; // T_UDERROR_IND
145: long DEST_length;
146: long DEST_offset;
147: long OPT_length;
148: long OPT_offset;
149: long ERROR_type;
150: };
151:
152: struct T_unitdata_ind {
153: long PRIM_type; // T_UNITDATA_IND
154: long SRC_length;
155: long SRC_offset;
156: long OPT_length;
157: long OPT_offset;
158: };
159:
160: struct T_optmgmt_ack {
161: long PRIM_type; // T_OPTMGMT_ACK
162: long MGMT_flags;
163: long OPT_length;
164: long OPT_offset;
165: };
166:
167: struct T_discon_ind {
168: long PRIM_type; // T_DISCON_IND
169: long DISCON_reason; // this is an NTSTATUS
170: long SEQ_number;
171: };
172:
173: struct T_ordrel_ind {
174: long PRIM_type; // T_ORDREL_IND
175: };
176:
177: struct T_conn_con {
178: long PRIM_type; // T_CONN_CON
179: long RES_length;
180: long RES_offset;
181: long OPT_length;
182: long OPT_offset;
183: };
184:
185: struct T_conn_ind {
186: long PRIM_type; // T_CONN_IND
187: long SRC_length;
188: long SRC_offset;
189: long OPT_length;
190: long OPT_offset;
191: long SEQ_number;
192: };
193:
194: struct T_data_ind {
195: long PRIM_type; // T_DATA_IND
196: long MORE_flag;
197: long reserved;
198: };
199:
200: struct T_exdata_ind {
201: long PRIM_type; // T_EXDATA_IND
202: long MORE_flag;
203: long reserved;
204: };
205:
206: struct T_info_req {
207: long PRIM_type; // T_INFO_REQ
208: };
209:
210: struct T_bind_req {
211: long PRIM_type; // T_BIND_REQ
212: long ADDR_length;
213: long ADDR_offset;
214: long CONIND_number;
215: };
216:
217: struct T_conn_req {
218: long PRIM_type; // T_CONN_REQ
219: long DEST_length;
220: long DEST_offset;
221: long OPT_length;
222: long OPT_offset;
223: };
224:
225: struct T_conn_res {
226: long PRIM_type; // T_CONN_RES
227: queue_t *QUEUE_ptr;
228: long SEQ_number;
229: long OPT_length;
230: long OPT_offset;
231: };
232:
233: struct T_conn_res_ack {
234: long PRIM_type; // T_CONN_RES_ACK
235: long SEQ_number;
236: };
237:
238: struct T_conn_res_nack {
239: long PRIM_type; // T_CONN_RES_NACK
240: long SEQ_number;
241: long TLI_error; // TNTERROR signifies that
242: long UNIX_error; // this is an NTSTATUS
243: };
244:
245: struct T_data_req {
246: long PRIM_type; // T_DATA_REQ
247: long MORE_flag;
248: long SEND_flags;
249: };
250:
251: struct T_exdata_req {
252: long PRIM_type; // T_EXDATA_REQ
253: long MORE_flag;
254: long SEND_flags;
255: };
256:
257: struct T_discon_req {
258: long PRIM_type; // T_DISCON_REQ
259: long SEQ_number;
260: };
261:
262: struct T_ordrel_req {
263: long PRIM_type; // T_ORDREL_REQ
264: };
265:
266: struct T_optmgmt_req {
267: long PRIM_type; // T_OPTMGMT_REQ
268: long MGMT_flags;
269: long OPT_length;
270: long OPT_offset;
271: };
272:
273: struct T_setshdput_req {
274: long PRIM_type; // T_SETSHDPUT_REQ
275: int *SHDPUT_func;
276: };
277:
278: struct T_info_ack {
279: long PRIM_type; // T_INFO_ACK
280: long TSDU_size;
281: long ETSDU_size;
282: long CDATA_size;
283: long DDATA_size;
284: long ADDR_size;
285: long OPT_size;
286: long TIDU_size;
287: long SERV_type;
288: long CURRENT_state;
289: // Microsoft Extensions:
290: long ADDR_length; // current transport address
291: long ADDR_offset; // of this stream
292: long ThroughPut; // ThroughPut in Kbytes/second
293: // 0 if not available
294: long Delay; // Delay on sending a packet
295: // 0 if not available
296: long Reliable; // 1 if the connection is
297: // reliable.
298: // 0 if not.
299: unsigned char UNIQUE_addr[6]; // unique address for this host
300: };
301:
302: struct T_bind_ack {
303: long PRIM_type; // T_BIND_ACK
304: long ADDR_length;
305: long ADDR_offset;
306: long CONIND_number;
307: };
308:
309: struct T_error_ack {
310: long PRIM_type; // T_ERROR_ACK
311: long ERROR_prim;
312: long TLI_error; // TNTERROR signifies that
313: long UNIX_error; // this is an NTSTATUS
314: };
315:
316: struct T_ok_ack {
317: long PRIM_type; // T_OK_ACK
318: long CORRECT_prim;
319: };
320:
321: struct T_unbind_req {
322: long PRIM_type; // T_UNBIND_REQ
323: };
324:
325: struct T_astat_req {
326: long PRIM_type; // T_ASTAT_REQ
327: long ADDR_length;
328: long ADDR_offset;
329: };
330:
331: struct T_astat_res {
332: long PRIM_type; // T_ASTAT_RES
333: };
334:
335: union T_primitives {
336: long type;
337: struct T_unitdata_req t_unitdata_req;
338: struct T_uderror_ind t_uderror_ind;
339: struct T_unitdata_ind t_unitdata_ind;
340: struct T_optmgmt_ack t_optmgmt_ack;
341: struct T_discon_ind t_discon_ind;
342: struct T_ordrel_ind t_ordrel_ind;
343: struct T_conn_con t_conn_con;
344: struct T_conn_ind t_conn_ind;
345: struct T_data_ind t_data_ind;
346: struct T_exdata_ind t_exdata_ind;
347: struct T_info_req t_info_req;
348: struct T_bind_req t_bind_req;
349: struct T_conn_req t_conn_req;
350: struct T_conn_res t_conn_res;
351: struct T_conn_res_ack t_conn_res_ack;
352: struct T_conn_res_nack t_conn_res_nack;
353: struct T_data_req t_data_req;
354: struct T_exdata_req t_exdata_req;
355: struct T_discon_req t_discon_req;
356: struct T_ordrel_req t_ordrel_req;
357: struct T_optmgmt_req t_optmgmt_req;
358: struct T_info_ack t_info_ack;
359: struct T_bind_ack t_bind_ack;
360: struct T_error_ack t_error_ack;
361: struct T_ok_ack t_ok_ack;
362: struct T_unbind_req t_unbind_req;
363: };
364:
365:
366: #define unitdata_req t_unitdata_req
367: #define uderror_ind t_uderror_ind
368: #define unitdata_ind t_unitdata_ind
369: #define optmgm_ack t_optmgmt_ack
370: #define discon_ind t_discon_ind
371: #define ordrel_ind t_ordrel_ind
372: #define conn_con t_conn_con
373: #define conn_ind t_conn_ind
374: #define data_ind t_data_ind
375: #define exdata_ind t_exdata_ind
376: #define info_req t_info_req
377: #define bind_req t_bind_req
378: #define conn_req t_conn_req
379: #define conn_res t_conn_res
380: #define data_req t_data_req
381: #define exdata_req t_exdata_req
382: #define discon_req t_discon_req
383: #define ordrel_req t_ordrel_req
384: #define optmgm_req t_optmgmt_req
385: #define info_ack t_info_ack
386: #define bind_ack t_bind_ack
387: #define error_ack t_error_ack
388: #define ok_ack t_ok_ack
389: #define unbind_req t_unbind_req
390:
391:
392:
393: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.