]> git.saurik.com Git - apple/security.git/blob - SecuritySNACCRuntime/c-lib/boot/tbl.h
Security-54.1.3.tar.gz
[apple/security.git] / SecuritySNACCRuntime / c-lib / boot / tbl.h
1 /*
2 * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved.
3 *
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
8 * using this file.
9 *
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
16 */
17
18
19 /*
20 * tbl.h
21 *
22 * "TBL" ASN.1 module C type definitions and prototypes
23 *
24 * This .h file was generated by snacc on Mon Jun 2 11:23:56 1997
25 *
26 * UBC snacc written compiler by Mike Sample
27 *
28 * NOTE: This is a machine generated file--editing not recommended
29 */
30
31
32 #ifndef _tbl_h_
33 #define _tbl_h_
34
35
36
37
38 typedef enum
39 {
40 TBL_BOOLEAN = 0,
41 TBL_INTEGER = 1,
42 TBL_BITSTRING = 2,
43 TBL_OCTETSTRING = 3,
44 TBL_NULL = 4,
45 TBL_OID = 5,
46 TBL_REAL = 6,
47 TBL_ENUMERATED = 7,
48 TBL_SEQUENCE = 8,
49 TBL_SET = 9,
50 TBL_SEQUENCEOF = 10,
51 TBL_SETOF = 11,
52 TBL_CHOICE = 12,
53 TBL_TYPEREF = 13
54 } TBLTypeId; /* ENUMERATED { TBL_BOOLEAN (0), TBL_INTEGER (1), TBL_BITSTRING (2), TBL_OCTETSTRING (3), TBL_NULL (4), TBL_OID (5), TBL_REAL (6), TBL_ENUMERATED (7), TBL_SEQUENCE (8), TBL_SET (9), TBL_SEQUENCEOF (10), TBL_SETOF (11), TBL_CHOICE (12), TBL_TYPEREF (13) } */
55
56 #define BEncTBLTypeIdContent BEncAsnEnumContent
57
58 #define BDecTBLTypeIdContent BDecAsnEnumContent
59
60 #define PrintTBLTypeId PrintAsnEnum
61
62 #define FreeTBLTypeId FreeAsnEnum
63
64
65
66
67 typedef AsnInt TBLTypeDefId; /* INTEGER */
68
69 #define BEncTBLTypeDefIdContent BEncAsnIntContent
70
71 #define BDecTBLTypeDefIdContent BDecAsnIntContent
72
73 #define PrintTBLTypeDefId PrintAsnInt
74
75 #define FreeTBLTypeDefId FreeAsnInt
76
77
78
79
80 typedef enum
81 {
82 UNIVERSAL = 0,
83 APPLICATION = 1,
84 CONTEXT = 2,
85 PRIVATE = 3
86 } TBLTagClass; /* ENUMERATED { UNIVERSAL (0), APPLICATION (1), CONTEXT (2), PRIVATE (3) } */
87
88 #define BEncTBLTagClassContent BEncAsnEnumContent
89
90 #define BDecTBLTagClassContent BDecAsnEnumContent
91
92 #define PrintTBLTagClass PrintAsnEnum
93
94 #define FreeTBLTagClass FreeAsnEnum
95
96
97
98
99 typedef struct TBLRange /* SEQUENCE */
100 {
101 AsnInt from; /* [0] IMPLICIT INTEGER */
102 AsnInt to; /* [1] IMPLICIT INTEGER */
103 } TBLRange;
104
105 AsnLen BEncTBLRangeContent PROTO ((BUF_TYPE b, TBLRange *v));
106
107 void BDecTBLRangeContent PROTO ((BUF_TYPE b, AsnTag tagId0, AsnLen elmtLen0, TBLRange *v, AsnLen *bytesDecoded, ENV_TYPE env));
108
109
110 void PrintTBLRange PROTO ((FILE* f, TBLRange *v, unsigned short int indent));
111 void FreeTBLRange PROTO ((TBLRange *v));
112
113
114
115
116
117 typedef struct TBLNamedNumber /* SEQUENCE */
118 {
119 PrintableString name; /* [0] IMPLICIT PrintableString */
120 AsnInt value; /* [1] IMPLICIT INTEGER */
121 } TBLNamedNumber;
122
123 AsnLen BEncTBLNamedNumberContent PROTO ((BUF_TYPE b, TBLNamedNumber *v));
124
125 void BDecTBLNamedNumberContent PROTO ((BUF_TYPE b, AsnTag tagId0, AsnLen elmtLen0, TBLNamedNumber *v, AsnLen *bytesDecoded, ENV_TYPE env));
126
127
128 void PrintTBLNamedNumber PROTO ((FILE* f, TBLNamedNumber *v, unsigned short int indent));
129 void FreeTBLNamedNumber PROTO ((TBLNamedNumber *v));
130
131
132
133
134
135 typedef AsnList TBLNamedNumberList; /* SEQUENCE OF TBLNamedNumber */
136
137 AsnLen BEncTBLNamedNumberListContent PROTO ((BUF_TYPE b, TBLNamedNumberList *v));
138
139 void BDecTBLNamedNumberListContent PROTO ((BUF_TYPE b, AsnTag tagId0, AsnLen elmtLen0, TBLNamedNumberList *v, AsnLen *bytesDecoded, ENV_TYPE env));
140
141
142 void PrintTBLNamedNumberList PROTO ((FILE* f, TBLNamedNumberList *v, unsigned short int indent));
143 void FreeTBLNamedNumberList PROTO ((TBLNamedNumberList *v));
144
145
146
147
148
149 typedef struct TBLTypeRef /* SEQUENCE */
150 {
151 TBLTypeDefId typeDef; /* TBLTypeDefId */
152 AsnBool implicit; /* BOOLEAN */
153 struct TBLTypeDef *typeDefPtr; /* Added by MS to hold resolved index */
154 } TBLTypeRef;
155
156 AsnLen BEncTBLTypeRefContent PROTO ((BUF_TYPE b, TBLTypeRef *v));
157
158 void BDecTBLTypeRefContent PROTO ((BUF_TYPE b, AsnTag tagId0, AsnLen elmtLen0, TBLTypeRef *v, AsnLen *bytesDecoded, ENV_TYPE env));
159
160
161 void PrintTBLTypeRef PROTO ((FILE* f, TBLTypeRef *v, unsigned short int indent));
162 void FreeTBLTypeRef PROTO ((TBLTypeRef *v));
163
164
165
166
167
168 typedef struct TBLTag /* SEQUENCE */
169 {
170 TBLTagClass tclass; /* TBLTagClass */
171 AsnInt code; /* INTEGER (0..MAX) */
172 BER_FORM form; /* added by MS to simplify enc/dec */
173 AsnTag encTag; /* added by MS to simplify enc/dec */
174 } TBLTag;
175
176 AsnLen BEncTBLTagContent PROTO ((BUF_TYPE b, TBLTag *v));
177
178 void BDecTBLTagContent PROTO ((BUF_TYPE b, AsnTag tagId0, AsnLen elmtLen0, TBLTag *v, AsnLen *bytesDecoded, ENV_TYPE env));
179
180
181 void PrintTBLTag PROTO ((FILE* f, TBLTag *v, unsigned short int indent));
182 void FreeTBLTag PROTO ((TBLTag *v));
183
184
185
186
187
188 typedef AsnList TBLTypeSeqOf; /* SEQUENCE OF TBLTag */
189
190 AsnLen BEncTBLTypeSeqOfContent PROTO ((BUF_TYPE b, TBLTypeSeqOf *v));
191
192 void BDecTBLTypeSeqOfContent PROTO ((BUF_TYPE b, AsnTag tagId0, AsnLen elmtLen0, TBLTypeSeqOf *v, AsnLen *bytesDecoded, ENV_TYPE env));
193
194
195 void PrintTBLTypeSeqOf PROTO ((FILE* f, TBLTypeSeqOf *v, unsigned short int indent));
196 void FreeTBLTypeSeqOf PROTO ((TBLTypeSeqOf *v));
197
198
199
200
201
202 typedef AsnList TBLTypeContentSeqOf; /* SEQUENCE OF TBLType */
203
204 AsnLen BEncTBLTypeContentSeqOfContent PROTO ((BUF_TYPE b, TBLTypeContentSeqOf *v));
205
206 void BDecTBLTypeContentSeqOfContent PROTO ((BUF_TYPE b, AsnTag tagId0, AsnLen elmtLen0, TBLTypeContentSeqOf *v, AsnLen *bytesDecoded, ENV_TYPE env));
207
208
209 void PrintTBLTypeContentSeqOf PROTO ((FILE* f, TBLTypeContentSeqOf *v, unsigned short int indent));
210 void FreeTBLTypeContentSeqOf PROTO ((TBLTypeContentSeqOf *v));
211
212
213
214
215
216 typedef struct TBLType /* SEQUENCE */
217 {
218 TBLTypeId typeId; /* [0] IMPLICIT TBLTypeId */
219 AsnBool optional; /* [1] IMPLICIT BOOLEAN */
220 TBLTypeSeqOf* tagList; /* [2] IMPLICIT TBLTypeSeqOf OPTIONAL */
221 struct TBLTypeContent* content; /* [3] TBLTypeContent */
222 PrintableString fieldName; /* [4] IMPLICIT PrintableString OPTIONAL */
223 struct TBLRange* constraint; /* [5] IMPLICIT TBLRange OPTIONAL */
224 TBLNamedNumberList* values; /* [6] IMPLICIT TBLNamedNumberList OPTIONAL */
225 } TBLType;
226
227 AsnLen BEncTBLTypeContent PROTO ((BUF_TYPE b, TBLType *v));
228
229 void BDecTBLTypeContent PROTO ((BUF_TYPE b, AsnTag tagId0, AsnLen elmtLen0, TBLType *v, AsnLen *bytesDecoded, ENV_TYPE env));
230
231
232 void PrintTBLType PROTO ((FILE* f, TBLType *v, unsigned short int indent));
233 void FreeTBLType PROTO ((TBLType *v));
234
235
236
237
238
239 typedef struct TBLTypeContent /* CHOICE */
240 {
241 enum TBLTypeContentChoiceId
242 {
243 TBLTYPECONTENT_PRIMTYPE,
244 TBLTYPECONTENT_ELMTS,
245 TBLTYPECONTENT_TYPEREF
246 } choiceId;
247 union TBLTypeContentChoiceUnion
248 {
249 AsnNull primType; /* [0] IMPLICIT NULL */
250 TBLTypeContentSeqOf* elmts; /* [1] IMPLICIT TBLTypeContentSeqOf */
251 struct TBLTypeRef* typeRef; /* [2] IMPLICIT TBLTypeRef */
252 } a;
253 } TBLTypeContent;
254
255 AsnLen BEncTBLTypeContentContent PROTO ((BUF_TYPE b, TBLTypeContent *v));
256
257 void BDecTBLTypeContentContent PROTO ((BUF_TYPE b, AsnTag tagId0, AsnLen elmtLen0, TBLTypeContent *v, AsnLen *bytesDecoded, ENV_TYPE env));
258
259
260 void PrintTBLTypeContent PROTO ((FILE* f, TBLTypeContent *v, unsigned short int indent));
261 void FreeTBLTypeContent PROTO ((TBLTypeContent *v));
262
263
264
265
266
267 typedef struct TBLTypeDef /* SEQUENCE */
268 {
269 TBLTypeDefId typeDefId; /* TBLTypeDefId */
270 PrintableString typeName; /* PrintableString */
271 struct TBLType* type; /* TBLType */
272 AsnNull* isPdu; /* NULL OPTIONAL */
273 } TBLTypeDef;
274
275 AsnLen BEncTBLTypeDefContent PROTO ((BUF_TYPE b, TBLTypeDef *v));
276
277 void BDecTBLTypeDefContent PROTO ((BUF_TYPE b, AsnTag tagId0, AsnLen elmtLen0, TBLTypeDef *v, AsnLen *bytesDecoded, ENV_TYPE env));
278
279
280 void PrintTBLTypeDef PROTO ((FILE* f, TBLTypeDef *v, unsigned short int indent));
281 void FreeTBLTypeDef PROTO ((TBLTypeDef *v));
282
283
284
285
286
287 typedef AsnList TBLModuleSeqOf; /* SEQUENCE OF TBLTypeDef */
288
289 AsnLen BEncTBLModuleSeqOfContent PROTO ((BUF_TYPE b, TBLModuleSeqOf *v));
290
291 void BDecTBLModuleSeqOfContent PROTO ((BUF_TYPE b, AsnTag tagId0, AsnLen elmtLen0, TBLModuleSeqOf *v, AsnLen *bytesDecoded, ENV_TYPE env));
292
293
294 void PrintTBLModuleSeqOf PROTO ((FILE* f, TBLModuleSeqOf *v, unsigned short int indent));
295 void FreeTBLModuleSeqOf PROTO ((TBLModuleSeqOf *v));
296
297
298
299
300
301 typedef struct TBLModule /* SEQUENCE */
302 {
303 PrintableString name; /* [0] IMPLICIT PrintableString */
304 AsnOid id; /* [1] IMPLICIT OBJECT IDENTIFIER OPTIONAL */
305 AsnBool isUseful; /* [2] IMPLICIT BOOLEAN */
306 TBLModuleSeqOf* typeDefs; /* [3] IMPLICIT TBLModuleSeqOf */
307 } TBLModule;
308
309 AsnLen BEncTBLModuleContent PROTO ((BUF_TYPE b, TBLModule *v));
310
311 void BDecTBLModuleContent PROTO ((BUF_TYPE b, AsnTag tagId0, AsnLen elmtLen0, TBLModule *v, AsnLen *bytesDecoded, ENV_TYPE env));
312
313
314 void PrintTBLModule PROTO ((FILE* f, TBLModule *v, unsigned short int indent));
315 void FreeTBLModule PROTO ((TBLModule *v));
316
317
318
319
320
321 typedef AsnList TBLSeqOf; /* SEQUENCE OF TBLModule */
322
323 AsnLen BEncTBLSeqOfContent PROTO ((BUF_TYPE b, TBLSeqOf *v));
324
325 void BDecTBLSeqOfContent PROTO ((BUF_TYPE b, AsnTag tagId0, AsnLen elmtLen0, TBLSeqOf *v, AsnLen *bytesDecoded, ENV_TYPE env));
326
327
328 void PrintTBLSeqOf PROTO ((FILE* f, TBLSeqOf *v, unsigned short int indent));
329 void FreeTBLSeqOf PROTO ((TBLSeqOf *v));
330
331
332
333
334
335 typedef struct TBL /* SEQUENCE */
336 {
337 AsnInt totalNumModules; /* INTEGER */
338 AsnInt totalNumTypeDefs; /* INTEGER */
339 AsnInt totalNumTypes; /* INTEGER */
340 AsnInt totalNumTags; /* INTEGER */
341 AsnInt totalNumStrings; /* INTEGER */
342 AsnInt totalLenStrings; /* INTEGER */
343 TBLSeqOf* modules; /* TBLSeqOf */
344 } TBL;
345
346 AsnLen BEncTBL PROTO ((BUF_TYPE b, TBL *v));
347
348 void BDecTBL PROTO ((BUF_TYPE b, TBL *result, AsnLen *bytesDecoded, ENV_TYPE env));
349 AsnLen BEncTBLContent PROTO ((BUF_TYPE b, TBL *v));
350
351 void BDecTBLContent PROTO ((BUF_TYPE b, AsnTag tagId0, AsnLen elmtLen0, TBL *v, AsnLen *bytesDecoded, ENV_TYPE env));
352
353
354 void PrintTBL PROTO ((FILE* f, TBL *v, unsigned short int indent));
355 void FreeTBL PROTO ((TBL *v));
356
357
358
359
360
361
362 #endif /* conditional include of tbl.h */