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

📄 70-xer-test-ok.asn1.-p

📁 RSA加密/解密算法源码 asn1c-0.9.12
💻 -P
📖 第 1 页 / 共 3 页
字号:
#include <NULL.h>#include <asn_SET_OF.h>#include <constr_SET_OF.h>/*** <<< TYPE-DECLS [SetOfNULL] >>> ***/typedef struct SetOfNULL {	A_SET_OF(NULL_t) list;		/* Context for parsing across buffer boundaries */	asn_struct_ctx_t _asn_ctx;} SetOfNULL_t;/*** <<< FUNC-DECLS [SetOfNULL] >>> ***/extern asn_TYPE_descriptor_t asn_DEF_SetOfNULL;/*** <<< STAT-DEFS [SetOfNULL] >>> ***/static asn_TYPE_member_t asn_MBR_SetOfNULL_1[] = {	{ ATF_NOFLAGS, 0, 0,		.tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),		.tag_mode = 0,		.type = (void *)&asn_DEF_NULL,		.memb_constraints = 0,	/* Defer constraints checking to the member type */		.name = ""		},};static ber_tlv_tag_t asn_DEF_SetOfNULL_1_tags[] = {	(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))};static asn_SET_OF_specifics_t asn_SPC_SetOfNULL_1_specs = {	sizeof(struct SetOfNULL),	offsetof(struct SetOfNULL, _asn_ctx),	1,	/* XER encoding is XMLValueList */};asn_TYPE_descriptor_t asn_DEF_SetOfNULL = {	"SetOfNULL",	"SetOfNULL",	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_SetOfNULL_1_tags,	sizeof(asn_DEF_SetOfNULL_1_tags)		/sizeof(asn_DEF_SetOfNULL_1_tags[0]), /* 1 */	asn_DEF_SetOfNULL_1_tags,	/* Same as above */	sizeof(asn_DEF_SetOfNULL_1_tags)		/sizeof(asn_DEF_SetOfNULL_1_tags[0]), /* 1 */	asn_MBR_SetOfNULL_1,	1,	/* Single element */	&asn_SPC_SetOfNULL_1_specs	/* Additional specs */};/*** <<< INCLUDES [SetOfEnums] >>> ***/#include <ENUMERATED.h>#include <asn_SET_OF.h>#include <constr_SET_OF.h>/*** <<< DEPS [SetOfEnums] >>> ***/typedef enum Member {	Member_one	= 0,	Member_oneMore	= 1} Member_e;/*** <<< TYPE-DECLS [SetOfEnums] >>> ***/typedef struct SetOfEnums {	A_SET_OF(ENUMERATED_t) list;		/* Context for parsing across buffer boundaries */	asn_struct_ctx_t _asn_ctx;} SetOfEnums_t;/*** <<< FUNC-DECLS [SetOfEnums] >>> ***//* extern asn_TYPE_descriptor_t asn_DEF_Member_2;	// (Use -fall-defs-global to expose) */extern asn_TYPE_descriptor_t asn_DEF_SetOfEnums;/*** <<< CODE [SetOfEnums] >>> ***/static intMember_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 voidMember_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 voidMember_2_free(asn_TYPE_descriptor_t *td,		void *struct_ptr, int contents_only) {	Member_2_inherit_TYPE_descriptor(td);	td->free_struct(td, struct_ptr, contents_only);}static intMember_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,		int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {	Member_2_inherit_TYPE_descriptor(td);	return td->print_struct(td, struct_ptr, ilevel, cb, app_key);}static asn_dec_rval_tMember_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) {	Member_2_inherit_TYPE_descriptor(td);	return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);}static asn_enc_rval_tMember_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) {	Member_2_inherit_TYPE_descriptor(td);	return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);}static asn_dec_rval_tMember_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) {	Member_2_inherit_TYPE_descriptor(td);	return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);}static asn_enc_rval_tMember_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) {	Member_2_inherit_TYPE_descriptor(td);	return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);}/*** <<< STAT-DEFS [SetOfEnums] >>> ***/static asn_INTEGER_enum_map_t asn_MAP_Member_2_value2enum[] = {	{ 0,	3,	"one" },	{ 1,	7,	"oneMore" }};static unsigned int asn_MAP_Member_2_enum2value[] = {	0,	/* one(0) */	1	/* oneMore(1) */};static asn_INTEGER_specifics_t asn_SPC_Member_2_specs = {	asn_MAP_Member_2_value2enum,	/* "tag" => N; sorted by tag */	asn_MAP_Member_2_enum2value,	/* N => "tag"; sorted by N */	2,	/* Number of elements in the maps */	0,	/* Enumeration is not extensible */	1	/* Strict enumeration */};static ber_tlv_tag_t asn_DEF_Member_2_tags[] = {	(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))};static /* Use -fall-defs-global to expose */asn_TYPE_descriptor_t asn_DEF_Member_2 = {	"",	"",	Member_2_free,	Member_2_print,	Member_2_constraint,	Member_2_decode_ber,	Member_2_encode_der,	Member_2_decode_xer,	Member_2_encode_xer,	0,	/* Use generic outmost tag fetcher */	asn_DEF_Member_2_tags,	sizeof(asn_DEF_Member_2_tags)		/sizeof(asn_DEF_Member_2_tags[0]), /* 1 */	asn_DEF_Member_2_tags,	/* Same as above */	sizeof(asn_DEF_Member_2_tags)		/sizeof(asn_DEF_Member_2_tags[0]), /* 1 */	0, 0,	/* Defined elsewhere */	&asn_SPC_Member_2_specs	/* Additional specs */};static asn_TYPE_member_t asn_MBR_SetOfEnums_1[] = {	{ ATF_NOFLAGS, 0, 0,		.tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),		.tag_mode = 0,		.type = (void *)&asn_DEF_Member_2,		.memb_constraints = 0,	/* Defer constraints checking to the member type */		.name = ""		},};static ber_tlv_tag_t asn_DEF_SetOfEnums_1_tags[] = {	(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))};static asn_SET_OF_specifics_t asn_SPC_SetOfEnums_1_specs = {	sizeof(struct SetOfEnums),	offsetof(struct SetOfEnums, _asn_ctx),	1,	/* XER encoding is XMLValueList */};asn_TYPE_descriptor_t asn_DEF_SetOfEnums = {	"SetOfEnums",	"SetOfEnums",	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_SetOfEnums_1_tags,	sizeof(asn_DEF_SetOfEnums_1_tags)		/sizeof(asn_DEF_SetOfEnums_1_tags[0]), /* 1 */	asn_DEF_SetOfEnums_1_tags,	/* Same as above */	sizeof(asn_DEF_SetOfEnums_1_tags)		/sizeof(asn_DEF_SetOfEnums_1_tags[0]), /* 1 */	asn_MBR_SetOfEnums_1,	1,	/* Single element */	&asn_SPC_SetOfEnums_1_specs	/* Additional specs */};/*** <<< INCLUDES [SequenceOf] >>> ***/#include <INTEGER.h>#include <asn_SEQUENCE_OF.h>#include <constr_SEQUENCE_OF.h>/*** <<< TYPE-DECLS [SequenceOf] >>> ***/typedef struct SequenceOf {	A_SEQUENCE_OF(INTEGER_t) list;		/* Context for parsing across buffer boundaries */	asn_struct_ctx_t _asn_ctx;} SequenceOf_t;/*** <<< FUNC-DECLS [SequenceOf] >>> ***/extern asn_TYPE_descriptor_t asn_DEF_SequenceOf;/*** <<< STAT-DEFS [SequenceOf] >>> ***/static asn_TYPE_member_t asn_MBR_SequenceOf_1[] = {	{ ATF_NOFLAGS, 0, 0,		.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),		.tag_mode = 0,		.type = (void *)&asn_DEF_INTEGER,		.memb_constraints = 0,	/* Defer constraints checking to the member type */		.name = "id"		},};static ber_tlv_tag_t asn_DEF_SequenceOf_1_tags[] = {	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))};static asn_SET_OF_specifics_t asn_SPC_SequenceOf_1_specs = {	sizeof(struct SequenceOf),	offsetof(struct SequenceOf, _asn_ctx),	0,	/* XER encoding is XMLDelimitedItemList */};asn_TYPE_descriptor_t asn_DEF_SequenceOf = {	"SequenceOf",	"SequenceOf",	SEQUENCE_OF_free,	SEQUENCE_OF_print,	SEQUENCE_OF_constraint,	SEQUENCE_OF_decode_ber,	SEQUENCE_OF_encode_der,	SEQUENCE_OF_decode_xer,	SEQUENCE_OF_encode_xer,	0,	/* Use generic outmost tag fetcher */	asn_DEF_SequenceOf_1_tags,	sizeof(asn_DEF_SequenceOf_1_tags)		/sizeof(asn_DEF_SequenceOf_1_tags[0]), /* 1 */	asn_DEF_SequenceOf_1_tags,	/* Same as above */	sizeof(asn_DEF_SequenceOf_1_tags)		/sizeof(asn_DEF_SequenceOf_1_tags[0]), /* 1 */	asn_MBR_SequenceOf_1,	1,	/* Single element */	&asn_SPC_SequenceOf_1_specs	/* Additional specs */};/*** <<< INCLUDES [SeqOfZuka] >>> ***/#include <NULL.h>#include <asn_SEQUENCE_OF.h>#include <constr_SEQUENCE_OF.h>/*** <<< TYPE-DECLS [SeqOfZuka] >>> ***/typedef struct SeqOfZuka {	A_SEQUENCE_OF(NULL_t) list;		/* Context for parsing across buffer boundaries */	asn_struct_ctx_t _asn_ctx;} SeqOfZuka_t;/*** <<< FUNC-DECLS [SeqOfZuka] >>> ***/extern asn_TYPE_descriptor_t asn_DEF_SeqOfZuka;/*** <<< STAT-DEFS [SeqOfZuka] >>> ***/static asn_TYPE_member_t asn_MBR_SeqOfZuka_1[] = {	{ ATF_NOFLAGS, 0, 0,		.tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),		.tag_mode = 0,		.type = (void *)&asn_DEF_NULL,		.memb_constraints = 0,	/* Defer constraints checking to the member type */		.name = "zuka"		},};static ber_tlv_tag_t asn_DEF_SeqOfZuka_1_tags[] = {	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))};static asn_SET_OF_specifics_t asn_SPC_SeqOfZuka_1_specs = {	sizeof(struct SeqOfZuka),	offsetof(struct SeqOfZuka, _asn_ctx),	1,	/* XER encoding is XMLValueList */};asn_TYPE_descriptor_t asn_DEF_SeqOfZuka = {	"SeqOfZuka",	"SeqOfZuka",	SEQUENCE_OF_free,	SEQUENCE_OF_print,	SEQUENCE_OF_constraint,	SEQUENCE_OF_decode_ber,	SEQUENCE_OF_encode_der,	SEQUENCE_OF_decode_xer,	SEQUENCE_OF_encode_xer,	0,	/* Use generic outmost tag fetcher */	asn_DEF_SeqOfZuka_1_tags,	sizeof(asn_DEF_SeqOfZuka_1_tags)		/sizeof(asn_DEF_SeqOfZuka_1_tags[0]), /* 1 */	asn_DEF_SeqOfZuka_1_tags,	/* Same as above */	sizeof(asn_DEF_SeqOfZuka_1_tags)		/sizeof(asn_DEF_SeqOfZuka_1_tags[0]), /* 1 */	asn_MBR_SeqOfZuka_1,	1,	/* Single element */	&asn_SPC_SeqOfZuka_1_specs	/* Additional specs */};

⌨️ 快捷键说明

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