/src/open5gs/lib/asn1c/s1ap/S1AP_ENB-ID.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 "S1AP-IEs" |
4 | | * found in "../support/s1ap-r19.1.0/36413-j10.asn" |
5 | | * `asn1c -pdu=all -fprefix=S1AP_ -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 "S1AP_ENB-ID.h" |
9 | | |
10 | | static int |
11 | | memb_S1AP_macroENB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, |
12 | 0 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
13 | 0 | const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; |
14 | 0 | size_t size; |
15 | | |
16 | 0 | if(!sptr) { |
17 | 0 | ASN__CTFAIL(app_key, td, sptr, |
18 | 0 | "%s: value not given (%s:%d)", |
19 | 0 | td->name, __FILE__, __LINE__); |
20 | 0 | return -1; |
21 | 0 | } |
22 | | |
23 | 0 | if(st->size > 0) { |
24 | | /* Size in bits */ |
25 | 0 | size = 8 * st->size - (st->bits_unused & 0x07); |
26 | 0 | } else { |
27 | 0 | size = 0; |
28 | 0 | } |
29 | | |
30 | 0 | if((size == 20UL)) { |
31 | | /* Constraint check succeeded */ |
32 | 0 | return 0; |
33 | 0 | } else { |
34 | 0 | ASN__CTFAIL(app_key, td, sptr, |
35 | 0 | "%s: constraint failed (%s:%d)", |
36 | 0 | td->name, __FILE__, __LINE__); |
37 | 0 | return -1; |
38 | 0 | } |
39 | 0 | } |
40 | | |
41 | | static int |
42 | | memb_S1AP_homeENB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, |
43 | 0 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
44 | 0 | const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; |
45 | 0 | size_t size; |
46 | | |
47 | 0 | if(!sptr) { |
48 | 0 | ASN__CTFAIL(app_key, td, sptr, |
49 | 0 | "%s: value not given (%s:%d)", |
50 | 0 | td->name, __FILE__, __LINE__); |
51 | 0 | return -1; |
52 | 0 | } |
53 | | |
54 | 0 | if(st->size > 0) { |
55 | | /* Size in bits */ |
56 | 0 | size = 8 * st->size - (st->bits_unused & 0x07); |
57 | 0 | } else { |
58 | 0 | size = 0; |
59 | 0 | } |
60 | | |
61 | 0 | if((size == 28UL)) { |
62 | | /* Constraint check succeeded */ |
63 | 0 | return 0; |
64 | 0 | } else { |
65 | 0 | ASN__CTFAIL(app_key, td, sptr, |
66 | 0 | "%s: constraint failed (%s:%d)", |
67 | 0 | td->name, __FILE__, __LINE__); |
68 | 0 | return -1; |
69 | 0 | } |
70 | 0 | } |
71 | | |
72 | | static int |
73 | | memb_S1AP_short_macroENB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, |
74 | 0 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
75 | 0 | const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; |
76 | 0 | size_t size; |
77 | | |
78 | 0 | if(!sptr) { |
79 | 0 | ASN__CTFAIL(app_key, td, sptr, |
80 | 0 | "%s: value not given (%s:%d)", |
81 | 0 | td->name, __FILE__, __LINE__); |
82 | 0 | return -1; |
83 | 0 | } |
84 | | |
85 | 0 | if(st->size > 0) { |
86 | | /* Size in bits */ |
87 | 0 | size = 8 * st->size - (st->bits_unused & 0x07); |
88 | 0 | } else { |
89 | 0 | size = 0; |
90 | 0 | } |
91 | | |
92 | 0 | if((size == 18UL)) { |
93 | | /* Constraint check succeeded */ |
94 | 0 | return 0; |
95 | 0 | } else { |
96 | 0 | ASN__CTFAIL(app_key, td, sptr, |
97 | 0 | "%s: constraint failed (%s:%d)", |
98 | 0 | td->name, __FILE__, __LINE__); |
99 | 0 | return -1; |
100 | 0 | } |
101 | 0 | } |
102 | | |
103 | | static int |
104 | | memb_S1AP_long_macroENB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, |
105 | 0 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
106 | 0 | const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; |
107 | 0 | size_t size; |
108 | | |
109 | 0 | if(!sptr) { |
110 | 0 | ASN__CTFAIL(app_key, td, sptr, |
111 | 0 | "%s: value not given (%s:%d)", |
112 | 0 | td->name, __FILE__, __LINE__); |
113 | 0 | return -1; |
114 | 0 | } |
115 | | |
116 | 0 | if(st->size > 0) { |
117 | | /* Size in bits */ |
118 | 0 | size = 8 * st->size - (st->bits_unused & 0x07); |
119 | 0 | } else { |
120 | 0 | size = 0; |
121 | 0 | } |
122 | | |
123 | 0 | if((size == 21UL)) { |
124 | | /* Constraint check succeeded */ |
125 | 0 | return 0; |
126 | 0 | } else { |
127 | 0 | ASN__CTFAIL(app_key, td, sptr, |
128 | 0 | "%s: constraint failed (%s:%d)", |
129 | 0 | td->name, __FILE__, __LINE__); |
130 | 0 | return -1; |
131 | 0 | } |
132 | 0 | } |
133 | | |
134 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
135 | | static asn_per_constraints_t asn_PER_memb_S1AP_macroENB_ID_constr_2 CC_NOTUSED = { |
136 | | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
137 | | { APC_CONSTRAINED, 0, 0, 20, 20 } /* (SIZE(20..20)) */, |
138 | | 0, 0 /* No PER value map */ |
139 | | }; |
140 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
141 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
142 | | static asn_per_constraints_t asn_PER_memb_S1AP_homeENB_ID_constr_3 CC_NOTUSED = { |
143 | | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
144 | | { APC_CONSTRAINED, 0, 0, 28, 28 } /* (SIZE(28..28)) */, |
145 | | 0, 0 /* No PER value map */ |
146 | | }; |
147 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
148 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
149 | | static asn_per_constraints_t asn_PER_memb_S1AP_short_macroENB_ID_constr_5 CC_NOTUSED = { |
150 | | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
151 | | { APC_CONSTRAINED, 0, 0, 18, 18 } /* (SIZE(18..18)) */, |
152 | | 0, 0 /* No PER value map */ |
153 | | }; |
154 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
155 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
156 | | static asn_per_constraints_t asn_PER_memb_S1AP_long_macroENB_ID_constr_6 CC_NOTUSED = { |
157 | | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
158 | | { APC_CONSTRAINED, 0, 0, 21, 21 } /* (SIZE(21..21)) */, |
159 | | 0, 0 /* No PER value map */ |
160 | | }; |
161 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
162 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
163 | | asn_per_constraints_t asn_PER_type_S1AP_ENB_ID_constr_1 CC_NOTUSED = { |
164 | | { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, |
165 | | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
166 | | 0, 0 /* No PER value map */ |
167 | | }; |
168 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
169 | | asn_TYPE_member_t asn_MBR_S1AP_ENB_ID_1[] = { |
170 | | { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENB_ID, choice.macroENB_ID), |
171 | | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
172 | | -1, /* IMPLICIT tag at current level */ |
173 | | &asn_DEF_BIT_STRING, |
174 | | 0, |
175 | | { |
176 | | #if !defined(ASN_DISABLE_OER_SUPPORT) |
177 | | 0, |
178 | | #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ |
179 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
180 | | &asn_PER_memb_S1AP_macroENB_ID_constr_2, |
181 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
182 | | #if !defined(ASN_DISABLE_JER_SUPPORT) |
183 | | 0, |
184 | | #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ |
185 | | memb_S1AP_macroENB_ID_constraint_1 |
186 | | }, |
187 | | 0, 0, /* No default value */ |
188 | | "macroENB-ID" |
189 | | }, |
190 | | { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENB_ID, choice.homeENB_ID), |
191 | | (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
192 | | -1, /* IMPLICIT tag at current level */ |
193 | | &asn_DEF_BIT_STRING, |
194 | | 0, |
195 | | { |
196 | | #if !defined(ASN_DISABLE_OER_SUPPORT) |
197 | | 0, |
198 | | #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ |
199 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
200 | | &asn_PER_memb_S1AP_homeENB_ID_constr_3, |
201 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
202 | | #if !defined(ASN_DISABLE_JER_SUPPORT) |
203 | | 0, |
204 | | #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ |
205 | | memb_S1AP_homeENB_ID_constraint_1 |
206 | | }, |
207 | | 0, 0, /* No default value */ |
208 | | "homeENB-ID" |
209 | | }, |
210 | | { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENB_ID, choice.short_macroENB_ID), |
211 | | (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
212 | | -1, /* IMPLICIT tag at current level */ |
213 | | &asn_DEF_BIT_STRING, |
214 | | 0, |
215 | | { |
216 | | #if !defined(ASN_DISABLE_OER_SUPPORT) |
217 | | 0, |
218 | | #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ |
219 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
220 | | &asn_PER_memb_S1AP_short_macroENB_ID_constr_5, |
221 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
222 | | #if !defined(ASN_DISABLE_JER_SUPPORT) |
223 | | 0, |
224 | | #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ |
225 | | memb_S1AP_short_macroENB_ID_constraint_1 |
226 | | }, |
227 | | 0, 0, /* No default value */ |
228 | | "short-macroENB-ID" |
229 | | }, |
230 | | { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENB_ID, choice.long_macroENB_ID), |
231 | | (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
232 | | -1, /* IMPLICIT tag at current level */ |
233 | | &asn_DEF_BIT_STRING, |
234 | | 0, |
235 | | { |
236 | | #if !defined(ASN_DISABLE_OER_SUPPORT) |
237 | | 0, |
238 | | #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ |
239 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
240 | | &asn_PER_memb_S1AP_long_macroENB_ID_constr_6, |
241 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
242 | | #if !defined(ASN_DISABLE_JER_SUPPORT) |
243 | | 0, |
244 | | #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ |
245 | | memb_S1AP_long_macroENB_ID_constraint_1 |
246 | | }, |
247 | | 0, 0, /* No default value */ |
248 | | "long-macroENB-ID" |
249 | | }, |
250 | | }; |
251 | | static const asn_TYPE_tag2member_t asn_MAP_S1AP_ENB_ID_tag2el_1[] = { |
252 | | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* macroENB-ID */ |
253 | | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* homeENB-ID */ |
254 | | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* short-macroENB-ID */ |
255 | | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* long-macroENB-ID */ |
256 | | }; |
257 | | asn_CHOICE_specifics_t asn_SPC_S1AP_ENB_ID_specs_1 = { |
258 | | sizeof(struct S1AP_ENB_ID), |
259 | | offsetof(struct S1AP_ENB_ID, _asn_ctx), |
260 | | offsetof(struct S1AP_ENB_ID, present), |
261 | | sizeof(((struct S1AP_ENB_ID *)0)->present), |
262 | | asn_MAP_S1AP_ENB_ID_tag2el_1, |
263 | | 4, /* Count of tags in the map */ |
264 | | 0, 0, |
265 | | 2 /* Extensions start */ |
266 | | }; |
267 | | asn_TYPE_descriptor_t asn_DEF_S1AP_ENB_ID = { |
268 | | "ENB-ID", |
269 | | "ENB-ID", |
270 | | &asn_OP_CHOICE, |
271 | | 0, /* No effective tags (pointer) */ |
272 | | 0, /* No effective tags (count) */ |
273 | | 0, /* No tags (pointer) */ |
274 | | 0, /* No tags (count) */ |
275 | | { |
276 | | #if !defined(ASN_DISABLE_OER_SUPPORT) |
277 | | 0, |
278 | | #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ |
279 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
280 | | &asn_PER_type_S1AP_ENB_ID_constr_1, |
281 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
282 | | #if !defined(ASN_DISABLE_JER_SUPPORT) |
283 | | 0, |
284 | | #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ |
285 | | CHOICE_constraint |
286 | | }, |
287 | | asn_MBR_S1AP_ENB_ID_1, |
288 | | 4, /* Elements count */ |
289 | | &asn_SPC_S1AP_ENB_ID_specs_1 /* Additional specs */ |
290 | | }; |
291 | | |