vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [PDU] >>> ***/ |
| 3 | |
| 4 | #include <Sequence.h> |
| 5 | #include <Set.h> |
| 6 | #include <SetOf.h> |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 7 | #include <SequenceOf.h> |
| 8 | #include <ExtensibleSet.h> |
| 9 | #include <ExtensibleSequence.h> |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 10 | #include <SetOfNULL.h> |
| 11 | #include <SetOfEnums.h> |
| 12 | #include <SeqOfZuka.h> |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 13 | #include <constr_CHOICE.h> |
| 14 | |
| 15 | /*** <<< DEPS [PDU] >>> ***/ |
| 16 | |
| 17 | typedef enum PDU_PR { |
| 18 | PDU_PR_NOTHING, /* No components present */ |
| 19 | PDU_PR_sequence, |
| 20 | PDU_PR_set, |
| 21 | PDU_PR_setOf, |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 22 | PDU_PR_sequenceOf, |
| 23 | PDU_PR_extensibleSet, |
| 24 | PDU_PR_extensibleSequence, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 25 | PDU_PR_setOfNULL, |
| 26 | PDU_PR_setOfEnums, |
| 27 | PDU_PR_seqOfZuka, |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 28 | /* Extensions may appear below */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 29 | } PDU_PR; |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 30 | |
| 31 | /*** <<< TYPE-DECLS [PDU] >>> ***/ |
| 32 | |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 33 | typedef struct PDU { |
| 34 | PDU_PR present; |
| 35 | union { |
| 36 | Sequence_t sequence; |
| 37 | Set_t set; |
| 38 | SetOf_t setOf; |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 39 | SequenceOf_t sequenceOf; |
| 40 | ExtensibleSet_t extensibleSet; |
| 41 | ExtensibleSequence_t extensibleSequence; |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 42 | SetOfNULL_t setOfNULL; |
| 43 | SetOfEnums_t setOfEnums; |
| 44 | SeqOfZuka_t seqOfZuka; |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 45 | /* |
| 46 | * This type is extensible, |
| 47 | * possible extensions are below. |
| 48 | */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 49 | } choice; |
| 50 | |
| 51 | /* Context for parsing across buffer boundaries */ |
| 52 | asn_struct_ctx_t _asn_ctx; |
| 53 | } PDU_t; |
| 54 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 55 | /*** <<< FUNC-DECLS [PDU] >>> ***/ |
| 56 | |
| 57 | extern asn_TYPE_descriptor_t asn_DEF_PDU; |
| 58 | |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 59 | /*** <<< STAT-DEFS [PDU] >>> ***/ |
| 60 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 61 | static asn_TYPE_member_t asn_MBR_PDU_1[] = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 62 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.sequence), |
| 63 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 64 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 65 | .type = (void *)&asn_DEF_Sequence, |
| 66 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 67 | .name = "sequence" |
| 68 | }, |
| 69 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.set), |
| 70 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 71 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 72 | .type = (void *)&asn_DEF_Set, |
| 73 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 74 | .name = "set" |
| 75 | }, |
| 76 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.setOf), |
| 77 | .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 78 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 79 | .type = (void *)&asn_DEF_SetOf, |
| 80 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 81 | .name = "setOf" |
| 82 | }, |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 83 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.sequenceOf), |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 84 | .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 85 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 86 | .type = (void *)&asn_DEF_SequenceOf, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 87 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 88 | .name = "sequenceOf" |
| 89 | }, |
| 90 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.extensibleSet), |
| 91 | .tag = (ASN_TAG_CLASS_CONTEXT | (4 << 2)), |
| 92 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 93 | .type = (void *)&asn_DEF_ExtensibleSet, |
| 94 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 95 | .name = "extensibleSet" |
| 96 | }, |
| 97 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.extensibleSequence), |
| 98 | .tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)), |
| 99 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 100 | .type = (void *)&asn_DEF_ExtensibleSequence, |
| 101 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 102 | .name = "extensibleSequence" |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 103 | }, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 104 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.setOfNULL), |
| 105 | .tag = (ASN_TAG_CLASS_CONTEXT | (6 << 2)), |
| 106 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 107 | .type = (void *)&asn_DEF_SetOfNULL, |
| 108 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 109 | .name = "setOfNULL" |
| 110 | }, |
| 111 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.setOfEnums), |
| 112 | .tag = (ASN_TAG_CLASS_CONTEXT | (7 << 2)), |
| 113 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 114 | .type = (void *)&asn_DEF_SetOfEnums, |
| 115 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 116 | .name = "setOfEnums" |
| 117 | }, |
| 118 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.seqOfZuka), |
| 119 | .tag = (ASN_TAG_CLASS_CONTEXT | (8 << 2)), |
| 120 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 121 | .type = (void *)&asn_DEF_SeqOfZuka, |
| 122 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 123 | .name = "seqOfZuka" |
| 124 | }, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 125 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 126 | static asn_TYPE_tag2member_t asn_MAP_PDU_1_tag2el[] = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 127 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sequence at 19 */ |
| 128 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* set at 20 */ |
| 129 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* setOf at 21 */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 130 | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* sequenceOf at 22 */ |
| 131 | { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* extensibleSet at 23 */ |
| 132 | { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* extensibleSequence at 24 */ |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 133 | { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* setOfNULL at 25 */ |
| 134 | { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* setOfEnums at 26 */ |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 135 | { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 } /* seqOfZuka at 27 */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 136 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 137 | static asn_CHOICE_specifics_t asn_SPC_PDU_1_specs = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 138 | sizeof(struct PDU), |
| 139 | offsetof(struct PDU, _asn_ctx), |
| 140 | offsetof(struct PDU, present), |
| 141 | sizeof(((struct PDU *)0)->present), |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 142 | asn_MAP_PDU_1_tag2el, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 143 | 9, /* Count of tags in the map */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 144 | 1 /* Whether extensible */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 145 | }; |
| 146 | asn_TYPE_descriptor_t asn_DEF_PDU = { |
| 147 | "PDU", |
| 148 | "PDU", |
| 149 | CHOICE_free, |
| 150 | CHOICE_print, |
| 151 | CHOICE_constraint, |
| 152 | CHOICE_decode_ber, |
| 153 | CHOICE_encode_der, |
| 154 | CHOICE_decode_xer, |
| 155 | CHOICE_encode_xer, |
| 156 | CHOICE_outmost_tag, |
| 157 | 0, /* No effective tags (pointer) */ |
| 158 | 0, /* No effective tags (count) */ |
| 159 | 0, /* No tags (pointer) */ |
| 160 | 0, /* No tags (count) */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 161 | asn_MBR_PDU_1, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 162 | 9, /* Elements count */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 163 | &asn_SPC_PDU_1_specs /* Additional specs */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 164 | }; |
| 165 | |
| 166 | |
| 167 | /*** <<< INCLUDES [Sequence] >>> ***/ |
| 168 | |
| 169 | #include <INTEGER.h> |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 170 | #include <BIT_STRING.h> |
| 171 | #include <UTF8String.h> |
| 172 | #include <constr_SEQUENCE.h> |
| 173 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 174 | /*** <<< FWD-DECLS [Sequence] >>> ***/ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 175 | |
vlm | 5feb752 | 2005-03-04 23:50:56 +0000 | [diff] [blame] | 176 | struct Sequence; |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 177 | |
| 178 | /*** <<< TYPE-DECLS [Sequence] >>> ***/ |
| 179 | |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 180 | typedef struct Sequence { |
| 181 | INTEGER_t integer; |
| 182 | struct Sequence *sequence /* OPTIONAL */; |
| 183 | BIT_STRING_t *bits /* OPTIONAL */; |
| 184 | UTF8String_t string; |
| 185 | |
| 186 | /* Context for parsing across buffer boundaries */ |
| 187 | asn_struct_ctx_t _asn_ctx; |
| 188 | } Sequence_t; |
| 189 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 190 | /*** <<< FUNC-DECLS [Sequence] >>> ***/ |
| 191 | |
| 192 | extern asn_TYPE_descriptor_t asn_DEF_Sequence; |
| 193 | |
| 194 | /*** <<< POST-INCLUDE [Sequence] >>> ***/ |
| 195 | |
| 196 | #include <Sequence.h> |
| 197 | |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 198 | /*** <<< STAT-DEFS [Sequence] >>> ***/ |
| 199 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 200 | static asn_TYPE_member_t asn_MBR_Sequence_1[] = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 201 | { ATF_NOFLAGS, 0, offsetof(struct Sequence, integer), |
| 202 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 203 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 204 | .type = (void *)&asn_DEF_INTEGER, |
| 205 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 206 | .name = "integer" |
| 207 | }, |
| 208 | { ATF_POINTER, 2, offsetof(struct Sequence, sequence), |
| 209 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 210 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 211 | .type = (void *)&asn_DEF_Sequence, |
| 212 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 213 | .name = "sequence" |
| 214 | }, |
| 215 | { ATF_POINTER, 1, offsetof(struct Sequence, bits), |
| 216 | .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 217 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 218 | .type = (void *)&asn_DEF_BIT_STRING, |
| 219 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 220 | .name = "bits" |
| 221 | }, |
| 222 | { ATF_NOFLAGS, 0, offsetof(struct Sequence, string), |
| 223 | .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 224 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 225 | .type = (void *)&asn_DEF_UTF8String, |
| 226 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 227 | .name = "string" |
| 228 | }, |
| 229 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 230 | static ber_tlv_tag_t asn_DEF_Sequence_1_tags[] = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 231 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 232 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 233 | static asn_TYPE_tag2member_t asn_MAP_Sequence_1_tag2el[] = { |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 234 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* integer at 32 */ |
| 235 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* sequence at 33 */ |
| 236 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* bits at 34 */ |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 237 | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* string at 35 */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 238 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 239 | static asn_SEQUENCE_specifics_t asn_SPC_Sequence_1_specs = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 240 | sizeof(struct Sequence), |
| 241 | offsetof(struct Sequence, _asn_ctx), |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 242 | asn_MAP_Sequence_1_tag2el, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 243 | 4, /* Count of tags in the map */ |
| 244 | -1, /* Start extensions */ |
| 245 | -1 /* Stop extensions */ |
| 246 | }; |
| 247 | asn_TYPE_descriptor_t asn_DEF_Sequence = { |
| 248 | "Sequence", |
| 249 | "Sequence", |
| 250 | SEQUENCE_free, |
| 251 | SEQUENCE_print, |
| 252 | SEQUENCE_constraint, |
| 253 | SEQUENCE_decode_ber, |
| 254 | SEQUENCE_encode_der, |
| 255 | SEQUENCE_decode_xer, |
| 256 | SEQUENCE_encode_xer, |
| 257 | 0, /* Use generic outmost tag fetcher */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 258 | asn_DEF_Sequence_1_tags, |
| 259 | sizeof(asn_DEF_Sequence_1_tags) |
| 260 | /sizeof(asn_DEF_Sequence_1_tags[0]), /* 1 */ |
| 261 | asn_DEF_Sequence_1_tags, /* Same as above */ |
| 262 | sizeof(asn_DEF_Sequence_1_tags) |
| 263 | /sizeof(asn_DEF_Sequence_1_tags[0]), /* 1 */ |
| 264 | asn_MBR_Sequence_1, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 265 | 4, /* Elements count */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 266 | &asn_SPC_Sequence_1_specs /* Additional specs */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 267 | }; |
| 268 | |
| 269 | |
| 270 | /*** <<< INCLUDES [Set] >>> ***/ |
| 271 | |
| 272 | #include <RELATIVE-OID.h> |
| 273 | #include <OCTET_STRING.h> |
| 274 | #include <constr_SET.h> |
| 275 | |
| 276 | /*** <<< DEPS [Set] >>> ***/ |
| 277 | |
| 278 | |
| 279 | /* |
| 280 | * Method of determining the components presence |
| 281 | */ |
| 282 | typedef enum Set_PR { |
| 283 | Set_PR_roid, /* Member roid is present */ |
| 284 | Set_PR_opaque, /* Member opaque is present */ |
| 285 | } Set_PR; |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 286 | |
| 287 | /*** <<< TYPE-DECLS [Set] >>> ***/ |
| 288 | |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 289 | typedef struct Set { |
| 290 | RELATIVE_OID_t roid; |
| 291 | OCTET_STRING_t *opaque /* OPTIONAL */; |
| 292 | |
| 293 | /* Presence bitmask: ASN_SET_ISPRESENT(pSet, Set_PR_x) */ |
| 294 | unsigned int _presence_map |
| 295 | [((2+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))]; |
| 296 | |
| 297 | /* Context for parsing across buffer boundaries */ |
| 298 | asn_struct_ctx_t _asn_ctx; |
| 299 | } Set_t; |
| 300 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 301 | /*** <<< FUNC-DECLS [Set] >>> ***/ |
| 302 | |
| 303 | extern asn_TYPE_descriptor_t asn_DEF_Set; |
| 304 | |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 305 | /*** <<< STAT-DEFS [Set] >>> ***/ |
| 306 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 307 | static asn_TYPE_member_t asn_MBR_Set_1[] = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 308 | { ATF_NOFLAGS, 0, offsetof(struct Set, roid), |
| 309 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 310 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 311 | .type = (void *)&asn_DEF_RELATIVE_OID, |
| 312 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 313 | .name = "roid" |
| 314 | }, |
| 315 | { ATF_POINTER, 1, offsetof(struct Set, opaque), |
| 316 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 317 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 318 | .type = (void *)&asn_DEF_OCTET_STRING, |
| 319 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 320 | .name = "opaque" |
| 321 | }, |
| 322 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 323 | static ber_tlv_tag_t asn_DEF_Set_1_tags[] = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 324 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 325 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 326 | static asn_TYPE_tag2member_t asn_MAP_Set_1_tag2el[] = { |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 327 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* roid at 39 */ |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 328 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* opaque at 40 */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 329 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 330 | static uint8_t asn_MAP_Set_1_mmap[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 331 | (1 << 7) | (0 << 6) |
| 332 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 333 | static asn_SET_specifics_t asn_SPC_Set_1_specs = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 334 | sizeof(struct Set), |
| 335 | offsetof(struct Set, _asn_ctx), |
| 336 | offsetof(struct Set, _presence_map), |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 337 | asn_MAP_Set_1_tag2el, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 338 | 2, /* Count of tags in the map */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 339 | asn_MAP_Set_1_tag2el, /* Same as above */ |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 340 | 2, /* Count of tags in the CXER map */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 341 | 0, /* Whether extensible */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 342 | (unsigned int *)asn_MAP_Set_1_mmap /* Mandatory elements map */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 343 | }; |
| 344 | asn_TYPE_descriptor_t asn_DEF_Set = { |
| 345 | "Set", |
| 346 | "Set", |
| 347 | SET_free, |
| 348 | SET_print, |
| 349 | SET_constraint, |
| 350 | SET_decode_ber, |
| 351 | SET_encode_der, |
| 352 | SET_decode_xer, |
| 353 | SET_encode_xer, |
| 354 | 0, /* Use generic outmost tag fetcher */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 355 | asn_DEF_Set_1_tags, |
| 356 | sizeof(asn_DEF_Set_1_tags) |
| 357 | /sizeof(asn_DEF_Set_1_tags[0]), /* 1 */ |
| 358 | asn_DEF_Set_1_tags, /* Same as above */ |
| 359 | sizeof(asn_DEF_Set_1_tags) |
| 360 | /sizeof(asn_DEF_Set_1_tags[0]), /* 1 */ |
| 361 | asn_MBR_Set_1, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 362 | 2, /* Elements count */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 363 | &asn_SPC_Set_1_specs /* Additional specs */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 364 | }; |
| 365 | |
| 366 | |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 367 | /*** <<< INCLUDES [ExtensibleSet] >>> ***/ |
| 368 | |
| 369 | #include <UTF8String.h> |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 370 | #include <ENUMERATED.h> |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 371 | #include <constr_SET.h> |
| 372 | |
| 373 | /*** <<< DEPS [ExtensibleSet] >>> ***/ |
| 374 | |
| 375 | |
| 376 | /* |
| 377 | * Method of determining the components presence |
| 378 | */ |
| 379 | typedef enum ExtensibleSet_PR { |
| 380 | ExtensibleSet_PR_string, /* Member string is present */ |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 381 | ExtensibleSet_PR_enum, /* Member enum is present */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 382 | } ExtensibleSet_PR; |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 383 | typedef enum Enum { |
| 384 | enum_b = 0, |
| 385 | enum_a = 1 |
| 386 | } enum_e; |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 387 | |
| 388 | /*** <<< TYPE-DECLS [ExtensibleSet] >>> ***/ |
| 389 | |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 390 | typedef struct ExtensibleSet { |
| 391 | UTF8String_t *string /* OPTIONAL */; |
| 392 | /* |
| 393 | * This type is extensible, |
| 394 | * possible extensions are below. |
| 395 | */ |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 396 | ENUMERATED_t *Enum; |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 397 | |
| 398 | /* Presence bitmask: ASN_SET_ISPRESENT(pExtensibleSet, ExtensibleSet_PR_x) */ |
| 399 | unsigned int _presence_map |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 400 | [((2+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))]; |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 401 | |
| 402 | /* Context for parsing across buffer boundaries */ |
| 403 | asn_struct_ctx_t _asn_ctx; |
| 404 | } ExtensibleSet_t; |
| 405 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 406 | /*** <<< FUNC-DECLS [ExtensibleSet] >>> ***/ |
| 407 | |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 408 | /* extern asn_TYPE_descriptor_t asn_DEF_enum_4; // (Use -fall-defs-global to expose) */ |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 409 | extern asn_TYPE_descriptor_t asn_DEF_ExtensibleSet; |
| 410 | |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 411 | /*** <<< CODE [ExtensibleSet] >>> ***/ |
| 412 | |
| 413 | static int |
| 414 | enum_4_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 415 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 416 | /* Replace with underlying type checker */ |
| 417 | td->check_constraints = asn_DEF_ENUMERATED.check_constraints; |
| 418 | return td->check_constraints(td, sptr, app_errlog, app_key); |
| 419 | } |
| 420 | |
| 421 | /* |
| 422 | * This type is implemented using ENUMERATED, |
| 423 | * so here we adjust the DEF accordingly. |
| 424 | */ |
| 425 | static void |
| 426 | enum_4_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 427 | td->free_struct = asn_DEF_ENUMERATED.free_struct; |
| 428 | td->print_struct = asn_DEF_ENUMERATED.print_struct; |
| 429 | td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder; |
| 430 | td->der_encoder = asn_DEF_ENUMERATED.der_encoder; |
| 431 | td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder; |
| 432 | td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder; |
| 433 | td->elements = asn_DEF_ENUMERATED.elements; |
| 434 | td->elements_count = asn_DEF_ENUMERATED.elements_count; |
| 435 | /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */ |
| 436 | } |
| 437 | |
| 438 | static void |
| 439 | enum_4_free(asn_TYPE_descriptor_t *td, |
| 440 | void *struct_ptr, int contents_only) { |
| 441 | enum_4_inherit_TYPE_descriptor(td); |
| 442 | td->free_struct(td, struct_ptr, contents_only); |
| 443 | } |
| 444 | |
| 445 | static int |
| 446 | enum_4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 447 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 448 | enum_4_inherit_TYPE_descriptor(td); |
| 449 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 450 | } |
| 451 | |
| 452 | static asn_dec_rval_t |
| 453 | enum_4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
vlm | c04faea | 2005-03-17 21:57:19 +0000 | [diff] [blame] | 454 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 455 | enum_4_inherit_TYPE_descriptor(td); |
| 456 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 457 | } |
| 458 | |
| 459 | static asn_enc_rval_t |
| 460 | enum_4_encode_der(asn_TYPE_descriptor_t *td, |
| 461 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 462 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 463 | enum_4_inherit_TYPE_descriptor(td); |
| 464 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 465 | } |
| 466 | |
| 467 | static asn_dec_rval_t |
| 468 | enum_4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
vlm | c04faea | 2005-03-17 21:57:19 +0000 | [diff] [blame] | 469 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 470 | enum_4_inherit_TYPE_descriptor(td); |
| 471 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 472 | } |
| 473 | |
| 474 | static asn_enc_rval_t |
| 475 | enum_4_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 476 | int ilevel, enum xer_encoder_flags_e flags, |
| 477 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 478 | enum_4_inherit_TYPE_descriptor(td); |
| 479 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 480 | } |
| 481 | |
| 482 | |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 483 | /*** <<< STAT-DEFS [ExtensibleSet] >>> ***/ |
| 484 | |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 485 | static asn_INTEGER_enum_map_t asn_MAP_enum_4_value2enum[] = { |
| 486 | { 0, 1, "b" }, |
| 487 | { 1, 1, "a" } |
| 488 | }; |
| 489 | static unsigned int asn_MAP_enum_4_enum2value[] = { |
| 490 | 1, /* a(1) */ |
| 491 | 0 /* b(0) */ |
| 492 | }; |
| 493 | static asn_INTEGER_specifics_t asn_SPC_enum_4_specs = { |
| 494 | asn_MAP_enum_4_value2enum, /* "tag" => N; sorted by tag */ |
| 495 | asn_MAP_enum_4_enum2value, /* N => "tag"; sorted by N */ |
| 496 | 2, /* Number of elements in the maps */ |
| 497 | 0, /* Enumeration is not extensible */ |
| 498 | 1 /* Strict enumeration */ |
| 499 | }; |
| 500 | static ber_tlv_tag_t asn_DEF_enum_4_tags[] = { |
| 501 | (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 502 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 503 | }; |
| 504 | static /* Use -fall-defs-global to expose */ |
| 505 | asn_TYPE_descriptor_t asn_DEF_enum_4 = { |
| 506 | "enum", |
| 507 | "enum", |
| 508 | enum_4_free, |
| 509 | enum_4_print, |
| 510 | enum_4_constraint, |
| 511 | enum_4_decode_ber, |
| 512 | enum_4_encode_der, |
| 513 | enum_4_decode_xer, |
| 514 | enum_4_encode_xer, |
| 515 | 0, /* Use generic outmost tag fetcher */ |
| 516 | asn_DEF_enum_4_tags, |
| 517 | sizeof(asn_DEF_enum_4_tags) |
| 518 | /sizeof(asn_DEF_enum_4_tags[0]) - 1, /* 1 */ |
| 519 | asn_DEF_enum_4_tags, /* Same as above */ |
| 520 | sizeof(asn_DEF_enum_4_tags) |
| 521 | /sizeof(asn_DEF_enum_4_tags[0]), /* 2 */ |
| 522 | 0, 0, /* Defined elsewhere */ |
| 523 | &asn_SPC_enum_4_specs /* Additional specs */ |
| 524 | }; |
| 525 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 526 | static asn_TYPE_member_t asn_MBR_ExtensibleSet_1[] = { |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 527 | { ATF_POINTER, 2, offsetof(struct ExtensibleSet, string), |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 528 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 529 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 530 | .type = (void *)&asn_DEF_UTF8String, |
| 531 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 532 | .name = "string" |
| 533 | }, |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 534 | { ATF_POINTER, 0, offsetof(struct ExtensibleSet, Enum), |
| 535 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 536 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 537 | .type = (void *)&asn_DEF_enum_4, |
| 538 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 539 | .name = "enum" |
| 540 | }, |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 541 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 542 | static ber_tlv_tag_t asn_DEF_ExtensibleSet_1_tags[] = { |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 543 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 544 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 545 | static asn_TYPE_tag2member_t asn_MAP_ExtensibleSet_1_tag2el[] = { |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 546 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* string at 44 */ |
| 547 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* enum at 46 */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 548 | }; |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 549 | static uint8_t asn_MAP_ExtensibleSet_1_mmap[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = { |
| 550 | (0 << 7) | (0 << 6) |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 551 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 552 | static asn_SET_specifics_t asn_SPC_ExtensibleSet_1_specs = { |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 553 | sizeof(struct ExtensibleSet), |
| 554 | offsetof(struct ExtensibleSet, _asn_ctx), |
| 555 | offsetof(struct ExtensibleSet, _presence_map), |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 556 | asn_MAP_ExtensibleSet_1_tag2el, |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 557 | 2, /* Count of tags in the map */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 558 | asn_MAP_ExtensibleSet_1_tag2el, /* Same as above */ |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 559 | 2, /* Count of tags in the CXER map */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 560 | 1, /* Whether extensible */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 561 | (unsigned int *)asn_MAP_ExtensibleSet_1_mmap /* Mandatory elements map */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 562 | }; |
| 563 | asn_TYPE_descriptor_t asn_DEF_ExtensibleSet = { |
| 564 | "ExtensibleSet", |
| 565 | "ExtensibleSet", |
| 566 | SET_free, |
| 567 | SET_print, |
| 568 | SET_constraint, |
| 569 | SET_decode_ber, |
| 570 | SET_encode_der, |
| 571 | SET_decode_xer, |
| 572 | SET_encode_xer, |
| 573 | 0, /* Use generic outmost tag fetcher */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 574 | asn_DEF_ExtensibleSet_1_tags, |
| 575 | sizeof(asn_DEF_ExtensibleSet_1_tags) |
| 576 | /sizeof(asn_DEF_ExtensibleSet_1_tags[0]), /* 1 */ |
| 577 | asn_DEF_ExtensibleSet_1_tags, /* Same as above */ |
| 578 | sizeof(asn_DEF_ExtensibleSet_1_tags) |
| 579 | /sizeof(asn_DEF_ExtensibleSet_1_tags[0]), /* 1 */ |
| 580 | asn_MBR_ExtensibleSet_1, |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 581 | 2, /* Elements count */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 582 | &asn_SPC_ExtensibleSet_1_specs /* Additional specs */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 583 | }; |
| 584 | |
| 585 | |
| 586 | /*** <<< INCLUDES [ExtensibleSequence] >>> ***/ |
| 587 | |
| 588 | #include <UTF8String.h> |
| 589 | #include <INTEGER.h> |
| 590 | #include <constr_SEQUENCE.h> |
| 591 | |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 592 | /*** <<< TYPE-DECLS [ExtensibleSequence] >>> ***/ |
| 593 | |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 594 | typedef struct ExtensibleSequence { |
| 595 | UTF8String_t *string /* OPTIONAL */; |
| 596 | /* |
| 597 | * This type is extensible, |
| 598 | * possible extensions are below. |
| 599 | */ |
| 600 | INTEGER_t *integer /* OPTIONAL */; |
| 601 | |
| 602 | /* Context for parsing across buffer boundaries */ |
| 603 | asn_struct_ctx_t _asn_ctx; |
| 604 | } ExtensibleSequence_t; |
| 605 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 606 | /*** <<< FUNC-DECLS [ExtensibleSequence] >>> ***/ |
| 607 | |
| 608 | extern asn_TYPE_descriptor_t asn_DEF_ExtensibleSequence; |
| 609 | |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 610 | /*** <<< STAT-DEFS [ExtensibleSequence] >>> ***/ |
| 611 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 612 | static asn_TYPE_member_t asn_MBR_ExtensibleSequence_1[] = { |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 613 | { ATF_POINTER, 2, offsetof(struct ExtensibleSequence, string), |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 614 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 615 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 616 | .type = (void *)&asn_DEF_UTF8String, |
| 617 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 618 | .name = "string" |
| 619 | }, |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 620 | { ATF_POINTER, 1, offsetof(struct ExtensibleSequence, integer), |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 621 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 622 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 623 | .type = (void *)&asn_DEF_INTEGER, |
| 624 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 625 | .name = "integer" |
| 626 | }, |
| 627 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 628 | static ber_tlv_tag_t asn_DEF_ExtensibleSequence_1_tags[] = { |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 629 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 630 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 631 | static asn_TYPE_tag2member_t asn_MAP_ExtensibleSequence_1_tag2el[] = { |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 632 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* string at 50 */ |
| 633 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* integer at 52 */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 634 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 635 | static asn_SEQUENCE_specifics_t asn_SPC_ExtensibleSequence_1_specs = { |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 636 | sizeof(struct ExtensibleSequence), |
| 637 | offsetof(struct ExtensibleSequence, _asn_ctx), |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 638 | asn_MAP_ExtensibleSequence_1_tag2el, |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 639 | 2, /* Count of tags in the map */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 640 | 0, /* Start extensions */ |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 641 | 3 /* Stop extensions */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 642 | }; |
| 643 | asn_TYPE_descriptor_t asn_DEF_ExtensibleSequence = { |
| 644 | "ExtensibleSequence", |
| 645 | "ExtensibleSequence", |
| 646 | SEQUENCE_free, |
| 647 | SEQUENCE_print, |
| 648 | SEQUENCE_constraint, |
| 649 | SEQUENCE_decode_ber, |
| 650 | SEQUENCE_encode_der, |
| 651 | SEQUENCE_decode_xer, |
| 652 | SEQUENCE_encode_xer, |
| 653 | 0, /* Use generic outmost tag fetcher */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 654 | asn_DEF_ExtensibleSequence_1_tags, |
| 655 | sizeof(asn_DEF_ExtensibleSequence_1_tags) |
| 656 | /sizeof(asn_DEF_ExtensibleSequence_1_tags[0]), /* 1 */ |
| 657 | asn_DEF_ExtensibleSequence_1_tags, /* Same as above */ |
| 658 | sizeof(asn_DEF_ExtensibleSequence_1_tags) |
| 659 | /sizeof(asn_DEF_ExtensibleSequence_1_tags[0]), /* 1 */ |
| 660 | asn_MBR_ExtensibleSequence_1, |
vlm | 9ef0e49 | 2005-03-10 11:20:47 +0000 | [diff] [blame] | 661 | 2, /* Elements count */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 662 | &asn_SPC_ExtensibleSequence_1_specs /* Additional specs */ |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 663 | }; |
| 664 | |
| 665 | |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 666 | /*** <<< INCLUDES [SetOf] >>> ***/ |
| 667 | |
| 668 | #include <REAL.h> |
| 669 | #include <asn_SET_OF.h> |
| 670 | #include <constr_SET_OF.h> |
| 671 | |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 672 | /*** <<< TYPE-DECLS [SetOf] >>> ***/ |
| 673 | |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 674 | typedef struct SetOf { |
| 675 | A_SET_OF(REAL_t) list; |
| 676 | |
| 677 | /* Context for parsing across buffer boundaries */ |
| 678 | asn_struct_ctx_t _asn_ctx; |
| 679 | } SetOf_t; |
| 680 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 681 | /*** <<< FUNC-DECLS [SetOf] >>> ***/ |
| 682 | |
| 683 | extern asn_TYPE_descriptor_t asn_DEF_SetOf; |
| 684 | |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 685 | /*** <<< STAT-DEFS [SetOf] >>> ***/ |
| 686 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 687 | static asn_TYPE_member_t asn_MBR_SetOf_1[] = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 688 | { ATF_NOFLAGS, 0, 0, |
| 689 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), |
| 690 | .tag_mode = 0, |
| 691 | .type = (void *)&asn_DEF_REAL, |
| 692 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 693 | .name = "" |
| 694 | }, |
| 695 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 696 | static ber_tlv_tag_t asn_DEF_SetOf_1_tags[] = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 697 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 698 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 699 | static asn_SET_OF_specifics_t asn_SPC_SetOf_1_specs = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 700 | sizeof(struct SetOf), |
| 701 | offsetof(struct SetOf, _asn_ctx), |
| 702 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 703 | }; |
| 704 | asn_TYPE_descriptor_t asn_DEF_SetOf = { |
| 705 | "SetOf", |
| 706 | "SetOf", |
| 707 | SET_OF_free, |
| 708 | SET_OF_print, |
| 709 | SET_OF_constraint, |
| 710 | SET_OF_decode_ber, |
| 711 | SET_OF_encode_der, |
| 712 | SET_OF_decode_xer, |
| 713 | SET_OF_encode_xer, |
| 714 | 0, /* Use generic outmost tag fetcher */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 715 | asn_DEF_SetOf_1_tags, |
| 716 | sizeof(asn_DEF_SetOf_1_tags) |
| 717 | /sizeof(asn_DEF_SetOf_1_tags[0]), /* 1 */ |
| 718 | asn_DEF_SetOf_1_tags, /* Same as above */ |
| 719 | sizeof(asn_DEF_SetOf_1_tags) |
| 720 | /sizeof(asn_DEF_SetOf_1_tags[0]), /* 1 */ |
| 721 | asn_MBR_SetOf_1, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 722 | 1, /* Single element */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 723 | &asn_SPC_SetOf_1_specs /* Additional specs */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 724 | }; |
| 725 | |
| 726 | |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 727 | /*** <<< INCLUDES [SetOfNULL] >>> ***/ |
| 728 | |
| 729 | #include <NULL.h> |
| 730 | #include <asn_SET_OF.h> |
| 731 | #include <constr_SET_OF.h> |
| 732 | |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 733 | /*** <<< TYPE-DECLS [SetOfNULL] >>> ***/ |
| 734 | |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 735 | typedef struct SetOfNULL { |
| 736 | A_SET_OF(NULL_t) list; |
| 737 | |
| 738 | /* Context for parsing across buffer boundaries */ |
| 739 | asn_struct_ctx_t _asn_ctx; |
| 740 | } SetOfNULL_t; |
| 741 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 742 | /*** <<< FUNC-DECLS [SetOfNULL] >>> ***/ |
| 743 | |
| 744 | extern asn_TYPE_descriptor_t asn_DEF_SetOfNULL; |
| 745 | |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 746 | /*** <<< STAT-DEFS [SetOfNULL] >>> ***/ |
| 747 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 748 | static asn_TYPE_member_t asn_MBR_SetOfNULL_1[] = { |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 749 | { ATF_NOFLAGS, 0, 0, |
| 750 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), |
| 751 | .tag_mode = 0, |
| 752 | .type = (void *)&asn_DEF_NULL, |
| 753 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 754 | .name = "" |
| 755 | }, |
| 756 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 757 | static ber_tlv_tag_t asn_DEF_SetOfNULL_1_tags[] = { |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 758 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 759 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 760 | static asn_SET_OF_specifics_t asn_SPC_SetOfNULL_1_specs = { |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 761 | sizeof(struct SetOfNULL), |
| 762 | offsetof(struct SetOfNULL, _asn_ctx), |
| 763 | 1, /* XER encoding is XMLValueList */ |
| 764 | }; |
| 765 | asn_TYPE_descriptor_t asn_DEF_SetOfNULL = { |
| 766 | "SetOfNULL", |
| 767 | "SetOfNULL", |
| 768 | SET_OF_free, |
| 769 | SET_OF_print, |
| 770 | SET_OF_constraint, |
| 771 | SET_OF_decode_ber, |
| 772 | SET_OF_encode_der, |
| 773 | SET_OF_decode_xer, |
| 774 | SET_OF_encode_xer, |
| 775 | 0, /* Use generic outmost tag fetcher */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 776 | asn_DEF_SetOfNULL_1_tags, |
| 777 | sizeof(asn_DEF_SetOfNULL_1_tags) |
| 778 | /sizeof(asn_DEF_SetOfNULL_1_tags[0]), /* 1 */ |
| 779 | asn_DEF_SetOfNULL_1_tags, /* Same as above */ |
| 780 | sizeof(asn_DEF_SetOfNULL_1_tags) |
| 781 | /sizeof(asn_DEF_SetOfNULL_1_tags[0]), /* 1 */ |
| 782 | asn_MBR_SetOfNULL_1, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 783 | 1, /* Single element */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 784 | &asn_SPC_SetOfNULL_1_specs /* Additional specs */ |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 785 | }; |
| 786 | |
| 787 | |
| 788 | /*** <<< INCLUDES [SetOfEnums] >>> ***/ |
| 789 | |
| 790 | #include <ENUMERATED.h> |
| 791 | #include <asn_SET_OF.h> |
| 792 | #include <constr_SET_OF.h> |
| 793 | |
| 794 | /*** <<< DEPS [SetOfEnums] >>> ***/ |
| 795 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 796 | typedef enum Member { |
| 797 | Member_one = 0, |
| 798 | Member_oneMore = 1 |
| 799 | } Member_e; |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 800 | |
| 801 | /*** <<< TYPE-DECLS [SetOfEnums] >>> ***/ |
| 802 | |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 803 | typedef struct SetOfEnums { |
| 804 | A_SET_OF(ENUMERATED_t) list; |
| 805 | |
| 806 | /* Context for parsing across buffer boundaries */ |
| 807 | asn_struct_ctx_t _asn_ctx; |
| 808 | } SetOfEnums_t; |
| 809 | |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 810 | /*** <<< FUNC-DECLS [SetOfEnums] >>> ***/ |
| 811 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 812 | /* extern asn_TYPE_descriptor_t asn_DEF_Member_2; // (Use -fall-defs-global to expose) */ |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 813 | extern asn_TYPE_descriptor_t asn_DEF_SetOfEnums; |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 814 | |
| 815 | /*** <<< CODE [SetOfEnums] >>> ***/ |
| 816 | |
| 817 | static int |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 818 | Member_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 819 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 820 | /* Replace with underlying type checker */ |
| 821 | td->check_constraints = asn_DEF_ENUMERATED.check_constraints; |
| 822 | return td->check_constraints(td, sptr, app_errlog, app_key); |
| 823 | } |
| 824 | |
| 825 | /* |
| 826 | * This type is implemented using ENUMERATED, |
| 827 | * so here we adjust the DEF accordingly. |
| 828 | */ |
| 829 | static void |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 830 | Member_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 831 | td->free_struct = asn_DEF_ENUMERATED.free_struct; |
| 832 | td->print_struct = asn_DEF_ENUMERATED.print_struct; |
| 833 | td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder; |
| 834 | td->der_encoder = asn_DEF_ENUMERATED.der_encoder; |
| 835 | td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder; |
| 836 | td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder; |
| 837 | td->elements = asn_DEF_ENUMERATED.elements; |
| 838 | td->elements_count = asn_DEF_ENUMERATED.elements_count; |
vlm | 2f80608 | 2005-02-25 10:24:53 +0000 | [diff] [blame] | 839 | /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */ |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 840 | } |
| 841 | |
| 842 | static void |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 843 | Member_2_free(asn_TYPE_descriptor_t *td, |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 844 | void *struct_ptr, int contents_only) { |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 845 | Member_2_inherit_TYPE_descriptor(td); |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 846 | td->free_struct(td, struct_ptr, contents_only); |
| 847 | } |
| 848 | |
| 849 | static int |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 850 | Member_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 851 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 852 | Member_2_inherit_TYPE_descriptor(td); |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 853 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 854 | } |
| 855 | |
| 856 | static asn_dec_rval_t |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 857 | Member_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
vlm | c04faea | 2005-03-17 21:57:19 +0000 | [diff] [blame] | 858 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 859 | Member_2_inherit_TYPE_descriptor(td); |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 860 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 861 | } |
| 862 | |
| 863 | static asn_enc_rval_t |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 864 | Member_2_encode_der(asn_TYPE_descriptor_t *td, |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 865 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 866 | asn_app_consume_bytes_f *cb, void *app_key) { |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 867 | Member_2_inherit_TYPE_descriptor(td); |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 868 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 869 | } |
| 870 | |
| 871 | static asn_dec_rval_t |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 872 | Member_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
vlm | c04faea | 2005-03-17 21:57:19 +0000 | [diff] [blame] | 873 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 874 | Member_2_inherit_TYPE_descriptor(td); |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 875 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 876 | } |
| 877 | |
| 878 | static asn_enc_rval_t |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 879 | Member_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 880 | int ilevel, enum xer_encoder_flags_e flags, |
| 881 | asn_app_consume_bytes_f *cb, void *app_key) { |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 882 | Member_2_inherit_TYPE_descriptor(td); |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 883 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 884 | } |
| 885 | |
| 886 | |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 887 | /*** <<< STAT-DEFS [SetOfEnums] >>> ***/ |
| 888 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 889 | static asn_INTEGER_enum_map_t asn_MAP_Member_2_value2enum[] = { |
vlm | 56a1f3e | 2005-02-25 11:08:02 +0000 | [diff] [blame] | 890 | { 0, 3, "one" }, |
| 891 | { 1, 7, "oneMore" } |
| 892 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 893 | static unsigned int asn_MAP_Member_2_enum2value[] = { |
vlm | 56a1f3e | 2005-02-25 11:08:02 +0000 | [diff] [blame] | 894 | 0, /* one(0) */ |
| 895 | 1 /* oneMore(1) */ |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 896 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 897 | static asn_INTEGER_specifics_t asn_SPC_Member_2_specs = { |
| 898 | asn_MAP_Member_2_value2enum, /* "tag" => N; sorted by tag */ |
| 899 | asn_MAP_Member_2_enum2value, /* N => "tag"; sorted by N */ |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 900 | 2, /* Number of elements in the maps */ |
vlm | c018f36 | 2005-02-25 11:47:59 +0000 | [diff] [blame] | 901 | 0, /* Enumeration is not extensible */ |
| 902 | 1 /* Strict enumeration */ |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 903 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 904 | static ber_tlv_tag_t asn_DEF_Member_2_tags[] = { |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 905 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 906 | }; |
| 907 | static /* Use -fall-defs-global to expose */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 908 | asn_TYPE_descriptor_t asn_DEF_Member_2 = { |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 909 | "", |
| 910 | "", |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 911 | Member_2_free, |
| 912 | Member_2_print, |
| 913 | Member_2_constraint, |
| 914 | Member_2_decode_ber, |
| 915 | Member_2_encode_der, |
| 916 | Member_2_decode_xer, |
| 917 | Member_2_encode_xer, |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 918 | 0, /* Use generic outmost tag fetcher */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 919 | asn_DEF_Member_2_tags, |
| 920 | sizeof(asn_DEF_Member_2_tags) |
| 921 | /sizeof(asn_DEF_Member_2_tags[0]), /* 1 */ |
| 922 | asn_DEF_Member_2_tags, /* Same as above */ |
| 923 | sizeof(asn_DEF_Member_2_tags) |
| 924 | /sizeof(asn_DEF_Member_2_tags[0]), /* 1 */ |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 925 | 0, 0, /* Defined elsewhere */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 926 | &asn_SPC_Member_2_specs /* Additional specs */ |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 927 | }; |
| 928 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 929 | static asn_TYPE_member_t asn_MBR_SetOfEnums_1[] = { |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 930 | { ATF_NOFLAGS, 0, 0, |
| 931 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), |
| 932 | .tag_mode = 0, |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 933 | .type = (void *)&asn_DEF_Member_2, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 934 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 935 | .name = "" |
| 936 | }, |
| 937 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 938 | static ber_tlv_tag_t asn_DEF_SetOfEnums_1_tags[] = { |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 939 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 940 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 941 | static asn_SET_OF_specifics_t asn_SPC_SetOfEnums_1_specs = { |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 942 | sizeof(struct SetOfEnums), |
| 943 | offsetof(struct SetOfEnums, _asn_ctx), |
vlm | 82e33fb | 2005-02-25 08:35:54 +0000 | [diff] [blame] | 944 | 1, /* XER encoding is XMLValueList */ |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 945 | }; |
| 946 | asn_TYPE_descriptor_t asn_DEF_SetOfEnums = { |
| 947 | "SetOfEnums", |
| 948 | "SetOfEnums", |
| 949 | SET_OF_free, |
| 950 | SET_OF_print, |
| 951 | SET_OF_constraint, |
| 952 | SET_OF_decode_ber, |
| 953 | SET_OF_encode_der, |
| 954 | SET_OF_decode_xer, |
| 955 | SET_OF_encode_xer, |
| 956 | 0, /* Use generic outmost tag fetcher */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 957 | asn_DEF_SetOfEnums_1_tags, |
| 958 | sizeof(asn_DEF_SetOfEnums_1_tags) |
| 959 | /sizeof(asn_DEF_SetOfEnums_1_tags[0]), /* 1 */ |
| 960 | asn_DEF_SetOfEnums_1_tags, /* Same as above */ |
| 961 | sizeof(asn_DEF_SetOfEnums_1_tags) |
| 962 | /sizeof(asn_DEF_SetOfEnums_1_tags[0]), /* 1 */ |
| 963 | asn_MBR_SetOfEnums_1, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 964 | 1, /* Single element */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 965 | &asn_SPC_SetOfEnums_1_specs /* Additional specs */ |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 966 | }; |
| 967 | |
| 968 | |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 969 | /*** <<< INCLUDES [SequenceOf] >>> ***/ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 970 | |
| 971 | #include <INTEGER.h> |
| 972 | #include <asn_SEQUENCE_OF.h> |
| 973 | #include <constr_SEQUENCE_OF.h> |
| 974 | |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 975 | /*** <<< TYPE-DECLS [SequenceOf] >>> ***/ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 976 | |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 977 | typedef struct SequenceOf { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 978 | A_SEQUENCE_OF(INTEGER_t) list; |
| 979 | |
| 980 | /* Context for parsing across buffer boundaries */ |
| 981 | asn_struct_ctx_t _asn_ctx; |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 982 | } SequenceOf_t; |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 983 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 984 | /*** <<< FUNC-DECLS [SequenceOf] >>> ***/ |
| 985 | |
| 986 | extern asn_TYPE_descriptor_t asn_DEF_SequenceOf; |
| 987 | |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 988 | /*** <<< STAT-DEFS [SequenceOf] >>> ***/ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 989 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 990 | static asn_TYPE_member_t asn_MBR_SequenceOf_1[] = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 991 | { ATF_NOFLAGS, 0, 0, |
| 992 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 993 | .tag_mode = 0, |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 994 | .type = (void *)&asn_DEF_INTEGER, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 995 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 996 | .name = "id" |
| 997 | }, |
| 998 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 999 | static ber_tlv_tag_t asn_DEF_SequenceOf_1_tags[] = { |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1000 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 1001 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1002 | static asn_SET_OF_specifics_t asn_SPC_SequenceOf_1_specs = { |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 1003 | sizeof(struct SequenceOf), |
| 1004 | offsetof(struct SequenceOf, _asn_ctx), |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1005 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 1006 | }; |
vlm | 422e4ce | 2005-02-18 16:30:26 +0000 | [diff] [blame] | 1007 | asn_TYPE_descriptor_t asn_DEF_SequenceOf = { |
| 1008 | "SequenceOf", |
| 1009 | "SequenceOf", |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1010 | SEQUENCE_OF_free, |
| 1011 | SEQUENCE_OF_print, |
| 1012 | SEQUENCE_OF_constraint, |
| 1013 | SEQUENCE_OF_decode_ber, |
| 1014 | SEQUENCE_OF_encode_der, |
| 1015 | SEQUENCE_OF_decode_xer, |
| 1016 | SEQUENCE_OF_encode_xer, |
| 1017 | 0, /* Use generic outmost tag fetcher */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1018 | asn_DEF_SequenceOf_1_tags, |
| 1019 | sizeof(asn_DEF_SequenceOf_1_tags) |
| 1020 | /sizeof(asn_DEF_SequenceOf_1_tags[0]), /* 1 */ |
| 1021 | asn_DEF_SequenceOf_1_tags, /* Same as above */ |
| 1022 | sizeof(asn_DEF_SequenceOf_1_tags) |
| 1023 | /sizeof(asn_DEF_SequenceOf_1_tags[0]), /* 1 */ |
| 1024 | asn_MBR_SequenceOf_1, |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1025 | 1, /* Single element */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1026 | &asn_SPC_SequenceOf_1_specs /* Additional specs */ |
vlm | 0d9046e | 2005-02-14 20:40:57 +0000 | [diff] [blame] | 1027 | }; |
| 1028 | |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1029 | |
| 1030 | /*** <<< INCLUDES [SeqOfZuka] >>> ***/ |
| 1031 | |
| 1032 | #include <NULL.h> |
| 1033 | #include <asn_SEQUENCE_OF.h> |
| 1034 | #include <constr_SEQUENCE_OF.h> |
| 1035 | |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1036 | /*** <<< TYPE-DECLS [SeqOfZuka] >>> ***/ |
| 1037 | |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1038 | typedef struct SeqOfZuka { |
| 1039 | A_SEQUENCE_OF(NULL_t) list; |
| 1040 | |
| 1041 | /* Context for parsing across buffer boundaries */ |
| 1042 | asn_struct_ctx_t _asn_ctx; |
| 1043 | } SeqOfZuka_t; |
| 1044 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 1045 | /*** <<< FUNC-DECLS [SeqOfZuka] >>> ***/ |
| 1046 | |
| 1047 | extern asn_TYPE_descriptor_t asn_DEF_SeqOfZuka; |
| 1048 | |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1049 | /*** <<< STAT-DEFS [SeqOfZuka] >>> ***/ |
| 1050 | |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1051 | static asn_TYPE_member_t asn_MBR_SeqOfZuka_1[] = { |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1052 | { ATF_NOFLAGS, 0, 0, |
| 1053 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), |
| 1054 | .tag_mode = 0, |
| 1055 | .type = (void *)&asn_DEF_NULL, |
| 1056 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 1057 | .name = "zuka" |
| 1058 | }, |
| 1059 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1060 | static ber_tlv_tag_t asn_DEF_SeqOfZuka_1_tags[] = { |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1061 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 1062 | }; |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1063 | static asn_SET_OF_specifics_t asn_SPC_SeqOfZuka_1_specs = { |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1064 | sizeof(struct SeqOfZuka), |
| 1065 | offsetof(struct SeqOfZuka, _asn_ctx), |
| 1066 | 1, /* XER encoding is XMLValueList */ |
| 1067 | }; |
| 1068 | asn_TYPE_descriptor_t asn_DEF_SeqOfZuka = { |
| 1069 | "SeqOfZuka", |
| 1070 | "SeqOfZuka", |
| 1071 | SEQUENCE_OF_free, |
| 1072 | SEQUENCE_OF_print, |
| 1073 | SEQUENCE_OF_constraint, |
| 1074 | SEQUENCE_OF_decode_ber, |
| 1075 | SEQUENCE_OF_encode_der, |
| 1076 | SEQUENCE_OF_decode_xer, |
| 1077 | SEQUENCE_OF_encode_xer, |
| 1078 | 0, /* Use generic outmost tag fetcher */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1079 | asn_DEF_SeqOfZuka_1_tags, |
| 1080 | sizeof(asn_DEF_SeqOfZuka_1_tags) |
| 1081 | /sizeof(asn_DEF_SeqOfZuka_1_tags[0]), /* 1 */ |
| 1082 | asn_DEF_SeqOfZuka_1_tags, /* Same as above */ |
| 1083 | sizeof(asn_DEF_SeqOfZuka_1_tags) |
| 1084 | /sizeof(asn_DEF_SeqOfZuka_1_tags[0]), /* 1 */ |
| 1085 | asn_MBR_SeqOfZuka_1, |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1086 | 1, /* Single element */ |
vlm | 44fe49a | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 1087 | &asn_SPC_SeqOfZuka_1_specs /* Additional specs */ |
vlm | 6d5cb6b | 2005-02-24 22:38:43 +0000 | [diff] [blame] | 1088 | }; |
| 1089 | |