| 1 |
|
| 2 |
/*** <<< INCLUDES [Attribute] >>> ***/ |
| 3 |
|
| 4 |
#include <RELATIVE-OID.h> |
| 5 |
#include <IA5String.h> |
| 6 |
#include <constr_SEQUENCE.h> |
| 7 |
|
| 8 |
/*** <<< TYPE-DECLS [Attribute] >>> ***/ |
| 9 |
|
| 10 |
typedef struct Attribute { |
| 11 |
RELATIVE_OID_t identifier; |
| 12 |
IA5String_t siAttributeValue; |
| 13 |
|
| 14 |
/* Context for parsing across buffer boundaries */ |
| 15 |
asn_struct_ctx_t _asn_ctx; |
| 16 |
} Attribute_t; |
| 17 |
|
| 18 |
/*** <<< FUNC-DECLS [Attribute] >>> ***/ |
| 19 |
|
| 20 |
extern asn_TYPE_descriptor_t asn_DEF_Attribute; |
| 21 |
|
| 22 |
/*** <<< CODE [Attribute] >>> ***/ |
| 23 |
|
| 24 |
static int |
| 25 |
memb_identifier_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 26 |
asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 27 |
|
| 28 |
if(!sptr) { |
| 29 |
ASN__CTFAIL(app_key, td, sptr, |
| 30 |
"%s: value not given (%s:%d)", |
| 31 |
td->name, __FILE__, __LINE__); |
| 32 |
return -1; |
| 33 |
} |
| 34 |
|
| 35 |
|
| 36 |
if(1 /* No applicable constraints whatsoever */) { |
| 37 |
/* Nothing is here. See below */ |
| 38 |
} |
| 39 |
|
| 40 |
return td->check_constraints(td, sptr, ctfailcb, app_key); |
| 41 |
} |
| 42 |
|
| 43 |
|
| 44 |
/*** <<< STAT-DEFS [Attribute] >>> ***/ |
| 45 |
|
| 46 |
static asn_TYPE_member_t asn_MBR_Attribute_1[] = { |
| 47 |
{ ATF_NOFLAGS, 0, offsetof(struct Attribute, identifier), |
| 48 |
.tag = (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)), |
| 49 |
.tag_mode = 0, |
| 50 |
.type = &asn_DEF_RELATIVE_OID, |
| 51 |
.memb_constraints = memb_identifier_constraint_1, |
| 52 |
.per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 53 |
.default_value = 0, |
| 54 |
.name = "identifier" |
| 55 |
}, |
| 56 |
{ ATF_NOFLAGS, 0, offsetof(struct Attribute, siAttributeValue), |
| 57 |
.tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), |
| 58 |
.tag_mode = 0, |
| 59 |
.type = &asn_DEF_IA5String, |
| 60 |
.memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 61 |
.per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 62 |
.default_value = 0, |
| 63 |
.name = "siAttributeValue" |
| 64 |
}, |
| 65 |
}; |
| 66 |
static const ber_tlv_tag_t asn_DEF_Attribute_tags_1[] = { |
| 67 |
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 68 |
}; |
| 69 |
static const asn_TYPE_tag2member_t asn_MAP_Attribute_tag2el_1[] = { |
| 70 |
{ (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)), 0, 0, 0 }, /* identifier */ |
| 71 |
{ (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), 1, 0, 0 } /* siAttributeValue */ |
| 72 |
}; |
| 73 |
static asn_SEQUENCE_specifics_t asn_SPC_Attribute_specs_1 = { |
| 74 |
sizeof(struct Attribute), |
| 75 |
offsetof(struct Attribute, _asn_ctx), |
| 76 |
asn_MAP_Attribute_tag2el_1, |
| 77 |
2, /* Count of tags in the map */ |
| 78 |
0, 0, 0, /* Optional elements (not needed) */ |
| 79 |
-1, /* Start extensions */ |
| 80 |
-1 /* Stop extensions */ |
| 81 |
}; |
| 82 |
asn_TYPE_descriptor_t asn_DEF_Attribute = { |
| 83 |
"Attribute", |
| 84 |
"Attribute", |
| 85 |
SEQUENCE_free, |
| 86 |
SEQUENCE_print, |
| 87 |
SEQUENCE_constraint, |
| 88 |
SEQUENCE_decode_ber, |
| 89 |
SEQUENCE_encode_der, |
| 90 |
SEQUENCE_decode_xer, |
| 91 |
SEQUENCE_encode_xer, |
| 92 |
0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 93 |
0, /* Use generic outmost tag fetcher */ |
| 94 |
asn_DEF_Attribute_tags_1, |
| 95 |
sizeof(asn_DEF_Attribute_tags_1) |
| 96 |
/sizeof(asn_DEF_Attribute_tags_1[0]), /* 1 */ |
| 97 |
asn_DEF_Attribute_tags_1, /* Same as above */ |
| 98 |
sizeof(asn_DEF_Attribute_tags_1) |
| 99 |
/sizeof(asn_DEF_Attribute_tags_1[0]), /* 1 */ |
| 100 |
0, /* No PER visible constraints */ |
| 101 |
asn_MBR_Attribute_1, |
| 102 |
2, /* Elements count */ |
| 103 |
&asn_SPC_Attribute_specs_1 /* Additional specs */ |
| 104 |
}; |
| 105 |
|