|
|
1.1 root 1: /* sector1.h - VTPM: sector 1 definitions */
2:
3: /*
4: * $Header: /f/osi/vt/RCS/sector1.h,v 7.0 89/11/23 22:31:39 mrose Rel $
5: *
6: *
7: * $Log: sector1.h,v $
8: * Revision 7.0 89/11/23 22:31:39 mrose
9: * Release 6.0
10: *
11: */
12:
13: /*
14: * NOTICE
15: *
16: * Acquisition, use, and distribution of this module and related
17: * materials are subject to the restrictions of a license agreement.
18: * Consult the Preface in the User's Manual for the full terms of
19: * this agreement.
20: *
21: */
22:
23:
24: #define MAXSPARGS 2 /*Max Special Profile Arguments (2 for TLENET)*/
25: #define MAXCDSOBJ 2 /*Max Display Objects (2 for TRANSPARENT)*/
26: #define MAXCSSOBJ 1 /*Max Control Objects to negotiate*/
27: #define MAXDEVOBJ 1 /*Max Device Objects*/
28: #define MAXFONTS 1
29: #define MAXREPS 1 /*Maximum Repertoires*/
30: #define MAXEMPS 1 /*Max Background Emphasis*/
31: #define MAXCOLORS 1 /*Aw C'mon*/
32:
33:
34: /* ASQ PDU Fields*/
35: #define ASQ_basic 0
36: #define ASQ_Imp_Ident 1
37: #define ASQ_Func_Units 2
38: #define ASQ_Profile 3
39: #define ASQ_P_Version 4
40: #define ASQ_Coll_Win 5
41:
42: /* ASR PDU Fields */
43: #define ASR_Fail_String 0
44: #define ASR_Fail_Reason 1
45: #define ASR_Result 2
46: #define ASR_Imp_Ident 3
47: #define ASR_P_Version 4
48: #define ASR_Arg_List 5
49: #define ASR_Func_Units 6
50: #define ASR_Coll_Win 7
51:
52: /* Functional Units Bit Map*/
53: #define profileSwitch 0x01
54: #define profileMIN 0x02
55: #define negRelease 0x04
56: #define urgData 0x08
57: #define destBreak 0x10
58:
59: /* NDQ ASN.1 Types */
60: #define ECHO_ON 0
61: #define ECHO_OFF 1
62: #define DISPLAY_OBJ 0
63: #define CTRL_OBJ 1
64: #define DO_NEXT_X 0
65: #define DO_NEXT_Y 1
66: #define DO_PTR_REL 2
67: #define DO_PTR_ABS 3
68: #define DO_TEXT 4
69: #define DO_RPT_TEXT 5
70: #define DO_ATTR 6
71: #define DO_ERASE 7
72: #define DO_PREV_X 8
73: #define DO_PREV_Y 9
74:
75: /*DI/KB Control Objects*/
76: #define KB_SIZE 5 /* network bit ordering */
77: #define IP_OBJ 0x80
78: #define AO_OBJ 0x40
79: #define AYT_OBJ 0x20
80: #define DM_OBJ 0x10
81: #define BRK_OBJ 0x08
82:
83: /*NI/NA Control Objects*/
84: #define NA_SIZE 4 /* network bit ordering */
85: #define ECHO_OBJ 0x80 /*0 is Local; 1 is Remote*/
86: #define SUP_GA 0x40 /*0 is Use Go Ahead; 1 is Suppress Go Ahead*/
87: #define DISP_BIN 0x20 /*1 = WACA is Binary; 0 = WACA is ASCII*/
88: #define KBD_BIN 0x10 /*1 = WACI is Binary; 0 = WACI is ASCII*/
89:
90: /*Go Ahead Control Object*/
91: #define GA_SIZE 1 /* network bit ordering */
92: #define GO_AHEAD 0x80
93:
94: /*Synch Control Object*/
95: #define SYNC_SIZE 1 /* network bit ordering */
96: #define SYNC 0x80
97:
98: /*Default Profile Control Object*/
99: #define DEF_SIZE 1 /* network bit ordering */
100: #define DEF_ECHO 0x80 /*True for local echo*/
101:
102: #define FULL_ASCII "ASCII" /*TEMP repertoire ID*/
103: #define ASCII_GO "GO"
104: #define TRANSPARENT "TRANS"
105:
106: typedef struct trans_args /*Arguments for transparent profile*/
107: {
108: int num_reps;
109: char *rep_ptr[MAXREPS];
110: char *cur_rep; /*Currently active repertoire*/
111: } TRANS_ARGS;
112:
113: typedef struct telnet_args /*Arguments for telnet profile*/
114: {
115: int x_window;
116: char full_ascii; /*If 1, Full ASCII. If 0, graphics only*/
117: } TELNET_ARGS;
118:
119: typedef struct vt_profile /*Structure for profile parameters*/
120: {
121: char *profile_name;
122: union
123: {
124: TRANS_ARGS tr_arg_list;
125: TELNET_ARGS tel_arg_list;
126: } arg_val;
127: } VT_PROFILE;
128:
129: /* Data Structures for PDU's */
130:
131: typedef struct ex_pointer /*Explicit Pointer*/
132: {
133: int x_true;
134: int x_value;
135: int y_true;
136: int y_value;
137: int z_true;
138: int z_value;
139: } EX_POINTER;
140:
141: typedef struct pointer /*General Pointer*/
142: {
143: int ptr_type; /*Values 0 - 6 */
144: EX_POINTER e_ptr;
145: } POINTER;
146:
147: typedef struct rpt_text /*Repeat text*/
148: {
149: POINTER fin_addr;
150: int text_count;
151: char *text;
152: } RPT_TEXT;
153:
154: typedef struct erase_text /*Erase*/
155: {
156: POINTER start_erase;
157: POINTER end_erase;
158: int erase_attr; /*Boolean*/
159: } ERASE_TEXT;
160:
161: typedef struct text
162: {
163: int text_count;
164: char *text_ptr;
165: } TEXT_CONTENT;
166:
167: typedef struct attrib
168: {
169: int attr_id; /* 0 - 4*/
170: int attr_val;
171: int attr_ext;
172: POINTER beg_p;
173: POINTER end_p;
174: } ATTRIB;
175:
176: typedef struct bool_u
177: {
178: int val_count;
179: char *value;
180: int mask_count;
181: char *mask;
182: } BOOL_U;
183:
184: typedef struct bit_str
185: {
186: int bitcount;
187: int bitstring;
188: } BIT_STR;
189:
190: typedef struct do_update /*Display Object Update*/
191: {
192: char *do_name;
193: int do_type; /* 0 - 9 */
194: union
195: {
196: EX_POINTER ptr_rel;
197: POINTER ptr_abs;
198: TEXT_CONTENT text_ud;
199: RPT_TEXT rpt_seq;
200: ATTRIB wrt_attrib;
201: ERASE_TEXT erase;
202: } do_cmd;
203: } DO_UPDATE;
204:
205: typedef struct co_update /*Control Object Update*/
206: {
207: char *co_name;
208: int co_type; /* 0 - 4 */
209: union
210: {
211: char *char_update;
212: BOOL_U bool_update;
213: int sym_update;
214: int int_update;
215: BIT_STR bit_update;
216: } co_cmd;
217: } CO_UPDATE;
218:
219: typedef struct text_update
220: {
221: struct text_update *ndq_elem; /*Pointer to next one in queue*/
222: int echo_sw; /*0 = Echo Now; 1 = Not Echo Now*/
223: int type_sw; /*0 = display; 1 = control*/
224: union
225: {
226: DO_UPDATE do_list;
227: CO_UPDATE co_list;
228: } updates;
229: } TEXT_UPDATE;
230:
231: typedef struct implem_id
232: {
233: int oid_true;
234: OID imp_oid; /*Optional*/
235: int name_true;
236: char *name; /*Optional*/
237: int version_true;
238: char *version; /*Optional*/
239: } IMPLEM_ID;
240:
241: typedef struct int_offer
242: {
243: int type; /*0 for single value, 1 for range*/
244: int value;
245: int min_val;
246: int max_val;
247: } INT_OFFER;
248:
249: typedef struct rep_font /*Repertoire Font Offer*/
250: {
251: int rep_type; /*1 = NULL; 2 = SEQUENCE....*/
252: char *rep_assign; /*0 value for pointer means not used*/
253: int valid_font_cap;
254: INT_OFFER capability;
255: int num_fonts;
256: char *font_names[MAXFONTS];
257: } REP_FONT;
258:
259: typedef struct dimen_param
260: {
261: int bound_type; /*0 for no bound, 1 for unbounded, 2 for
262: INT_OFFER */
263: INT_OFFER bound;
264: BIT_STR addressing; /*NOT optional according to 9041*/
265: BIT_STR absolute; /*Optional*/
266: int window_type; /*0 for not used, 1 for unbounded, 2 for
267: INT_OFFER */
268: INT_OFFER window;
269: } DIMEN_PARAM;
270:
271: typedef struct rep_list /*Repertoire list*/
272: {
273: int valid_cap;
274: INT_OFFER capability; /*Listed as optional but seems you should
275: have it. */
276: int num_reps; /*Number of repertoires -- seems it should
277: usually equal capability. */
278: REP_FONT repertoire[MAXREPS];
279: } REP_LIST;
280:
281: typedef struct emp_list
282: {
283: int valid_cap;
284: INT_OFFER capability; /*Technically Optional*/
285: int num_emps;
286: char *emp_string[MAXEMPS];
287: } EMP_LIST;
288:
289: typedef struct color_list
290: {
291: int valid_cap;
292: INT_OFFER capability;
293: int num_colors;
294: char *color_string[MAXCOLORS];
295: } COLOR_LIST;
296:
297: typedef struct cds_offer
298: {
299: char *obj_name;
300: BIT_STR dimensions;
301: int valid_x_dim;
302: DIMEN_PARAM x_dim;
303: int valid_y_dim;
304: DIMEN_PARAM y_dim;
305: int valid_z_dim;
306: DIMEN_PARAM z_dim;
307: BIT_STR erasure;
308: int valid_rep_list;
309: REP_LIST rep_offer;
310: int valid_emp_list;
311: EMP_LIST emp_offer;
312: int valid_fore_color;
313: COLOR_LIST fore_color_list;
314: int valid_back_color;
315: COLOR_LIST back_color_list;
316: BIT_STR access_right;
317: } CDS_OFFER;
318:
319: typedef struct css_offer /*Unused in TELNET (and hopefully Forms)*/
320: {
321: int i; /*For compiler*/
322: } CSS_OFFER;
323:
324: typedef struct dev_offer /*Also unused*/
325: {
326: int i; /*For compiler*/
327: } DEV_OFFER;
328:
329: typedef struct special_offer
330: {
331: int param_num;
332: int param_type; /*0,1,or2*/
333: union
334: {
335: char *bool_arg; /*Turns into bitstring = 0 or 1*/
336: INT_OFFER int_arg;
337: char *string_arg;
338: } args;
339: } SPECIAL_OFFER;
340:
341: typedef struct arg_offer_list
342: {
343: int oid_true; /*Optional--Use Default Profile if not specified*/
344: OID prof_oid;
345: int num_sp_param; /*Number of special profile arguments*/
346: int num_cds_objects; /*Number of Conceptual Data Store objects*/
347: int num_css_objects; /*Number of Control Signal Status objects*/
348: int num_dev_objects; /*Number of Device Object identifiers*/
349: SPECIAL_OFFER sp_offer_list[MAXSPARGS];
350: CDS_OFFER cds_offer_list[MAXCDSOBJ];
351: CSS_OFFER css_offer_list[MAXCSSOBJ];
352: DEV_OFFER dev_offer_list[MAXDEVOBJ];
353: BIT_STR del_ctrl; /*Delivery Control*/
354: } ARG_OFFER_LIST;
355:
356: typedef struct asq_msg
357: {
358: int class; /*Basic only (=1)*/
359: int valid_imp;
360: IMPLEM_ID imp_id; /*Optional*/
361: BIT_STR func_units;
362: int valid_prof;
363: ARG_OFFER_LIST asq_profile; /*Profile is optional*/
364: BIT_STR version; /*Default = '1'B*/
365: int valid_coll;
366: int coll_winner; /*Optional*/
367: } ASQ_MSG;
368:
369: typedef struct fail_reason
370: {
371: int type; /*0 or 1*/
372: char *usr_reason;
373: int provider_reason; /* 1,2,3,or 4*/
374: } FAIL_REASON;
375:
376:
377: typedef struct font_value /*Repertoire Font Value*/
378: {
379: int rep_type; /*1 = NULL; 2 = SEQUENCE....*/
380: char *rep_assign; /*0 value for pointer means not used*/
381: int valid_font_cap;
382: int capability;
383: int num_fonts;
384: char *font_names[MAXFONTS];
385: } FONT_VALUE;
386:
387: typedef struct dimen_value
388: {
389: int bound_type; /*0 for no bound, 1 for unbounded, 2 for
390: integer */
391: int bound;
392: int valid_addr;
393: int addressing; /*NOT optional according to 9041*/
394: int valid_abs;
395: int absolute; /*Optional*/
396: int window_type; /*0 for not used, 1 for unbounded, 2 for
397: integer */
398: int window;
399: } DIMEN_VALUE;
400:
401: typedef struct rep_val_list /*Repertoire value list*/
402: {
403: int valid_cap;
404: int capability;
405: int num_reps; /*Number of repertoires */
406: FONT_VALUE repertoire[MAXREPS];
407: } REP_VALUE;
408:
409: typedef struct emp_value
410: {
411: int valid_cap;
412: int capability;
413: int num_emps;
414: char *emp_string[MAXEMPS];
415: } EMP_VALUE;
416:
417: typedef struct color_value
418: {
419: int valid_cap;
420: int capability;
421: int num_colors;
422: char *color_string[MAXCOLORS];
423: } COLOR_VALUE;
424:
425: typedef struct cds_value
426: {
427: char *obj_name;
428: int dimensions; /*0 if not valid*/
429: int valid_x_dim;
430: DIMEN_VALUE x_dim;
431: int valid_y_dim;
432: DIMEN_VALUE y_dim;
433: int valid_z_dim;
434: DIMEN_VALUE z_dim;
435: int valid_erasure;
436: int erasure;
437: int valid_rep_list;
438: REP_VALUE rep_value;
439: int valid_emp_list;
440: EMP_VALUE emp_value;
441: int valid_fore_color;
442: COLOR_VALUE fore_color_list;
443: int valid_back_color;
444: COLOR_VALUE back_color_list;
445: int valid_access_right;
446: int access_right;
447: } CDS_VALUE;
448:
449: typedef struct css_value /*Unused in TELNET */
450: {
451: int i; /*For compiler*/
452: } CSS_VALUE;
453:
454: typedef struct dev_value /*Also unused*/
455: {
456: int i; /*For compiler*/
457: } DEV_VALUE;
458:
459: typedef struct special_value
460: {
461: int param_num;
462: int param_type; /*0,1,or2*/
463: union
464: {
465: int bool_arg; /*Turns into bitstring = 0 or 1*/
466: int int_arg;
467: char *string_arg;
468: } args;
469: } SPECIAL_VALUE;
470:
471: typedef struct arg_val_list
472: {
473: int num_sp_param; /*Number of special profile arguments*/
474: int num_cds_objects; /*Number of Conceptual Data Store objects*/
475: int num_css_objects; /*Number of Control Signal Status objects*/
476: int num_dev_objects; /*Number of Device Object identifiers*/
477: SPECIAL_VALUE sp_val[MAXSPARGS];
478: CDS_VALUE cds_val[MAXCDSOBJ];
479: CSS_VALUE css_val[MAXCSSOBJ];
480: DEV_VALUE dev_val[MAXDEVOBJ];
481: int del_ctrl; /*Delivery Control*/
482: } ARG_VAL_LIST;
483:
484: typedef struct asr_msg
485: {
486: int valid_reason; /*1 if reason is supplied*/
487: FAIL_REASON reason; /*Optional*/
488: int result; /*0,1, or 2*/
489: int valid_imp; /*1 if implementation i.d is supplied*/
490: IMPLEM_ID imp_id; /*Optional*/
491: BIT_STR version; /*Only '1'B now valid*/
492: int valid_arg_list;
493: ARG_VAL_LIST arg_list;
494: BIT_STR func_units;
495: int valid_coll; /*Is collision_winner valid?*/
496: int coll_winner; /*Optional (0,1,2)*/
497: } ASR_MSG;
498:
499:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.