blob: 0d0feb0661d2f82b2934a31ea436c0305f731d3d [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
38memb_identifier_constraint_1(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 Walkin1eded352006-07-13 11:19:01 +000053 return td->check_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 Walkin6ec10322006-03-14 11:48:01 +000065 .memb_constraints = memb_identifier_constraint_1,
Lev Walkinb33425f2017-07-14 14:59:52 +040066 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin6ec10322006-03-14 11:48:01 +000067 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
68 .default_value = 0,
69 .name = "identifier"
70 },
71 { ATF_NOFLAGS, 0, offsetof(struct Attribute, siAttributeValue),
72 .tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)),
73 .tag_mode = 0,
74 .type = &asn_DEF_IA5String,
Lev Walkin67a30122017-08-10 05:48:54 -070075 .type_selector = 0,
Lev Walkin6ec10322006-03-14 11:48:01 +000076 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040077 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin6ec10322006-03-14 11:48:01 +000078 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
79 .default_value = 0,
80 .name = "siAttributeValue"
81 },
82};
Lev Walkina7591b52014-10-12 18:37:35 -070083static const ber_tlv_tag_t asn_DEF_Attribute_tags_1[] = {
Lev Walkin6ec10322006-03-14 11:48:01 +000084 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
85};
Lev Walkina7591b52014-10-12 18:37:35 -070086static const asn_TYPE_tag2member_t asn_MAP_Attribute_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070087 { (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)), 0, 0, 0 }, /* identifier */
88 { (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), 1, 0, 0 } /* siAttributeValue */
Lev Walkin6ec10322006-03-14 11:48:01 +000089};
90static asn_SEQUENCE_specifics_t asn_SPC_Attribute_specs_1 = {
91 sizeof(struct Attribute),
92 offsetof(struct Attribute, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -070093 .tag2el = asn_MAP_Attribute_tag2el_1,
94 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin6ec10322006-03-14 11:48:01 +000095 0, 0, 0, /* Optional elements (not needed) */
96 -1, /* Start extensions */
97 -1 /* Stop extensions */
98};
99asn_TYPE_descriptor_t asn_DEF_Attribute = {
100 "Attribute",
101 "Attribute",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800102 &asn_OP_SEQUENCE,
Lev Walkin6ec10322006-03-14 11:48:01 +0000103 SEQUENCE_constraint,
Lev Walkin6ec10322006-03-14 11:48:01 +0000104 asn_DEF_Attribute_tags_1,
105 sizeof(asn_DEF_Attribute_tags_1)
106 /sizeof(asn_DEF_Attribute_tags_1[0]), /* 1 */
107 asn_DEF_Attribute_tags_1, /* Same as above */
108 sizeof(asn_DEF_Attribute_tags_1)
109 /sizeof(asn_DEF_Attribute_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400110 0, /* No OER visible constraints */
Lev Walkin6ec10322006-03-14 11:48:01 +0000111 0, /* No PER visible constraints */
112 asn_MBR_Attribute_1,
113 2, /* Elements count */
114 &asn_SPC_Attribute_specs_1 /* Additional specs */
115};
116