亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? q931pdu.cpp

?? asn格式文件的編譯器
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/* * Q931pdu.cpp *  * Copyright (c) 2001 Institute for Information Industry, Taiwan, Republic of China  * (http://www.iii.org.tw/iiia/ewelcome.htm) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 1, or (at your option) * any later version. * * 2001/07/27 Huang-Ming Huang * Fixed Progress indicator and Call state information element identifier coding. * * 2001/07/16 Huang-Ming Huang * Fixed the bug when parsing CallingPartyNumber and add ConnectedPartyNumberInformationElement * Thanks to Danail Kirov for providing this patch. * */#include "h323_messages.h"#include "q931pdu.h"#include "perattacher.h"class InformationElement{public:	static InformationElement* Build(Q931Decoder& strm);	InformationElement(const unsigned char* pFrame, int nSize = 1) : data(pFrame), len(nSize){};	int getLength() const { return len; }	virtual void attachProperties(HFRAME hFrame, HPROPERTY hProperty) const ; 	virtual const char* getName() const { return ""; }protected:	const unsigned char* data;	int len;};class VariableLengthInformationElement : public InformationElement{public:	VariableLengthInformationElement(const unsigned char* pFrame) : InformationElement(pFrame, pFrame[1] +2 ){}	virtual void attachProperties(HFRAME hFrame, HPROPERTY hProperty) const; 	virtual void attachContent(HFRAME hFrame, HPROPERTY hProperty) const ;	virtual const char* getName() const;};class UserUserInformationElement : public InformationElement{public:	UserUserInformationElement(const unsigned char* pFrame,                                ASN1::CoderEnv* coderEnv)     : InformationElement(pFrame, (pFrame[1] << 8) | pFrame[2] + 3 )     , env(coderEnv){}	virtual void attachProperties(HFRAME hFrame, HPROPERTY hProperty) const; 	virtual const char* getName() const { return "User-User"; }	bool decodeIE() const;private:    ASN1::CoderEnv* env;};class IA5StringInformationElement : public VariableLengthInformationElement{public:	IA5StringInformationElement(const unsigned char* pFrame) : VariableLengthInformationElement(pFrame){}	virtual void attachContent(HFRAME hFrame, HPROPERTY hProperty) const ;};class DisplayInformationElement : public IA5StringInformationElement{public:	DisplayInformationElement(const unsigned char* pFrame) : IA5StringInformationElement(pFrame){}	virtual const char* getName() const { return "Display";}};class KeypadFacilityInformationElement : public IA5StringInformationElement{public:	KeypadFacilityInformationElement(const unsigned char* pFrame) : IA5StringInformationElement(pFrame){}	virtual const char* getName() const { return "Keypad Facility";}};class CauseInformationElement : public VariableLengthInformationElement{public:	CauseInformationElement(const unsigned char* pFrame) : VariableLengthInformationElement(pFrame){}	virtual void attachContent(HFRAME hFrame, HPROPERTY hProperty) const ;	virtual const char* getName() const { return "Cause";}};class CalledPartyNumberInformationElement : public VariableLengthInformationElement{public:	CalledPartyNumberInformationElement(const unsigned char* pFrame) : VariableLengthInformationElement(pFrame){}	virtual void attachContent(HFRAME hFrame, HPROPERTY hProperty) const ;	virtual const char* getName() const { return "Called Party Number";}};class CallingPartyNumberInformationElement : public VariableLengthInformationElement{public:	CallingPartyNumberInformationElement(const unsigned char* pFrame) : VariableLengthInformationElement(pFrame){}	virtual void attachContent(HFRAME hFrame, HPROPERTY hProperty) const ;	virtual const char* getName() const { return "Calling Party Number";}};class ConnectedPartyNumberInformationElement : public VariableLengthInformationElement{public:	ConnectedPartyNumberInformationElement(const unsigned char* pFrame) : VariableLengthInformationElement(pFrame){}	virtual void attachContent(HFRAME hFrame, HPROPERTY hProperty) const ;	virtual const char* getName() const { return "Connected Party Number";}};class ProgressInformationElement : public VariableLengthInformationElement{public:	ProgressInformationElement(const unsigned char* pFrame) : VariableLengthInformationElement(pFrame){}	virtual void attachContent(HFRAME hFrame, HPROPERTY hProperty) const ;	virtual const char* getName() const { return "Progress";}};class BearerCapabilityInformationElement : public VariableLengthInformationElement{public:	BearerCapabilityInformationElement(const unsigned char* pFrame) : VariableLengthInformationElement(pFrame){}	virtual void attachContent(HFRAME hFrame, HPROPERTY hProperty) const ;	virtual const char* getName() const { return "Bearer Capability";}};class CallStateInformationElement : public VariableLengthInformationElement{public:	CallStateInformationElement(const unsigned char* pFrame) : VariableLengthInformationElement(pFrame){}	virtual void attachContent(HFRAME hFrame, HPROPERTY hProperty) const ;	virtual const char* getName() const { return "Call State";}};class SignalInformationElement : public VariableLengthInformationElement{public:	SignalInformationElement(const unsigned char* pFrame) : VariableLengthInformationElement(pFrame){}	virtual void attachContent(HFRAME hFrame, HPROPERTY hProperty) const ;	virtual const char* getName() const { return "Signal";}};struct TableEntry{	int code;	const char* str;};const char* FindStringFromTable(int code, const TableEntry* table, int tableSize){ // linear search 	for (int i = 0; i < tableSize; ++i)		if (table[i].code == code)			return table[i].str;	return "";}#define FindString(code) FindStringFromTable(code, code##Table, sizeof(code##Table)) void FormatBits(char* buf, int highBit, int lowBit, int value){	for (int i = 7; i >= 0; --i)	{		if (i > highBit || i < lowBit)			buf[7-i] = '.';		else if ((value >> i) & 0x01 )			buf[7-i] = '1';		else 			buf[7-i] = '0';	}} InformationElement* InformationElement::Build(Q931Decoder& decoder){	InformationElement* result = NULL;	if (decoder.offset < decoder.size)	{		int discriminator = decoder.data[decoder.offset];		if ((discriminator & 0x80) == 1)			result = new InformationElement(&decoder.data[decoder.offset]);		else 		{			switch (discriminator)			{		    case 0x04:			    result = new BearerCapabilityInformationElement(&decoder.data[decoder.offset]);				break;			case 0x08:				result = new CauseInformationElement(&decoder.data[decoder.offset]);				break;		    case 0x1E:			    result = new ProgressInformationElement(&decoder.data[decoder.offset]);				break;			case 0x14:				result = new CallStateInformationElement(&decoder.data[decoder.offset]);				break;			case 0x28:				result = new DisplayInformationElement(&decoder.data[decoder.offset]);				break;		    case 0x2C:				result = new KeypadFacilityInformationElement(&decoder.data[decoder.offset]);				break;		    case 0x34:			    result = new SignalInformationElement(&decoder.data[decoder.offset]);				break;		    case 0x4C:				result = new ConnectedPartyNumberInformationElement(&decoder.data[decoder.offset]);				break;		    case 0x6c:				result = new CallingPartyNumberInformationElement(&decoder.data[decoder.offset]);				break;		    case 0x70:				result = new CalledPartyNumberInformationElement(&decoder.data[decoder.offset]);				break;			case 0x7E:				result = new UserUserInformationElement(&decoder.data[decoder.offset], decoder.env);				break;			default:				result = new VariableLengthInformationElement(&decoder.data[decoder.offset]);			}		}		decoder.offset += result->getLength();	}	return result;}void InformationElement::attachProperties(HFRAME hFrame, HPROPERTY hProperty) const{	char buf[80];	wsprintf(buf, "%s Information Element", getName());	AttachPropertyInstanceEx(hFrame, hProperty, len, (void*)data,		strlen(buf)+1, buf, 0, 1, 0);	wsprintf(buf, "Information Element Identifier = 0x%02x (%s)", data[0], getName());	AttachPropertyInstanceEx(hFrame, hProperty, 1, (void*) data,		strlen(buf) + 1, buf , 0, 2, 0);}const char* VariableLengthInformationElement::getName() const{	switch (data[0])	{    case 0x1c:		return "Facility";	}	return "";}void VariableLengthInformationElement::attachProperties(HFRAME hFrame, HPROPERTY hProperty) const{	InformationElement::attachProperties(hFrame, hProperty);	char buf[80];	wsprintf(buf, "Information Element Content Length = %d", data[1]);	AttachPropertyInstanceEx(hFrame, hProperty, 1,(void*) (data+1),		strlen(buf) + 1, buf , 0, 2, 0);	if (data[1] >0)		attachContent(hFrame, hProperty);}void VariableLengthInformationElement::attachContent(HFRAME hFrame, HPROPERTY hProperty) const{	AttachPropertyInstanceEx(hFrame, hProperty, (DWORD) data[1] , (void*) (data+2),		28, "Information Element Content" , 0, 2, 0 );}void UserUserInformationElement::attachProperties(HFRAME hFrame, HPROPERTY hProperty) const{	InformationElement::attachProperties(hFrame, hProperty);	char buf[80];	wsprintf(buf, "Information Element Content Length = %d", len-3 );	AttachPropertyInstanceEx(hFrame, hProperty, 2, (void*) (data+1),		strlen(buf) + 1, buf , 0, 2, 0);    H323_MESSAGES::H323_UserInformation userInformation;    ASN1::PERDecoder decoder((char*)data+4, (char*)data+len, env);    PERAttacher attacher(decoder, hFrame, hProperty, "H323_UserInformation ",2);	userInformation.accept(attacher);}bool UserUserInformationElement::decodeIE() const{    H323_MESSAGES::H323_UserInformation userInformation;	ASN1::PERDecoder decoder((char*)data+4, (char*)data+len);	return userInformation.accept(decoder);}void IA5StringInformationElement::attachContent(HFRAME hFrame, HPROPERTY hProperty) const{	char buf[80];	int len;	wsprintf(buf, "Information Element Content = \"");	len = strlen(buf);	memcpy(buf+len, data+2, data[1]);	len += data[1];	buf[len++] = '"';	buf[len++] = 0;	AttachPropertyInstanceEx(hFrame, hProperty, (DWORD) data[1] , (void*) (data+2),		len, buf , 0, 2, 0 );}enum EXT_STATUS{	BOTH,	FORCE_0,	FORCE_1};char* extensionStringTable[][2] = {	{" - Octet continues through the next octet", " - Last octet"},	{"", " - Coding Error : This bit has to be 0" },	{" - Coding Error : This bit has to be 1", "" }};void AttachExtensionIndicator(HFRAME hFrame, HPROPERTY hProperty, const unsigned char* Byte, enum EXT_STATUS status ){	char buf[80];	// extension indicator	bool ext = (Byte[0] & 0x80) > 1;	wsprintf(buf, "%d....... = Extention Indicator %s", ext , extensionStringTable[status][ext]);	AttachPropertyInstanceEx(hFrame, hProperty, 1 , (void*)Byte,		strlen(buf)+1 , buf , 0, 2, 0 );}void AttachCodingStandard(HFRAME hFrame, HPROPERTY hProperty, const unsigned char* Byte , int startBit = 6){	static const char* codeStandardString[] = 	{		"CCITT standardized coding",		"ISO/IEC standard",		"National standard",		"Standard specific to identified location"	};	char buf[100];	int codingStandard = (Byte[0] & 0x60) ;	FormatBits(buf, startBit, startBit-1,codingStandard); 	wsprintf(buf+8, " = Coding Standard - %s", codeStandardString[codingStandard >> (startBit-1)]);	AttachPropertyInstanceEx(hFrame, hProperty, 1 , (void*) Byte,		strlen(buf)+1 , buf , 0, 2, 0 );}void AttachLocation(HFRAME hFrame, HPROPERTY hProperty, const unsigned char* Byte){	const char* locationString[] =	{		"User ",		"Private network serving the local user",		"Public network serving the local user",		"Transit network",		"Public network serving the remote user",		"Private network serving the remote user",		"International network",		"Reserved",		"Reserved",		"Network beyond interworking point"		"Reserved",		"Reserved",		"Reserved",		"Reserved",		"Reserved",		"Reserved",	};	int location = (Byte[0] & 0x0f);	char buf[100];	FormatBits(buf, 3, 0, location);	wsprintf(buf+8 , " = Location - %s", locationString[location]);	AttachPropertyInstanceEx(hFrame, hProperty, 1 , (void*) Byte,		strlen(buf)+1 , buf , 0, 2, 0 );}TableEntry recommendationTable[] = {	{0, "Q.931"},	{3, "X.21" },	{4,"X.25"},	{5,"Public land mobile networks, Q.1031/Q.1051"},};TableEntry causeTable[] = {	{0x02,"No Route To Network"},	{0x03,"No Route To Destination"},	{0x06,"Channel Unacceptable"},	{0x10,"Normal Call Clearing"},	{0x11,"User Busy"},	{0x12,"No Response"},	{0x13,"No Answer"},	{0x14,"Subscriber Absent"},	{0x15,"Call Rejected"},	{0x16,"Number Changed"},	{0x17,"Redirection"},	{0x1b,"Destination Out Of Order"},	{0x1c,"Invalid Number Format"},	{0x1e,"StatusEnquiryResponse"},	{0x2a,"Congestion"},	{0x51,"InvalidCallReference"}};void CauseInformationElement::attachContent(HFRAME hFrame, HPROPERTY hProperty) const{	char buf[80];	// extension indicator	AttachExtensionIndicator(hFrame, hProperty, data+2, BOTH);	AttachCodingStandard(hFrame, hProperty, data+2);	AttachLocation(hFrame, hProperty, data+2);	int pos = 3;	if ((data[2]& 0x80) == 0)	{		AttachExtensionIndicator(hFrame, hProperty, data+3, FORCE_1);		int recommendation = data[3] & 0x7F;		FormatBits(buf, 6, 0, recommendation);		wsprintf(buf+8, " = Recommendation - %s", FindString(recommendation) );		AttachPropertyInstanceEx(hFrame, hProperty, 1 , (void*) (data+3),			strlen(buf)+1 , buf , 0, 2, 0 );		pos ++;	}		AttachExtensionIndicator(hFrame, hProperty, data+3, FORCE_0);	int cause = data[pos] & 0x7F;	FormatBits(buf, 6, 0, cause);	wsprintf(buf+8, " = Cause Value (0x%02x) - %s", cause, FindString(cause) );	AttachPropertyInstanceEx(hFrame, hProperty, 1 , (void*) (data+pos),			strlen(buf)+1 , buf , 0, 2, 0 );}void AttachPartyNumber_TypeOfNumber(	HFRAME					hFrame, 	HPROPERTY				hProperty, 	const unsigned char*	Byte	){	static const char* str[] = 	{

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色狠狠综合天天综合综合| 国内偷窥港台综合视频在线播放| 色美美综合视频| 玉足女爽爽91| 欧美日韩一区高清| 亚洲成人免费视| 日韩一区二区三区免费看 | 国产精品白丝av| 久久久久久久久久久久久夜| 国产成人a级片| 亚洲情趣在线观看| 91精品久久久久久久91蜜桃| 狠狠色狠狠色综合系列| 国产精品视频九色porn| 91成人网在线| 蜜桃91丨九色丨蝌蚪91桃色| 国产日韩av一区二区| 99久久精品国产一区| 亚洲成人av一区| 2020日本不卡一区二区视频| 99久久婷婷国产综合精品| 亚洲福利国产精品| 337p粉嫩大胆色噜噜噜噜亚洲 | 日本欧美大码aⅴ在线播放| 亚洲精品一区二区三区四区高清| 成人av高清在线| 亚洲bt欧美bt精品| 国产午夜精品一区二区三区嫩草| 色拍拍在线精品视频8848| 日韩va欧美va亚洲va久久| 国产欧美一区二区在线观看| 在线观看成人免费视频| 国产一区999| 亚洲成av人片一区二区| 26uuuu精品一区二区| 色又黄又爽网站www久久| 精品一区二区在线观看| 一区二区三区资源| 2021国产精品久久精品| 欧美日韩第一区日日骚| 成人免费高清视频在线观看| 美国精品在线观看| 亚洲精品国产无天堂网2021| 精品成a人在线观看| 欧美日韩国产另类一区| 97se狠狠狠综合亚洲狠狠| 国产一区二区三区精品视频| 午夜精品福利一区二区三区av| 日本一区二区三区久久久久久久久不| 欧美日韩国产三级| 色偷偷一区二区三区| 成人精品国产一区二区4080 | 国产一区二区三区国产| 日韩成人免费看| 亚洲一级在线观看| 中文字幕视频一区| 国产拍揄自揄精品视频麻豆| 欧美大片拔萝卜| 欧美一区二区三区四区视频| 91麻豆免费观看| 成人晚上爱看视频| 国产激情一区二区三区| 麻豆91在线播放免费| 午夜久久久久久| 五月婷婷综合激情| 亚洲电影在线免费观看| 亚洲已满18点击进入久久| 国产精品久久久久久久久久久免费看 | 日韩欧美中文字幕一区| 欧美色图天堂网| 色天使色偷偷av一区二区| www.日本不卡| www.亚洲色图.com| 99久久免费国产| caoporn国产精品| 99久久婷婷国产| 色婷婷综合久久久久中文| 99久久国产免费看| 99久久精品免费看| a级精品国产片在线观看| 成人黄色a**站在线观看| 成人少妇影院yyyy| 91在线观看一区二区| 色丁香久综合在线久综合在线观看| 9l国产精品久久久久麻豆| 99久久er热在这里只有精品66| 色综合久久久久网| 欧美日韩精品系列| 日韩一区二区麻豆国产| 精品国产免费人成在线观看| 国产婷婷色一区二区三区| 国产精品高清亚洲| 亚洲欧美欧美一区二区三区| 亚洲一区二区视频在线观看| 日韩成人dvd| 国产成人亚洲综合色影视| 波多野结衣中文字幕一区二区三区| 91看片淫黄大片一级在线观看| 在线视频观看一区| 日韩天堂在线观看| 国产亚洲欧美日韩在线一区| 国产精品国产三级国产普通话蜜臀| 亚洲欧美一区二区三区久本道91| 一区二区三区四区蜜桃| 日韩av电影免费观看高清完整版 | 欧洲av在线精品| 日韩亚洲国产中文字幕欧美| 久久久久久久久蜜桃| 亚洲激情第一区| 日本va欧美va欧美va精品| 国产一区二区三区| 国产成人亚洲综合a∨婷婷 | 午夜精品视频在线观看| 韩国av一区二区三区在线观看| 成人午夜短视频| 欧美日韩免费观看一区二区三区 | 91精品91久久久中77777| 欧美一级久久久| 亚洲国产精品成人综合| 亚洲日本在线a| 免费在线观看一区| 成人高清视频在线| 7777女厕盗摄久久久| 国产午夜精品一区二区三区四区| 亚洲综合免费观看高清在线观看| 麻豆精品一二三| 91麻豆高清视频| 精品国产亚洲在线| 一区二区三区日本| 国产精品自产自拍| 欧美日本一区二区在线观看| 国产欧美精品一区二区色综合 | 日韩精品一区二区三区中文不卡 | 国产欧美日韩精品a在线观看| 亚洲成人精品一区| 国产 日韩 欧美大片| 欧美日韩一卡二卡| 国产精品国产三级国产普通话蜜臀 | 国产精品原创巨作av| 欧美丝袜自拍制服另类| 国产欧美久久久精品影院| 日本vs亚洲vs韩国一区三区二区| 99国产一区二区三精品乱码| 久久综合色天天久久综合图片| 亚洲综合久久久| 91丨porny丨蝌蚪视频| 久久综合九色综合欧美98| 亚洲sss视频在线视频| 99国产欧美久久久精品| 久久久影院官网| 日韩精品免费专区| 精品视频一区二区三区免费| 国产精品美女久久久久aⅴ国产馆| 韩国女主播成人在线观看| 欧美电影影音先锋| 亚洲精品高清在线观看| 成人福利视频在线| 国产蜜臀av在线一区二区三区| 免费在线观看视频一区| 91精品国产欧美一区二区| 亚洲国产一区二区三区| 91捆绑美女网站| 亚洲欧美激情一区二区| 不卡在线视频中文字幕| 亚洲国产精品成人综合| 国产美女娇喘av呻吟久久| 日韩色在线观看| 久久99精品国产麻豆婷婷| 日韩一区二区三区四区五区六区| 日韩激情中文字幕| 正在播放一区二区| 日韩电影在线免费观看| 日韩亚洲欧美在线| 韩国中文字幕2020精品| 久久夜色精品一区| 国产精品亚洲一区二区三区在线 | 欧美视频完全免费看| 亚洲1区2区3区视频| 欧美高清精品3d| 青草国产精品久久久久久| 欧美一区二区三区不卡| 麻豆91小视频| 久久这里只精品最新地址| 国产精品911| 亚洲色图都市小说| 欧美性受xxxx黑人xyx| 日韩电影在线一区二区| 精品美女在线播放| 成人深夜在线观看| 亚洲自拍欧美精品| 欧美精品自拍偷拍| 日本免费在线视频不卡一不卡二| 日韩女优视频免费观看| 国产很黄免费观看久久| 亚洲理论在线观看| 91精品一区二区三区久久久久久| 国产又黄又大久久| 亚洲欧洲日韩av| 69成人精品免费视频| 国产九色sp调教91|