⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 42-real-life-ok.asn1.-pr

📁 RSA加密/解密算法源码 asn1c-0.9.12
💻 -PR
📖 第 1 页 / 共 2 页
字号:
	SET_OF_encode_xer,	0,	/* Use generic outmost tag fetcher */	asn_DEF_vset_2_tags,	sizeof(asn_DEF_vset_2_tags)		/sizeof(asn_DEF_vset_2_tags[0]), /* 1 */	asn_DEF_vset_2_tags,	/* Same as above */	sizeof(asn_DEF_vset_2_tags)		/sizeof(asn_DEF_vset_2_tags[0]), /* 1 */	asn_MBR_vset_2,	1,	/* Single element */	&asn_SPC_vset_2_specs	/* Additional specs */};static asn_TYPE_member_t asn_MBR_vrange_4[] = {	{ ATF_NOFLAGS, 0, offsetof(struct vrange, from),		.tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),		.tag_mode = 0,		.type = (void *)&asn_DEF_VisibleString,		.memb_constraints = 0,	/* Defer constraints checking to the member type */		.name = "from"		},	{ ATF_NOFLAGS, 0, offsetof(struct vrange, to),		.tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),		.tag_mode = 0,		.type = (void *)&asn_DEF_VisibleString,		.memb_constraints = 0,	/* Defer constraints checking to the member type */		.name = "to"		},};static ber_tlv_tag_t asn_DEF_vrange_4_tags[] = {	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))};static asn_TYPE_tag2member_t asn_MAP_vrange_4_tag2el[] = {    { (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 0, 0, 1 }, /* from at 45 */    { (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 1, -1, 0 } /* to at 46 */};static asn_SEQUENCE_specifics_t asn_SPC_vrange_4_specs = {	sizeof(struct vrange),	offsetof(struct vrange, _asn_ctx),	asn_MAP_vrange_4_tag2el,	2,	/* Count of tags in the map */	1,	/* Start extensions */	3	/* Stop extensions */};static /* Use -fall-defs-global to expose */asn_TYPE_descriptor_t asn_DEF_vrange_4 = {	"vrange",	"vrange",	SEQUENCE_free,	SEQUENCE_print,	SEQUENCE_constraint,	SEQUENCE_decode_ber,	SEQUENCE_encode_der,	SEQUENCE_decode_xer,	SEQUENCE_encode_xer,	0,	/* Use generic outmost tag fetcher */	asn_DEF_vrange_4_tags,	sizeof(asn_DEF_vrange_4_tags)		/sizeof(asn_DEF_vrange_4_tags[0]), /* 1 */	asn_DEF_vrange_4_tags,	/* Same as above */	sizeof(asn_DEF_vrange_4_tags)		/sizeof(asn_DEF_vrange_4_tags[0]), /* 1 */	asn_MBR_vrange_4,	2,	/* Elements count */	&asn_SPC_vrange_4_specs	/* Additional specs */};static asn_TYPE_member_t asn_MBR_VariablePart_1[] = {	{ ATF_NOFLAGS, 0, offsetof(struct VariablePart, choice.vset),		.tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),		.tag_mode = 0,		.type = (void *)&asn_DEF_vset_2,		.memb_constraints = memb_vset_1_constraint,		.name = "vset"		},	{ ATF_NOFLAGS, 0, offsetof(struct VariablePart, choice.vrange),		.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),		.tag_mode = 0,		.type = (void *)&asn_DEF_vrange_4,		.memb_constraints = 0,	/* Defer constraints checking to the member type */		.name = "vrange"		},};static asn_TYPE_tag2member_t asn_MAP_VariablePart_1_tag2el[] = {    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* vrange at 45 */    { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* vset at 42 */};static asn_CHOICE_specifics_t asn_SPC_VariablePart_1_specs = {	sizeof(struct VariablePart),	offsetof(struct VariablePart, _asn_ctx),	offsetof(struct VariablePart, present),	sizeof(((struct VariablePart *)0)->present),	asn_MAP_VariablePart_1_tag2el,	2,	/* Count of tags in the map */	1	/* Whether extensible */};asn_TYPE_descriptor_t asn_DEF_VariablePart = {	"VariablePart",	"VariablePart",	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_VariablePart_1,	2,	/* Elements count */	&asn_SPC_VariablePart_1_specs	/* Additional specs */};/*** <<< INCLUDES [ActionItem] >>> ***/#include <ENUMERATED.h>#include <BOOLEAN.h>#include <VisibleString.h>#include <asn_SET_OF.h>#include <constr_SET_OF.h>#include <constr_SEQUENCE.h>/*** <<< DEPS [ActionItem] >>> ***/typedef enum accept_as {	accept_as_unknown	= 0,	accept_as_safe	= 1,	accept_as_unsafe	= 2	/*	 * Enumeration is extensible	 */} accept_as_e;/*** <<< TYPE-DECLS [ActionItem] >>> ***/typedef struct ActionItem {	ENUMERATED_t	 accept_as;	struct notify {		BOOLEAN_t	 critical;		struct email {			A_SET_OF(VisibleString_t) list;						/* Context for parsing across buffer boundaries */			asn_struct_ctx_t _asn_ctx;		} email;		/*		 * This type is extensible,		 * possible extensions are below.		 */				/* Context for parsing across buffer boundaries */		asn_struct_ctx_t _asn_ctx;	} *notify;	/*	 * This type is extensible,	 * possible extensions are below.	 */		/* Context for parsing across buffer boundaries */	asn_struct_ctx_t _asn_ctx;} ActionItem_t;/*** <<< FUNC-DECLS [ActionItem] >>> ***//* extern asn_TYPE_descriptor_t asn_DEF_accept_as_2;	// (Use -fall-defs-global to expose) */extern asn_TYPE_descriptor_t asn_DEF_ActionItem;/*** <<< CODE [ActionItem] >>> ***/static intaccept_as_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,			asn_app_consume_bytes_f *app_errlog, void *app_key) {	/* Replace with underlying type checker */	td->check_constraints = asn_DEF_ENUMERATED.check_constraints;	return td->check_constraints(td, sptr, app_errlog, app_key);}/* * This type is implemented using ENUMERATED, * so here we adjust the DEF accordingly. */static voidaccept_as_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {	td->free_struct    = asn_DEF_ENUMERATED.free_struct;	td->print_struct   = asn_DEF_ENUMERATED.print_struct;	td->ber_decoder    = asn_DEF_ENUMERATED.ber_decoder;	td->der_encoder    = asn_DEF_ENUMERATED.der_encoder;	td->xer_decoder    = asn_DEF_ENUMERATED.xer_decoder;	td->xer_encoder    = asn_DEF_ENUMERATED.xer_encoder;	td->elements       = asn_DEF_ENUMERATED.elements;	td->elements_count = asn_DEF_ENUMERATED.elements_count;    /* td->specifics      = asn_DEF_ENUMERATED.specifics;	// Defined explicitly */}static voidaccept_as_2_free(asn_TYPE_descriptor_t *td,		void *struct_ptr, int contents_only) {	accept_as_2_inherit_TYPE_descriptor(td);	td->free_struct(td, struct_ptr, contents_only);}static intaccept_as_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,		int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {	accept_as_2_inherit_TYPE_descriptor(td);	return td->print_struct(td, struct_ptr, ilevel, cb, app_key);}static asn_dec_rval_taccept_as_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,		void **structure, void *bufptr, size_t size, int tag_mode) {	accept_as_2_inherit_TYPE_descriptor(td);	return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);}static asn_enc_rval_taccept_as_2_encode_der(asn_TYPE_descriptor_t *td,		void *structure, int tag_mode, ber_tlv_tag_t tag,		asn_app_consume_bytes_f *cb, void *app_key) {	accept_as_2_inherit_TYPE_descriptor(td);	return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);}static asn_dec_rval_taccept_as_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,		void **structure, const char *opt_mname, void *bufptr, size_t size) {	accept_as_2_inherit_TYPE_descriptor(td);	return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);}static asn_enc_rval_taccept_as_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,		int ilevel, enum xer_encoder_flags_e flags,		asn_app_consume_bytes_f *cb, void *app_key) {	accept_as_2_inherit_TYPE_descriptor(td);	return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);}/*** <<< STAT-DEFS [ActionItem] >>> ***/static asn_INTEGER_enum_map_t asn_MAP_accept_as_2_value2enum[] = {	{ 0,	7,	"unknown" },	{ 1,	4,	"safe" },	{ 2,	6,	"unsafe" }	/* This list is extensible */};static unsigned int asn_MAP_accept_as_2_enum2value[] = {	1,	/* safe(1) */	0,	/* unknown(0) */	2	/* unsafe(2) */	/* This list is extensible */};static asn_INTEGER_specifics_t asn_SPC_accept_as_2_specs = {	asn_MAP_accept_as_2_value2enum,	/* "tag" => N; sorted by tag */	asn_MAP_accept_as_2_enum2value,	/* N => "tag"; sorted by N */	3,	/* Number of elements in the maps */	1,	/* Enumeration is extensible */	1	/* Strict enumeration */};static ber_tlv_tag_t asn_DEF_accept_as_2_tags[] = {	(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))};static /* Use -fall-defs-global to expose */asn_TYPE_descriptor_t asn_DEF_accept_as_2 = {	"accept-as",	"accept-as",	accept_as_2_free,	accept_as_2_print,	accept_as_2_constraint,	accept_as_2_decode_ber,	accept_as_2_encode_der,	accept_as_2_decode_xer,	accept_as_2_encode_xer,	0,	/* Use generic outmost tag fetcher */	asn_DEF_accept_as_2_tags,	sizeof(asn_DEF_accept_as_2_tags)		/sizeof(asn_DEF_accept_as_2_tags[0]), /* 1 */	asn_DEF_accept_as_2_tags,	/* Same as above */	sizeof(asn_DEF_accept_as_2_tags)		/sizeof(asn_DEF_accept_as_2_tags[0]), /* 1 */	0, 0,	/* Defined elsewhere */	&asn_SPC_accept_as_2_specs	/* Additional specs */};static asn_TYPE_member_t asn_MBR_email_9[] = {	{ ATF_NOFLAGS, 0, 0,		.tag = (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),		.tag_mode = 0,		.type = (void *)&asn_DEF_VisibleString,		.memb_constraints = 0,	/* Defer constraints checking to the member type */		.name = ""		},};static ber_tlv_tag_t asn_DEF_email_9_tags[] = {	(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))};static asn_SET_OF_specifics_t asn_SPC_email_9_specs = {	sizeof(struct email),	offsetof(struct email, _asn_ctx),	0,	/* XER encoding is XMLDelimitedItemList */};static /* Use -fall-defs-global to expose */asn_TYPE_descriptor_t asn_DEF_email_9 = {	"email",	"email",	SET_OF_free,	SET_OF_print,	SET_OF_constraint,	SET_OF_decode_ber,	SET_OF_encode_der,	SET_OF_decode_xer,	SET_OF_encode_xer,	0,	/* Use generic outmost tag fetcher */	asn_DEF_email_9_tags,	sizeof(asn_DEF_email_9_tags)		/sizeof(asn_DEF_email_9_tags[0]), /* 1 */	asn_DEF_email_9_tags,	/* Same as above */	sizeof(asn_DEF_email_9_tags)		/sizeof(asn_DEF_email_9_tags[0]), /* 1 */	asn_MBR_email_9,	1,	/* Single element */	&asn_SPC_email_9_specs	/* Additional specs */};static asn_TYPE_member_t asn_MBR_notify_7[] = {	{ ATF_NOFLAGS, 0, offsetof(struct notify, critical),		.tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),		.tag_mode = 0,		.type = (void *)&asn_DEF_BOOLEAN,		.memb_constraints = 0,	/* Defer constraints checking to the member type */		.name = "critical"		},	{ ATF_NOFLAGS, 0, offsetof(struct notify, email),		.tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),		.tag_mode = 0,		.type = (void *)&asn_DEF_email_9,		.memb_constraints = 0,	/* Defer constraints checking to the member type */		.name = "email"		},};static ber_tlv_tag_t asn_DEF_notify_7_tags[] = {	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))};static asn_TYPE_tag2member_t asn_MAP_notify_7_tag2el[] = {    { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* critical at 61 */    { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 } /* email at 62 */};static asn_SEQUENCE_specifics_t asn_SPC_notify_7_specs = {	sizeof(struct notify),	offsetof(struct notify, _asn_ctx),	asn_MAP_notify_7_tag2el,	2,	/* Count of tags in the map */	1,	/* Start extensions */	3	/* Stop extensions */};static /* Use -fall-defs-global to expose */asn_TYPE_descriptor_t asn_DEF_notify_7 = {	"notify",	"notify",	SEQUENCE_free,	SEQUENCE_print,	SEQUENCE_constraint,	SEQUENCE_decode_ber,	SEQUENCE_encode_der,	SEQUENCE_decode_xer,	SEQUENCE_encode_xer,	0,	/* Use generic outmost tag fetcher */	asn_DEF_notify_7_tags,	sizeof(asn_DEF_notify_7_tags)		/sizeof(asn_DEF_notify_7_tags[0]), /* 1 */	asn_DEF_notify_7_tags,	/* Same as above */	sizeof(asn_DEF_notify_7_tags)		/sizeof(asn_DEF_notify_7_tags[0]), /* 1 */	asn_MBR_notify_7,	2,	/* Elements count */	&asn_SPC_notify_7_specs	/* Additional specs */};static asn_TYPE_member_t asn_MBR_ActionItem_1[] = {	{ ATF_NOFLAGS, 0, offsetof(struct ActionItem, accept_as),		.tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),		.tag_mode = 0,		.type = (void *)&asn_DEF_accept_as_2,		.memb_constraints = 0,	/* Defer constraints checking to the member type */		.name = "accept-as"		},	{ ATF_POINTER, 1, offsetof(struct ActionItem, notify),		.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),		.tag_mode = 0,		.type = (void *)&asn_DEF_notify_7,		.memb_constraints = 0,	/* Defer constraints checking to the member type */		.name = "notify"		},};static ber_tlv_tag_t asn_DEF_ActionItem_1_tags[] = {	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))};static asn_TYPE_tag2member_t asn_MAP_ActionItem_1_tag2el[] = {    { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 }, /* accept-as at 55 */    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* notify at 61 */};static asn_SEQUENCE_specifics_t asn_SPC_ActionItem_1_specs = {	sizeof(struct ActionItem),	offsetof(struct ActionItem, _asn_ctx),	asn_MAP_ActionItem_1_tag2el,	2,	/* Count of tags in the map */	1,	/* Start extensions */	3	/* Stop extensions */};asn_TYPE_descriptor_t asn_DEF_ActionItem = {	"ActionItem",	"ActionItem",	SEQUENCE_free,	SEQUENCE_print,	SEQUENCE_constraint,	SEQUENCE_decode_ber,	SEQUENCE_encode_der,	SEQUENCE_decode_xer,	SEQUENCE_encode_xer,	0,	/* Use generic outmost tag fetcher */	asn_DEF_ActionItem_1_tags,	sizeof(asn_DEF_ActionItem_1_tags)		/sizeof(asn_DEF_ActionItem_1_tags[0]), /* 1 */	asn_DEF_ActionItem_1_tags,	/* Same as above */	sizeof(asn_DEF_ActionItem_1_tags)		/sizeof(asn_DEF_ActionItem_1_tags[0]), /* 1 */	asn_MBR_ActionItem_1,	2,	/* Elements count */	&asn_SPC_ActionItem_1_specs	/* Additional specs */};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -