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> |
| 7 | #include <SeqOf.h> |
| 8 | #include <constr_CHOICE.h> |
| 9 | |
| 10 | /*** <<< DEPS [PDU] >>> ***/ |
| 11 | |
| 12 | typedef enum PDU_PR { |
| 13 | PDU_PR_NOTHING, /* No components present */ |
| 14 | PDU_PR_sequence, |
| 15 | PDU_PR_set, |
| 16 | PDU_PR_setOf, |
| 17 | PDU_PR_seqOf, |
| 18 | } PDU_PR; |
| 19 | extern asn_TYPE_descriptor_t asn_DEF_PDU; |
| 20 | |
| 21 | /*** <<< TYPE-DECLS [PDU] >>> ***/ |
| 22 | |
| 23 | |
| 24 | typedef struct PDU { |
| 25 | PDU_PR present; |
| 26 | union { |
| 27 | Sequence_t sequence; |
| 28 | Set_t set; |
| 29 | SetOf_t setOf; |
| 30 | SeqOf_t seqOf; |
| 31 | } choice; |
| 32 | |
| 33 | /* Context for parsing across buffer boundaries */ |
| 34 | asn_struct_ctx_t _asn_ctx; |
| 35 | } PDU_t; |
| 36 | |
| 37 | /*** <<< STAT-DEFS [PDU] >>> ***/ |
| 38 | |
| 39 | static asn_TYPE_member_t asn_MBR_PDU[] = { |
| 40 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.sequence), |
| 41 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 42 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 43 | .type = (void *)&asn_DEF_Sequence, |
| 44 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 45 | .name = "sequence" |
| 46 | }, |
| 47 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.set), |
| 48 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 49 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 50 | .type = (void *)&asn_DEF_Set, |
| 51 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 52 | .name = "set" |
| 53 | }, |
| 54 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.setOf), |
| 55 | .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 56 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 57 | .type = (void *)&asn_DEF_SetOf, |
| 58 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 59 | .name = "setOf" |
| 60 | }, |
| 61 | { ATF_NOFLAGS, 0, offsetof(struct PDU, choice.seqOf), |
| 62 | .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 63 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 64 | .type = (void *)&asn_DEF_SeqOf, |
| 65 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 66 | .name = "seqOf" |
| 67 | }, |
| 68 | }; |
| 69 | static asn_TYPE_tag2member_t asn_DEF_PDU_tag2el[] = { |
| 70 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sequence at 19 */ |
| 71 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* set at 20 */ |
| 72 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* setOf at 21 */ |
| 73 | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* seqOf at 23 */ |
| 74 | }; |
| 75 | static asn_CHOICE_specifics_t asn_DEF_PDU_specs = { |
| 76 | sizeof(struct PDU), |
| 77 | offsetof(struct PDU, _asn_ctx), |
| 78 | offsetof(struct PDU, present), |
| 79 | sizeof(((struct PDU *)0)->present), |
| 80 | asn_DEF_PDU_tag2el, |
| 81 | 4, /* Count of tags in the map */ |
| 82 | 0 /* Whether extensible */ |
| 83 | }; |
| 84 | asn_TYPE_descriptor_t asn_DEF_PDU = { |
| 85 | "PDU", |
| 86 | "PDU", |
| 87 | CHOICE_free, |
| 88 | CHOICE_print, |
| 89 | CHOICE_constraint, |
| 90 | CHOICE_decode_ber, |
| 91 | CHOICE_encode_der, |
| 92 | CHOICE_decode_xer, |
| 93 | CHOICE_encode_xer, |
| 94 | CHOICE_outmost_tag, |
| 95 | 0, /* No effective tags (pointer) */ |
| 96 | 0, /* No effective tags (count) */ |
| 97 | 0, /* No tags (pointer) */ |
| 98 | 0, /* No tags (count) */ |
| 99 | asn_MBR_PDU, |
| 100 | 4, /* Elements count */ |
| 101 | &asn_DEF_PDU_specs /* Additional specs */ |
| 102 | }; |
| 103 | |
| 104 | |
| 105 | /*** <<< INCLUDES [Sequence] >>> ***/ |
| 106 | |
| 107 | #include <INTEGER.h> |
| 108 | #include <Sequence.h> |
| 109 | #include <BIT_STRING.h> |
| 110 | #include <UTF8String.h> |
| 111 | #include <constr_SEQUENCE.h> |
| 112 | |
| 113 | /*** <<< DEPS [Sequence] >>> ***/ |
| 114 | |
| 115 | |
| 116 | struct Sequence; /* Forward declaration */ |
| 117 | extern asn_TYPE_descriptor_t asn_DEF_Sequence; |
| 118 | |
| 119 | /*** <<< TYPE-DECLS [Sequence] >>> ***/ |
| 120 | |
| 121 | |
| 122 | typedef struct Sequence { |
| 123 | INTEGER_t integer; |
| 124 | struct Sequence *sequence /* OPTIONAL */; |
| 125 | BIT_STRING_t *bits /* OPTIONAL */; |
| 126 | UTF8String_t string; |
| 127 | |
| 128 | /* Context for parsing across buffer boundaries */ |
| 129 | asn_struct_ctx_t _asn_ctx; |
| 130 | } Sequence_t; |
| 131 | |
| 132 | /*** <<< STAT-DEFS [Sequence] >>> ***/ |
| 133 | |
| 134 | static asn_TYPE_member_t asn_MBR_Sequence[] = { |
| 135 | { ATF_NOFLAGS, 0, offsetof(struct Sequence, integer), |
| 136 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 137 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 138 | .type = (void *)&asn_DEF_INTEGER, |
| 139 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 140 | .name = "integer" |
| 141 | }, |
| 142 | { ATF_POINTER, 2, offsetof(struct Sequence, sequence), |
| 143 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 144 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 145 | .type = (void *)&asn_DEF_Sequence, |
| 146 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 147 | .name = "sequence" |
| 148 | }, |
| 149 | { ATF_POINTER, 1, offsetof(struct Sequence, bits), |
| 150 | .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 151 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 152 | .type = (void *)&asn_DEF_BIT_STRING, |
| 153 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 154 | .name = "bits" |
| 155 | }, |
| 156 | { ATF_NOFLAGS, 0, offsetof(struct Sequence, string), |
| 157 | .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 158 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 159 | .type = (void *)&asn_DEF_UTF8String, |
| 160 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 161 | .name = "string" |
| 162 | }, |
| 163 | }; |
| 164 | static ber_tlv_tag_t asn_DEF_Sequence_tags[] = { |
| 165 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 166 | }; |
| 167 | static asn_TYPE_tag2member_t asn_DEF_Sequence_tag2el[] = { |
| 168 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* integer at 26 */ |
| 169 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* sequence at 27 */ |
| 170 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* bits at 28 */ |
| 171 | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* string at 29 */ |
| 172 | }; |
| 173 | static asn_SEQUENCE_specifics_t asn_DEF_Sequence_specs = { |
| 174 | sizeof(struct Sequence), |
| 175 | offsetof(struct Sequence, _asn_ctx), |
| 176 | asn_DEF_Sequence_tag2el, |
| 177 | 4, /* Count of tags in the map */ |
| 178 | -1, /* Start extensions */ |
| 179 | -1 /* Stop extensions */ |
| 180 | }; |
| 181 | asn_TYPE_descriptor_t asn_DEF_Sequence = { |
| 182 | "Sequence", |
| 183 | "Sequence", |
| 184 | SEQUENCE_free, |
| 185 | SEQUENCE_print, |
| 186 | SEQUENCE_constraint, |
| 187 | SEQUENCE_decode_ber, |
| 188 | SEQUENCE_encode_der, |
| 189 | SEQUENCE_decode_xer, |
| 190 | SEQUENCE_encode_xer, |
| 191 | 0, /* Use generic outmost tag fetcher */ |
| 192 | asn_DEF_Sequence_tags, |
| 193 | sizeof(asn_DEF_Sequence_tags) |
| 194 | /sizeof(asn_DEF_Sequence_tags[0]), /* 1 */ |
| 195 | asn_DEF_Sequence_tags, /* Same as above */ |
| 196 | sizeof(asn_DEF_Sequence_tags) |
| 197 | /sizeof(asn_DEF_Sequence_tags[0]), /* 1 */ |
| 198 | asn_MBR_Sequence, |
| 199 | 4, /* Elements count */ |
| 200 | &asn_DEF_Sequence_specs /* Additional specs */ |
| 201 | }; |
| 202 | |
| 203 | |
| 204 | /*** <<< INCLUDES [Set] >>> ***/ |
| 205 | |
| 206 | #include <RELATIVE-OID.h> |
| 207 | #include <OCTET_STRING.h> |
| 208 | #include <constr_SET.h> |
| 209 | |
| 210 | /*** <<< DEPS [Set] >>> ***/ |
| 211 | |
| 212 | |
| 213 | /* |
| 214 | * Method of determining the components presence |
| 215 | */ |
| 216 | typedef enum Set_PR { |
| 217 | Set_PR_roid, /* Member roid is present */ |
| 218 | Set_PR_opaque, /* Member opaque is present */ |
| 219 | } Set_PR; |
| 220 | extern asn_TYPE_descriptor_t asn_DEF_Set; |
| 221 | |
| 222 | /*** <<< TYPE-DECLS [Set] >>> ***/ |
| 223 | |
| 224 | |
| 225 | typedef struct Set { |
| 226 | RELATIVE_OID_t roid; |
| 227 | OCTET_STRING_t *opaque /* OPTIONAL */; |
| 228 | |
| 229 | /* Presence bitmask: ASN_SET_ISPRESENT(pSet, Set_PR_x) */ |
| 230 | unsigned int _presence_map |
| 231 | [((2+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))]; |
| 232 | |
| 233 | /* Context for parsing across buffer boundaries */ |
| 234 | asn_struct_ctx_t _asn_ctx; |
| 235 | } Set_t; |
| 236 | |
| 237 | /*** <<< STAT-DEFS [Set] >>> ***/ |
| 238 | |
| 239 | static asn_TYPE_member_t asn_MBR_Set[] = { |
| 240 | { ATF_NOFLAGS, 0, offsetof(struct Set, roid), |
| 241 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 242 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 243 | .type = (void *)&asn_DEF_RELATIVE_OID, |
| 244 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 245 | .name = "roid" |
| 246 | }, |
| 247 | { ATF_POINTER, 1, offsetof(struct Set, opaque), |
| 248 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 249 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 250 | .type = (void *)&asn_DEF_OCTET_STRING, |
| 251 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 252 | .name = "opaque" |
| 253 | }, |
| 254 | }; |
| 255 | static ber_tlv_tag_t asn_DEF_Set_tags[] = { |
| 256 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 257 | }; |
| 258 | static asn_TYPE_tag2member_t asn_DEF_Set_tag2el[] = { |
| 259 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* roid at 33 */ |
| 260 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* opaque at 34 */ |
| 261 | }; |
| 262 | static uint8_t asn_DEF_Set_mmap[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = { |
| 263 | (1 << 7) | (0 << 6) |
| 264 | }; |
| 265 | static asn_SET_specifics_t asn_DEF_Set_specs = { |
| 266 | sizeof(struct Set), |
| 267 | offsetof(struct Set, _asn_ctx), |
| 268 | offsetof(struct Set, _presence_map), |
| 269 | asn_DEF_Set_tag2el, |
| 270 | 2, /* Count of tags in the map */ |
| 271 | asn_DEF_Set_tag2el, /* Same as above */ |
| 272 | 2, /* Count of tags in the CANONICAL-XER map */ |
| 273 | 0, /* Whether extensible */ |
| 274 | (unsigned int *)asn_DEF_Set_mmap /* Mandatory elements map */ |
| 275 | }; |
| 276 | asn_TYPE_descriptor_t asn_DEF_Set = { |
| 277 | "Set", |
| 278 | "Set", |
| 279 | SET_free, |
| 280 | SET_print, |
| 281 | SET_constraint, |
| 282 | SET_decode_ber, |
| 283 | SET_encode_der, |
| 284 | SET_decode_xer, |
| 285 | SET_encode_xer, |
| 286 | 0, /* Use generic outmost tag fetcher */ |
| 287 | asn_DEF_Set_tags, |
| 288 | sizeof(asn_DEF_Set_tags) |
| 289 | /sizeof(asn_DEF_Set_tags[0]), /* 1 */ |
| 290 | asn_DEF_Set_tags, /* Same as above */ |
| 291 | sizeof(asn_DEF_Set_tags) |
| 292 | /sizeof(asn_DEF_Set_tags[0]), /* 1 */ |
| 293 | asn_MBR_Set, |
| 294 | 2, /* Elements count */ |
| 295 | &asn_DEF_Set_specs /* Additional specs */ |
| 296 | }; |
| 297 | |
| 298 | |
| 299 | /*** <<< INCLUDES [SetOf] >>> ***/ |
| 300 | |
| 301 | #include <REAL.h> |
| 302 | #include <asn_SET_OF.h> |
| 303 | #include <constr_SET_OF.h> |
| 304 | |
| 305 | /*** <<< DEPS [SetOf] >>> ***/ |
| 306 | |
| 307 | extern asn_TYPE_descriptor_t asn_DEF_SetOf; |
| 308 | |
| 309 | /*** <<< TYPE-DECLS [SetOf] >>> ***/ |
| 310 | |
| 311 | |
| 312 | typedef struct SetOf { |
| 313 | A_SET_OF(REAL_t) list; |
| 314 | |
| 315 | /* Context for parsing across buffer boundaries */ |
| 316 | asn_struct_ctx_t _asn_ctx; |
| 317 | } SetOf_t; |
| 318 | |
| 319 | /*** <<< STAT-DEFS [SetOf] >>> ***/ |
| 320 | |
| 321 | static asn_TYPE_member_t asn_MBR_SetOf[] = { |
| 322 | { ATF_NOFLAGS, 0, 0, |
| 323 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), |
| 324 | .tag_mode = 0, |
| 325 | .type = (void *)&asn_DEF_REAL, |
| 326 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 327 | .name = "" |
| 328 | }, |
| 329 | }; |
| 330 | static ber_tlv_tag_t asn_DEF_SetOf_tags[] = { |
| 331 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 332 | }; |
| 333 | static asn_SET_OF_specifics_t asn_DEF_SetOf_specs = { |
| 334 | sizeof(struct SetOf), |
| 335 | offsetof(struct SetOf, _asn_ctx), |
| 336 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 337 | }; |
| 338 | asn_TYPE_descriptor_t asn_DEF_SetOf = { |
| 339 | "SetOf", |
| 340 | "SetOf", |
| 341 | SET_OF_free, |
| 342 | SET_OF_print, |
| 343 | SET_OF_constraint, |
| 344 | SET_OF_decode_ber, |
| 345 | SET_OF_encode_der, |
| 346 | SET_OF_decode_xer, |
| 347 | SET_OF_encode_xer, |
| 348 | 0, /* Use generic outmost tag fetcher */ |
| 349 | asn_DEF_SetOf_tags, |
| 350 | sizeof(asn_DEF_SetOf_tags) |
| 351 | /sizeof(asn_DEF_SetOf_tags[0]), /* 1 */ |
| 352 | asn_DEF_SetOf_tags, /* Same as above */ |
| 353 | sizeof(asn_DEF_SetOf_tags) |
| 354 | /sizeof(asn_DEF_SetOf_tags[0]), /* 1 */ |
| 355 | asn_MBR_SetOf, |
| 356 | 1, /* Single element */ |
| 357 | &asn_DEF_SetOf_specs /* Additional specs */ |
| 358 | }; |
| 359 | |
| 360 | |
| 361 | /*** <<< INCLUDES [SeqOf] >>> ***/ |
| 362 | |
| 363 | #include <INTEGER.h> |
| 364 | #include <asn_SEQUENCE_OF.h> |
| 365 | #include <constr_SEQUENCE_OF.h> |
| 366 | |
| 367 | /*** <<< DEPS [SeqOf] >>> ***/ |
| 368 | |
| 369 | extern asn_TYPE_descriptor_t asn_DEF_SeqOf; |
| 370 | |
| 371 | /*** <<< TYPE-DECLS [SeqOf] >>> ***/ |
| 372 | |
| 373 | |
| 374 | typedef struct SeqOf { |
| 375 | A_SEQUENCE_OF(INTEGER_t) list; |
| 376 | |
| 377 | /* Context for parsing across buffer boundaries */ |
| 378 | asn_struct_ctx_t _asn_ctx; |
| 379 | } SeqOf_t; |
| 380 | |
| 381 | /*** <<< STAT-DEFS [SeqOf] >>> ***/ |
| 382 | |
| 383 | static asn_TYPE_member_t asn_MBR_SeqOf[] = { |
| 384 | { ATF_NOFLAGS, 0, 0, |
| 385 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 386 | .tag_mode = 0, |
| 387 | .type = (void *)&asn_DEF_INTEGER, |
| 388 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 389 | .name = "id" |
| 390 | }, |
| 391 | }; |
| 392 | static ber_tlv_tag_t asn_DEF_SeqOf_tags[] = { |
| 393 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 394 | }; |
| 395 | static asn_SET_OF_specifics_t asn_DEF_SeqOf_specs = { |
| 396 | sizeof(struct SeqOf), |
| 397 | offsetof(struct SeqOf, _asn_ctx), |
| 398 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 399 | }; |
| 400 | asn_TYPE_descriptor_t asn_DEF_SeqOf = { |
| 401 | "SeqOf", |
| 402 | "SeqOf", |
| 403 | SEQUENCE_OF_free, |
| 404 | SEQUENCE_OF_print, |
| 405 | SEQUENCE_OF_constraint, |
| 406 | SEQUENCE_OF_decode_ber, |
| 407 | SEQUENCE_OF_encode_der, |
| 408 | SEQUENCE_OF_decode_xer, |
| 409 | SEQUENCE_OF_encode_xer, |
| 410 | 0, /* Use generic outmost tag fetcher */ |
| 411 | asn_DEF_SeqOf_tags, |
| 412 | sizeof(asn_DEF_SeqOf_tags) |
| 413 | /sizeof(asn_DEF_SeqOf_tags[0]), /* 1 */ |
| 414 | asn_DEF_SeqOf_tags, /* Same as above */ |
| 415 | sizeof(asn_DEF_SeqOf_tags) |
| 416 | /sizeof(asn_DEF_SeqOf_tags[0]), /* 1 */ |
| 417 | asn_MBR_SeqOf, |
| 418 | 1, /* Single element */ |
| 419 | &asn_DEF_SeqOf_specs /* Additional specs */ |
| 420 | }; |
| 421 | |