Commit dfae9758 authored by Lev Walkin's avatar Lev Walkin

asn1_* renamed into asn_*

parent 1ca69678
This diff is collapsed.
This diff is collapsed.
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
/*** <<< DEPS [Programming] >>> ***/ /*** <<< DEPS [Programming] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_Programming; extern asn_TYPE_descriptor_t asn_DEF_Programming;
/*** <<< TYPE-DECLS [Programming] >>> ***/ /*** <<< TYPE-DECLS [Programming] >>> ***/
...@@ -16,29 +16,29 @@ typedef struct Programming { ...@@ -16,29 +16,29 @@ typedef struct Programming {
A_SEQUENCE_OF(Fault_t) list; A_SEQUENCE_OF(Fault_t) list;
/* Context for parsing across buffer boundaries */ /* Context for parsing across buffer boundaries */
ber_dec_ctx_t _ber_dec_ctx; asn_struct_ctx_t _asn_ctx;
} Programming_t; } Programming_t;
/*** <<< STAT-DEFS [Programming] >>> ***/ /*** <<< STAT-DEFS [Programming] >>> ***/
static asn1_TYPE_member_t asn1_MBR_Programming[] = { static asn_TYPE_member_t asn_MBR_Programming[] = {
{ ATF_NOFLAGS, 0, 0, { ATF_NOFLAGS, 0, 0,
.tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn1_DEF_Fault, .type = (void *)&asn_DEF_Fault,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "" .name = ""
}, },
}; };
static ber_tlv_tag_t asn1_DEF_Programming_tags[] = { static ber_tlv_tag_t asn_DEF_Programming_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
}; };
static asn1_SET_OF_specifics_t asn1_DEF_Programming_specs = { static asn_SET_OF_specifics_t asn_DEF_Programming_specs = {
sizeof(struct Programming), sizeof(struct Programming),
offsetof(struct Programming, _ber_dec_ctx), offsetof(struct Programming, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */ 0, /* XER encoding is XMLDelimitedItemList */
}; };
asn1_TYPE_descriptor_t asn1_DEF_Programming = { asn_TYPE_descriptor_t asn_DEF_Programming = {
"Programming", "Programming",
SEQUENCE_OF_free, SEQUENCE_OF_free,
SEQUENCE_OF_print, SEQUENCE_OF_print,
...@@ -48,15 +48,15 @@ asn1_TYPE_descriptor_t asn1_DEF_Programming = { ...@@ -48,15 +48,15 @@ asn1_TYPE_descriptor_t asn1_DEF_Programming = {
0, /* Not implemented yet */ 0, /* Not implemented yet */
SEQUENCE_OF_encode_xer, SEQUENCE_OF_encode_xer,
0, /* Use generic outmost tag fetcher */ 0, /* Use generic outmost tag fetcher */
asn1_DEF_Programming_tags, asn_DEF_Programming_tags,
sizeof(asn1_DEF_Programming_tags) sizeof(asn_DEF_Programming_tags)
/sizeof(asn1_DEF_Programming_tags[0]), /* 1 */ /sizeof(asn_DEF_Programming_tags[0]), /* 1 */
asn1_DEF_Programming_tags, /* Same as above */ asn_DEF_Programming_tags, /* Same as above */
sizeof(asn1_DEF_Programming_tags) sizeof(asn_DEF_Programming_tags)
/sizeof(asn1_DEF_Programming_tags[0]), /* 1 */ /sizeof(asn_DEF_Programming_tags[0]), /* 1 */
asn1_MBR_Programming, asn_MBR_Programming,
1, /* Single element */ 1, /* Single element */
&asn1_DEF_Programming_specs /* Additional specs */ &asn_DEF_Programming_specs /* Additional specs */
}; };
...@@ -68,7 +68,7 @@ asn1_TYPE_descriptor_t asn1_DEF_Programming = { ...@@ -68,7 +68,7 @@ asn1_TYPE_descriptor_t asn1_DEF_Programming = {
/*** <<< DEPS [Fault] >>> ***/ /*** <<< DEPS [Fault] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_Fault; extern asn_TYPE_descriptor_t asn_DEF_Fault;
/*** <<< TYPE-DECLS [Fault] >>> ***/ /*** <<< TYPE-DECLS [Fault] >>> ***/
...@@ -77,29 +77,29 @@ typedef struct Fault { ...@@ -77,29 +77,29 @@ typedef struct Fault {
A_SET_OF(Error_t) list; A_SET_OF(Error_t) list;
/* Context for parsing across buffer boundaries */ /* Context for parsing across buffer boundaries */
ber_dec_ctx_t _ber_dec_ctx; asn_struct_ctx_t _asn_ctx;
} Fault_t; } Fault_t;
/*** <<< STAT-DEFS [Fault] >>> ***/ /*** <<< STAT-DEFS [Fault] >>> ***/
static asn1_TYPE_member_t asn1_MBR_Fault[] = { static asn_TYPE_member_t asn_MBR_Fault[] = {
{ ATF_NOFLAGS, 0, 0, { ATF_NOFLAGS, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_Error, .type = (void *)&asn_DEF_Error,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "" .name = ""
}, },
}; };
static ber_tlv_tag_t asn1_DEF_Fault_tags[] = { static ber_tlv_tag_t asn_DEF_Fault_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
}; };
static asn1_SET_OF_specifics_t asn1_DEF_Fault_specs = { static asn_SET_OF_specifics_t asn_DEF_Fault_specs = {
sizeof(struct Fault), sizeof(struct Fault),
offsetof(struct Fault, _ber_dec_ctx), offsetof(struct Fault, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */ 0, /* XER encoding is XMLDelimitedItemList */
}; };
asn1_TYPE_descriptor_t asn1_DEF_Fault = { asn_TYPE_descriptor_t asn_DEF_Fault = {
"Fault", "Fault",
SET_OF_free, SET_OF_free,
SET_OF_print, SET_OF_print,
...@@ -109,15 +109,15 @@ asn1_TYPE_descriptor_t asn1_DEF_Fault = { ...@@ -109,15 +109,15 @@ asn1_TYPE_descriptor_t asn1_DEF_Fault = {
0, /* Not implemented yet */ 0, /* Not implemented yet */
SET_OF_encode_xer, SET_OF_encode_xer,
0, /* Use generic outmost tag fetcher */ 0, /* Use generic outmost tag fetcher */
asn1_DEF_Fault_tags, asn_DEF_Fault_tags,
sizeof(asn1_DEF_Fault_tags) sizeof(asn_DEF_Fault_tags)
/sizeof(asn1_DEF_Fault_tags[0]), /* 1 */ /sizeof(asn_DEF_Fault_tags[0]), /* 1 */
asn1_DEF_Fault_tags, /* Same as above */ asn_DEF_Fault_tags, /* Same as above */
sizeof(asn1_DEF_Fault_tags) sizeof(asn_DEF_Fault_tags)
/sizeof(asn1_DEF_Fault_tags[0]), /* 1 */ /sizeof(asn_DEF_Fault_tags[0]), /* 1 */
asn1_MBR_Fault, asn_MBR_Fault,
1, /* Single element */ 1, /* Single element */
&asn1_DEF_Fault_specs /* Additional specs */ &asn_DEF_Fault_specs /* Additional specs */
}; };
...@@ -127,7 +127,7 @@ asn1_TYPE_descriptor_t asn1_DEF_Fault = { ...@@ -127,7 +127,7 @@ asn1_TYPE_descriptor_t asn1_DEF_Fault = {
/*** <<< DEPS [Error] >>> ***/ /*** <<< DEPS [Error] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_Error; extern asn_TYPE_descriptor_t asn_DEF_Error;
/*** <<< TYPE-DECLS [Error] >>> ***/ /*** <<< TYPE-DECLS [Error] >>> ***/
...@@ -139,25 +139,25 @@ typedef struct Error { ...@@ -139,25 +139,25 @@ typedef struct Error {
*/ */
/* Context for parsing across buffer boundaries */ /* Context for parsing across buffer boundaries */
ber_dec_ctx_t _ber_dec_ctx; asn_struct_ctx_t _asn_ctx;
} Error_t; } Error_t;
/*** <<< STAT-DEFS [Error] >>> ***/ /*** <<< STAT-DEFS [Error] >>> ***/
static ber_tlv_tag_t asn1_DEF_Error_tags[] = { static ber_tlv_tag_t asn_DEF_Error_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
}; };
static asn1_TYPE_tag2member_t asn1_DEF_Error_tag2el[] = { static asn_TYPE_tag2member_t asn_DEF_Error_tag2el[] = {
}; };
static asn1_SEQUENCE_specifics_t asn1_DEF_Error_specs = { static asn_SEQUENCE_specifics_t asn_DEF_Error_specs = {
sizeof(struct Error), sizeof(struct Error),
offsetof(struct Error, _ber_dec_ctx), offsetof(struct Error, _asn_ctx),
asn1_DEF_Error_tag2el, asn_DEF_Error_tag2el,
0, /* Count of tags in the map */ 0, /* Count of tags in the map */
-1, /* Start extensions */ -1, /* Start extensions */
-1 /* Stop extensions */ -1 /* Stop extensions */
}; };
asn1_TYPE_descriptor_t asn1_DEF_Error = { asn_TYPE_descriptor_t asn_DEF_Error = {
"Error", "Error",
SEQUENCE_free, SEQUENCE_free,
SEQUENCE_print, SEQUENCE_print,
...@@ -167,13 +167,13 @@ asn1_TYPE_descriptor_t asn1_DEF_Error = { ...@@ -167,13 +167,13 @@ asn1_TYPE_descriptor_t asn1_DEF_Error = {
0, /* Not implemented yet */ 0, /* Not implemented yet */
SEQUENCE_encode_xer, SEQUENCE_encode_xer,
0, /* Use generic outmost tag fetcher */ 0, /* Use generic outmost tag fetcher */
asn1_DEF_Error_tags, asn_DEF_Error_tags,
sizeof(asn1_DEF_Error_tags) sizeof(asn_DEF_Error_tags)
/sizeof(asn1_DEF_Error_tags[0]), /* 1 */ /sizeof(asn_DEF_Error_tags[0]), /* 1 */
asn1_DEF_Error_tags, /* Same as above */ asn_DEF_Error_tags, /* Same as above */
sizeof(asn1_DEF_Error_tags) sizeof(asn_DEF_Error_tags)
/sizeof(asn1_DEF_Error_tags[0]), /* 1 */ /sizeof(asn_DEF_Error_tags[0]), /* 1 */
0, 0, /* No members */ 0, 0, /* No members */
&asn1_DEF_Error_specs /* Additional specs */ &asn_DEF_Error_specs /* Additional specs */
}; };
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
/*** <<< DEPS [T] >>> ***/ /*** <<< DEPS [T] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_T; extern asn_TYPE_descriptor_t asn_DEF_T;
/*** <<< TYPE-DECLS [T] >>> ***/ /*** <<< TYPE-DECLS [T] >>> ***/
...@@ -20,34 +20,34 @@ typedef struct T { ...@@ -20,34 +20,34 @@ typedef struct T {
A_SEQUENCE_OF(T2_t) list; A_SEQUENCE_OF(T2_t) list;
/* Context for parsing across buffer boundaries */ /* Context for parsing across buffer boundaries */
ber_dec_ctx_t _ber_dec_ctx; asn_struct_ctx_t _asn_ctx;
} collection; } collection;
/* Context for parsing across buffer boundaries */ /* Context for parsing across buffer boundaries */
ber_dec_ctx_t _ber_dec_ctx; asn_struct_ctx_t _asn_ctx;
} T_t; } T_t;
/*** <<< STAT-DEFS [T] >>> ***/ /*** <<< STAT-DEFS [T] >>> ***/
static asn1_TYPE_member_t asn1_MBR_collection[] = { static asn_TYPE_member_t asn_MBR_collection[] = {
{ ATF_NOFLAGS, 0, 0, { ATF_NOFLAGS, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_T2, .type = (void *)&asn_DEF_T2,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "" .name = ""
}, },
}; };
static ber_tlv_tag_t asn1_DEF_collection_tags[] = { static ber_tlv_tag_t asn_DEF_collection_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
}; };
static asn1_SET_OF_specifics_t asn1_DEF_collection_specs = { static asn_SET_OF_specifics_t asn_DEF_collection_specs = {
sizeof(struct collection), sizeof(struct collection),
offsetof(struct collection, _ber_dec_ctx), offsetof(struct collection, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */ 0, /* XER encoding is XMLDelimitedItemList */
}; };
static /* Use -fall-defs-global to expose */ static /* Use -fall-defs-global to expose */
asn1_TYPE_descriptor_t asn1_DEF_collection = { asn_TYPE_descriptor_t asn_DEF_collection = {
"collection", "collection",
SEQUENCE_OF_free, SEQUENCE_OF_free,
SEQUENCE_OF_print, SEQUENCE_OF_print,
...@@ -57,49 +57,49 @@ asn1_TYPE_descriptor_t asn1_DEF_collection = { ...@@ -57,49 +57,49 @@ asn1_TYPE_descriptor_t asn1_DEF_collection = {
0, /* Not implemented yet */ 0, /* Not implemented yet */
SEQUENCE_OF_encode_xer, SEQUENCE_OF_encode_xer,
0, /* Use generic outmost tag fetcher */ 0, /* Use generic outmost tag fetcher */
asn1_DEF_collection_tags, asn_DEF_collection_tags,
sizeof(asn1_DEF_collection_tags) sizeof(asn_DEF_collection_tags)
/sizeof(asn1_DEF_collection_tags[0]), /* 1 */ /sizeof(asn_DEF_collection_tags[0]), /* 1 */
asn1_DEF_collection_tags, /* Same as above */ asn_DEF_collection_tags, /* Same as above */
sizeof(asn1_DEF_collection_tags) sizeof(asn_DEF_collection_tags)
/sizeof(asn1_DEF_collection_tags[0]), /* 1 */ /sizeof(asn_DEF_collection_tags[0]), /* 1 */
asn1_MBR_collection, asn_MBR_collection,
1, /* Single element */ 1, /* Single element */
&asn1_DEF_collection_specs /* Additional specs */ &asn_DEF_collection_specs /* Additional specs */
}; };
static asn1_TYPE_member_t asn1_MBR_T[] = { static asn_TYPE_member_t asn_MBR_T[] = {
{ ATF_NOFLAGS, 0, offsetof(struct T, int), { ATF_NOFLAGS, 0, offsetof(struct T, int),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_INTEGER, .type = (void *)&asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "int" .name = "int"
}, },
{ ATF_NOFLAGS, 0, offsetof(struct T, collection), { ATF_NOFLAGS, 0, offsetof(struct T, collection),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_collection, .type = (void *)&asn_DEF_collection,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "collection" .name = "collection"
}, },
}; };
static ber_tlv_tag_t asn1_DEF_T_tags[] = { static ber_tlv_tag_t asn_DEF_T_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
}; };
static asn1_TYPE_tag2member_t asn1_DEF_T_tag2el[] = { static asn_TYPE_tag2member_t asn_DEF_T_tag2el[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* int at 15 */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* int at 15 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* collection at 17 */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* collection at 17 */
}; };
static asn1_SEQUENCE_specifics_t asn1_DEF_T_specs = { static asn_SEQUENCE_specifics_t asn_DEF_T_specs = {
sizeof(struct T), sizeof(struct T),
offsetof(struct T, _ber_dec_ctx), offsetof(struct T, _asn_ctx),
asn1_DEF_T_tag2el, asn_DEF_T_tag2el,
2, /* Count of tags in the map */ 2, /* Count of tags in the map */
-1, /* Start extensions */ -1, /* Start extensions */
-1 /* Stop extensions */ -1 /* Stop extensions */
}; };
asn1_TYPE_descriptor_t asn1_DEF_T = { asn_TYPE_descriptor_t asn_DEF_T = {
"T", "T",
SEQUENCE_free, SEQUENCE_free,
SEQUENCE_print, SEQUENCE_print,
...@@ -109,15 +109,15 @@ asn1_TYPE_descriptor_t asn1_DEF_T = { ...@@ -109,15 +109,15 @@ asn1_TYPE_descriptor_t asn1_DEF_T = {
0, /* Not implemented yet */ 0, /* Not implemented yet */
SEQUENCE_encode_xer, SEQUENCE_encode_xer,
0, /* Use generic outmost tag fetcher */ 0, /* Use generic outmost tag fetcher */
asn1_DEF_T_tags, asn_DEF_T_tags,
sizeof(asn1_DEF_T_tags) sizeof(asn_DEF_T_tags)
/sizeof(asn1_DEF_T_tags[0]), /* 1 */ /sizeof(asn_DEF_T_tags[0]), /* 1 */
asn1_DEF_T_tags, /* Same as above */ asn_DEF_T_tags, /* Same as above */
sizeof(asn1_DEF_T_tags) sizeof(asn_DEF_T_tags)
/sizeof(asn1_DEF_T_tags[0]), /* 1 */ /sizeof(asn_DEF_T_tags[0]), /* 1 */
asn1_MBR_T, asn_MBR_T,
2, /* Elements count */ 2, /* Elements count */
&asn1_DEF_T_specs /* Additional specs */ &asn_DEF_T_specs /* Additional specs */
}; };
...@@ -129,7 +129,7 @@ asn1_TYPE_descriptor_t asn1_DEF_T = { ...@@ -129,7 +129,7 @@ asn1_TYPE_descriptor_t asn1_DEF_T = {
/*** <<< DEPS [T2] >>> ***/ /*** <<< DEPS [T2] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_T2; extern asn_TYPE_descriptor_t asn_DEF_T2;
/*** <<< TYPE-DECLS [T2] >>> ***/ /*** <<< TYPE-DECLS [T2] >>> ***/
...@@ -139,43 +139,43 @@ typedef struct T2 { ...@@ -139,43 +139,43 @@ typedef struct T2 {
UTF8String_t str; UTF8String_t str;
/* Context for parsing across buffer boundaries */ /* Context for parsing across buffer boundaries */
ber_dec_ctx_t _ber_dec_ctx; asn_struct_ctx_t _asn_ctx;
} T2_t; } T2_t;
/*** <<< STAT-DEFS [T2] >>> ***/ /*** <<< STAT-DEFS [T2] >>> ***/
static asn1_TYPE_member_t asn1_MBR_T2[] = { static asn_TYPE_member_t asn_MBR_T2[] = {
{ ATF_NOFLAGS, 0, offsetof(struct T2, flag), { ATF_NOFLAGS, 0, offsetof(struct T2, flag),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_BOOLEAN, .type = (void *)&asn_DEF_BOOLEAN,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "flag" .name = "flag"
}, },
{ ATF_NOFLAGS, 0, offsetof(struct T2, str), { ATF_NOFLAGS, 0, offsetof(struct T2, str),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_UTF8String, .type = (void *)&asn_DEF_UTF8String,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "str" .name = "str"
}, },
}; };
static ber_tlv_tag_t asn1_DEF_T2_tags[] = { static ber_tlv_tag_t asn_DEF_T2_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
}; };
static asn1_TYPE_tag2member_t asn1_DEF_T2_tag2el[] = { static asn_TYPE_tag2member_t asn_DEF_T2_tag2el[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* flag at 20 */ { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* flag at 20 */
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 }, /* str at 21 */ { (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 }, /* str at 21 */
}; };
static asn1_SEQUENCE_specifics_t asn1_DEF_T2_specs = { static asn_SEQUENCE_specifics_t asn_DEF_T2_specs = {
sizeof(struct T2), sizeof(struct T2),
offsetof(struct T2, _ber_dec_ctx), offsetof(struct T2, _asn_ctx),
asn1_DEF_T2_tag2el, asn_DEF_T2_tag2el,
2, /* Count of tags in the map */ 2, /* Count of tags in the map */
-1, /* Start extensions */ -1, /* Start extensions */
-1 /* Stop extensions */ -1 /* Stop extensions */
}; };
asn1_TYPE_descriptor_t asn1_DEF_T2 = { asn_TYPE_descriptor_t asn_DEF_T2 = {
"T2", "T2",
SEQUENCE_free, SEQUENCE_free,
SEQUENCE_print, SEQUENCE_print,
...@@ -185,14 +185,14 @@ asn1_TYPE_descriptor_t asn1_DEF_T2 = { ...@@ -185,14 +185,14 @@ asn1_TYPE_descriptor_t asn1_DEF_T2 = {
0, /* Not implemented yet */ 0, /* Not implemented yet */
SEQUENCE_encode_xer, SEQUENCE_encode_xer,
0, /* Use generic outmost tag fetcher */ 0, /* Use generic outmost tag fetcher */
asn1_DEF_T2_tags, asn_DEF_T2_tags,
sizeof(asn1_DEF_T2_tags) sizeof(asn_DEF_T2_tags)
/sizeof(asn1_DEF_T2_tags[0]), /* 1 */ /sizeof(asn_DEF_T2_tags[0]), /* 1 */
asn1_DEF_T2_tags, /* Same as above */ asn_DEF_T2_tags, /* Same as above */
sizeof(asn1_DEF_T2_tags) sizeof(asn_DEF_T2_tags)
/sizeof(asn1_DEF_T2_tags[0]), /* 1 */ /sizeof(asn_DEF_T2_tags[0]), /* 1 */
asn1_MBR_T2, asn_MBR_T2,
2, /* Elements count */ 2, /* Elements count */
&asn1_DEF_T2_specs /* Additional specs */ &asn_DEF_T2_specs /* Additional specs */
}; };
This diff is collapsed.
...@@ -24,7 +24,7 @@ typedef enum h_PR { ...@@ -24,7 +24,7 @@ typedef enum h_PR {
h_PR_i, h_PR_i,
h_PR_j, h_PR_j,
} h_PR; } h_PR;
extern asn1_TYPE_descriptor_t asn1_DEF_T; extern asn_TYPE_descriptor_t asn_DEF_T;
/*** <<< TYPE-DECLS [T] >>> ***/ /*** <<< TYPE-DECLS [T] >>> ***/
...@@ -44,7 +44,7 @@ typedef struct T { ...@@ -44,7 +44,7 @@ typedef struct T {
} choice; } choice;
/* Context for parsing across buffer boundaries */ /* Context for parsing across buffer boundaries */
ber_dec_ctx_t _ber_dec_ctx; asn_struct_ctx_t _asn_ctx;
} e; } e;
struct h { struct h {
h_PR present; h_PR present;
...@@ -54,51 +54,51 @@ typedef struct T { ...@@ -54,51 +54,51 @@ typedef struct T {
} choice; } choice;
/* Context for parsing across buffer boundaries */ /* Context for parsing across buffer boundaries */
ber_dec_ctx_t _ber_dec_ctx; asn_struct_ctx_t _asn_ctx;
} h; } h;
} choice; } choice;
/* Context for parsing across buffer boundaries */ /* Context for parsing across buffer boundaries */
ber_dec_ctx_t _ber_dec_ctx; asn_struct_ctx_t _asn_ctx;
} b; } b;
/* Context for parsing across buffer boundaries */ /* Context for parsing across buffer boundaries */
ber_dec_ctx_t _ber_dec_ctx; asn_struct_ctx_t _asn_ctx;
} T_t; } T_t;
/*** <<< STAT-DEFS [T] >>> ***/ /*** <<< STAT-DEFS [T] >>> ***/
static asn1_TYPE_member_t asn1_MBR_e[] = { static asn_TYPE_member_t asn_MBR_e[] = {
{ ATF_NOFLAGS, 0, offsetof(struct e, choice.f), { ATF_NOFLAGS, 0, offsetof(struct e, choice.f),
.tag = (ASN_TAG_CLASS_PRIVATE | (7 << 2)), .tag = (ASN_TAG_CLASS_PRIVATE | (7 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn1_DEF_NULL, .type = (void *)&asn_DEF_NULL,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "f" .name = "f"
}, },
{ ATF_NOFLAGS, 0, offsetof(struct e, choice.g), { ATF_NOFLAGS, 0, offsetof(struct e, choice.g),
.tag = (ASN_TAG_CLASS_PRIVATE | (8 << 2)), .tag = (ASN_TAG_CLASS_PRIVATE | (8 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn1_DEF_NULL, .type = (void *)&asn_DEF_NULL,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "g" .name = "g"
}, },
}; };
static asn1_TYPE_tag2member_t asn1_DEF_e_tag2el[] = { static asn_TYPE_tag2member_t asn_DEF_e_tag2el[] = {
{ (ASN_TAG_CLASS_PRIVATE | (7 << 2)), 0, 0, 0 }, /* f at 20 */ { (ASN_TAG_CLASS_PRIVATE | (7 << 2)), 0, 0, 0 }, /* f at 20 */
{ (ASN_TAG_CLASS_PRIVATE | (8 << 2)), 1, 0, 0 }, /* g at 21 */ { (ASN_TAG_CLASS_PRIVATE | (8 << 2)), 1, 0, 0 }, /* g at 21 */
}; };
static asn1_CHOICE_specifics_t asn1_DEF_e_specs = { static asn_CHOICE_specifics_t asn_DEF_e_specs = {
sizeof(struct e), sizeof(struct e),
offsetof(struct e, _ber_dec_ctx), offsetof(struct e, _asn_ctx),
offsetof(struct e, present), offsetof(struct e, present),
sizeof(((struct e *)0)->present), sizeof(((struct e *)0)->present),
asn1_DEF_e_tag2el, asn_DEF_e_tag2el,
2, /* Count of tags in the map */ 2, /* Count of tags in the map */
0 /* Whether extensible */ 0 /* Whether extensible */
}; };
static /* Use -fall-defs-global to expose */ static /* Use -fall-defs-global to expose */
asn1_TYPE_descriptor_t asn1_DEF_e = { asn_TYPE_descriptor_t asn_DEF_e = {
"e", "e",
CHOICE_free, CHOICE_free,
CHOICE_print, CHOICE_print,
...@@ -112,42 +112,42 @@ asn1_TYPE_descriptor_t asn1_DEF_e = { ...@@ -112,42 +112,42 @@ asn1_TYPE_descriptor_t asn1_DEF_e = {
0, /* No effective tags (count) */ 0, /* No effective tags (count) */
0, /* No tags (pointer) */ 0, /* No tags (pointer) */
0, /* No tags (count) */ 0, /* No tags (count) */
asn1_MBR_e, asn_MBR_e,
2, /* Elements count */ 2, /* Elements count */
&asn1_DEF_e_specs /* Additional specs */ &asn_DEF_e_specs /* Additional specs */
}; };
static asn1_TYPE_member_t asn1_MBR_h[] = { static asn_TYPE_member_t asn_MBR_h[] = {
{ ATF_NOFLAGS, 0, offsetof(struct h, choice.i), { ATF_NOFLAGS, 0, offsetof(struct h, choice.i),
.tag = (ASN_TAG_CLASS_PRIVATE | (1 << 2)), .tag = (ASN_TAG_CLASS_PRIVATE | (1 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn1_DEF_NULL, .type = (void *)&asn_DEF_NULL,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "i" .name = "i"
}, },
{ ATF_NOFLAGS, 0, offsetof(struct h, choice.j), { ATF_NOFLAGS, 0, offsetof(struct h, choice.j),
.tag = (ASN_TAG_CLASS_PRIVATE | (2 << 2)), .tag = (ASN_TAG_CLASS_PRIVATE | (2 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn1_DEF_NULL, .type = (void *)&asn_DEF_NULL,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "j" .name = "j"
}, },
}; };
static asn1_TYPE_tag2member_t asn1_DEF_h_tag2el[] = { static asn_TYPE_tag2member_t asn_DEF_h_tag2el[] = {
{ (ASN_TAG_CLASS_PRIVATE | (1 << 2)), 0, 0, 0 }, /* i at 24 */ { (ASN_TAG_CLASS_PRIVATE | (1 << 2)), 0, 0, 0 }, /* i at 24 */
{ (ASN_TAG_CLASS_PRIVATE | (2 << 2)), 1, 0, 0 }, /* j at 25 */ { (ASN_TAG_CLASS_PRIVATE | (2 << 2)), 1, 0, 0 }, /* j at 25 */
}; };
static asn1_CHOICE_specifics_t asn1_DEF_h_specs = { static asn_CHOICE_specifics_t asn_DEF_h_specs = {
sizeof(struct h), sizeof(struct h),
offsetof(struct h, _ber_dec_ctx), offsetof(struct h, _asn_ctx),
offsetof(struct h, present), offsetof(struct h, present),
sizeof(((struct h *)0)->present), sizeof(((struct h *)0)->present),
asn1_DEF_h_tag2el, asn_DEF_h_tag2el,
2, /* Count of tags in the map */ 2, /* Count of tags in the map */
0 /* Whether extensible */ 0 /* Whether extensible */
}; };
static /* Use -fall-defs-global to expose */ static /* Use -fall-defs-global to expose */
asn1_TYPE_descriptor_t asn1_DEF_h = { asn_TYPE_descriptor_t asn_DEF_h = {
"h", "h",
CHOICE_free, CHOICE_free,
CHOICE_print, CHOICE_print,
...@@ -161,59 +161,59 @@ asn1_TYPE_descriptor_t asn1_DEF_h = { ...@@ -161,59 +161,59 @@ asn1_TYPE_descriptor_t asn1_DEF_h = {
0, /* No effective tags (count) */ 0, /* No effective tags (count) */
0, /* No tags (pointer) */ 0, /* No tags (pointer) */
0, /* No tags (count) */ 0, /* No tags (count) */
asn1_MBR_h, asn_MBR_h,
2, /* Elements count */ 2, /* Elements count */
&asn1_DEF_h_specs /* Additional specs */ &asn_DEF_h_specs /* Additional specs */
}; };
static asn1_TYPE_member_t asn1_MBR_b[] = { static asn_TYPE_member_t asn_MBR_b[] = {
{ ATF_NOFLAGS, 0, offsetof(struct b, choice.c), { ATF_NOFLAGS, 0, offsetof(struct b, choice.c),
.tag = (ASN_TAG_CLASS_PRIVATE | (5 << 2)), .tag = (ASN_TAG_CLASS_PRIVATE | (5 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn1_DEF_NULL, .type = (void *)&asn_DEF_NULL,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "c" .name = "c"
}, },
{ ATF_NOFLAGS, 0, offsetof(struct b, choice.d), { ATF_NOFLAGS, 0, offsetof(struct b, choice.d),
.tag = (ASN_TAG_CLASS_PRIVATE | (6 << 2)), .tag = (ASN_TAG_CLASS_PRIVATE | (6 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn1_DEF_NULL, .type = (void *)&asn_DEF_NULL,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "d" .name = "d"
}, },
{ ATF_NOFLAGS, 0, offsetof(struct b, choice.e), { ATF_NOFLAGS, 0, offsetof(struct b, choice.e),
.tag = -1 /* Ambiguous tag (CHOICE?) */, .tag = -1 /* Ambiguous tag (CHOICE?) */,
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_e, .type = (void *)&asn_DEF_e,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "e" .name = "e"
}, },
{ ATF_NOFLAGS, 0, offsetof(struct b, choice.h), { ATF_NOFLAGS, 0, offsetof(struct b, choice.h),
.tag = (ASN_TAG_CLASS_PRIVATE | (9 << 2)), .tag = (ASN_TAG_CLASS_PRIVATE | (9 << 2)),
.tag_mode = +1, /* EXPLICIT tag at current level */ .tag_mode = +1, /* EXPLICIT tag at current level */
.type = (void *)&asn1_DEF_h, .type = (void *)&asn_DEF_h,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "h" .name = "h"
}, },
}; };
static asn1_TYPE_tag2member_t asn1_DEF_b_tag2el[] = { static asn_TYPE_tag2member_t asn_DEF_b_tag2el[] = {
{ (ASN_TAG_CLASS_PRIVATE | (5 << 2)), 0, 0, 0 }, /* c at 17 */ { (ASN_TAG_CLASS_PRIVATE | (5 << 2)), 0, 0, 0 }, /* c at 17 */
{ (ASN_TAG_CLASS_PRIVATE | (6 << 2)), 1, 0, 0 }, /* d at 18 */ { (ASN_TAG_CLASS_PRIVATE | (6 << 2)), 1, 0, 0 }, /* d at 18 */
{ (ASN_TAG_CLASS_PRIVATE | (7 << 2)), 2, 0, 0 }, /* f at 20 */ { (ASN_TAG_CLASS_PRIVATE | (7 << 2)), 2, 0, 0 }, /* f at 20 */
{ (ASN_TAG_CLASS_PRIVATE | (8 << 2)), 2, 0, 0 }, /* g at 21 */ { (ASN_TAG_CLASS_PRIVATE | (8 << 2)), 2, 0, 0 }, /* g at 21 */
{ (ASN_TAG_CLASS_PRIVATE | (9 << 2)), 3, 0, 0 }, /* h at 24 */ { (ASN_TAG_CLASS_PRIVATE | (9 << 2)), 3, 0, 0 }, /* h at 24 */
}; };
static asn1_CHOICE_specifics_t asn1_DEF_b_specs = { static asn_CHOICE_specifics_t asn_DEF_b_specs = {
sizeof(struct b), sizeof(struct b),
offsetof(struct b, _ber_dec_ctx), offsetof(struct b, _asn_ctx),
offsetof(struct b, present), offsetof(struct b, present),
sizeof(((struct b *)0)->present), sizeof(((struct b *)0)->present),
asn1_DEF_b_tag2el, asn_DEF_b_tag2el,
5, /* Count of tags in the map */ 5, /* Count of tags in the map */
0 /* Whether extensible */ 0 /* Whether extensible */
}; };
static /* Use -fall-defs-global to expose */ static /* Use -fall-defs-global to expose */
asn1_TYPE_descriptor_t asn1_DEF_b = { asn_TYPE_descriptor_t asn_DEF_b = {
"b", "b",
CHOICE_free, CHOICE_free,
CHOICE_print, CHOICE_print,
...@@ -227,32 +227,32 @@ asn1_TYPE_descriptor_t asn1_DEF_b = { ...@@ -227,32 +227,32 @@ asn1_TYPE_descriptor_t asn1_DEF_b = {
0, /* No effective tags (count) */ 0, /* No effective tags (count) */
0, /* No tags (pointer) */ 0, /* No tags (pointer) */
0, /* No tags (count) */ 0, /* No tags (count) */
asn1_MBR_b, asn_MBR_b,
4, /* Elements count */ 4, /* Elements count */
&asn1_DEF_b_specs /* Additional specs */ &asn_DEF_b_specs /* Additional specs */
}; };
static asn1_TYPE_member_t asn1_MBR_T[] = { static asn_TYPE_member_t asn_MBR_T[] = {
{ ATF_NOFLAGS, 0, offsetof(struct T, a), { ATF_NOFLAGS, 0, offsetof(struct T, a),
.tag = (ASN_TAG_CLASS_PRIVATE | (2 << 2)), .tag = (ASN_TAG_CLASS_PRIVATE | (2 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn1_DEF_NULL, .type = (void *)&asn_DEF_NULL,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "a" .name = "a"
}, },
{ ATF_NOFLAGS, 0, offsetof(struct T, b), { ATF_NOFLAGS, 0, offsetof(struct T, b),
.tag = -1 /* Ambiguous tag (CHOICE?) */, .tag = -1 /* Ambiguous tag (CHOICE?) */,
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_b, .type = (void *)&asn_DEF_b,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "b" .name = "b"
}, },
}; };
static ber_tlv_tag_t asn1_DEF_T_tags[] = { static ber_tlv_tag_t asn_DEF_T_tags[] = {
(ASN_TAG_CLASS_PRIVATE | (1 << 2)), (ASN_TAG_CLASS_PRIVATE | (1 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
}; };
static asn1_TYPE_tag2member_t asn1_DEF_T_tag2el[] = { static asn_TYPE_tag2member_t asn_DEF_T_tag2el[] = {
{ (ASN_TAG_CLASS_PRIVATE | (2 << 2)), 0, 0, 0 }, /* a at 15 */ { (ASN_TAG_CLASS_PRIVATE | (2 << 2)), 0, 0, 0 }, /* a at 15 */
{ (ASN_TAG_CLASS_PRIVATE | (5 << 2)), 1, 0, 0 }, /* c at 17 */ { (ASN_TAG_CLASS_PRIVATE | (5 << 2)), 1, 0, 0 }, /* c at 17 */
{ (ASN_TAG_CLASS_PRIVATE | (6 << 2)), 1, 0, 0 }, /* d at 18 */ { (ASN_TAG_CLASS_PRIVATE | (6 << 2)), 1, 0, 0 }, /* d at 18 */
...@@ -260,15 +260,15 @@ static asn1_TYPE_tag2member_t asn1_DEF_T_tag2el[] = { ...@@ -260,15 +260,15 @@ static asn1_TYPE_tag2member_t asn1_DEF_T_tag2el[] = {
{ (ASN_TAG_CLASS_PRIVATE | (8 << 2)), 1, 0, 0 }, /* g at 21 */ { (ASN_TAG_CLASS_PRIVATE | (8 << 2)), 1, 0, 0 }, /* g at 21 */
{ (ASN_TAG_CLASS_PRIVATE | (9 << 2)), 1, 0, 0 }, /* h at 24 */ { (ASN_TAG_CLASS_PRIVATE | (9 << 2)), 1, 0, 0 }, /* h at 24 */
}; };
static asn1_SEQUENCE_specifics_t asn1_DEF_T_specs = { static asn_SEQUENCE_specifics_t asn_DEF_T_specs = {
sizeof(struct T), sizeof(struct T),
offsetof(struct T, _ber_dec_ctx), offsetof(struct T, _asn_ctx),
asn1_DEF_T_tag2el, asn_DEF_T_tag2el,
6, /* Count of tags in the map */ 6, /* Count of tags in the map */
-1, /* Start extensions */ -1, /* Start extensions */
-1 /* Stop extensions */ -1 /* Stop extensions */
}; };
asn1_TYPE_descriptor_t asn1_DEF_T = { asn_TYPE_descriptor_t asn_DEF_T = {
"T", "T",
SEQUENCE_free, SEQUENCE_free,
SEQUENCE_print, SEQUENCE_print,
...@@ -278,14 +278,14 @@ asn1_TYPE_descriptor_t asn1_DEF_T = { ...@@ -278,14 +278,14 @@ asn1_TYPE_descriptor_t asn1_DEF_T = {
0, /* Not implemented yet */ 0, /* Not implemented yet */
SEQUENCE_encode_xer, SEQUENCE_encode_xer,
0, /* Use generic outmost tag fetcher */ 0, /* Use generic outmost tag fetcher */
asn1_DEF_T_tags, asn_DEF_T_tags,
sizeof(asn1_DEF_T_tags) sizeof(asn_DEF_T_tags)
/sizeof(asn1_DEF_T_tags[0]) - 1, /* 1 */ /sizeof(asn_DEF_T_tags[0]) - 1, /* 1 */
asn1_DEF_T_tags, /* Same as above */ asn_DEF_T_tags, /* Same as above */
sizeof(asn1_DEF_T_tags) sizeof(asn_DEF_T_tags)
/sizeof(asn1_DEF_T_tags[0]), /* 2 */ /sizeof(asn_DEF_T_tags[0]), /* 2 */
asn1_MBR_T, asn_MBR_T,
2, /* Elements count */ 2, /* Elements count */
&asn1_DEF_T_specs /* Additional specs */ &asn_DEF_T_specs /* Additional specs */
}; };
...@@ -11,7 +11,7 @@ typedef OCTET_STRING_t PrimitiveType_t; ...@@ -11,7 +11,7 @@ typedef OCTET_STRING_t PrimitiveType_t;
/*** <<< FUNC-DECLS [PrimitiveType] >>> ***/ /*** <<< FUNC-DECLS [PrimitiveType] >>> ***/
/* This type is equivalent to OCTET_STRING */ /* This type is equivalent to OCTET_STRING */
#define asn1_DEF_PrimitiveType asn1_DEF_OCTET_STRING #define asn_DEF_PrimitiveType asn_DEF_OCTET_STRING
/*** <<< CODE [PrimitiveType] >>> ***/ /*** <<< CODE [PrimitiveType] >>> ***/
...@@ -25,7 +25,7 @@ typedef OCTET_STRING_t PrimitiveType_t; ...@@ -25,7 +25,7 @@ typedef OCTET_STRING_t PrimitiveType_t;
/*** <<< DEPS [ConstructedType] >>> ***/ /*** <<< DEPS [ConstructedType] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_ConstructedType; extern asn_TYPE_descriptor_t asn_DEF_ConstructedType;
/*** <<< TYPE-DECLS [ConstructedType] >>> ***/ /*** <<< TYPE-DECLS [ConstructedType] >>> ***/
...@@ -34,35 +34,35 @@ typedef struct ConstructedType { ...@@ -34,35 +34,35 @@ typedef struct ConstructedType {
PrimitiveType_t field; PrimitiveType_t field;
/* Context for parsing across buffer boundaries */ /* Context for parsing across buffer boundaries */
ber_dec_ctx_t _ber_dec_ctx; asn_struct_ctx_t _asn_ctx;
} ConstructedType_t; } ConstructedType_t;
/*** <<< STAT-DEFS [ConstructedType] >>> ***/ /*** <<< STAT-DEFS [ConstructedType] >>> ***/
static asn1_TYPE_member_t asn1_MBR_ConstructedType[] = { static asn_TYPE_member_t asn_MBR_ConstructedType[] = {
{ ATF_NOFLAGS, 0, offsetof(struct ConstructedType, field), { ATF_NOFLAGS, 0, offsetof(struct ConstructedType, field),
.tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)), .tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn1_DEF_PrimitiveType, .type = (void *)&asn_DEF_PrimitiveType,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "field" .name = "field"
}, },
}; };
static ber_tlv_tag_t asn1_DEF_ConstructedType_tags[] = { static ber_tlv_tag_t asn_DEF_ConstructedType_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
}; };
static asn1_TYPE_tag2member_t asn1_DEF_ConstructedType_tag2el[] = { static asn_TYPE_tag2member_t asn_DEF_ConstructedType_tag2el[] = {
{ (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 0, 0, 0 }, /* field at 18 */ { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 0, 0, 0 }, /* field at 18 */
}; };
static asn1_SEQUENCE_specifics_t asn1_DEF_ConstructedType_specs = { static asn_SEQUENCE_specifics_t asn_DEF_ConstructedType_specs = {
sizeof(struct ConstructedType), sizeof(struct ConstructedType),
offsetof(struct ConstructedType, _ber_dec_ctx), offsetof(struct ConstructedType, _asn_ctx),
asn1_DEF_ConstructedType_tag2el, asn_DEF_ConstructedType_tag2el,
1, /* Count of tags in the map */ 1, /* Count of tags in the map */
-1, /* Start extensions */ -1, /* Start extensions */
-1 /* Stop extensions */ -1 /* Stop extensions */
}; };
asn1_TYPE_descriptor_t asn1_DEF_ConstructedType = { asn_TYPE_descriptor_t asn_DEF_ConstructedType = {
"ConstructedType", "ConstructedType",
SEQUENCE_free, SEQUENCE_free,
SEQUENCE_print, SEQUENCE_print,
...@@ -72,15 +72,15 @@ asn1_TYPE_descriptor_t asn1_DEF_ConstructedType = { ...@@ -72,15 +72,15 @@ asn1_TYPE_descriptor_t asn1_DEF_ConstructedType = {
0, /* Not implemented yet */ 0, /* Not implemented yet */
SEQUENCE_encode_xer, SEQUENCE_encode_xer,
0, /* Use generic outmost tag fetcher */ 0, /* Use generic outmost tag fetcher */
asn1_DEF_ConstructedType_tags, asn_DEF_ConstructedType_tags,
sizeof(asn1_DEF_ConstructedType_tags) sizeof(asn_DEF_ConstructedType_tags)
/sizeof(asn1_DEF_ConstructedType_tags[0]), /* 1 */ /sizeof(asn_DEF_ConstructedType_tags[0]), /* 1 */
asn1_DEF_ConstructedType_tags, /* Same as above */ asn_DEF_ConstructedType_tags, /* Same as above */
sizeof(asn1_DEF_ConstructedType_tags) sizeof(asn_DEF_ConstructedType_tags)
/sizeof(asn1_DEF_ConstructedType_tags[0]), /* 1 */ /sizeof(asn_DEF_ConstructedType_tags[0]), /* 1 */
asn1_MBR_ConstructedType, asn_MBR_ConstructedType,
1, /* Elements count */ 1, /* Elements count */
&asn1_DEF_ConstructedType_specs /* Additional specs */ &asn_DEF_ConstructedType_specs /* Additional specs */
}; };
...@@ -95,7 +95,7 @@ typedef ConstructedType_t T_t; ...@@ -95,7 +95,7 @@ typedef ConstructedType_t T_t;
/*** <<< FUNC-DECLS [T] >>> ***/ /*** <<< FUNC-DECLS [T] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_T; extern asn_TYPE_descriptor_t asn_DEF_T;
asn_struct_free_f T_free; asn_struct_free_f T_free;
asn_struct_print_f T_print; asn_struct_print_f T_print;
asn_constr_check_f T_constraint; asn_constr_check_f T_constraint;
...@@ -106,10 +106,10 @@ xer_type_encoder_f T_encode_xer; ...@@ -106,10 +106,10 @@ xer_type_encoder_f T_encode_xer;
/*** <<< CODE [T] >>> ***/ /*** <<< CODE [T] >>> ***/
int int
T_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, T_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) { asn_app_consume_bytes_f *app_errlog, void *app_key) {
/* Replace with underlying type checker */ /* Replace with underlying type checker */
td->check_constraints = asn1_DEF_ConstructedType.check_constraints; td->check_constraints = asn_DEF_ConstructedType.check_constraints;
return td->check_constraints(td, sptr, app_errlog, app_key); return td->check_constraints(td, sptr, app_errlog, app_key);
} }
...@@ -118,41 +118,41 @@ T_constraint(asn1_TYPE_descriptor_t *td, const void *sptr, ...@@ -118,41 +118,41 @@ T_constraint(asn1_TYPE_descriptor_t *td, const void *sptr,
* so here we adjust the DEF accordingly. * so here we adjust the DEF accordingly.
*/ */
static void static void
T_inherit_TYPE_descriptor(asn1_TYPE_descriptor_t *td) { T_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->free_struct = asn1_DEF_ConstructedType.free_struct; td->free_struct = asn_DEF_ConstructedType.free_struct;
td->print_struct = asn1_DEF_ConstructedType.print_struct; td->print_struct = asn_DEF_ConstructedType.print_struct;
td->ber_decoder = asn1_DEF_ConstructedType.ber_decoder; td->ber_decoder = asn_DEF_ConstructedType.ber_decoder;
td->der_encoder = asn1_DEF_ConstructedType.der_encoder; td->der_encoder = asn_DEF_ConstructedType.der_encoder;
td->xer_decoder = asn1_DEF_ConstructedType.xer_decoder; td->xer_decoder = asn_DEF_ConstructedType.xer_decoder;
td->xer_encoder = asn1_DEF_ConstructedType.xer_encoder; td->xer_encoder = asn_DEF_ConstructedType.xer_encoder;
td->elements = asn1_DEF_ConstructedType.elements; td->elements = asn_DEF_ConstructedType.elements;
td->elements_count = asn1_DEF_ConstructedType.elements_count; td->elements_count = asn_DEF_ConstructedType.elements_count;
td->specifics = asn1_DEF_ConstructedType.specifics; td->specifics = asn_DEF_ConstructedType.specifics;
} }
void void
T_free(asn1_TYPE_descriptor_t *td, T_free(asn_TYPE_descriptor_t *td,
void *struct_ptr, int contents_only) { void *struct_ptr, int contents_only) {
T_inherit_TYPE_descriptor(td); T_inherit_TYPE_descriptor(td);
td->free_struct(td, struct_ptr, contents_only); td->free_struct(td, struct_ptr, contents_only);
} }
int int
T_print(asn1_TYPE_descriptor_t *td, const void *struct_ptr, T_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
T_inherit_TYPE_descriptor(td); T_inherit_TYPE_descriptor(td);
return td->print_struct(td, struct_ptr, ilevel, cb, app_key); return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
} }
ber_dec_rval_t ber_dec_rval_t
T_decode_ber(asn1_TYPE_descriptor_t *td, T_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, void *bufptr, size_t size, int tag_mode) { void **structure, void *bufptr, size_t size, int tag_mode) {
T_inherit_TYPE_descriptor(td); T_inherit_TYPE_descriptor(td);
return td->ber_decoder(td, structure, bufptr, size, tag_mode); return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
} }
asn_enc_rval_t asn_enc_rval_t
T_encode_der(asn1_TYPE_descriptor_t *td, T_encode_der(asn_TYPE_descriptor_t *td,
void *structure, int tag_mode, ber_tlv_tag_t tag, void *structure, int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) { asn_app_consume_bytes_f *cb, void *app_key) {
T_inherit_TYPE_descriptor(td); T_inherit_TYPE_descriptor(td);
...@@ -160,7 +160,7 @@ T_encode_der(asn1_TYPE_descriptor_t *td, ...@@ -160,7 +160,7 @@ T_encode_der(asn1_TYPE_descriptor_t *td,
} }
asn_enc_rval_t asn_enc_rval_t
T_encode_xer(asn1_TYPE_descriptor_t *td, void *structure, T_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
int ilevel, enum xer_encoder_flags_e flags, int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) { asn_app_consume_bytes_f *cb, void *app_key) {
T_inherit_TYPE_descriptor(td); T_inherit_TYPE_descriptor(td);
...@@ -170,11 +170,11 @@ T_encode_xer(asn1_TYPE_descriptor_t *td, void *structure, ...@@ -170,11 +170,11 @@ T_encode_xer(asn1_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T] >>> ***/ /*** <<< STAT-DEFS [T] >>> ***/
static ber_tlv_tag_t asn1_DEF_T_tags[] = { static ber_tlv_tag_t asn_DEF_T_tags[] = {
(ASN_TAG_CLASS_CONTEXT | (3 << 2)), (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
}; };
asn1_TYPE_descriptor_t asn1_DEF_T = { asn_TYPE_descriptor_t asn_DEF_T = {
"T", "T",
T_free, T_free,
T_print, T_print,
...@@ -184,12 +184,12 @@ asn1_TYPE_descriptor_t asn1_DEF_T = { ...@@ -184,12 +184,12 @@ asn1_TYPE_descriptor_t asn1_DEF_T = {
0, /* Not implemented yet */ 0, /* Not implemented yet */
T_encode_xer, T_encode_xer,
0, /* Use generic outmost tag fetcher */ 0, /* Use generic outmost tag fetcher */
asn1_DEF_T_tags, asn_DEF_T_tags,
sizeof(asn1_DEF_T_tags) sizeof(asn_DEF_T_tags)
/sizeof(asn1_DEF_T_tags[0]) - 1, /* 1 */ /sizeof(asn_DEF_T_tags[0]) - 1, /* 1 */
asn1_DEF_T_tags, /* Same as above */ asn_DEF_T_tags, /* Same as above */
sizeof(asn1_DEF_T_tags) sizeof(asn_DEF_T_tags)
/sizeof(asn1_DEF_T_tags[0]), /* 2 */ /sizeof(asn_DEF_T_tags[0]), /* 2 */
0, 0, /* Defined elsewhere */ 0, 0, /* Defined elsewhere */
0 /* No specifics */ 0 /* No specifics */
}; };
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
typedef enum T1_PR { typedef enum T1_PR {
T1_PR_i, /* Member i is present */ T1_PR_i, /* Member i is present */
} T1_PR; } T1_PR;
extern asn1_TYPE_descriptor_t asn1_DEF_T1; extern asn_TYPE_descriptor_t asn_DEF_T1;
/*** <<< TYPE-DECLS [T1] >>> ***/ /*** <<< TYPE-DECLS [T1] >>> ***/
...@@ -30,39 +30,39 @@ typedef struct T1 { ...@@ -30,39 +30,39 @@ typedef struct T1 {
[((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))]; [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
/* Context for parsing across buffer boundaries */ /* Context for parsing across buffer boundaries */
ber_dec_ctx_t _ber_dec_ctx; asn_struct_ctx_t _asn_ctx;
} T1_t; } T1_t;
/*** <<< STAT-DEFS [T1] >>> ***/ /*** <<< STAT-DEFS [T1] >>> ***/
static asn1_TYPE_member_t asn1_MBR_T1[] = { static asn_TYPE_member_t asn_MBR_T1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct T1, i), { ATF_NOFLAGS, 0, offsetof(struct T1, i),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_INTEGER, .type = (void *)&asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "i" .name = "i"
}, },
}; };
static ber_tlv_tag_t asn1_DEF_T1_tags[] = { static ber_tlv_tag_t asn_DEF_T1_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
}; };
static asn1_TYPE_tag2member_t asn1_DEF_T1_tag2el[] = { static asn_TYPE_tag2member_t asn_DEF_T1_tag2el[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 14 */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 14 */
}; };
static uint8_t asn1_DEF_T1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = { static uint8_t asn_DEF_T1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7) (1 << 7)
}; };
static asn1_SET_specifics_t asn1_DEF_T1_specs = { static asn_SET_specifics_t asn_DEF_T1_specs = {
sizeof(struct T1), sizeof(struct T1),
offsetof(struct T1, _ber_dec_ctx), offsetof(struct T1, _asn_ctx),
offsetof(struct T1, _presence_map), offsetof(struct T1, _presence_map),
asn1_DEF_T1_tag2el, asn_DEF_T1_tag2el,
1, /* Count of tags in the map */ 1, /* Count of tags in the map */
1, /* Whether extensible */ 1, /* Whether extensible */
(unsigned int *)asn1_DEF_T1_mmap /* Mandatory elements map */ (unsigned int *)asn_DEF_T1_mmap /* Mandatory elements map */
}; };
asn1_TYPE_descriptor_t asn1_DEF_T1 = { asn_TYPE_descriptor_t asn_DEF_T1 = {
"T1", "T1",
SET_free, SET_free,
SET_print, SET_print,
...@@ -72,15 +72,15 @@ asn1_TYPE_descriptor_t asn1_DEF_T1 = { ...@@ -72,15 +72,15 @@ asn1_TYPE_descriptor_t asn1_DEF_T1 = {
0, /* Not implemented yet */ 0, /* Not implemented yet */
SET_encode_xer, SET_encode_xer,
0, /* Use generic outmost tag fetcher */ 0, /* Use generic outmost tag fetcher */
asn1_DEF_T1_tags, asn_DEF_T1_tags,
sizeof(asn1_DEF_T1_tags) sizeof(asn_DEF_T1_tags)
/sizeof(asn1_DEF_T1_tags[0]), /* 1 */ /sizeof(asn_DEF_T1_tags[0]), /* 1 */
asn1_DEF_T1_tags, /* Same as above */ asn_DEF_T1_tags, /* Same as above */
sizeof(asn1_DEF_T1_tags) sizeof(asn_DEF_T1_tags)
/sizeof(asn1_DEF_T1_tags[0]), /* 1 */ /sizeof(asn_DEF_T1_tags[0]), /* 1 */
asn1_MBR_T1, asn_MBR_T1,
1, /* Elements count */ 1, /* Elements count */
&asn1_DEF_T1_specs /* Additional specs */ &asn_DEF_T1_specs /* Additional specs */
}; };
...@@ -98,7 +98,7 @@ asn1_TYPE_descriptor_t asn1_DEF_T1 = { ...@@ -98,7 +98,7 @@ asn1_TYPE_descriptor_t asn1_DEF_T1 = {
typedef enum T2_PR { typedef enum T2_PR {
T2_PR_i, /* Member i is present */ T2_PR_i, /* Member i is present */
} T2_PR; } T2_PR;
extern asn1_TYPE_descriptor_t asn1_DEF_T2; extern asn_TYPE_descriptor_t asn_DEF_T2;
/*** <<< TYPE-DECLS [T2] >>> ***/ /*** <<< TYPE-DECLS [T2] >>> ***/
...@@ -115,39 +115,39 @@ typedef struct T2 { ...@@ -115,39 +115,39 @@ typedef struct T2 {
[((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))]; [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
/* Context for parsing across buffer boundaries */ /* Context for parsing across buffer boundaries */
ber_dec_ctx_t _ber_dec_ctx; asn_struct_ctx_t _asn_ctx;
} T2_t; } T2_t;
/*** <<< STAT-DEFS [T2] >>> ***/ /*** <<< STAT-DEFS [T2] >>> ***/
static asn1_TYPE_member_t asn1_MBR_T2[] = { static asn_TYPE_member_t asn_MBR_T2[] = {
{ ATF_NOFLAGS, 0, offsetof(struct T2, i), { ATF_NOFLAGS, 0, offsetof(struct T2, i),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_INTEGER, .type = (void *)&asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "i" .name = "i"
}, },
}; };
static ber_tlv_tag_t asn1_DEF_T2_tags[] = { static ber_tlv_tag_t asn_DEF_T2_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
}; };
static asn1_TYPE_tag2member_t asn1_DEF_T2_tag2el[] = { static asn_TYPE_tag2member_t asn_DEF_T2_tag2el[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 15 */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 15 */
}; };
static uint8_t asn1_DEF_T2_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = { static uint8_t asn_DEF_T2_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7) (1 << 7)
}; };
static asn1_SET_specifics_t asn1_DEF_T2_specs = { static asn_SET_specifics_t asn_DEF_T2_specs = {
sizeof(struct T2), sizeof(struct T2),
offsetof(struct T2, _ber_dec_ctx), offsetof(struct T2, _asn_ctx),
offsetof(struct T2, _presence_map), offsetof(struct T2, _presence_map),
asn1_DEF_T2_tag2el, asn_DEF_T2_tag2el,
1, /* Count of tags in the map */ 1, /* Count of tags in the map */
1, /* Whether extensible */ 1, /* Whether extensible */
(unsigned int *)asn1_DEF_T2_mmap /* Mandatory elements map */ (unsigned int *)asn_DEF_T2_mmap /* Mandatory elements map */
}; };
asn1_TYPE_descriptor_t asn1_DEF_T2 = { asn_TYPE_descriptor_t asn_DEF_T2 = {
"T2", "T2",
SET_free, SET_free,
SET_print, SET_print,
...@@ -157,15 +157,15 @@ asn1_TYPE_descriptor_t asn1_DEF_T2 = { ...@@ -157,15 +157,15 @@ asn1_TYPE_descriptor_t asn1_DEF_T2 = {
0, /* Not implemented yet */ 0, /* Not implemented yet */
SET_encode_xer, SET_encode_xer,
0, /* Use generic outmost tag fetcher */ 0, /* Use generic outmost tag fetcher */
asn1_DEF_T2_tags, asn_DEF_T2_tags,
sizeof(asn1_DEF_T2_tags) sizeof(asn_DEF_T2_tags)
/sizeof(asn1_DEF_T2_tags[0]), /* 1 */ /sizeof(asn_DEF_T2_tags[0]), /* 1 */
asn1_DEF_T2_tags, /* Same as above */ asn_DEF_T2_tags, /* Same as above */
sizeof(asn1_DEF_T2_tags) sizeof(asn_DEF_T2_tags)
/sizeof(asn1_DEF_T2_tags[0]), /* 1 */ /sizeof(asn_DEF_T2_tags[0]), /* 1 */
asn1_MBR_T2, asn_MBR_T2,
1, /* Elements count */ 1, /* Elements count */
&asn1_DEF_T2_specs /* Additional specs */ &asn_DEF_T2_specs /* Additional specs */
}; };
...@@ -181,7 +181,7 @@ typedef enum T3_PR { ...@@ -181,7 +181,7 @@ typedef enum T3_PR {
T3_PR_i, T3_PR_i,
/* Extensions may appear below */ /* Extensions may appear below */
} T3_PR; } T3_PR;
extern asn1_TYPE_descriptor_t asn1_DEF_T3; extern asn_TYPE_descriptor_t asn_DEF_T3;
/*** <<< TYPE-DECLS [T3] >>> ***/ /*** <<< TYPE-DECLS [T3] >>> ***/
...@@ -197,33 +197,33 @@ typedef struct T3 { ...@@ -197,33 +197,33 @@ typedef struct T3 {
} choice; } choice;
/* Context for parsing across buffer boundaries */ /* Context for parsing across buffer boundaries */
ber_dec_ctx_t _ber_dec_ctx; asn_struct_ctx_t _asn_ctx;
} T3_t; } T3_t;
/*** <<< STAT-DEFS [T3] >>> ***/ /*** <<< STAT-DEFS [T3] >>> ***/
static asn1_TYPE_member_t asn1_MBR_T3[] = { static asn_TYPE_member_t asn_MBR_T3[] = {
{ ATF_NOFLAGS, 0, offsetof(struct T3, choice.i), { ATF_NOFLAGS, 0, offsetof(struct T3, choice.i),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_INTEGER, .type = (void *)&asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "i" .name = "i"
}, },
}; };
static asn1_TYPE_tag2member_t asn1_DEF_T3_tag2el[] = { static asn_TYPE_tag2member_t asn_DEF_T3_tag2el[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 16 */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 16 */
}; };
static asn1_CHOICE_specifics_t asn1_DEF_T3_specs = { static asn_CHOICE_specifics_t asn_DEF_T3_specs = {
sizeof(struct T3), sizeof(struct T3),
offsetof(struct T3, _ber_dec_ctx), offsetof(struct T3, _asn_ctx),
offsetof(struct T3, present), offsetof(struct T3, present),
sizeof(((struct T3 *)0)->present), sizeof(((struct T3 *)0)->present),
asn1_DEF_T3_tag2el, asn_DEF_T3_tag2el,
1, /* Count of tags in the map */ 1, /* Count of tags in the map */
1 /* Whether extensible */ 1 /* Whether extensible */
}; };
asn1_TYPE_descriptor_t asn1_DEF_T3 = { asn_TYPE_descriptor_t asn_DEF_T3 = {
"T3", "T3",
CHOICE_free, CHOICE_free,
CHOICE_print, CHOICE_print,
...@@ -237,9 +237,9 @@ asn1_TYPE_descriptor_t asn1_DEF_T3 = { ...@@ -237,9 +237,9 @@ asn1_TYPE_descriptor_t asn1_DEF_T3 = {
0, /* No effective tags (count) */ 0, /* No effective tags (count) */
0, /* No tags (pointer) */ 0, /* No tags (pointer) */
0, /* No tags (count) */ 0, /* No tags (count) */
asn1_MBR_T3, asn_MBR_T3,
1, /* Elements count */ 1, /* Elements count */
&asn1_DEF_T3_specs /* Additional specs */ &asn_DEF_T3_specs /* Additional specs */
}; };
...@@ -255,7 +255,7 @@ typedef enum T4_PR { ...@@ -255,7 +255,7 @@ typedef enum T4_PR {
T4_PR_i, T4_PR_i,
/* Extensions may appear below */ /* Extensions may appear below */
} T4_PR; } T4_PR;
extern asn1_TYPE_descriptor_t asn1_DEF_T4; extern asn_TYPE_descriptor_t asn_DEF_T4;
/*** <<< TYPE-DECLS [T4] >>> ***/ /*** <<< TYPE-DECLS [T4] >>> ***/
...@@ -271,33 +271,33 @@ typedef struct T4 { ...@@ -271,33 +271,33 @@ typedef struct T4 {
} choice; } choice;
/* Context for parsing across buffer boundaries */ /* Context for parsing across buffer boundaries */
ber_dec_ctx_t _ber_dec_ctx; asn_struct_ctx_t _asn_ctx;
} T4_t; } T4_t;
/*** <<< STAT-DEFS [T4] >>> ***/ /*** <<< STAT-DEFS [T4] >>> ***/
static asn1_TYPE_member_t asn1_MBR_T4[] = { static asn_TYPE_member_t asn_MBR_T4[] = {
{ ATF_NOFLAGS, 0, offsetof(struct T4, choice.i), { ATF_NOFLAGS, 0, offsetof(struct T4, choice.i),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_INTEGER, .type = (void *)&asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "i" .name = "i"
}, },
}; };
static asn1_TYPE_tag2member_t asn1_DEF_T4_tag2el[] = { static asn_TYPE_tag2member_t asn_DEF_T4_tag2el[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 17 */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 17 */
}; };
static asn1_CHOICE_specifics_t asn1_DEF_T4_specs = { static asn_CHOICE_specifics_t asn_DEF_T4_specs = {
sizeof(struct T4), sizeof(struct T4),
offsetof(struct T4, _ber_dec_ctx), offsetof(struct T4, _asn_ctx),
offsetof(struct T4, present), offsetof(struct T4, present),
sizeof(((struct T4 *)0)->present), sizeof(((struct T4 *)0)->present),
asn1_DEF_T4_tag2el, asn_DEF_T4_tag2el,
1, /* Count of tags in the map */ 1, /* Count of tags in the map */
1 /* Whether extensible */ 1 /* Whether extensible */
}; };
asn1_TYPE_descriptor_t asn1_DEF_T4 = { asn_TYPE_descriptor_t asn_DEF_T4 = {
"T4", "T4",
CHOICE_free, CHOICE_free,
CHOICE_print, CHOICE_print,
...@@ -311,8 +311,8 @@ asn1_TYPE_descriptor_t asn1_DEF_T4 = { ...@@ -311,8 +311,8 @@ asn1_TYPE_descriptor_t asn1_DEF_T4 = {
0, /* No effective tags (count) */ 0, /* No effective tags (count) */
0, /* No tags (pointer) */ 0, /* No tags (pointer) */
0, /* No tags (count) */ 0, /* No tags (count) */
asn1_MBR_T4, asn_MBR_T4,
1, /* Elements count */ 1, /* Elements count */
&asn1_DEF_T4_specs /* Additional specs */ &asn_DEF_T4_specs /* Additional specs */
}; };
This diff is collapsed.
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
/*** <<< DEPS [T1] >>> ***/ /*** <<< DEPS [T1] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_T1; extern asn_TYPE_descriptor_t asn_DEF_T1;
/*** <<< TYPE-DECLS [T1] >>> ***/ /*** <<< TYPE-DECLS [T1] >>> ***/
...@@ -17,42 +17,42 @@ typedef struct T1 { ...@@ -17,42 +17,42 @@ typedef struct T1 {
ANY_t any; ANY_t any;
/* Context for parsing across buffer boundaries */ /* Context for parsing across buffer boundaries */
ber_dec_ctx_t _ber_dec_ctx; asn_struct_ctx_t _asn_ctx;
} T1_t; } T1_t;
/*** <<< STAT-DEFS [T1] >>> ***/ /*** <<< STAT-DEFS [T1] >>> ***/
static asn1_TYPE_member_t asn1_MBR_T1[] = { static asn_TYPE_member_t asn_MBR_T1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct T1, i), { ATF_NOFLAGS, 0, offsetof(struct T1, i),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_INTEGER, .type = (void *)&asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "i" .name = "i"
}, },
{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct T1, any), { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct T1, any),
.tag = -1 /* Ambiguous tag (ANY?) */, .tag = -1 /* Ambiguous tag (ANY?) */,
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_ANY, .type = (void *)&asn_DEF_ANY,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "any" .name = "any"
}, },
}; };
static ber_tlv_tag_t asn1_DEF_T1_tags[] = { static ber_tlv_tag_t asn_DEF_T1_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
}; };
static asn1_TYPE_tag2member_t asn1_DEF_T1_tag2el[] = { static asn_TYPE_tag2member_t asn_DEF_T1_tag2el[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 15 */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 15 */
}; };
static asn1_SEQUENCE_specifics_t asn1_DEF_T1_specs = { static asn_SEQUENCE_specifics_t asn_DEF_T1_specs = {
sizeof(struct T1), sizeof(struct T1),
offsetof(struct T1, _ber_dec_ctx), offsetof(struct T1, _asn_ctx),
asn1_DEF_T1_tag2el, asn_DEF_T1_tag2el,
1, /* Count of tags in the map */ 1, /* Count of tags in the map */
-1, /* Start extensions */ -1, /* Start extensions */
-1 /* Stop extensions */ -1 /* Stop extensions */
}; };
asn1_TYPE_descriptor_t asn1_DEF_T1 = { asn_TYPE_descriptor_t asn_DEF_T1 = {
"T1", "T1",
SEQUENCE_free, SEQUENCE_free,
SEQUENCE_print, SEQUENCE_print,
...@@ -62,15 +62,15 @@ asn1_TYPE_descriptor_t asn1_DEF_T1 = { ...@@ -62,15 +62,15 @@ asn1_TYPE_descriptor_t asn1_DEF_T1 = {
0, /* Not implemented yet */ 0, /* Not implemented yet */
SEQUENCE_encode_xer, SEQUENCE_encode_xer,
0, /* Use generic outmost tag fetcher */ 0, /* Use generic outmost tag fetcher */
asn1_DEF_T1_tags, asn_DEF_T1_tags,
sizeof(asn1_DEF_T1_tags) sizeof(asn_DEF_T1_tags)
/sizeof(asn1_DEF_T1_tags[0]), /* 1 */ /sizeof(asn_DEF_T1_tags[0]), /* 1 */
asn1_DEF_T1_tags, /* Same as above */ asn_DEF_T1_tags, /* Same as above */
sizeof(asn1_DEF_T1_tags) sizeof(asn_DEF_T1_tags)
/sizeof(asn1_DEF_T1_tags[0]), /* 1 */ /sizeof(asn_DEF_T1_tags[0]), /* 1 */
asn1_MBR_T1, asn_MBR_T1,
2, /* Elements count */ 2, /* Elements count */
&asn1_DEF_T1_specs /* Additional specs */ &asn_DEF_T1_specs /* Additional specs */
}; };
...@@ -82,7 +82,7 @@ asn1_TYPE_descriptor_t asn1_DEF_T1 = { ...@@ -82,7 +82,7 @@ asn1_TYPE_descriptor_t asn1_DEF_T1 = {
/*** <<< DEPS [T2] >>> ***/ /*** <<< DEPS [T2] >>> ***/
extern asn1_TYPE_descriptor_t asn1_DEF_T2; extern asn_TYPE_descriptor_t asn_DEF_T2;
/*** <<< TYPE-DECLS [T2] >>> ***/ /*** <<< TYPE-DECLS [T2] >>> ***/
...@@ -92,43 +92,43 @@ typedef struct T2 { ...@@ -92,43 +92,43 @@ typedef struct T2 {
ANY_t *any /* OPTIONAL */; ANY_t *any /* OPTIONAL */;
/* Context for parsing across buffer boundaries */ /* Context for parsing across buffer boundaries */
ber_dec_ctx_t _ber_dec_ctx; asn_struct_ctx_t _asn_ctx;
} T2_t; } T2_t;
/*** <<< STAT-DEFS [T2] >>> ***/ /*** <<< STAT-DEFS [T2] >>> ***/
static asn1_TYPE_member_t asn1_MBR_T2[] = { static asn_TYPE_member_t asn_MBR_T2[] = {
{ ATF_NOFLAGS, 0, offsetof(struct T2, i), { ATF_NOFLAGS, 0, offsetof(struct T2, i),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0, .tag_mode = 0,
.type = (void *)&asn1_DEF_INTEGER, .type = (void *)&asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "i" .name = "i"
}, },
{ ATF_POINTER, 1, offsetof(struct T2, any), { ATF_POINTER, 1, offsetof(struct T2, any),
.tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
.tag_mode = +1, /* EXPLICIT tag at current level */ .tag_mode = +1, /* EXPLICIT tag at current level */
.type = (void *)&asn1_DEF_ANY, .type = (void *)&asn_DEF_ANY,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer to actual type */
.name = "any" .name = "any"
}, },
}; };
static ber_tlv_tag_t asn1_DEF_T2_tags[] = { static ber_tlv_tag_t asn_DEF_T2_tags[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
}; };
static asn1_TYPE_tag2member_t asn1_DEF_T2_tag2el[] = { static asn_TYPE_tag2member_t asn_DEF_T2_tag2el[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 20 */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 20 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* any at 21 */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* any at 21 */
}; };
static asn1_SEQUENCE_specifics_t asn1_DEF_T2_specs = { static asn_SEQUENCE_specifics_t asn_DEF_T2_specs = {
sizeof(struct T2), sizeof(struct T2),
offsetof(struct T2, _ber_dec_ctx), offsetof(struct T2, _asn_ctx),
asn1_DEF_T2_tag2el, asn_DEF_T2_tag2el,
2, /* Count of tags in the map */ 2, /* Count of tags in the map */
-1, /* Start extensions */ -1, /* Start extensions */
-1 /* Stop extensions */ -1 /* Stop extensions */
}; };
asn1_TYPE_descriptor_t asn1_DEF_T2 = { asn_TYPE_descriptor_t asn_DEF_T2 = {
"T2", "T2",
SEQUENCE_free, SEQUENCE_free,
SEQUENCE_print, SEQUENCE_print,
...@@ -138,14 +138,14 @@ asn1_TYPE_descriptor_t asn1_DEF_T2 = { ...@@ -138,14 +138,14 @@ asn1_TYPE_descriptor_t asn1_DEF_T2 = {
0, /* Not implemented yet */ 0, /* Not implemented yet */
SEQUENCE_encode_xer, SEQUENCE_encode_xer,
0, /* Use generic outmost tag fetcher */ 0, /* Use generic outmost tag fetcher */
asn1_DEF_T2_tags, asn_DEF_T2_tags,
sizeof(asn1_DEF_T2_tags) sizeof(asn_DEF_T2_tags)
/sizeof(asn1_DEF_T2_tags[0]), /* 1 */ /sizeof(asn_DEF_T2_tags[0]), /* 1 */
asn1_DEF_T2_tags, /* Same as above */ asn_DEF_T2_tags, /* Same as above */
sizeof(asn1_DEF_T2_tags) sizeof(asn_DEF_T2_tags)
/sizeof(asn1_DEF_T2_tags[0]), /* 1 */ /sizeof(asn_DEF_T2_tags[0]), /* 1 */
asn1_MBR_T2, asn_MBR_T2,
2, /* Elements count */ 2, /* Elements count */
&asn1_DEF_T2_specs /* Additional specs */ &asn_DEF_T2_specs /* Additional specs */
}; };
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment