blob: 6f2ef863ac7d2d4eda9a84a63f279e685d1264a6 [file] [log] [blame]
Lev Walkin6ec10322006-03-14 11:48:01 +00001
2/*** <<< INCLUDES [Attribute] >>> ***/
3
4#include <RELATIVE-OID.h>
5#include <IA5String.h>
Lev Walkinad0d6372017-08-08 02:02:42 -07006#include <asn_ioc.h>
Lev Walkin6ec10322006-03-14 11:48:01 +00007#include <constr_SEQUENCE.h>
8
9/*** <<< TYPE-DECLS [Attribute] >>> ***/
10
11typedef struct Attribute {
12 RELATIVE_OID_t identifier;
13 IA5String_t siAttributeValue;
14
15 /* Context for parsing across buffer boundaries */
16 asn_struct_ctx_t _asn_ctx;
17} Attribute_t;
18
19/*** <<< FUNC-DECLS [Attribute] >>> ***/
20
21extern asn_TYPE_descriptor_t asn_DEF_Attribute;
22
Lev Walkin67a30122017-08-10 05:48:54 -070023/*** <<< IOC-TABLES [Attribute] >>> ***/
24
Lev Walkind357f3d2017-08-10 17:40:37 -070025static const RELATIVE_OID_t asn_VAL_1_raf = { "not supported", 0 };
26static const RELATIVE_OID_t asn_VAL_2_rcf = { "not supported", 0 };
Lev Walkin67a30122017-08-10 05:48:54 -070027static const asn_ioc_cell_t asn_IOS_Attributes_1_rows[] = {
Lev Walkind357f3d2017-08-10 17:40:37 -070028 { "&id", aioc__value, &asn_DEF_RELATIVE_OID, &asn_VAL_1_raf },
29 { "&id", aioc__value, &asn_DEF_RELATIVE_OID, &asn_VAL_2_rcf }
Lev Walkin67a30122017-08-10 05:48:54 -070030};
Lev Walkin18660d22017-08-12 20:45:23 -070031static const asn_ioc_set_t asn_IOS_Attributes_1[] = {
Lev Walkin67a30122017-08-10 05:48:54 -070032 2, 1, asn_IOS_Attributes_1_rows
33};
34
Lev Walkin6ec10322006-03-14 11:48:01 +000035/*** <<< CODE [Attribute] >>> ***/
36
37static int
Lev Walkin20696a42017-10-17 21:27:33 -070038memb_identifier_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +000039 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin6ec10322006-03-14 11:48:01 +000040
41 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -070042 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin6ec10322006-03-14 11:48:01 +000043 "%s: value not given (%s:%d)",
44 td->name, __FILE__, __LINE__);
45 return -1;
46 }
47
48
49 if(1 /* No applicable constraints whatsoever */) {
50 /* Nothing is here. See below */
51 }
52
Lev Walkin0bfea562017-09-29 23:16:48 -070053 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin6ec10322006-03-14 11:48:01 +000054}
55
56
57/*** <<< STAT-DEFS [Attribute] >>> ***/
58
59static asn_TYPE_member_t asn_MBR_Attribute_1[] = {
60 { ATF_NOFLAGS, 0, offsetof(struct Attribute, identifier),
61 .tag = (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)),
62 .tag_mode = 0,
63 .type = &asn_DEF_RELATIVE_OID,
Lev Walkin67a30122017-08-10 05:48:54 -070064 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -070065 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_identifier_constraint_1 },
Lev Walkin20696a42017-10-17 21:27:33 -070066 0, 0, /* No default value */
Lev Walkin6ec10322006-03-14 11:48:01 +000067 .name = "identifier"
68 },
69 { ATF_NOFLAGS, 0, offsetof(struct Attribute, siAttributeValue),
70 .tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)),
71 .tag_mode = 0,
72 .type = &asn_DEF_IA5String,
Lev Walkin67a30122017-08-10 05:48:54 -070073 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -070074 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -070075 0, 0, /* No default value */
Lev Walkin6ec10322006-03-14 11:48:01 +000076 .name = "siAttributeValue"
77 },
78};
Lev Walkina7591b52014-10-12 18:37:35 -070079static const ber_tlv_tag_t asn_DEF_Attribute_tags_1[] = {
Lev Walkin6ec10322006-03-14 11:48:01 +000080 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
81};
Lev Walkina7591b52014-10-12 18:37:35 -070082static const asn_TYPE_tag2member_t asn_MAP_Attribute_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070083 { (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)), 0, 0, 0 }, /* identifier */
84 { (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), 1, 0, 0 } /* siAttributeValue */
Lev Walkin6ec10322006-03-14 11:48:01 +000085};
86static asn_SEQUENCE_specifics_t asn_SPC_Attribute_specs_1 = {
87 sizeof(struct Attribute),
88 offsetof(struct Attribute, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -070089 .tag2el = asn_MAP_Attribute_tag2el_1,
90 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin6ec10322006-03-14 11:48:01 +000091 0, 0, 0, /* Optional elements (not needed) */
Lev Walkindf2edbb2017-10-21 13:40:07 -070092 -1, /* First extension addition */
Lev Walkin6ec10322006-03-14 11:48:01 +000093};
94asn_TYPE_descriptor_t asn_DEF_Attribute = {
95 "Attribute",
96 "Attribute",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +080097 &asn_OP_SEQUENCE,
Lev Walkin6ec10322006-03-14 11:48:01 +000098 asn_DEF_Attribute_tags_1,
99 sizeof(asn_DEF_Attribute_tags_1)
100 /sizeof(asn_DEF_Attribute_tags_1[0]), /* 1 */
101 asn_DEF_Attribute_tags_1, /* Same as above */
102 sizeof(asn_DEF_Attribute_tags_1)
103 /sizeof(asn_DEF_Attribute_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700104 { 0, 0, SEQUENCE_constraint },
Lev Walkin6ec10322006-03-14 11:48:01 +0000105 asn_MBR_Attribute_1,
106 2, /* Elements count */
107 &asn_SPC_Attribute_specs_1 /* Additional specs */
108};
109