2 * Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
3 * From ASN.1 module "ULP-Components"
4 * found in "../asn1src/ULP-Components.asn"
5 * `asn1c -gen-PER -fskeletons-copy -fnative-types`
10 static int check_permitted_alphabet_6(const void *sptr
) {
11 /* The underlying type is IA5String */
12 const IA5String_t
*st
= (const IA5String_t
*)sptr
;
13 const uint8_t *ch
= st
->buf
;
14 const uint8_t *end
= ch
+ st
->size
;
16 for(; ch
< end
; ch
++) {
18 if(!(cv
<= 127)) return -1;
24 memb_msisdn_constraint_1(asn_TYPE_descriptor_t
*td
, const void *sptr
,
25 asn_app_constraint_failed_f
*ctfailcb
, void *app_key
) {
26 const OCTET_STRING_t
*st
= (const OCTET_STRING_t
*)sptr
;
30 _ASN_CTFAIL(app_key
, td
, sptr
,
31 "%s: value not given (%s:%d)",
32 td
->name
, __FILE__
, __LINE__
);
39 /* Constraint check succeeded */
42 _ASN_CTFAIL(app_key
, td
, sptr
,
43 "%s: constraint failed (%s:%d)",
44 td
->name
, __FILE__
, __LINE__
);
50 memb_mdn_constraint_1(asn_TYPE_descriptor_t
*td
, const void *sptr
,
51 asn_app_constraint_failed_f
*ctfailcb
, void *app_key
) {
52 const OCTET_STRING_t
*st
= (const OCTET_STRING_t
*)sptr
;
56 _ASN_CTFAIL(app_key
, td
, sptr
,
57 "%s: value not given (%s:%d)",
58 td
->name
, __FILE__
, __LINE__
);
65 /* Constraint check succeeded */
68 _ASN_CTFAIL(app_key
, td
, sptr
,
69 "%s: constraint failed (%s:%d)",
70 td
->name
, __FILE__
, __LINE__
);
76 memb_min_constraint_1(asn_TYPE_descriptor_t
*td
, const void *sptr
,
77 asn_app_constraint_failed_f
*ctfailcb
, void *app_key
) {
78 const BIT_STRING_t
*st
= (const BIT_STRING_t
*)sptr
;
82 _ASN_CTFAIL(app_key
, td
, sptr
,
83 "%s: value not given (%s:%d)",
84 td
->name
, __FILE__
, __LINE__
);
90 size
= 8 * st
->size
- (st
->bits_unused
& 0x07);
96 /* Constraint check succeeded */
99 _ASN_CTFAIL(app_key
, td
, sptr
,
100 "%s: constraint failed (%s:%d)",
101 td
->name
, __FILE__
, __LINE__
);
107 memb_imsi_constraint_1(asn_TYPE_descriptor_t
*td
, const void *sptr
,
108 asn_app_constraint_failed_f
*ctfailcb
, void *app_key
) {
109 const OCTET_STRING_t
*st
= (const OCTET_STRING_t
*)sptr
;
113 _ASN_CTFAIL(app_key
, td
, sptr
,
114 "%s: value not given (%s:%d)",
115 td
->name
, __FILE__
, __LINE__
);
122 /* Constraint check succeeded */
125 _ASN_CTFAIL(app_key
, td
, sptr
,
126 "%s: constraint failed (%s:%d)",
127 td
->name
, __FILE__
, __LINE__
);
133 memb_nai_constraint_1(asn_TYPE_descriptor_t
*td
, const void *sptr
,
134 asn_app_constraint_failed_f
*ctfailcb
, void *app_key
) {
135 const IA5String_t
*st
= (const IA5String_t
*)sptr
;
139 _ASN_CTFAIL(app_key
, td
, sptr
,
140 "%s: value not given (%s:%d)",
141 td
->name
, __FILE__
, __LINE__
);
147 if((size
>= 1 && size
<= 1000)
148 && !check_permitted_alphabet_6(st
)) {
149 /* Constraint check succeeded */
152 _ASN_CTFAIL(app_key
, td
, sptr
,
153 "%s: constraint failed (%s:%d)",
154 td
->name
, __FILE__
, __LINE__
);
159 static asn_per_constraints_t asn_PER_memb_msisdn_constr_2
= {
160 { APC_UNCONSTRAINED
, -1, -1, 0, 0 },
161 { APC_CONSTRAINED
, 0, 0, 8, 8 } /* (SIZE(8..8)) */,
162 0, 0 /* No PER value map */
164 static asn_per_constraints_t asn_PER_memb_mdn_constr_3
= {
165 { APC_UNCONSTRAINED
, -1, -1, 0, 0 },
166 { APC_CONSTRAINED
, 0, 0, 8, 8 } /* (SIZE(8..8)) */,
167 0, 0 /* No PER value map */
169 static asn_per_constraints_t asn_PER_memb_min_constr_4
= {
170 { APC_UNCONSTRAINED
, -1, -1, 0, 0 },
171 { APC_CONSTRAINED
, 0, 0, 34, 34 } /* (SIZE(34..34)) */,
172 0, 0 /* No PER value map */
174 static asn_per_constraints_t asn_PER_memb_imsi_constr_5
= {
175 { APC_UNCONSTRAINED
, -1, -1, 0, 0 },
176 { APC_CONSTRAINED
, 0, 0, 8, 8 } /* (SIZE(8..8)) */,
177 0, 0 /* No PER value map */
179 static asn_per_constraints_t asn_PER_memb_nai_constr_6
= {
180 { APC_CONSTRAINED
, 7, 7, 0, 127 } /* (0..127) */,
181 { APC_CONSTRAINED
, 10, 10, 1, 1000 } /* (SIZE(1..1000)) */,
182 0, 0 /* No PER character map necessary */
184 static asn_per_constraints_t asn_PER_type_SETId_constr_1
= {
185 { APC_CONSTRAINED
| APC_EXTENSIBLE
, 3, 3, 0, 5 } /* (0..5,...) */,
186 { APC_UNCONSTRAINED
, -1, -1, 0, 0 },
187 0, 0 /* No PER value map */
189 static asn_TYPE_member_t asn_MBR_SETId_1
[] = {
190 { ATF_NOFLAGS
, 0, offsetof(struct SETId
, choice
.msisdn
),
191 (ASN_TAG_CLASS_CONTEXT
| (0 << 2)),
192 -1, /* IMPLICIT tag at current level */
193 &asn_DEF_OCTET_STRING
,
194 memb_msisdn_constraint_1
,
195 &asn_PER_memb_msisdn_constr_2
,
199 { ATF_NOFLAGS
, 0, offsetof(struct SETId
, choice
.mdn
),
200 (ASN_TAG_CLASS_CONTEXT
| (1 << 2)),
201 -1, /* IMPLICIT tag at current level */
202 &asn_DEF_OCTET_STRING
,
203 memb_mdn_constraint_1
,
204 &asn_PER_memb_mdn_constr_3
,
208 { ATF_NOFLAGS
, 0, offsetof(struct SETId
, choice
.min
),
209 (ASN_TAG_CLASS_CONTEXT
| (2 << 2)),
210 -1, /* IMPLICIT tag at current level */
212 memb_min_constraint_1
,
213 &asn_PER_memb_min_constr_4
,
217 { ATF_NOFLAGS
, 0, offsetof(struct SETId
, choice
.imsi
),
218 (ASN_TAG_CLASS_CONTEXT
| (3 << 2)),
219 -1, /* IMPLICIT tag at current level */
220 &asn_DEF_OCTET_STRING
,
221 memb_imsi_constraint_1
,
222 &asn_PER_memb_imsi_constr_5
,
226 { ATF_NOFLAGS
, 0, offsetof(struct SETId
, choice
.nai
),
227 (ASN_TAG_CLASS_CONTEXT
| (4 << 2)),
228 -1, /* IMPLICIT tag at current level */
230 memb_nai_constraint_1
,
231 &asn_PER_memb_nai_constr_6
,
235 { ATF_NOFLAGS
, 0, offsetof(struct SETId
, choice
.iPAddress
),
236 (ASN_TAG_CLASS_CONTEXT
| (5 << 2)),
237 +1, /* EXPLICIT tag at current level */
239 0, /* Defer constraints checking to the member type */
240 0, /* No PER visible constraints */
245 static asn_TYPE_tag2member_t asn_MAP_SETId_tag2el_1
[] = {
246 { (ASN_TAG_CLASS_CONTEXT
| (0 << 2)), 0, 0, 0 }, /* msisdn at 23 */
247 { (ASN_TAG_CLASS_CONTEXT
| (1 << 2)), 1, 0, 0 }, /* mdn at 24 */
248 { (ASN_TAG_CLASS_CONTEXT
| (2 << 2)), 2, 0, 0 }, /* min at 25 */
249 { (ASN_TAG_CLASS_CONTEXT
| (3 << 2)), 3, 0, 0 }, /* imsi at 26 */
250 { (ASN_TAG_CLASS_CONTEXT
| (4 << 2)), 4, 0, 0 }, /* nai at 27 */
251 { (ASN_TAG_CLASS_CONTEXT
| (5 << 2)), 5, 0, 0 } /* iPAddress at 28 */
253 static asn_CHOICE_specifics_t asn_SPC_SETId_specs_1
= {
254 sizeof(struct SETId
),
255 offsetof(struct SETId
, _asn_ctx
),
256 offsetof(struct SETId
, present
),
257 sizeof(((struct SETId
*)0)->present
),
258 asn_MAP_SETId_tag2el_1
,
259 6, /* Count of tags in the map */
261 6 /* Extensions start */
263 asn_TYPE_descriptor_t asn_DEF_SETId
= {
276 0, /* No effective tags (pointer) */
277 0, /* No effective tags (count) */
278 0, /* No tags (pointer) */
279 0, /* No tags (count) */
280 &asn_PER_type_SETId_constr_1
,
282 6, /* Elements count */
283 &asn_SPC_SETId_specs_1
/* Additional specs */