4 * "ASN-USEFUL" ASN.1 module C type definitions and prototypes
6 * This .h file was generated by snacc on Tue Mar 19 07:24:46 2002
8 * UBC snacc written compiler by Mike Sample
10 * NOTE: This is a machine generated file--editing not recommended
14 #ifndef _asn_useful_h_
15 #define _asn_useful_h_
20 typedef AsnOcts ObjectDescriptor
; /* [UNIVERSAL 7] IMPLICIT OCTET STRING */
22 #define BEncObjectDescriptorContent BEncAsnOctsContent
24 #define BDecObjectDescriptorContent BDecAsnOctsContent
26 #define PrintObjectDescriptor PrintAsnOcts
28 #define FreeObjectDescriptor FreeAsnOcts
33 typedef AsnOcts UTF8String
; /* [UNIVERSAL 12] IMPLICIT OCTET STRING */
35 AsnLen BEncUTF8String
PROTO ((BUF_TYPE b
, UTF8String
*v
));
37 void BDecUTF8String
PROTO ((BUF_TYPE b
, UTF8String
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
38 #define BEncUTF8StringContent BEncAsnOctsContent
40 #define BDecUTF8StringContent BDecAsnOctsContent
42 #define PrintUTF8String PrintAsnOcts
44 #define FreeUTF8String FreeAsnOcts
49 typedef AsnOcts NumericString
; /* [UNIVERSAL 18] IMPLICIT OCTET STRING */
51 AsnLen BEncNumericString
PROTO ((BUF_TYPE b
, NumericString
*v
));
53 void BDecNumericString
PROTO ((BUF_TYPE b
, NumericString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
54 #define BEncNumericStringContent BEncAsnOctsContent
56 #define BDecNumericStringContent BDecAsnOctsContent
58 #define PrintNumericString PrintAsnOcts
60 #define FreeNumericString FreeAsnOcts
65 typedef AsnOcts PrintableString
; /* [UNIVERSAL 19] IMPLICIT OCTET STRING */
67 AsnLen BEncPrintableString
PROTO ((BUF_TYPE b
, PrintableString
*v
));
69 void BDecPrintableString
PROTO ((BUF_TYPE b
, PrintableString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
70 #define BEncPrintableStringContent BEncAsnOctsContent
72 #define BDecPrintableStringContent BDecAsnOctsContent
74 #define PrintPrintableString PrintAsnOcts
76 #define FreePrintableString FreeAsnOcts
81 typedef AsnOcts TeletexString
; /* [UNIVERSAL 20] IMPLICIT OCTET STRING */
83 AsnLen BEncTeletexString
PROTO ((BUF_TYPE b
, TeletexString
*v
));
85 void BDecTeletexString
PROTO ((BUF_TYPE b
, TeletexString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
86 #define BEncTeletexStringContent BEncAsnOctsContent
88 #define BDecTeletexStringContent BDecAsnOctsContent
90 #define PrintTeletexString PrintAsnOcts
92 #define FreeTeletexString FreeAsnOcts
97 typedef AsnOcts T61String
; /* [UNIVERSAL 20] IMPLICIT OCTET STRING */
99 AsnLen BEncT61String
PROTO ((BUF_TYPE b
, T61String
*v
));
101 void BDecT61String
PROTO ((BUF_TYPE b
, T61String
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
102 #define BEncT61StringContent BEncAsnOctsContent
104 #define BDecT61StringContent BDecAsnOctsContent
106 #define PrintT61String PrintAsnOcts
108 #define FreeT61String FreeAsnOcts
113 typedef AsnOcts VideotexString
; /* [UNIVERSAL 21] IMPLICIT OCTET STRING */
115 AsnLen BEncVideotexString
PROTO ((BUF_TYPE b
, VideotexString
*v
));
117 void BDecVideotexString
PROTO ((BUF_TYPE b
, VideotexString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
118 #define BEncVideotexStringContent BEncAsnOctsContent
120 #define BDecVideotexStringContent BDecAsnOctsContent
122 #define PrintVideotexString PrintAsnOcts
124 #define FreeVideotexString FreeAsnOcts
129 typedef AsnOcts IA5String
; /* [UNIVERSAL 22] IMPLICIT OCTET STRING */
131 AsnLen BEncIA5String
PROTO ((BUF_TYPE b
, IA5String
*v
));
133 void BDecIA5String
PROTO ((BUF_TYPE b
, IA5String
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
134 #define BEncIA5StringContent BEncAsnOctsContent
136 #define BDecIA5StringContent BDecAsnOctsContent
138 #define PrintIA5String PrintAsnOcts
140 #define FreeIA5String FreeAsnOcts
145 typedef AsnOcts GraphicString
; /* [UNIVERSAL 25] IMPLICIT OCTET STRING */
147 AsnLen BEncGraphicString
PROTO ((BUF_TYPE b
, GraphicString
*v
));
149 void BDecGraphicString
PROTO ((BUF_TYPE b
, GraphicString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
150 #define BEncGraphicStringContent BEncAsnOctsContent
152 #define BDecGraphicStringContent BDecAsnOctsContent
154 #define PrintGraphicString PrintAsnOcts
156 #define FreeGraphicString FreeAsnOcts
161 typedef AsnOcts VisibleString
; /* [UNIVERSAL 26] IMPLICIT OCTET STRING */
163 AsnLen BEncVisibleString
PROTO ((BUF_TYPE b
, VisibleString
*v
));
165 void BDecVisibleString
PROTO ((BUF_TYPE b
, VisibleString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
166 #define BEncVisibleStringContent BEncAsnOctsContent
168 #define BDecVisibleStringContent BDecAsnOctsContent
170 #define PrintVisibleString PrintAsnOcts
172 #define FreeVisibleString FreeAsnOcts
177 typedef AsnOcts ISO646String
; /* [UNIVERSAL 26] IMPLICIT OCTET STRING */
179 AsnLen BEncISO646String
PROTO ((BUF_TYPE b
, ISO646String
*v
));
181 void BDecISO646String
PROTO ((BUF_TYPE b
, ISO646String
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
182 #define BEncISO646StringContent BEncAsnOctsContent
184 #define BDecISO646StringContent BDecAsnOctsContent
186 #define PrintISO646String PrintAsnOcts
188 #define FreeISO646String FreeAsnOcts
193 typedef AsnOcts GeneralString
; /* [UNIVERSAL 27] IMPLICIT OCTET STRING */
195 AsnLen BEncGeneralString
PROTO ((BUF_TYPE b
, GeneralString
*v
));
197 void BDecGeneralString
PROTO ((BUF_TYPE b
, GeneralString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
198 #define BEncGeneralStringContent BEncAsnOctsContent
200 #define BDecGeneralStringContent BDecAsnOctsContent
202 #define PrintGeneralString PrintAsnOcts
204 #define FreeGeneralString FreeAsnOcts
209 typedef AsnOcts UTCTime
; /* [UNIVERSAL 23] IMPLICIT OCTET STRING */
211 AsnLen BEncUTCTime
PROTO ((BUF_TYPE b
, UTCTime
*v
));
213 void BDecUTCTime
PROTO ((BUF_TYPE b
, UTCTime
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
214 #define BEncUTCTimeContent BEncAsnOctsContent
216 #define BDecUTCTimeContent BDecAsnOctsContent
218 #define PrintUTCTime PrintAsnOcts
220 #define FreeUTCTime FreeAsnOcts
225 typedef AsnOcts GeneralizedTime
; /* [UNIVERSAL 24] IMPLICIT OCTET STRING */
227 AsnLen BEncGeneralizedTime
PROTO ((BUF_TYPE b
, GeneralizedTime
*v
));
229 void BDecGeneralizedTime
PROTO ((BUF_TYPE b
, GeneralizedTime
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
230 #define BEncGeneralizedTimeContent BEncAsnOctsContent
232 #define BDecGeneralizedTimeContent BDecAsnOctsContent
234 #define PrintGeneralizedTime PrintAsnOcts
236 #define FreeGeneralizedTime FreeAsnOcts
241 typedef AsnOcts UniversalString
; /* [UNIVERSAL 28] IMPLICIT OCTET STRING */
243 AsnLen BEncUniversalString
PROTO ((BUF_TYPE b
, UniversalString
*v
));
245 void BDecUniversalString
PROTO ((BUF_TYPE b
, UniversalString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
246 #define BEncUniversalStringContent BEncAsnOctsContent
248 #define BDecUniversalStringContent BDecAsnOctsContent
250 #define PrintUniversalString PrintAsnOcts
252 #define FreeUniversalString FreeAsnOcts
257 typedef AsnOcts BMPString
; /* [UNIVERSAL 30] IMPLICIT OCTET STRING */
259 AsnLen BEncBMPString
PROTO ((BUF_TYPE b
, BMPString
*v
));
261 void BDecBMPString
PROTO ((BUF_TYPE b
, BMPString
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
262 #define BEncBMPStringContent BEncAsnOctsContent
264 #define BDecBMPStringContent BDecAsnOctsContent
266 #define PrintBMPString PrintAsnOcts
268 #define FreeBMPString FreeAsnOcts
273 typedef struct EXTERNALChoice
/* CHOICE */
275 enum EXTERNALChoiceChoiceId
277 EXTERNALCHOICE_SINGLE_ASN1_TYPE
,
278 EXTERNALCHOICE_OCTET_ALIGNED
,
279 EXTERNALCHOICE_ARBITRARY
281 union EXTERNALChoiceChoiceUnion
283 AsnOcts
* single_ASN1_type
; /* [0] OCTET STRING */
284 AsnOcts
* octet_aligned
; /* [1] IMPLICIT OCTET STRING */
285 AsnBits
* arbitrary
; /* [2] IMPLICIT BIT STRING */
289 AsnLen BEncEXTERNALChoiceContent
PROTO ((BUF_TYPE b
, EXTERNALChoice
*v
));
291 void BDecEXTERNALChoiceContent
PROTO ((BUF_TYPE b
, AsnTag tagId0
, AsnLen elmtLen0
, EXTERNALChoice
*v
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
294 void PrintEXTERNALChoice
PROTO ((FILE* f
, EXTERNALChoice
*v
, unsigned short int indent
));
295 void FreeEXTERNALChoice
PROTO ((EXTERNALChoice
*v
));
301 typedef struct EXTERNAL
/* [UNIVERSAL 8] IMPLICIT SEQUENCE */
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 */
309 AsnLen BEncEXTERNAL
PROTO ((BUF_TYPE b
, EXTERNAL
*v
));
311 void BDecEXTERNAL
PROTO ((BUF_TYPE b
, EXTERNAL
*result
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
312 AsnLen BEncEXTERNALContent
PROTO ((BUF_TYPE b
, EXTERNAL
*v
));
314 void BDecEXTERNALContent
PROTO ((BUF_TYPE b
, AsnTag tagId0
, AsnLen elmtLen0
, EXTERNAL
*v
, AsnLen
*bytesDecoded
, ENV_TYPE env
));
317 void PrintEXTERNAL
PROTO ((FILE* f
, EXTERNAL
*v
, unsigned short int indent
));
318 void FreeEXTERNAL
PROTO ((EXTERNAL
*v
));
325 #endif /* conditional include of asn-useful.h */