]>
Commit | Line | Data |
---|---|---|
bac41a7b A |
1 | /* |
2 | * asn-useful.h | |
3 | * | |
4 | * "ASN-USEFUL" ASN.1 module C type definitions and prototypes | |
5 | * | |
29654253 | 6 | * This .h file was generated by snacc on Tue Mar 19 07:24:46 2002 |
bac41a7b A |
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 _asn_useful_h_ | |
15 | #define _asn_useful_h_ | |
16 | ||
17 | ||
18 | ||
19 | ||
20 | typedef AsnOcts ObjectDescriptor; /* [UNIVERSAL 7] IMPLICIT OCTET STRING */ | |
21 | ||
22 | #define BEncObjectDescriptorContent BEncAsnOctsContent | |
23 | ||
24 | #define BDecObjectDescriptorContent BDecAsnOctsContent | |
25 | ||
26 | #define PrintObjectDescriptor PrintAsnOcts | |
27 | ||
28 | #define FreeObjectDescriptor FreeAsnOcts | |
29 | ||
30 | ||
31 | ||
32 | ||
33 | typedef AsnOcts UTF8String; /* [UNIVERSAL 12] IMPLICIT OCTET STRING */ | |
34 | ||
35 | AsnLen BEncUTF8String PROTO ((BUF_TYPE b, UTF8String *v)); | |
36 | ||
37 | void BDecUTF8String PROTO ((BUF_TYPE b, UTF8String *result, AsnLen *bytesDecoded, ENV_TYPE env)); | |
38 | #define BEncUTF8StringContent BEncAsnOctsContent | |
39 | ||
40 | #define BDecUTF8StringContent BDecAsnOctsContent | |
41 | ||
42 | #define PrintUTF8String PrintAsnOcts | |
43 | ||
44 | #define FreeUTF8String FreeAsnOcts | |
45 | ||
46 | ||
47 | ||
48 | ||
49 | typedef AsnOcts NumericString; /* [UNIVERSAL 18] IMPLICIT OCTET STRING */ | |
50 | ||
51 | AsnLen BEncNumericString PROTO ((BUF_TYPE b, NumericString *v)); | |
52 | ||
53 | void BDecNumericString PROTO ((BUF_TYPE b, NumericString *result, AsnLen *bytesDecoded, ENV_TYPE env)); | |
54 | #define BEncNumericStringContent BEncAsnOctsContent | |
55 | ||
56 | #define BDecNumericStringContent BDecAsnOctsContent | |
57 | ||
58 | #define PrintNumericString PrintAsnOcts | |
59 | ||
60 | #define FreeNumericString FreeAsnOcts | |
61 | ||
62 | ||
63 | ||
64 | ||
65 | typedef AsnOcts PrintableString; /* [UNIVERSAL 19] IMPLICIT OCTET STRING */ | |
66 | ||
67 | AsnLen BEncPrintableString PROTO ((BUF_TYPE b, PrintableString *v)); | |
68 | ||
69 | void BDecPrintableString PROTO ((BUF_TYPE b, PrintableString *result, AsnLen *bytesDecoded, ENV_TYPE env)); | |
70 | #define BEncPrintableStringContent BEncAsnOctsContent | |
71 | ||
72 | #define BDecPrintableStringContent BDecAsnOctsContent | |
73 | ||
74 | #define PrintPrintableString PrintAsnOcts | |
75 | ||
76 | #define FreePrintableString FreeAsnOcts | |
77 | ||
78 | ||
79 | ||
80 | ||
81 | typedef AsnOcts TeletexString; /* [UNIVERSAL 20] IMPLICIT OCTET STRING */ | |
82 | ||
83 | AsnLen BEncTeletexString PROTO ((BUF_TYPE b, TeletexString *v)); | |
84 | ||
85 | void BDecTeletexString PROTO ((BUF_TYPE b, TeletexString *result, AsnLen *bytesDecoded, ENV_TYPE env)); | |
86 | #define BEncTeletexStringContent BEncAsnOctsContent | |
87 | ||
88 | #define BDecTeletexStringContent BDecAsnOctsContent | |
89 | ||
90 | #define PrintTeletexString PrintAsnOcts | |
91 | ||
92 | #define FreeTeletexString FreeAsnOcts | |
93 | ||
94 | ||
95 | ||
96 | ||
97 | typedef AsnOcts T61String; /* [UNIVERSAL 20] IMPLICIT OCTET STRING */ | |
98 | ||
99 | AsnLen BEncT61String PROTO ((BUF_TYPE b, T61String *v)); | |
100 | ||
101 | void BDecT61String PROTO ((BUF_TYPE b, T61String *result, AsnLen *bytesDecoded, ENV_TYPE env)); | |
102 | #define BEncT61StringContent BEncAsnOctsContent | |
103 | ||
104 | #define BDecT61StringContent BDecAsnOctsContent | |
105 | ||
106 | #define PrintT61String PrintAsnOcts | |
107 | ||
108 | #define FreeT61String FreeAsnOcts | |
109 | ||
110 | ||
111 | ||
112 | ||
113 | typedef AsnOcts VideotexString; /* [UNIVERSAL 21] IMPLICIT OCTET STRING */ | |
114 | ||
115 | AsnLen BEncVideotexString PROTO ((BUF_TYPE b, VideotexString *v)); | |
116 | ||
117 | void BDecVideotexString PROTO ((BUF_TYPE b, VideotexString *result, AsnLen *bytesDecoded, ENV_TYPE env)); | |
118 | #define BEncVideotexStringContent BEncAsnOctsContent | |
119 | ||
120 | #define BDecVideotexStringContent BDecAsnOctsContent | |
121 | ||
122 | #define PrintVideotexString PrintAsnOcts | |
123 | ||
124 | #define FreeVideotexString FreeAsnOcts | |
125 | ||
126 | ||
127 | ||
128 | ||
129 | typedef AsnOcts IA5String; /* [UNIVERSAL 22] IMPLICIT OCTET STRING */ | |
130 | ||
131 | AsnLen BEncIA5String PROTO ((BUF_TYPE b, IA5String *v)); | |
132 | ||
133 | void BDecIA5String PROTO ((BUF_TYPE b, IA5String *result, AsnLen *bytesDecoded, ENV_TYPE env)); | |
134 | #define BEncIA5StringContent BEncAsnOctsContent | |
135 | ||
136 | #define BDecIA5StringContent BDecAsnOctsContent | |
137 | ||
138 | #define PrintIA5String PrintAsnOcts | |
139 | ||
140 | #define FreeIA5String FreeAsnOcts | |
141 | ||
142 | ||
143 | ||
144 | ||
145 | typedef AsnOcts GraphicString; /* [UNIVERSAL 25] IMPLICIT OCTET STRING */ | |
146 | ||
147 | AsnLen BEncGraphicString PROTO ((BUF_TYPE b, GraphicString *v)); | |
148 | ||
149 | void BDecGraphicString PROTO ((BUF_TYPE b, GraphicString *result, AsnLen *bytesDecoded, ENV_TYPE env)); | |
150 | #define BEncGraphicStringContent BEncAsnOctsContent | |
151 | ||
152 | #define BDecGraphicStringContent BDecAsnOctsContent | |
153 | ||
154 | #define PrintGraphicString PrintAsnOcts | |
155 | ||
156 | #define FreeGraphicString FreeAsnOcts | |
157 | ||
158 | ||
159 | ||
160 | ||
161 | typedef AsnOcts VisibleString; /* [UNIVERSAL 26] IMPLICIT OCTET STRING */ | |
162 | ||
163 | AsnLen BEncVisibleString PROTO ((BUF_TYPE b, VisibleString *v)); | |
164 | ||
165 | void BDecVisibleString PROTO ((BUF_TYPE b, VisibleString *result, AsnLen *bytesDecoded, ENV_TYPE env)); | |
166 | #define BEncVisibleStringContent BEncAsnOctsContent | |
167 | ||
168 | #define BDecVisibleStringContent BDecAsnOctsContent | |
169 | ||
170 | #define PrintVisibleString PrintAsnOcts | |
171 | ||
172 | #define FreeVisibleString FreeAsnOcts | |
173 | ||
174 | ||
175 | ||
176 | ||
177 | typedef AsnOcts ISO646String; /* [UNIVERSAL 26] IMPLICIT OCTET STRING */ | |
178 | ||
179 | AsnLen BEncISO646String PROTO ((BUF_TYPE b, ISO646String *v)); | |
180 | ||
181 | void BDecISO646String PROTO ((BUF_TYPE b, ISO646String *result, AsnLen *bytesDecoded, ENV_TYPE env)); | |
182 | #define BEncISO646StringContent BEncAsnOctsContent | |
183 | ||
184 | #define BDecISO646StringContent BDecAsnOctsContent | |
185 | ||
186 | #define PrintISO646String PrintAsnOcts | |
187 | ||
188 | #define FreeISO646String FreeAsnOcts | |
189 | ||
190 | ||
191 | ||
192 | ||
193 | typedef AsnOcts GeneralString; /* [UNIVERSAL 27] IMPLICIT OCTET STRING */ | |
194 | ||
195 | AsnLen BEncGeneralString PROTO ((BUF_TYPE b, GeneralString *v)); | |
196 | ||
197 | void BDecGeneralString PROTO ((BUF_TYPE b, GeneralString *result, AsnLen *bytesDecoded, ENV_TYPE env)); | |
198 | #define BEncGeneralStringContent BEncAsnOctsContent | |
199 | ||
200 | #define BDecGeneralStringContent BDecAsnOctsContent | |
201 | ||
202 | #define PrintGeneralString PrintAsnOcts | |
203 | ||
204 | #define FreeGeneralString FreeAsnOcts | |
205 | ||
206 | ||
207 | ||
208 | ||
209 | typedef AsnOcts UTCTime; /* [UNIVERSAL 23] IMPLICIT OCTET STRING */ | |
210 | ||
211 | AsnLen BEncUTCTime PROTO ((BUF_TYPE b, UTCTime *v)); | |
212 | ||
213 | void BDecUTCTime PROTO ((BUF_TYPE b, UTCTime *result, AsnLen *bytesDecoded, ENV_TYPE env)); | |
214 | #define BEncUTCTimeContent BEncAsnOctsContent | |
215 | ||
216 | #define BDecUTCTimeContent BDecAsnOctsContent | |
217 | ||
218 | #define PrintUTCTime PrintAsnOcts | |
219 | ||
220 | #define FreeUTCTime FreeAsnOcts | |
221 | ||
222 | ||
223 | ||
224 | ||
225 | typedef AsnOcts GeneralizedTime; /* [UNIVERSAL 24] IMPLICIT OCTET STRING */ | |
226 | ||
227 | AsnLen BEncGeneralizedTime PROTO ((BUF_TYPE b, GeneralizedTime *v)); | |
228 | ||
229 | void BDecGeneralizedTime PROTO ((BUF_TYPE b, GeneralizedTime *result, AsnLen *bytesDecoded, ENV_TYPE env)); | |
230 | #define BEncGeneralizedTimeContent BEncAsnOctsContent | |
231 | ||
232 | #define BDecGeneralizedTimeContent BDecAsnOctsContent | |
233 | ||
234 | #define PrintGeneralizedTime PrintAsnOcts | |
235 | ||
236 | #define FreeGeneralizedTime FreeAsnOcts | |
237 | ||
238 | ||
239 | ||
240 | ||
241 | typedef AsnOcts UniversalString; /* [UNIVERSAL 28] IMPLICIT OCTET STRING */ | |
242 | ||
243 | AsnLen BEncUniversalString PROTO ((BUF_TYPE b, UniversalString *v)); | |
244 | ||
245 | void BDecUniversalString PROTO ((BUF_TYPE b, UniversalString *result, AsnLen *bytesDecoded, ENV_TYPE env)); | |
246 | #define BEncUniversalStringContent BEncAsnOctsContent | |
247 | ||
248 | #define BDecUniversalStringContent BDecAsnOctsContent | |
249 | ||
250 | #define PrintUniversalString PrintAsnOcts | |
251 | ||
252 | #define FreeUniversalString FreeAsnOcts | |
253 | ||
254 | ||
255 | ||
256 | ||
257 | typedef AsnOcts BMPString; /* [UNIVERSAL 30] IMPLICIT OCTET STRING */ | |
258 | ||
259 | AsnLen BEncBMPString PROTO ((BUF_TYPE b, BMPString *v)); | |
260 | ||
261 | void BDecBMPString PROTO ((BUF_TYPE b, BMPString *result, AsnLen *bytesDecoded, ENV_TYPE env)); | |
262 | #define BEncBMPStringContent BEncAsnOctsContent | |
263 | ||
264 | #define BDecBMPStringContent BDecAsnOctsContent | |
265 | ||
266 | #define PrintBMPString PrintAsnOcts | |
267 | ||
268 | #define FreeBMPString FreeAsnOcts | |
269 | ||
270 | ||
271 | ||
272 | ||
273 | typedef struct EXTERNALChoice /* CHOICE */ | |
274 | { | |
275 | enum EXTERNALChoiceChoiceId | |
276 | { | |
277 | EXTERNALCHOICE_SINGLE_ASN1_TYPE, | |
278 | EXTERNALCHOICE_OCTET_ALIGNED, | |
279 | EXTERNALCHOICE_ARBITRARY | |
280 | } choiceId; | |
281 | union EXTERNALChoiceChoiceUnion | |
282 | { | |
283 | AsnOcts* single_ASN1_type; /* [0] OCTET STRING */ | |
284 | AsnOcts* octet_aligned; /* [1] IMPLICIT OCTET STRING */ | |
285 | AsnBits* arbitrary; /* [2] IMPLICIT BIT STRING */ | |
286 | } a; | |
287 | } EXTERNALChoice; | |
288 | ||
289 | AsnLen BEncEXTERNALChoiceContent PROTO ((BUF_TYPE b, EXTERNALChoice *v)); | |
290 | ||
291 | void BDecEXTERNALChoiceContent PROTO ((BUF_TYPE b, AsnTag tagId0, AsnLen elmtLen0, EXTERNALChoice *v, AsnLen *bytesDecoded, ENV_TYPE env)); | |
292 | ||
293 | ||
294 | void PrintEXTERNALChoice PROTO ((FILE* f, EXTERNALChoice *v, unsigned short int indent)); | |
295 | void FreeEXTERNALChoice PROTO ((EXTERNALChoice *v)); | |
296 | ||
297 | ||
298 | ||
299 | ||
300 | ||
301 | typedef struct EXTERNAL /* [UNIVERSAL 8] IMPLICIT SEQUENCE */ | |
302 | { | |
303 | AsnOid direct_reference; /* OBJECT IDENTIFIER OPTIONAL */ | |
304 | AsnInt* indirect_reference; /* INTEGER OPTIONAL */ | |
305 | ObjectDescriptor data_value_descriptor; /* ObjectDescriptor OPTIONAL */ | |
306 | struct EXTERNALChoice* encoding; /* EXTERNALChoice */ | |
307 | } EXTERNAL; | |
308 | ||
309 | AsnLen BEncEXTERNAL PROTO ((BUF_TYPE b, EXTERNAL *v)); | |
310 | ||
311 | void BDecEXTERNAL PROTO ((BUF_TYPE b, EXTERNAL *result, AsnLen *bytesDecoded, ENV_TYPE env)); | |
312 | AsnLen BEncEXTERNALContent PROTO ((BUF_TYPE b, EXTERNAL *v)); | |
313 | ||
314 | void BDecEXTERNALContent PROTO ((BUF_TYPE b, AsnTag tagId0, AsnLen elmtLen0, EXTERNAL *v, AsnLen *bytesDecoded, ENV_TYPE env)); | |
315 | ||
316 | ||
317 | void PrintEXTERNAL PROTO ((FILE* f, EXTERNAL *v, unsigned short int indent)); | |
318 | void FreeEXTERNAL PROTO ((EXTERNAL *v)); | |
319 | ||
320 | ||
321 | ||
322 | ||
323 | ||
324 | ||
325 | #endif /* conditional include of asn-useful.h */ |