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