📄 bs_ue.h
字号:
/******************************************************************************\
Copyright (c) 2007, UTStarcom,Inc. (ShenZhen R&D Center)
All Rights Reserved.
Subsystem : WIMAX
Group : GW/AnchorDP/...
File : bs_ue.h
Version :
Build :
Author : RCT
Maintained by : RCT
Create Date : 2007-01-22
Last Modify :
Description : BS SIM UE Context
\******************************************************************************/
/*
-----------------------------------------------------------
Software Develop CodeName :
Module Reference :
-----------------------------------------------------------
Change History:
07-01.22 RCT create file.
*/
#ifndef _BS_UE_H_
#define _BS_UE_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "adp_list.h"
#include "r64_message_ie.h"
#include "r64_message.h"
#include "bs_common.h"
#include "dhcp_comm.h"
#define BS_MAX_NUM_UE 1024
#define BS_UE_HASH_LEN 1024
#define BS_UECTXT_MAGIC0 0xADEC0109
#define BS_UECTXT_MAGIC1 0x0109ADEC
#define BS_UECTXT_GOOD(pUeCtxt) (NULL != (pUeCtxt) && (pUeCtxt)->magic0 == BS_UECTXT_MAGIC0 && (pUeCtxt)->magic1 == BS_UECTXT_MAGIC1)
#define BS_UECTXT_MAGIC_SET(pUeCtxt) do {if(NULL !=(pUeCtxt)) {(pUeCtxt)->magic0 = BS_UECTXT_MAGIC0; (pUeCtxt)->magic1 = BS_UECTXT_MAGIC1;}}while(0)
#define BS_UECTXT_HASHKEY(hashKey) ((hashKey) % BS_UE_HASH_LEN)
#define BS_GET_UE_ID(pUeCtxt) ((pUeCtxt) - &gBsUeCtxt[0] + 1)
#define BS_UECTXT_EXIST 1
typedef struct bs_ue_ctxt
{
unsigned int magic0; /* magic starting */
TAILQ_ENTRY(bs_ue_ctxt) listNode; /* chained in free list or R1 mac addr hash list */
/* common part */
unsigned char flag; /* exist or not */
unsigned char state; /* BS FSM state of UE */
unsigned char reserved; /* extension */
unsigned int cause;
unsigned int result;
R64_MS_ID_S msId; /* R1 Mac address to identify MS globaly */
unsigned short ueId; /* ue index in BS internal */
BS_TMR_ID timer;
WORD transId; /*passive*/
WORD xid; /*initiative*/
BYTE sendCount;
/* dhcp part */
St_DhcpBinding *dhcpClientTestBinding;
/* data path */
BYTE dpNum;
BYTE sfNum;
R64_SF_INFO_S sfInfo[R64_MAX_SF_NUM_PER_SS];
R64_DATA_PATH_INFO_S dpInfo[R64_MAX_SF_NUM_PER_SS];
unsigned int magic1; /* magic ending */
}St_BsUeCtxt;
typedef TAILQ_HEAD(BsUeCtxt_List, bs_ue_ctxt) St_BsUeCtxt_List;
extern int BS_UeCtxtInit();
extern St_BsUeCtxt* BS_UeAlloc(R64_MS_ID_S msId);
extern St_BsUeCtxt* BS_Ue_Lookup_By_MSID(R64_MS_ID_S pMsId);
extern St_BsUeCtxt* BS_Ue_Lookup_By_UEID(unsigned short ueId);
extern int BS_UeFree(St_BsUeCtxt *pUeCtxt);
#ifdef __cplusplus
}
#endif
#endif /* _BS_UE_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -