/src/open5gs/lib/asn1c/ngap/NGAP_ExtendedRATRestrictionInformation.c
Line | Count | Source |
1 | | /* |
2 | | * Generated by asn1c-v1.4-43-gb7926896-2026-05-03 (https://github.com/mouse07410/asn1c) |
3 | | * From ASN.1 module "NGAP-IEs" |
4 | | * found in "../support/ngap-r19.2.0/38413-j20.asn" |
5 | | * `asn1c -pdu=all -fprefix=NGAP_ -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-JER -no-gen-CBOR -no-gen-OER -no-gen-UPER` |
6 | | */ |
7 | | |
8 | | #include "NGAP_ExtendedRATRestrictionInformation.h" |
9 | | |
10 | | #include "NGAP_ProtocolExtensionContainer.h" |
11 | | static int |
12 | | memb_NGAP_primaryRATRestriction_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, |
13 | 0 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
14 | 0 | const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; |
15 | 0 | size_t size; |
16 | | |
17 | 0 | if(!sptr) { |
18 | 0 | ASN__CTFAIL(app_key, td, sptr, |
19 | 0 | "%s: value not given (%s:%d)", |
20 | 0 | td->name, __FILE__, __LINE__); |
21 | 0 | return -1; |
22 | 0 | } |
23 | | |
24 | 0 | if(st->size > 0) { |
25 | | /* Size in bits */ |
26 | 0 | size = 8 * st->size - (st->bits_unused & 0x07); |
27 | 0 | } else { |
28 | 0 | size = 0; |
29 | 0 | } |
30 | | |
31 | 0 | if(((size == 8UL) || (size == 16UL))) { |
32 | | /* Constraint check succeeded */ |
33 | 0 | return 0; |
34 | 0 | } else { |
35 | 0 | ASN__CTFAIL(app_key, td, sptr, |
36 | 0 | "%s: constraint failed (%s:%d)", |
37 | 0 | td->name, __FILE__, __LINE__); |
38 | 0 | return -1; |
39 | 0 | } |
40 | 0 | } |
41 | | |
42 | | static int |
43 | | memb_NGAP_secondaryRATRestriction_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, |
44 | 0 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
45 | 0 | const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; |
46 | 0 | size_t size; |
47 | | |
48 | 0 | if(!sptr) { |
49 | 0 | ASN__CTFAIL(app_key, td, sptr, |
50 | 0 | "%s: value not given (%s:%d)", |
51 | 0 | td->name, __FILE__, __LINE__); |
52 | 0 | return -1; |
53 | 0 | } |
54 | | |
55 | 0 | if(st->size > 0) { |
56 | | /* Size in bits */ |
57 | 0 | size = 8 * st->size - (st->bits_unused & 0x07); |
58 | 0 | } else { |
59 | 0 | size = 0; |
60 | 0 | } |
61 | | |
62 | 0 | if((size == 8UL)) { |
63 | | /* Constraint check succeeded */ |
64 | 0 | return 0; |
65 | 0 | } else { |
66 | 0 | ASN__CTFAIL(app_key, td, sptr, |
67 | 0 | "%s: constraint failed (%s:%d)", |
68 | 0 | td->name, __FILE__, __LINE__); |
69 | 0 | return -1; |
70 | 0 | } |
71 | 0 | } |
72 | | |
73 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
74 | | static asn_per_constraints_t asn_PER_memb_NGAP_primaryRATRestriction_constr_2 CC_NOTUSED = { |
75 | | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
76 | | { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 8, 16 } /* (SIZE(8..16,...)) */, |
77 | | 0, 0 /* No PER value map */ |
78 | | }; |
79 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
80 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
81 | | static asn_per_constraints_t asn_PER_memb_NGAP_secondaryRATRestriction_constr_3 CC_NOTUSED = { |
82 | | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
83 | | { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 8, 8 } /* (SIZE(8..8,...)) */, |
84 | | 0, 0 /* No PER value map */ |
85 | | }; |
86 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
87 | | asn_TYPE_member_t asn_MBR_NGAP_ExtendedRATRestrictionInformation_1[] = { |
88 | | { ATF_NOFLAGS, 0, offsetof(struct NGAP_ExtendedRATRestrictionInformation, primaryRATRestriction), |
89 | | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
90 | | -1, /* IMPLICIT tag at current level */ |
91 | | &asn_DEF_BIT_STRING, |
92 | | 0, |
93 | | { |
94 | | #if !defined(ASN_DISABLE_OER_SUPPORT) |
95 | | 0, |
96 | | #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ |
97 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
98 | | &asn_PER_memb_NGAP_primaryRATRestriction_constr_2, |
99 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
100 | | #if !defined(ASN_DISABLE_JER_SUPPORT) |
101 | | 0, |
102 | | #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ |
103 | | memb_NGAP_primaryRATRestriction_constraint_1 |
104 | | }, |
105 | | 0, 0, /* No default value */ |
106 | | "primaryRATRestriction" |
107 | | }, |
108 | | { ATF_NOFLAGS, 0, offsetof(struct NGAP_ExtendedRATRestrictionInformation, secondaryRATRestriction), |
109 | | (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
110 | | -1, /* IMPLICIT tag at current level */ |
111 | | &asn_DEF_BIT_STRING, |
112 | | 0, |
113 | | { |
114 | | #if !defined(ASN_DISABLE_OER_SUPPORT) |
115 | | 0, |
116 | | #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ |
117 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
118 | | &asn_PER_memb_NGAP_secondaryRATRestriction_constr_3, |
119 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
120 | | #if !defined(ASN_DISABLE_JER_SUPPORT) |
121 | | 0, |
122 | | #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ |
123 | | memb_NGAP_secondaryRATRestriction_constraint_1 |
124 | | }, |
125 | | 0, 0, /* No default value */ |
126 | | "secondaryRATRestriction" |
127 | | }, |
128 | | { ATF_POINTER, 1, offsetof(struct NGAP_ExtendedRATRestrictionInformation, iE_Extensions), |
129 | | (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
130 | | -1, /* IMPLICIT tag at current level */ |
131 | | &asn_DEF_NGAP_ProtocolExtensionContainer_14713P116, |
132 | | 0, |
133 | | { |
134 | | #if !defined(ASN_DISABLE_OER_SUPPORT) |
135 | | 0, |
136 | | #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ |
137 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
138 | | 0, |
139 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
140 | | #if !defined(ASN_DISABLE_JER_SUPPORT) |
141 | | 0, |
142 | | #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ |
143 | | 0 |
144 | | }, |
145 | | 0, 0, /* No default value */ |
146 | | "iE-Extensions" |
147 | | }, |
148 | | }; |
149 | | static const int asn_MAP_NGAP_ExtendedRATRestrictionInformation_oms_1[] = { 2 }; |
150 | | static const ber_tlv_tag_t asn_DEF_NGAP_ExtendedRATRestrictionInformation_tags_1[] = { |
151 | | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
152 | | }; |
153 | | static const asn_TYPE_tag2member_t asn_MAP_NGAP_ExtendedRATRestrictionInformation_tag2el_1[] = { |
154 | | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* primaryRATRestriction */ |
155 | | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* secondaryRATRestriction */ |
156 | | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ |
157 | | }; |
158 | | asn_SEQUENCE_specifics_t asn_SPC_NGAP_ExtendedRATRestrictionInformation_specs_1 = { |
159 | | sizeof(struct NGAP_ExtendedRATRestrictionInformation), |
160 | | offsetof(struct NGAP_ExtendedRATRestrictionInformation, _asn_ctx), |
161 | | asn_MAP_NGAP_ExtendedRATRestrictionInformation_tag2el_1, |
162 | | 3, /* Count of tags in the map */ |
163 | | asn_MAP_NGAP_ExtendedRATRestrictionInformation_oms_1, /* Optional members */ |
164 | | 1, 0, /* Root/Additions */ |
165 | | 3, /* First extension addition */ |
166 | | }; |
167 | | asn_TYPE_descriptor_t asn_DEF_NGAP_ExtendedRATRestrictionInformation = { |
168 | | "ExtendedRATRestrictionInformation", |
169 | | "ExtendedRATRestrictionInformation", |
170 | | &asn_OP_SEQUENCE, |
171 | | asn_DEF_NGAP_ExtendedRATRestrictionInformation_tags_1, |
172 | | sizeof(asn_DEF_NGAP_ExtendedRATRestrictionInformation_tags_1) |
173 | | /sizeof(asn_DEF_NGAP_ExtendedRATRestrictionInformation_tags_1[0]), /* 1 */ |
174 | | asn_DEF_NGAP_ExtendedRATRestrictionInformation_tags_1, /* Same as above */ |
175 | | sizeof(asn_DEF_NGAP_ExtendedRATRestrictionInformation_tags_1) |
176 | | /sizeof(asn_DEF_NGAP_ExtendedRATRestrictionInformation_tags_1[0]), /* 1 */ |
177 | | { |
178 | | #if !defined(ASN_DISABLE_OER_SUPPORT) |
179 | | 0, |
180 | | #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ |
181 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
182 | | 0, |
183 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
184 | | #if !defined(ASN_DISABLE_JER_SUPPORT) |
185 | | 0, |
186 | | #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ |
187 | | SEQUENCE_constraint |
188 | | }, |
189 | | asn_MBR_NGAP_ExtendedRATRestrictionInformation_1, |
190 | | 3, /* Elements count */ |
191 | | &asn_SPC_NGAP_ExtendedRATRestrictionInformation_specs_1 /* Additional specs */ |
192 | | }; |
193 | | |