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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? 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一区二区三区免费野_久草精品视频
中文字幕在线观看一区| 国产麻豆精品一区二区| 激情欧美一区二区三区在线观看| 国产精品资源在线| 在线免费精品视频| 欧美韩国日本一区| 欧美aaa在线| 欧洲色大大久久| 欧美国产成人在线| 久久电影网站中文字幕 | 欧美一级淫片007| 国产精品乱人伦中文| 久久精品国产77777蜜臀| 在线观看免费视频综合| 国产精品视频第一区| 精品一区二区国语对白| 宅男在线国产精品| 亚洲午夜久久久久久久久电影网 | 欧美综合色免费| 国产欧美一二三区| 精品在线观看免费| 日韩欧美综合在线| 日韩精品色哟哟| 欧美伦理影视网| 亚洲成人精品影院| 欧美性videosxxxxx| 亚洲摸摸操操av| 91在线播放网址| 成人欧美一区二区三区小说| 成人综合在线视频| 欧美激情一区二区三区在线| 成人一区二区三区视频在线观看| 久久日一线二线三线suv| 琪琪一区二区三区| 精品美女一区二区| 精品一区二区精品| 久久久久综合网| 成人午夜大片免费观看| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 中文久久乱码一区二区| 国产a精品视频| 国产精品国产三级国产三级人妇 | 成人黄色a**站在线观看| 国产欧美精品一区二区三区四区| 国产精品一区二区视频| 国产欧美日本一区二区三区| 99在线热播精品免费| 亚洲免费观看视频| 欧美人狂配大交3d怪物一区| 日韩福利电影在线| 精品国产凹凸成av人网站| 国产精品亚洲人在线观看| 国产精品传媒在线| 欧美三级欧美一级| 九九精品一区二区| 亚洲欧洲韩国日本视频| 欧美视频一区在线| 激情综合一区二区三区| 中文字幕亚洲一区二区va在线| 91视频国产资源| 日韩在线一区二区三区| 2021中文字幕一区亚洲| 91亚洲精品久久久蜜桃网站| 亚洲第一成年网| 久久精品夜色噜噜亚洲a∨| 97se亚洲国产综合自在线 | 狠狠色丁香九九婷婷综合五月| 国产日韩欧美综合一区| 欧美自拍偷拍一区| 国产精品一级黄| 亚洲高清免费观看| 国产女主播在线一区二区| 在线观看免费视频综合| 国产成人精品一区二区三区网站观看 | 亚洲国产精品尤物yw在线观看| 久久久久国产精品厨房| 欧美三级欧美一级| 成人免费av网站| 日本亚洲三级在线| 亚洲精选免费视频| 综合久久久久综合| 欧美一卡二卡在线| 欧美在线综合视频| 国产精品1024| 奇米影视一区二区三区| 国产精品电影一区二区| www国产精品av| 91麻豆精品国产自产在线观看一区 | 精品久久久久一区| 欧美色偷偷大香| 91在线码无精品| 国产伦理精品不卡| 久久成人免费网| 日韩黄色片在线观看| 一区二区三区在线观看视频| 国产日韩欧美亚洲| ww久久中文字幕| 精品久久国产字幕高潮| 欧美日韩色一区| 日本久久一区二区| 99久久精品国产一区二区三区| 国精产品一区一区三区mba视频 | 99久久久免费精品国产一区二区 | 色美美综合视频| 91一区二区三区在线观看| 国产成人夜色高潮福利影视| 麻豆精品蜜桃视频网站| 日韩激情中文字幕| 日韩精彩视频在线观看| 天天影视色香欲综合网老头| 亚洲成人动漫一区| 亚洲国产精品一区二区久久| 一区二区三区产品免费精品久久75| 亚洲超碰精品一区二区| 亚洲免费视频成人| 亚洲视频免费看| 亚洲美女视频一区| 亚洲影视资源网| 夜夜嗨av一区二区三区四季av| 亚洲黄色免费网站| 五月天一区二区三区| 亚洲va天堂va国产va久| 亚洲国产精品久久一线不卡| 亚洲mv大片欧洲mv大片精品| 五月天丁香久久| 麻豆精品视频在线观看视频| 国产在线观看一区二区| 岛国一区二区在线观看| 99国产精品视频免费观看| 日本国产一区二区| 91精品婷婷国产综合久久性色| 欧美一区二区网站| 国产亚洲一区二区三区| 国产精品欧美久久久久无广告 | 日韩一区二区三区电影 | 成人免费精品视频| 欧美性视频一区二区三区| 欧美一区二区国产| 国产欧美一区二区精品婷婷| 一区二区三区久久| 老司机精品视频导航| 成人手机电影网| 欧美日韩国产综合视频在线观看| 91精品国产综合久久婷婷香蕉 | 国产精品私人影院| 亚洲国产精品精华液ab| 国产欧美精品在线观看| 亚洲欧美经典视频| 午夜视频在线观看一区| 蜜桃精品视频在线观看| 波多野结衣的一区二区三区| 色中色一区二区| 欧美一区二区三区四区视频| 久久精品人人做| 亚洲综合免费观看高清在线观看| 午夜精品福利一区二区三区av| 另类综合日韩欧美亚洲| 99国产精品久久久久| 欧美日韩大陆在线| 久久久一区二区| 一区二区不卡在线播放| 国产91精品一区二区麻豆亚洲| 色狠狠色噜噜噜综合网| 日韩视频免费观看高清完整版在线观看| 69久久夜色精品国产69蝌蚪网| 亚洲国产精品传媒在线观看| 亚洲制服欧美中文字幕中文字幕| 麻豆视频观看网址久久| 国产乱妇无码大片在线观看| 欧美日韩免费不卡视频一区二区三区| 日韩欧美一级二级三级| 中文字幕永久在线不卡| 日本不卡一区二区| 一本色道久久综合亚洲aⅴ蜜桃| 欧美一区二区在线免费观看| 成人免费在线视频| 精品一区二区三区日韩| 色又黄又爽网站www久久| 2021中文字幕一区亚洲| 男人的天堂亚洲一区| 99精品视频一区二区三区| 日韩欧美一区二区久久婷婷| 国产欧美视频一区二区| 久久99久久久久久久久久久| 91美女片黄在线观看91美女| 久久丝袜美腿综合| 亚洲福利视频一区| 在线观看日韩电影| 中文字幕一区二区三区在线观看 | 在线观看91av| 亚洲天堂成人在线观看| 成人性生交大片免费看视频在线| 91精品婷婷国产综合久久| 亚洲另类中文字| 国产传媒一区在线| 国产午夜精品一区二区| 老司机精品视频在线| 制服.丝袜.亚洲.中文.综合| 午夜视频在线观看一区| 日本韩国一区二区|