ber_decoder.h

来自「RSA加密/解密算法源码 asn1c-0.9.12」· C头文件 代码 · 共 56 行

H
56
字号
/*- * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */#ifndef	_BER_DECODER_H_#define	_BER_DECODER_H_#include <asn_application.h>struct asn_TYPE_descriptor_s;	/* Forward declaration */struct asn_codec_ctx_s;		/* Forward declaration *//* * The BER decoder of any type. * This function may be invoked directly from the application. */asn_dec_rval_t ber_decode(struct asn_codec_ctx_s *opt_codec_ctx,	struct asn_TYPE_descriptor_s *type_descriptor,	void **struct_ptr,	/* Pointer to a target structure's pointer */	void *buffer,		/* Data to be decoded */	size_t size		/* Size of that buffer */	);/* * Type of generic function which decodes the byte stream into the structure. */typedef asn_dec_rval_t (ber_type_decoder_f)(		struct asn_codec_ctx_s *opt_codec_ctx,		struct asn_TYPE_descriptor_s *type_descriptor,		void **struct_ptr, void *buf_ptr, size_t size,		int tag_mode);/******************************* * INTERNALLY USEFUL FUNCTIONS * *******************************//* * Check that all tags correspond to the type definition (as given in head). * On return, last_length would contain either a non-negative length of the * value part of the last TLV, or the negative number of expected * "end of content" sequences. The number may only be negative if the * head->last_tag_form is non-zero. */asn_dec_rval_t ber_check_tags(		struct asn_codec_ctx_s *opt_codec_ctx,	/* optional context */		struct asn_TYPE_descriptor_s *type_dsc,		asn_struct_ctx_t *opt_ctx,	/* saved decoding context */		void *ptr, size_t size,		int tag_mode,		/* {-1,0,1}: IMPLICIT, no, EXPLICIT */		int last_tag_form,	/* {-1,0:1}: any, primitive, constr */		ber_tlv_len_t *last_length,		int *opt_tlv_form	/* optional tag form */	);#endif	/* _BER_DECODER_H_ */

⌨️ 快捷键说明

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