📄 isup.cpp
字号:
dataLength = u_msgLength - SS7_ISUP_H1H0_OFFSET;
indexByte = SS7_ISUP_DATA_OFFSET;
///////////////////////////////////////////////////////////////////////////////////////////
//必备可变长 或 任选参数群 的指针
strLength += sprintf(&v_pParseData[strLength], "\n******** PARAMETERS POINTER ********\n" );
strLength += sprintf(&v_pParseData[strLength], \
"%02X SOP :0x%02X %s\n",
u_pMsg[indexByte], u_pMsg[indexByte], \
"任选参数群的开始位置指针" ); //Offset of Start of Optional Part
int nLenOptPointer;
nLenOptPointer = (int)u_pMsg[indexByte];
indexOptParm = indexByte + (int)u_pMsg[indexByte];
////////////////////////////////////////////////////////////////////////////////////////////////
//任选参数群部分
if(nLenOptPointer == 0x00)
return TRUE;
strLength += sprintf(&v_pParseData[strLength], "\n******** OPTIONAL PARAMETERS PART ********\n" );
indexByte = indexOptParm;
while(indexByte < ((int)u_msgLength-1))
{
switch(u_pMsg[indexByte])
{
case 0x38: //消息兼容性信息 Message compatibility information
getOptionParm_38(u_pMsg, strLength, indexByte, v_pParseData);
indexByte += ((int)u_pMsg[indexByte+1] + 1);
strLength = strlen(v_pParseData);
break;
default:
break;
} // switch(u_pMsg[indexByte])
indexByte += 1;
if(indexByte == ((int)u_msgLength-1))
{
strLength += sprintf(&v_pParseData[strLength], " === End of Optional Parameters === \n" );
strLength += sprintf(&v_pParseData[strLength], \
"%02X END :0x%02X %s\n",
u_pMsg[indexByte], u_pMsg[indexByte], \
SS7_ISUP_OPTPARM_END );
}
}
*/
return TRUE;
}
////////////////////////////////////////////////////////////////////
////分段----SEG case 0x38 Segmentation
BOOL CIsup::GetDataDecode_SEG(BYTE *u_pMsg, DWORD u_msgLength, char *v_pParseData) //分段
{
int dataLength=0;
int strLength=0, indexByte=0;
//int i=0, j=0, k=0;
int indexOptParm=0; //indexVarParm=0,
dataLength = u_msgLength - SS7_ISUP_H1H0_OFFSET;
indexByte = SS7_ISUP_DATA_OFFSET;
///////////////////////////////////////////////////////////////////////////////////////////
//必备可变长 或 任选参数群 的指针
strLength += sprintf(&v_pParseData[strLength], "\n******** PARAMETERS POINTER ********\n" );
strLength += sprintf(&v_pParseData[strLength], \
"%02X SOP :0x%02X %s\n",
u_pMsg[indexByte], u_pMsg[indexByte], \
"任选参数群的开始位置指针" ); //Offset of Start of Optional Part
int nLenOptPointer;
nLenOptPointer = (int)u_pMsg[indexByte];
indexOptParm = indexByte + (int)u_pMsg[indexByte];
////////////////////////////////////////////////////////////////////////////////////////////////
//任选参数群部分
if(nLenOptPointer == 0x00)
return TRUE;
strLength += sprintf(&v_pParseData[strLength], "\n******** OPTIONAL PARAMETERS PART ********\n" );
indexByte = indexOptParm;
while(indexByte < ((int)u_msgLength-1))
{
switch(u_pMsg[indexByte])
{
case 0x03: //接入转送 Access transport
getOptionParm_03(u_pMsg, strLength, indexByte, v_pParseData);
indexByte += ((int)u_pMsg[indexByte+1] + 1);
strLength = strlen(v_pParseData);
break;
case 0x20: //用户-用户信息 User-to-user information
getOptionParm_20(u_pMsg, strLength, indexByte, v_pParseData);
indexByte += ((int)u_pMsg[indexByte+1] + 1);
strLength = strlen(v_pParseData);
break;
case 0x38: //消息兼容性信息 Message compatibility information
getOptionParm_38(u_pMsg, strLength, indexByte, v_pParseData);
indexByte += ((int)u_pMsg[indexByte+1] + 1);
strLength = strlen(v_pParseData);
break;
case 0xC1: //通用数字 Generic digits (national use)
getOptionParm_C1(u_pMsg, strLength, indexByte, v_pParseData);
indexByte += ((int)u_pMsg[indexByte+1] + 1);
strLength = strlen(v_pParseData);
break;
case 0x2C: //通用通知 Generic notification indicator (此参数可重复)
getOptionParm_2C(u_pMsg, strLength, indexByte, v_pParseData);
indexByte += ((int)u_pMsg[indexByte+1] + 1);
strLength = strlen(v_pParseData);
break;
case 0xC0: //通用号码 Generic number
getOptionParm_C0(u_pMsg, strLength, indexByte, v_pParseData);
indexByte += ((int)u_pMsg[indexByte+1] + 1);
strLength = strlen(v_pParseData);
break;
default:
break;
} // switch(u_pMsg[indexByte])
indexByte += 1;
if(indexByte == ((int)u_msgLength-1))
{
strLength += sprintf(&v_pParseData[strLength], " === End of Optional Parameters === \n" );
strLength += sprintf(&v_pParseData[strLength], \
"%02X END :0x%02X %s\n",
u_pMsg[indexByte], u_pMsg[indexByte], \
SS7_ISUP_OPTPARM_END );
}
}
return TRUE;
}
////////////////////////////////////////////////////////////////////
////识别响应----IRP ; case 0x37 Identification request
BOOL CIsup::GetDataDecode_IRP(BYTE *u_pMsg, DWORD u_msgLength, char *v_pParseData) //识别响应
{
int dataLength=0;
int strLength=0, indexByte=0;
//int i=0, j=0, k=0;
int indexOptParm=0; //indexVarParm=0,
dataLength = u_msgLength - SS7_ISUP_H1H0_OFFSET;
indexByte = SS7_ISUP_DATA_OFFSET;
///////////////////////////////////////////////////////////////////////////////////////////
//必备可变长 或 任选参数群 的指针
strLength += sprintf(&v_pParseData[strLength], "\n******** PARAMETERS POINTER ********\n" );
strLength += sprintf(&v_pParseData[strLength], \
"%02X SOP :0x%02X %s\n",
u_pMsg[indexByte], u_pMsg[indexByte], \
"任选参数群的开始位置指针" ); //Offset of Start of Optional Part
int nLenOptPointer;
nLenOptPointer = (int)u_pMsg[indexByte];
indexOptParm = indexByte + (int)u_pMsg[indexByte];
////////////////////////////////////////////////////////////////////////////////////////////////
//任选参数群部分
if(nLenOptPointer == 0x00)
return TRUE;
strLength += sprintf(&v_pParseData[strLength], "\n******** OPTIONAL PARAMETERS PART ********\n" );
indexByte = indexOptParm;
while(indexByte < ((int)u_msgLength-1))
{
switch(u_pMsg[indexByte])
{
case 0x3C: //MCID响应表示语 MCID response indicators
getOptionParm_3C(u_pMsg, strLength, indexByte, v_pParseData);
indexByte += ((int)u_pMsg[indexByte+1] + 1);
strLength = strlen(v_pParseData);
break;
case 0x38: //消息兼容性信息 Message compatibility information
getOptionParm_38(u_pMsg, strLength, indexByte, v_pParseData);
indexByte += ((int)u_pMsg[indexByte+1] + 1);
strLength = strlen(v_pParseData);
break;
case 0x39: //参数兼容性信息 Parameter compatibility information
getOptionParm_39(u_pMsg, strLength, indexByte, v_pParseData);
indexByte += ((int)u_pMsg[indexByte+1] + 1);
strLength = strlen(v_pParseData);
break;
case 0x0A: //主叫用户号码 Calling Party Number
getOptionParm_0A(u_pMsg, strLength, indexByte, v_pParseData);
indexByte += ((int)u_pMsg[indexByte+1] + 1);
strLength = strlen(v_pParseData);
break;
case 0x03: //接入转送 Access transport
getOptionParm_03(u_pMsg, strLength, indexByte, v_pParseData);
indexByte += ((int)u_pMsg[indexByte+1] + 1);
strLength = strlen(v_pParseData);
break;
case 0xC0: //通用号码 Generic number
getOptionParm_C0(u_pMsg, strLength, indexByte, v_pParseData);
indexByte += ((int)u_pMsg[indexByte+1] + 1);
strLength = strlen(v_pParseData);
break;
/*
//此参数 在 中文版协议 中没有
//Charged party identification (national use)
*/
default:
break;
} // switch(u_pMsg[indexByte])
indexByte += 1;
if(indexByte == ((int)u_msgLength-1))
{
strLength += sprintf(&v_pParseData[strLength], " === End of Optional Parameters === \n" );
strLength += sprintf(&v_pParseData[strLength], \
"%02X END :0x%02X %s\n",
u_pMsg[indexByte], u_pMsg[indexByte], \
SS7_ISUP_OPTPARM_END );
}
}
return TRUE;
}
////////////////////////////////////////////////////////////////////
////识别请求----IRQ ; case 0x36 Identification request
BOOL CIsup::GetDataDecode_IRQ(BYTE *u_pMsg, DWORD u_msgLength, char *v_pParseData) //识别请求
{
int dataLength=0;
int strLength=0, indexByte=0;
//int i=0, j=0, k=0;
int indexOptParm=0; //indexVarParm=0,
dataLength = u_msgLength - SS7_ISUP_H1H0_OFFSET;
indexByte = SS7_ISUP_DATA_OFFSET;
///////////////////////////////////////////////////////////////////////////////////////////
//必备可变长 或 任选参数群 的指针
strLength += sprintf(&v_pParseData[strLength], "\n******** PARAMETERS POINTER ********\n" );
strLength += sprintf(&v_pParseData[strLength], \
"%02X SOP :0x%02X %s\n",
u_pMsg[indexByte], u_pMsg[indexByte], \
"任选参数群的开始位置指针" ); //Offset of Start of Optional Part
int nLenOptPointer;
nLenOptPointer = (int)u_pMsg[indexByte];
indexOptParm = indexByte + (int)u_pMsg[indexByte];
////////////////////////////////////////////////////////////////////////////////////////////////
//任选参数群部分
if(nLenOptPointer == 0x00)
return TRUE;
strLength += sprintf(&v_pParseData[strLength], "\n******** OPTIONAL PARAMETERS PART ********\n" );
indexByte = indexOptParm;
while(indexByte < ((int)u_msgLength-1))
{
switch(u_pMsg[indexByte])
{
case 0x3B: //MCID请求表示语 MCID request indicators
getOptionParm_3B(u_pMsg, strLength, indexByte, v_pParseData);
indexByte += ((int)u_pMsg[indexByte+1] + 1);
strLength = strlen(v_pParseData);
break;
case 0x38: //消息兼容性信息 Message compatibility information
getOptionParm_38(u_pMsg, strLength, indexByte, v_pParseData);
indexByte += ((int)u_pMsg[indexByte+1] + 1);
strLength = strlen(v_pParseData);
break;
case 0x39: //参数兼容性信息 Parameter compatibility information
getOptionParm_39(u_pMsg, strLength, indexByte, v_pParseData);
indexByte += ((int)u_pMsg[indexByte+1] + 1);
strLength = strlen(v_pParseData);
break;
default:
break;
} // switch(u_pMsg[indexByte])
indexByte += 1;
if(indexByte == ((int)u_msgLength-1))
{
strLength += sprintf(&v_pParseData[strLength], " === End of Optional Parameters === \n" );
strLength += sprintf(&v_pParseData[strLength], \
"%02X END :0x%02X %s\n",
u_pMsg[indexByte], u_pMsg[indexByte], \
SS7_ISUP_OPTPARM_END );
}
}
return TRUE;
}
////////////////////////////////////////////////////////////////////
////网络资源管理----NRM ; case 0x32 Network resource management
BOOL CIsup::GetDataDecode_NRM(BYTE *u_pMsg, DWORD u_msgLength, char *v_pParseData) //网络资源管理
{
int dataLength=0;
int strLength=0, indexByte=0;
//int i=0, j=0, k=0;
int indexOptParm=0; //indexVarParm=0,
dataLength = u_msgLength - SS7_ISUP_H1H0_OFFSET;
indexByte = SS7_ISUP_DATA_OFFSET;
///////////////////////////////////////////////////////////////////////////////////////////
//必备可变长 或 任选参数群 的指针
strLength += sprintf(&v_pParseData[strLength], "\n******** PARAMETERS POINTER ********\n" );
strLength += sprintf(&v_pParseData[strLength], \
"%02X SOP :0x%02X %s\n",
u_pMsg[indexByte], u_pMsg[indexByte], \
"任选参数群的开始位置指针" ); //Offset of Start of Optional Part
int nLenOptPointer;
nLenOptPointer = (int)u_pMsg[indexByte];
indexOptParm = indexByte + (int)u_pMsg[indexByte];
////////////////////////////////////////////////////////////////////////////////////////////////
//任选参数群部分
if(nLenOptPointer == 0x00)
return TRUE;
strLength += sprintf(&v_pParseData[strLength], "\n******** OPTIONAL PARAMETERS PART ********\n" );
indexByte = indexOptParm;
while(indexByte < ((int)u_msgLength-1))
{
switch(u_pMsg[i
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -