dcasnparser.h

来自「ASN.1解析解码工具,可以解析各种ASN.1格式的文件,并对相应的BER文件解」· C头文件 代码 · 共 72 行

H
72
字号
/****************************************************************************************
* Copyrights  2006,深圳天源迪科信息技术股份有限公司
*
* All rights reserved.
*
* Filename:	DCAsnParser.h		
* Indentifier:		
* Description:	
* Version:		V1.0
* Author:		wangbin
* Finished:	2007年6月16日
* History:
******************************************************************************************/

#ifndef _DCAsnParser_Util_H_
#define _DCAsnParser_Util_H_

extern "C"
{

#include "asn1parser/asn1parser.h"
#include "asn1fix/asn1fix.h"
#include "asn1fix/asn1fix_internal.h"
#include "asn1fix/asn1print.h"
#include "berdecoder/ber_tlv_tag.h"
#include "berdecoder/ber_tlv_length.h"
}

#include "dicasnutil/DCBerTlv.h"

#include <string>

#define DICASN_MIN(a,b) ((a)>(b)?(b):(a))

namespace dicasn1p
{
void outhexbuf(const void *buf,size_t len);

class DCAsnValue
{
public:
	DCAsnValue(asn1p_value_t* value);
	~DCAsnValue();
	void assign(asn1p_value_t* value);
	const char* getTypeName();
	const char* getValue();
protected:
private:
	asn1p_value_t *value;
	char m_retBuf[512];
};

class DCAsnExpr
{
public:
	DCAsnExpr(asn1p_expr_t* expr);
	~DCAsnExpr();
	void assign(asn1p_expr_t* expr);
	const char* getTypeName();
	const char* getDesc();
	const char* getValue();
	const char* getMetaType();
protected:
private:
	char m_retBuf[512];
	asn1p_expr_t *expr;
	DCAsnValue value;
};
} //namespace dicasn1p

#endif

⌨️ 快捷键说明

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