nonstandardidentifier.c
来自「H.248协议编解码协议栈」· C语言 代码 · 共 108 行
C
108 行
/* * Generated by asn1c-0.9.16 (http://lionet.info/asn1c) * From ASN.1 module "MEDIA-GATEWAY-CONTROL" * found in "h248_2.asn" */#include <asn_internal.h>#include "NonStandardIdentifier.h"static int check_permitted_alphabet_4(const void *sptr) { /* The underlying type is IA5String */ const IA5String_t *st = (const IA5String_t *)sptr; const uint8_t *ch = st->buf; const uint8_t *end = ch + st->size; for(; ch < end; ch++) { uint8_t cv = *ch; if(!(cv <= 127)) return -1; } return 0;}static intmemb_experimental_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr, asn_app_consume_bytes_f *app_errlog, void *app_key) { const IA5String_t *st = (const IA5String_t *)sptr; size_t size; if(!sptr) { _ASN_ERRLOG(app_errlog, app_key, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size == 8) && !check_permitted_alphabet_4(st)) { /* Constraint check succeeded */ return 0; } else { _ASN_ERRLOG(app_errlog, app_key, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; }}static asn_TYPE_member_t asn_MBR_NonStandardIdentifier_1[] = { { ATF_NOFLAGS, 0, offsetof(struct NonStandardIdentifier, choice.object), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ (void *)&asn_DEF_OBJECT_IDENTIFIER, 0, /* Defer constraints checking to the member type */ "object" }, { ATF_NOFLAGS, 0, offsetof(struct NonStandardIdentifier, choice.h221NonStandard), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ (void *)&asn_DEF_H221NonStandard, 0, /* Defer constraints checking to the member type */ "h221NonStandard" }, { ATF_NOFLAGS, 0, offsetof(struct NonStandardIdentifier, choice.experimental), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ (void *)&asn_DEF_IA5String, memb_experimental_1_constraint, "experimental" },};static asn_TYPE_tag2member_t asn_MAP_NonStandardIdentifier_1_tag2el[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* object at 938 */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* h221NonStandard at 939 */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* experimental at 940 */};static asn_CHOICE_specifics_t asn_SPC_NonStandardIdentifier_1_specs = { sizeof(struct NonStandardIdentifier), offsetof(struct NonStandardIdentifier, _asn_ctx), offsetof(struct NonStandardIdentifier, present), sizeof(((struct NonStandardIdentifier *)0)->present), asn_MAP_NonStandardIdentifier_1_tag2el, 3, /* Count of tags in the map */ 1 /* Whether extensible */};asn_TYPE_descriptor_t asn_DEF_NonStandardIdentifier = { "NonStandardIdentifier", "NonStandardIdentifier", CHOICE_free, CHOICE_print, CHOICE_constraint, CHOICE_decode_ber, CHOICE_encode_der, CHOICE_decode_xer, CHOICE_encode_xer, CHOICE_outmost_tag, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ asn_MBR_NonStandardIdentifier_1, 3, /* Elements count */ &asn_SPC_NonStandardIdentifier_1_specs /* Additional specs */};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?