sccp.cpp

来自「No。7七号信令网协议64K链路协议解码程序」· C++ 代码 · 共 82 行

CPP
82
字号
// Sccp.cpp: implementation of the CSccp class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "decode.h"
#include "Sccp.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CSccp::CSccp()
{

}

CSccp::~CSccp()
{

}

BOOL CSccp::GetH1H0(BYTE *u_pMsg, DWORD u_msgLength, char *v_pH1H0)
{
    //sprintf(v_pH1H0, "%02X", u_pMsg[SS7_SCCP_H1H0_OFFSET]);
    
    v_pH1H0[0] = 0;
    
    return TRUE;
}
BOOL CSccp::GetSls(BYTE *u_pMsg, DWORD u_msgLength, char *v_pSls)
{
    //sprintf(v_pSls, "%X", u_pMsg[SS7_SCCP_SLS_OFFSET] & SS7_SCCP_SLS_MASK);
    
    v_pSls[0] = 0;
    
    return TRUE;
}
BOOL CSccp::GetCic(BYTE *u_pMsg, DWORD u_msgLength, char *v_pCic)
{
    v_pCic[0] = 0;
    
    return TRUE;
}
BOOL CSccp::GetData(BYTE *u_pMsg, DWORD u_msgLength, char *v_pData)
{
    extern CDecodeApp theApp;
    int dataLength;
    int i, temp;
    
    temp = SS7_SCCP_DATA_OFFSET + MAX_DATA_BYTE_NUMBER - 1;
    if(temp > ((int )u_msgLength))
    {
        dataLength = u_msgLength - SS7_SCCP_DATA_OFFSET;
    }
    else
    {
        dataLength = MAX_DATA_BYTE_NUMBER;
    }
    
    temp = 0;
    for(i=0; i<dataLength; i++)
    {
        theApp.ConvertOneByte(u_pMsg[SS7_SCCP_DATA_OFFSET + i], \
            &v_pData[temp]);
        temp += 3;
    }    
           
    return TRUE;
}
BOOL CSccp::GetMessageDecodeInfo(BYTE *u_pMsg, DWORD u_msgLength, char *v_pDecodeResult)
{
    //以后再实现。
    
    return TRUE;
}

⌨️ 快捷键说明

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