📄 gbptl.hpp
字号:
UINT8* pNS;
LPSLLC lpllc;
UINT16 LLCleng;
UINT16 AssembleLeng;
UINT16 FrameLen;
void Init();
private:
char NsUnitdata(UINT8 *ptr,UINT16 len);
char NsReset(UINT8 *ptr,UINT16 len);
char NsResetAck(UINT8 *ptr,UINT16 len);
char NsBlock(UINT8 *ptr,UINT16 len);
char NsBlockAck(UINT8 *ptr,UINT16 len);
char NsUnblock(UINT8 *ptr,UINT16 len);
char NsStatus(UINT8 *ptr,UINT16 len);
char BSSGPDecode(UINT8 *ptr, UINT16 len);
char DLUNITDATADecode(UINT8 *ptr, UINT16 len);
char ULUNITDATADecode(UINT8 *ptr, UINT16 len);
char RACAPABILITYDecode(UINT8 *ptr, UINT16 len);
char PAGINGPSDecode(UINT8 *ptr, UINT16 len);
char PAGINGCSDecode(UINT8 *ptr, UINT16 len);
char RACAPABILITYUPDATEDecode(UINT8 *ptr, UINT16 len);
char RACAPABILITYUPDATEACKDecode(UINT8 *ptr, UINT16 len);
char RADIOSTATUSDecode(UINT8 *ptr, UINT16 len);
char SUSPENDDecode(UINT8 *ptr, UINT16 len);
char SUSPENDACKDecode(UINT8 *ptr, UINT16 len);
char SUSPENDNACKDecode(UINT8 *ptr, UINT16 len);
char RESUMEDecode(UINT8 *ptr, UINT16 len);
char RESUMEACKDecode(UINT8 *ptr, UINT16 len);
char RESUMENACKDecode(UINT8 *ptr, UINT16 len);
char FLUSHLLDecode(UINT8 *ptr, UINT16 len);
char FLUSHLLACKDecode(UINT8 *ptr, UINT16 len);
char LLCDISCARDEDDecode(UINT8 *ptr, UINT16 len);
char FLOWCONTROLBVCDecode(UINT8 *ptr, UINT16 len);
char FLOWCONTROLBVCACKDecode(UINT8 *ptr, UINT16 len);
char FLOWCONTROLMSDecode(UINT8 *ptr, UINT16 len);
char FLOWCONTROLMSACKDecode(UINT8 *ptr, UINT16 len);
char BVCBLOCKDecode(UINT8 *ptr, UINT16 len);
char BVCBLOCKACKDecode(UINT8 *ptr, UINT16 len);
char BVCUNBLOCKDecode(UINT8 *ptr, UINT16 len);
char BVCUNBLOCKACKDecode(UINT8 *ptr, UINT16 len);
char BVCRESETDecode(UINT8 *ptr, UINT16 len);
char BVCRESETACKDecode(UINT8 *ptr, UINT16 len);
char STATUSDecode(UINT8 *ptr, UINT16 len);
char SGSNINVOKETRACEDecode(UINT8 *ptr, UINT16 len);
char DOWNLOADBSSPFCDecode(UINT8 *ptr, UINT16 len);
char CREATEBSSPFCDecode(UINT8 *ptr, UINT16 len);
char CREATEBSSPFCACKDecode(UINT8 *ptr, UINT16 len);
char CREATEBSSPFCNACKDecode(UINT8 *ptr, UINT16 len);
char MODIFYBSSPFCDecode(UINT8 *ptr, UINT16 len);
char MODIFYBSSPFCACKDecode(UINT8 *ptr, UINT16 len);
char DELETEBSSPFCDecode(UINT8 *ptr, UINT16 len);
char DELETEBSSPFCACKDecode(UINT8 *ptr, UINT16 len);
char LLCDecode(UINT8 *ptr, UINT16 len);
char GMMDecode(UINT8 *ptr, UINT16 len);
char MobilityManagement(UINT8 *ptr, UINT16 len);
char AttachRequest(UINT8 *ptr, UINT16 len);
char AttachAccept(UINT8 *ptr, UINT16 len);
char AttachComplete(UINT8 *ptr, UINT16 len);
char AttachReject(UINT8 *ptr, UINT16 len);
char DetachRequest(UINT8 *ptr, UINT16 len);
char DetachAccept(UINT8 *ptr, UINT16 len);
char P_TMSIRealloCationCommand(UINT8 *ptr, UINT16 len);
char P_TMSIReallocationComplete(UINT8 *ptr, UINT16 len);
char AuthentiCationandCipheringreq(UINT8 *ptr, UINT16 len);
char RoutingAreaUpdateRequest(UINT8 *ptr, UINT16 len);
char RoutingareaUpdateAccept(UINT8 *ptr, UINT16 len);
char RoutingAreaUpdateReject(UINT8 *ptr, UINT16 len);
char RoutingAreaUpdateComplete(UINT8 *ptr, UINT16 len);
char AuthenticationAndCipheringreSp(UINT8 *ptr, UINT16 len);
char AuthenticationAndCipheringRej(UINT8 *ptr, UINT16 len);
char ActivatePDPContextRequest(UINT8 *ptr, UINT16 len);
char ActivatePDPContextAccept(UINT8 *ptr, UINT16 len);
char ActivatePDPContextReject(UINT8 *ptr, UINT16 len);
char ModifyPDPcontextrequest(UINT8 *ptr, UINT16 len);
char ModifyPDPcontextaccept(UINT8 *ptr, UINT16 len);
char DeactivatePDPcontextrequest(UINT8 *ptr, UINT16 len);
char DeactivatePDPcontextaccept(UINT8 *ptr, UINT16 len);
char ActivateAAPDPcontextrequest(UINT8 *ptr, UINT16 len);
char ActivateAAPDPcontextaccept(UINT8 *ptr, UINT16 len);
char ActivateAAPDPContextreject(UINT8 *ptr, UINT16 len);
char RequestPdpContextActivationRej(UINT8 *ptr, UINT16 len);
char GMMStatus(UINT8 *ptr, UINT16 len);
UINT8*SaveIE(UINT8 *p);//用来保存TLV格的IE
UINT8*SaveLVIE(UINT8 ID,UINT8*p,UINT16 len); //用于保存LV格式的IE
UINT8*SaveIE(UINT8*p,UINT8 ID,UINT16 len);
#define LLGMM 0x01//移动性管理
#define TOM2 0x02//Tunnelling of messages 2
#define TOM8 0x08//Tunnelling of messages 8
#define LL3 0x03//用户数据1
#define LL5 0x05//用户数据2
#define LL9 0x09//用户数据3
#define LL11 0x0b//用户数据4
#define LLSMS 0x07//短消息
#define ATTACHREQUEST 0x01//附着请求
#define ATTACHACCEPT 0x02//附着接受
#define ATTACHCOMPLETE 0x03//附着完成
#define ATTACHREJECT 0x04//附着拒绝
#define DETACHREQUEST 0x05//分离请求
#define DETACHACCEPT 0x06//分离接受
#define ROUTINGAREAUPDATEREQUEST 0x08//路由更新请求2
#define ROUTINGAREAUPDATEACCEPT 0x09//路由更新接受
#define ROUTINGAREAUPDATECOMPLETE 0x0a//路由更新完成
#define ROUTINGAREAUPDATEREJECT 0x0b//路更表拒绝
#define P_TMSIREALLOCATIONCOMMAND 0x10//ptmsi分配命令
#define P_TMSIREALLOCATIONCOMPLETE 0x11
#define AUTHENTICATIONANDCIPHERINGREQ 0x12
#define AUTHENTICATIONANDCIPHERINGRESP 0x13
#define AUTHENTICATIONANDCIPHERINGREJ 0x14//Authentication and ciphering rej
#define IDENTITYREQUEST 0x15//Identity request
#define IDENTITYRESPONSE 0x16//Identity response
#define GMM_STATUS 0x20//GMM status
#define GMMINFORMATION 0x21//GMM information
//---Session management messages
#define ACTIVATEPDPCONTEXTREQUEST 0x41//Activate PDP context request
#define ACTIVATEPDPCONTEXTACCEPT 0x42//激活PDP上下文接受
#define ACTIVATEPDPCONTEXTREJECT 0x43//激活PDP上下文拒绝
#define REQUESTPDPCONTEXTACTIVATION 0x44//Request PDP context activation
#define REQUESTPDPCONTEXACTIVATIONREJ 0x45//Request PDP context activation rej
#define DEACTIVATEPDPCONTEXTREQUEST 0x46//Deactivate PDP context request
#define DEACTIVATEPDPCONTEXTACCEPT 0x47//Deactivate PDP context accept
#define MODIFYPDPCONTEXTREQUEST 0x48//Modify PDP context request
#define MODIFYPDPCONTEXTACCEPT 0x49//Modify PDP context accept
#define ACTIVATEAAPDPCONTEXTREQUEST 0x50//Activate AA PDP context request
#define ACTIVATEAAPDPCONTEXTACCEPT 0x51//Activate AA PDP context accept
#define ACTIVATEAAPDPCONTEXTREJECT 0x52//Activate AA PDP context reject
#define DEACTIVATEAAPDPCONTEXTREQUEST 0x53//Deactivate AA PDP context request
#define DEACTIVATEAAPDPCONTEXTACCEPT 0x54//Deactivate AA PDP context accept
#define SMSTATUS 0x55//SM Status
#define REQUEST_PDP_CONTEXT_ACTIVATION_REJ 0x85//Request PDP context activation reject
#define UFORMAT 0x07
#define UIFORMAT 0x06
#define SFORMAT 0x04
#define IFORMAT 0x00
#define DL_UNITDATA 0x00
#define UL_UNITDATA 0x01
#define RA_CAPABILITY 0x02
#define PTM_UNITDATA 0x03
#define PAGING_PS 0x06
#define PAGING_CS 0x07
#define RA_CAPABILITY_UPDATE 0x08
#define RA_CAPABILITY_UPDATE_ACK 0x09
#define RADIO_STATUS 0x0a
#define SUSPEND 0x0b
#define SUSPEND_ACK 0x0c
#define SUSPEND_NACK 0x0d
#define RESUME 0x0e
#define RESUME_ACK 0x0f
#define RESUME_NACK 0x10
#define DOWNLOAD_BSS_PFC 0x50
#define CREATE_BSS_PFC 0x51
#define CREATE_BSS_PFC_ACK 0x52
#define CREATE_BSS_PFC_NACK 0x53
#define MODIFY_BSS_PFC 0x54
#define MODIFY_BSS_PFC_ACK 0x55
#define DELETE_BSS_PFC 0x56
#define DELETE_BSS_PFC_ACK 0x57
//自定义不主要的IE
//NS服务层
#define NS_UNITDATA 0x00
#define NS_RESET 0x02
#define NS_RESET_ACK 0x03
#define NS_BLOCK 0x04
#define NS_BLOCK_ACK 0x05
#define NS_UNBLOCK 0x06
#define NS_UNBLOCK_ACK 0x07
#define NS_STATUS 0x08
#define NS_ACIVE 0x0a
#define NS_ACIVE_ACK 0x0b
#define NS_CAUSE 0x07//原因IE
#define NS_VCI 0x01
#define NS_PDU 0x02
#define NS_BVCI 0x03
#define NS_NSEI 0x04
#define BVC_BLOCK 0x20
#define BVC_BLOCK_ACK 0x21
#define BVC_RESET 0x22
#define BVC_RESET_ACK 0x23
#define BVC_UNBLOCK 0x24
#define BVC_UNBLOCK_ACK 0x25
#define FLOW_CONTROL_BVC 0x26
#define FLOW_CONTROL_BVC_ACK 0x27
#define FLOW_CONTROL_MS 0x28
#define FLOW_CONTROL_MS_ACK 0x29
#define FLUSH_LL 0x2a
#define FLUSH_LL_ACK 0x2b
#define LLC_DISCARDED 0x2c
#define SGSN_INVOKE_TRACE 0x40
#define STATUS 0x41
};
#pragma pack(1)
struct CipheringKey
{
UINT8 KeySequence:4;
UINT8 CipheringKeyIE:4;
};
typedef long time_t;
typedef struct _INFO
{
CGBPdu * pCGBPdu;
time_t BegTimer;
_INFO * Next;
}*LPINFO,INFO;
#pragma pack()
#define MAXTIME 18000///seconds秒
//#define COMPARE(x,y) ((x&0xffffff00)==(y&0xffffff00))
#define COMPARE(x,y) (x==y)
#define LENGTH ptr-p>=len-3
class Association
{
public:
int operator-=(CGBPdu* pCGBPdu);
int operator+=(CGBPdu* pCGBPdu);
CGBPdu* operator[](CGBPdu* pCGBPdu);
CGBPdu* operator=(CGBPdu* pCGBPdu);
LPINFO GetHead();
Association();
virtual ~Association();
int AddBvci(unsigned short Bvci,UINT32 Tlli);
private:
void TimeMaintenance();
LPINFO ASeekToEnd();
private:
LPINFO TempInfo;
LPINFO pInfo;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -