2 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3 * From ASN.1 module "E2AP-IEs"
4 * found in "2022_E2AP.asn1"
5 * `asn1c -D ./E2AP/ -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-example`
8 #include "TNLinformation.h"
11 memb_tnlAddress_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
12 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13 const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
17 ASN__CTFAIL(app_key, td, sptr,
18 "%s: value not given (%s:%d)",
19 td->name, __FILE__, __LINE__);
25 size = 8 * st->size - (st->bits_unused & 0x07);
30 if((size >= 1 && size <= 160)) {
31 /* Constraint check succeeded */
34 ASN__CTFAIL(app_key, td, sptr,
35 "%s: constraint failed (%s:%d)",
36 td->name, __FILE__, __LINE__);
42 memb_tnlPort_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
43 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
44 const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
48 ASN__CTFAIL(app_key, td, sptr,
49 "%s: value not given (%s:%d)",
50 td->name, __FILE__, __LINE__);
56 size = 8 * st->size - (st->bits_unused & 0x07);
62 /* Constraint check succeeded */
65 ASN__CTFAIL(app_key, td, sptr,
66 "%s: constraint failed (%s:%d)",
67 td->name, __FILE__, __LINE__);
72 static asn_oer_constraints_t asn_OER_memb_tnlAddress_constr_2 CC_NOTUSED = {
74 -1 /* (SIZE(0..MAX)) */};
75 static asn_per_constraints_t asn_PER_memb_tnlAddress_constr_2 CC_NOTUSED = {
76 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
77 { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 160 } /* (SIZE(1..160,...)) */,
78 0, 0 /* No PER value map */
80 static asn_oer_constraints_t asn_OER_memb_tnlPort_constr_3 CC_NOTUSED = {
82 16 /* (SIZE(16..16)) */};
83 static asn_per_constraints_t asn_PER_memb_tnlPort_constr_3 CC_NOTUSED = {
84 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
85 { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */,
86 0, 0 /* No PER value map */
88 asn_TYPE_member_t asn_MBR_TNLinformation_1[] = {
89 { ATF_NOFLAGS, 0, offsetof(struct TNLinformation, tnlAddress),
90 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
91 -1, /* IMPLICIT tag at current level */
94 { &asn_OER_memb_tnlAddress_constr_2, &asn_PER_memb_tnlAddress_constr_2, memb_tnlAddress_constraint_1 },
95 0, 0, /* No default value */
98 { ATF_POINTER, 1, offsetof(struct TNLinformation, tnlPort),
99 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
100 -1, /* IMPLICIT tag at current level */
103 { &asn_OER_memb_tnlPort_constr_3, &asn_PER_memb_tnlPort_constr_3, memb_tnlPort_constraint_1 },
104 0, 0, /* No default value */
108 static const int asn_MAP_TNLinformation_oms_1[] = { 1 };
109 static const ber_tlv_tag_t asn_DEF_TNLinformation_tags_1[] = {
110 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
112 static const asn_TYPE_tag2member_t asn_MAP_TNLinformation_tag2el_1[] = {
113 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* tnlAddress */
114 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* tnlPort */
116 asn_SEQUENCE_specifics_t asn_SPC_TNLinformation_specs_1 = {
117 sizeof(struct TNLinformation),
118 offsetof(struct TNLinformation, _asn_ctx),
119 asn_MAP_TNLinformation_tag2el_1,
120 2, /* Count of tags in the map */
121 asn_MAP_TNLinformation_oms_1, /* Optional members */
122 1, 0, /* Root/Additions */
123 2, /* First extension addition */
125 asn_TYPE_descriptor_t asn_DEF_TNLinformation = {
129 asn_DEF_TNLinformation_tags_1,
130 sizeof(asn_DEF_TNLinformation_tags_1)
131 /sizeof(asn_DEF_TNLinformation_tags_1[0]), /* 1 */
132 asn_DEF_TNLinformation_tags_1, /* Same as above */
133 sizeof(asn_DEF_TNLinformation_tags_1)
134 /sizeof(asn_DEF_TNLinformation_tags_1[0]), /* 1 */
135 { 0, 0, SEQUENCE_constraint },
136 asn_MBR_TNLinformation_1,
137 2, /* Elements count */
138 &asn_SPC_TNLinformation_specs_1 /* Additional specs */