Commit d3741e8b authored by gauthier's avatar gauthier

Changed with Cedric the collection initial ue id/enb s1ap id that did not work...

Changed with Cedric the collection initial ue id/enb s1ap id that did not work in rb tree -> 2 hashtables + misc types name change in openaircn (gtp types )



git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7661 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 2d6270a7
...@@ -188,7 +188,8 @@ function main() ...@@ -188,7 +188,8 @@ function main()
echo "set args $exe_arguments" >> ~/.gdb_lte_softmodem echo "set args $exe_arguments" >> ~/.gdb_lte_softmodem
echo "run" >> ~/.gdb_lte_softmodem echo "run" >> ~/.gdb_lte_softmodem
cat ~/.gdb_lte_softmodem cat ~/.gdb_lte_softmodem
gdb -n -x ~/.gdb_lte_softmodem 2>&1 > /tmp/gdb_lte_softmodem.stdout.txt gdb -n -x ~/.gdb_lte_softmodem 2>&1
#> /tmp/gdb_lte_softmodem.stdout.txt
fi fi
if [ $run_mscgen -eq 1 ]; then if [ $run_mscgen -eq 1 ]; then
......
...@@ -78,19 +78,19 @@ gtpv1u_eNB_send_init_udp( ...@@ -78,19 +78,19 @@ gtpv1u_eNB_send_init_udp(
NwGtpv1uRcT NwGtpv1uRcT
gtpv1u_eNB_log_request( gtpv1u_eNB_log_request(
NwGtpv1uLogMgrHandleT hLogMgr, NwGtpv1uLogMgrHandleT hLogMgr,
NwU32T logLevel, uint32_t logLevel,
NwCharT *file, NwCharT *file,
NwU32T line, uint32_t line,
NwCharT *logStr); NwCharT *logStr);
NwGtpv1uRcT NwGtpv1uRcT
gtpv1u_eNB_send_udp_msg( gtpv1u_eNB_send_udp_msg(
NwGtpv1uUdpHandleT udpHandle, NwGtpv1uUdpHandleT udpHandle,
NwU8T *buffer, uint8_t *buffer,
NwU32T buffer_len, uint32_t buffer_len,
NwU32T buffer_offset, uint32_t buffer_offset,
NwU32T peerIpAddr, uint32_t peerIpAddr,
NwU16T peerPort); uint16_t peerPort);
NwGtpv1uRcT NwGtpv1uRcT
gtpv1u_eNB_process_stack_req( gtpv1u_eNB_process_stack_req(
...@@ -114,9 +114,9 @@ data_recv_callback( ...@@ -114,9 +114,9 @@ data_recv_callback(
static NwGtpv1uRcT static NwGtpv1uRcT
gtpv1u_start_timer_wrapper( gtpv1u_start_timer_wrapper(
NwGtpv1uTimerMgrHandleT tmrMgrHandle, NwGtpv1uTimerMgrHandleT tmrMgrHandle,
NwU32T timeoutSec, uint32_t timeoutSec,
NwU32T timeoutUsec, uint32_t timeoutUsec,
NwU32T tmrType, uint32_t tmrType,
void *timeoutArg, void *timeoutArg,
NwGtpv1uTimerHandleT *hTmr); NwGtpv1uTimerHandleT *hTmr);
...@@ -241,9 +241,9 @@ static int gtpv1u_eNB_send_init_udp(uint16_t port_number) ...@@ -241,9 +241,9 @@ static int gtpv1u_eNB_send_init_udp(uint16_t port_number)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
NwGtpv1uRcT gtpv1u_eNB_log_request(NwGtpv1uLogMgrHandleT hLogMgr, NwGtpv1uRcT gtpv1u_eNB_log_request(NwGtpv1uLogMgrHandleT hLogMgr,
NwU32T logLevel, uint32_t logLevel,
NwCharT *file, NwCharT *file,
NwU32T line, uint32_t line,
NwCharT *logStr) NwCharT *logStr)
{ {
LOG_D(GTPU, "%s\n", logStr); LOG_D(GTPU, "%s\n", logStr);
...@@ -253,11 +253,11 @@ NwGtpv1uRcT gtpv1u_eNB_log_request(NwGtpv1uLogMgrHandleT hLogMgr, ...@@ -253,11 +253,11 @@ NwGtpv1uRcT gtpv1u_eNB_log_request(NwGtpv1uLogMgrHandleT hLogMgr,
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
NwGtpv1uRcT gtpv1u_eNB_send_udp_msg( NwGtpv1uRcT gtpv1u_eNB_send_udp_msg(
NwGtpv1uUdpHandleT udpHandle, NwGtpv1uUdpHandleT udpHandle,
NwU8T *buffer, uint8_t *buffer,
NwU32T buffer_len, uint32_t buffer_len,
NwU32T buffer_offset, uint32_t buffer_offset,
NwU32T peerIpAddr, uint32_t peerIpAddr,
NwU16T peerPort) uint16_t peerPort)
{ {
// Create and alloc new message // Create and alloc new message
MessageDef *message_p = NULL; MessageDef *message_p = NULL;
...@@ -491,9 +491,9 @@ int data_recv_callback(uint16_t portP, ...@@ -491,9 +491,9 @@ int data_recv_callback(uint16_t portP,
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static NwGtpv1uRcT gtpv1u_start_timer_wrapper( static NwGtpv1uRcT gtpv1u_start_timer_wrapper(
NwGtpv1uTimerMgrHandleT tmrMgrHandle, NwGtpv1uTimerMgrHandleT tmrMgrHandle,
NwU32T timeoutSec, uint32_t timeoutSec,
NwU32T timeoutUsec, uint32_t timeoutUsec,
NwU32T tmrType, uint32_t tmrType,
void *timeoutArg, void *timeoutArg,
NwGtpv1uTimerHandleT *hTmr) NwGtpv1uTimerHandleT *hTmr)
{ {
......
...@@ -48,12 +48,12 @@ typedef enum { ...@@ -48,12 +48,12 @@ typedef enum {
BEARER_MAX, BEARER_MAX,
} bearer_state_t; } bearer_state_t;
#define BUFFER_TO_NwU32T(buf, x) \ #define BUFFER_TO_uint32_t(buf, x) \
do { \ do { \
x = ((NwU32T)((buf)[0]) ) | \ x = ((uint32_t)((buf)[0]) ) | \
((NwU32T)((buf)[1]) << 8) | \ ((uint32_t)((buf)[1]) << 8) | \
((NwU32T)((buf)[2]) << 16) | \ ((uint32_t)((buf)[2]) << 16) | \
((NwU32T)((buf)[3]) << 24); \ ((uint32_t)((buf)[3]) << 24); \
} while(0) } while(0)
......
...@@ -63,17 +63,17 @@ static void *gtpv1u_thread(void *args); ...@@ -63,17 +63,17 @@ static void *gtpv1u_thread(void *args);
NwGtpv1uRcT gtpv1u_send_udp_msg( NwGtpv1uRcT gtpv1u_send_udp_msg(
NwGtpv1uUdpHandleT udpHandle, NwGtpv1uUdpHandleT udpHandle,
NwU8T *buffer, uint8_t *buffer,
NwU32T buffer_len, uint32_t buffer_len,
NwU32T buffer_offset, uint32_t buffer_offset,
NwU32T peerIpAddr, uint32_t peerIpAddr,
NwU32T peerPort); uint32_t peerPort);
NwGtpv1uRcT gtpv1u_log_request( NwGtpv1uRcT gtpv1u_log_request(
NwGtpv1uLogMgrHandleT hLogMgr, NwGtpv1uLogMgrHandleT hLogMgr,
NwU32T logLevel, uint32_t logLevel,
NwCharT *file, NwCharT *file,
NwU32T line, uint32_t line,
NwCharT *logStr); NwCharT *logStr);
NwGtpv1uRcT gtpv1u_process_stack_req( NwGtpv1uRcT gtpv1u_process_stack_req(
...@@ -149,15 +149,39 @@ void gtpu_print_hex_octets(unsigned char* dataP, unsigned long sizeP) ...@@ -149,15 +149,39 @@ void gtpu_print_hex_octets(unsigned char* dataP, unsigned long sizeP)
NwGtpv1uRcT gtpv1u_log_request(NwGtpv1uLogMgrHandleT hLogMgr, NwGtpv1uRcT gtpv1u_log_request(NwGtpv1uLogMgrHandleT hLogMgr,
NwU32T logLevel, uint32_t logLevel,
NwCharT *file, NwCharT *file,
NwU32T line, uint32_t line,
NwCharT *logStr) NwCharT *logStr)
{ {
GTPU_DEBUG("%s\n", logStr); GTPU_DEBUG("%s\n", logStr);
return NW_GTPV1U_OK; return NW_GTPV1U_OK;
} }
NwGtpv1uRcT gtpv1u_send_udp_msg(
NwGtpv1uUdpHandleT udpHandle,
uint8_t *buffer,
uint32_t buffer_len,
uint32_t buffer_offset,
uint32_t peerIpAddr,
uint32_t peerPort)
{
// Create and alloc new message
MessageDef *message_p;
udp_data_req_t *udp_data_req_p;
message_p = itti_alloc_new_message(TASK_GTPV1_U, UDP_DATA_REQ);
udp_data_req_p = &message_p->ittiMsg.udp_data_req;
udp_data_req_p->peer_address = peerIpAddr;
udp_data_req_p->peer_port = peerPort;
udp_data_req_p->buffer = buffer;
udp_data_req_p->buffer_length = buffer_len;
udp_data_req_p->buffer_offset = buffer_offset;
return itti_send_msg_to_task(TASK_UDP, INSTANCE_DEFAULT, message_p);
}
/* Callback called when a gtpv1u message arrived on UDP interface */ /* Callback called when a gtpv1u message arrived on UDP interface */
NwGtpv1uRcT gtpv1u_process_stack_req( NwGtpv1uRcT gtpv1u_process_stack_req(
...@@ -179,7 +203,7 @@ NwGtpv1uRcT gtpv1u_process_stack_req( ...@@ -179,7 +203,7 @@ NwGtpv1uRcT gtpv1u_process_stack_req(
* task for transmission. * task for transmission.
*/ */
/*if (NW_GTPV1U_OK != nwGtpv1uMsgGetTpdu(pUlpApi->apiInfo.recvMsgInfo.hMsg, /*if (NW_GTPV1U_OK != nwGtpv1uMsgGetTpdu(pUlpApi->apiInfo.recvMsgInfo.hMsg,
buffer, (NwU32T *)&buffer_len)) { buffer, (uint32_t *)&buffer_len)) {
GTPU_ERROR("Error while retrieving T-PDU\n"); GTPU_ERROR("Error while retrieving T-PDU\n");
}*/ }*/
GTPU_DEBUG("Received TPDU from gtpv1u stack %u with size %d\n", GTPU_DEBUG("Received TPDU from gtpv1u stack %u with size %d\n",
...@@ -347,9 +371,9 @@ static int gtpv1u_update_s1u_tunnel(Gtpv1uUpdateTunnelReq *reqP) ...@@ -347,9 +371,9 @@ static int gtpv1u_update_s1u_tunnel(Gtpv1uUpdateTunnelReq *reqP)
static NwGtpv1uRcT gtpv1u_start_timer_wrapper( static NwGtpv1uRcT gtpv1u_start_timer_wrapper(
NwGtpv1uTimerMgrHandleT tmrMgrHandle, NwGtpv1uTimerMgrHandleT tmrMgrHandle,
NwU32T timeoutSec, uint32_t timeoutSec,
NwU32T timeoutUsec, uint32_t timeoutUsec,
NwU32T tmrType, uint32_t tmrType,
void *timeoutArg, void *timeoutArg,
NwGtpv1uTimerHandleT *hTmr) NwGtpv1uTimerHandleT *hTmr)
{ {
...@@ -410,6 +434,19 @@ static void *gtpv1u_thread(void *args) ...@@ -410,6 +434,19 @@ static void *gtpv1u_thread(void *args)
} }
break; break;
// DATA COMING FROM UDP
case UDP_DATA_IND: {
udp_data_ind_t *udp_data_ind_p;
udp_data_ind_p = &received_message_p->ittiMsg.udp_data_ind;
nwGtpv1uProcessUdpReq(gtpv1u_sgw_data.gtpv1u_stack,
udp_data_ind_p->buffer,
udp_data_ind_p->buffer_length,
udp_data_ind_p->peer_port,
udp_data_ind_p->peer_address);
//itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), udp_data_ind_p->buffer);
}
break;
case TIMER_HAS_EXPIRED: case TIMER_HAS_EXPIRED:
nwGtpv1uProcessTimeout(&received_message_p->ittiMsg.timer_has_expired.arg); nwGtpv1uProcessTimeout(&received_message_p->ittiMsg.timer_has_expired.arg);
break; break;
......
...@@ -79,15 +79,15 @@ extern "C" { ...@@ -79,15 +79,15 @@ extern "C" {
*/ */
typedef struct NwGtpv1uStack { typedef struct NwGtpv1uStack {
NwU32T stackType;/**< GTPU_STACK_ENB or GTPU_STACK_SGW */ uint32_t stackType;/**< GTPU_STACK_ENB or GTPU_STACK_SGW */
NwPtrT id; NwPtrT id;
NwU32T seq; uint32_t seq;
NwGtpv1uUlpEntityT ulp; NwGtpv1uUlpEntityT ulp;
NwGtpv1uUdpEntityT udp; NwGtpv1uUdpEntityT udp;
NwGtpv1uMemMgrEntityT memMgr; NwGtpv1uMemMgrEntityT memMgr;
NwGtpv1uTimerMgrEntityT tmrMgr; NwGtpv1uTimerMgrEntityT tmrMgr;
NwGtpv1uLogMgrEntityT logMgr; NwGtpv1uLogMgrEntityT logMgr;
NwU32T logLevel; uint32_t logLevel;
RB_HEAD( NwGtpv1uOutstandingTxSeqNumTrxnMap, NwGtpv1uTrxn) outstandingTxSeqNumMap; RB_HEAD( NwGtpv1uOutstandingTxSeqNumTrxnMap, NwGtpv1uTrxn) outstandingTxSeqNumMap;
RB_HEAD( NwGtpv1uOutstandingRxSeqNumTrxnMap, NwGtpv1uTrxn) outstandingRxSeqNumMap; RB_HEAD( NwGtpv1uOutstandingRxSeqNumTrxnMap, NwGtpv1uTrxn) outstandingRxSeqNumMap;
RB_HEAD(NwGtpv1uTunnelEndPointTMap, NwGtpv1uTunnelEndPoint) sessionMap; RB_HEAD(NwGtpv1uTunnelEndPointTMap, NwGtpv1uTunnelEndPoint) sessionMap;
...@@ -99,8 +99,8 @@ typedef struct NwGtpv1uStack { ...@@ -99,8 +99,8 @@ typedef struct NwGtpv1uStack {
*/ */
typedef struct NwGtpv1uTunnelEndPoint { typedef struct NwGtpv1uTunnelEndPoint {
NwU32T teid; /**< Gtpu Tunnel End Point Identifier */ uint32_t teid; /**< Gtpu Tunnel End Point Identifier */
NwU32T peerAddr; /**< Peer IP address for the session */ uint32_t peerAddr; /**< Peer IP address for the session */
NwGtpv1uStackT* pStack; /**< Pointer to the parent stack */ NwGtpv1uStackT* pStack; /**< Pointer to the parent stack */
NwGtpv1uUlpSessionHandleT hUlpSession; /**< ULP session handle for the session */ NwGtpv1uUlpSessionHandleT hUlpSession; /**< ULP session handle for the session */
RB_ENTRY (NwGtpv1uTunnelEndPoint) sessionMapRbtNode; /**< RB Tree Data Structure Node */ RB_ENTRY (NwGtpv1uTunnelEndPoint) sessionMapRbtNode; /**< RB Tree Data Structure Node */
...@@ -152,20 +152,20 @@ nwGtpStopTrxnPeerRspTimer(NwGtpv1uStackT* thiz, NwGtpv1uTimerHandleT* phTmr); ...@@ -152,20 +152,20 @@ nwGtpStopTrxnPeerRspTimer(NwGtpv1uStackT* thiz, NwGtpv1uTimerHandleT* phTmr);
* NwGtpv1uMsgT holds gtpv1u messages to/from the peer. * NwGtpv1uMsgT holds gtpv1u messages to/from the peer.
*/ */
typedef struct NwGtpv1uMsg { typedef struct NwGtpv1uMsg {
NwU8T version; uint8_t version;
NwU8T protocolType; uint8_t protocolType;
NwU8T extHdrFlag; uint8_t extHdrFlag;
NwU8T seqNumFlag; uint8_t seqNumFlag;
NwU16T npduNumFlag; uint16_t npduNumFlag;
NwU32T msgType; uint32_t msgType;
NwU16T msgLen; uint16_t msgLen;
NwU32T teid; uint32_t teid;
NwU16T seqNum; uint16_t seqNum;
NwU8T npduNum; uint8_t npduNum;
NwU8T nextExtHdrType; uint8_t nextExtHdrType;
NwU8T* msgBuf; uint8_t* msgBuf;
NwU32T msgBufLen; uint32_t msgBufLen;
NwU32T msgBufOffset; uint32_t msgBufOffset;
struct NwGtpv1uMsg* next; struct NwGtpv1uMsg* next;
} NwGtpv1uMsgT; } NwGtpv1uMsgT;
...@@ -179,16 +179,16 @@ typedef struct NwGtpv1uMsg { ...@@ -179,16 +179,16 @@ typedef struct NwGtpv1uMsg {
*/ */
typedef struct NwGtpv1uTrxn { typedef struct NwGtpv1uTrxn {
NwU32T seqNum; uint32_t seqNum;
NwU32T peerIp; uint32_t peerIp;
NwU32T peerPort; uint32_t peerPort;
NwU8T maxRetries; uint8_t maxRetries;
NwU8T t3Timer; uint8_t t3Timer;
NwGtpv1uTimerHandleT hRspTmr; NwGtpv1uTimerHandleT hRspTmr;
NwGtpv1uTimeoutInfoT peerRspTimeoutInfo; NwGtpv1uTimeoutInfoT peerRspTimeoutInfo;
NwGtpv1uStackT* pStack; NwGtpv1uStackT* pStack;
NwGtpv1uTunnelEndPointT* pSession; NwGtpv1uTunnelEndPointT* pSession;
NwU32T hUlpTrxn; uint32_t hUlpTrxn;
NwGtpv1uMsgT* pMsg; NwGtpv1uMsgT* pMsg;
RB_ENTRY (NwGtpv1uTrxn) outstandingTxSeqNumMapRbtNode; /**< RB Tree Data Structure Node */ RB_ENTRY (NwGtpv1uTrxn) outstandingTxSeqNumMapRbtNode; /**< RB Tree Data Structure Node */
RB_ENTRY (NwGtpv1uTrxn) outstandingRxSeqNumMapRbtNode; /**< RB Tree Data Structure Node */ RB_ENTRY (NwGtpv1uTrxn) outstandingRxSeqNumMapRbtNode; /**< RB Tree Data Structure Node */
...@@ -203,15 +203,15 @@ typedef struct NwGtpv1uTrxn { ...@@ -203,15 +203,15 @@ typedef struct NwGtpv1uTrxn {
#pragma pack(1) #pragma pack(1)
typedef struct NwGtpv1uMsgHeader { typedef struct NwGtpv1uMsgHeader {
NwU8T PN:1; uint8_t PN:1;
NwU8T S:1; uint8_t S:1;
NwU8T E:1; uint8_t E:1;
NwU8T spare:1; uint8_t spare:1;
NwU8T PT:1; uint8_t PT:1;
NwU8T version:3; uint8_t version:3;
NwU8T msgType; uint8_t msgType;
NwU16T msgLength; uint16_t msgLength;
NwU32T teid; uint32_t teid;
} NwGtpv1uMsgHeaderT; } NwGtpv1uMsgHeaderT;
#pragma pack() #pragma pack()
......
...@@ -56,7 +56,7 @@ nwGtpv1uTrxnNew( NW_IN NwGtpv1uStackT* thiz, ...@@ -56,7 +56,7 @@ nwGtpv1uTrxnNew( NW_IN NwGtpv1uStackT* thiz,
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uTrxnWithSeqNew( NW_IN NwGtpv1uStackT* thiz, nwGtpv1uTrxnWithSeqNew( NW_IN NwGtpv1uStackT* thiz,
NW_IN NwU32T seqNum, NW_IN uint32_t seqNum,
NW_OUT NwGtpv1uTrxnT **ppTrxn); NW_OUT NwGtpv1uTrxnT **ppTrxn);
NwGtpv1uRcT NwGtpv1uRcT
...@@ -72,8 +72,8 @@ nwGtpv1uTrxnDelete( NW_INOUT NwGtpv1uTrxnT **pthiz); ...@@ -72,8 +72,8 @@ nwGtpv1uTrxnDelete( NW_INOUT NwGtpv1uTrxnT **pthiz);
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uTrxnCreateAndSendMsg( NW_IN NwGtpv1uStackT* thiz, nwGtpv1uTrxnCreateAndSendMsg( NW_IN NwGtpv1uStackT* thiz,
NW_IN NwGtpv1uTrxnT *pTrxn, NW_IN NwGtpv1uTrxnT *pTrxn,
NW_IN NwU32T peerIp, NW_IN uint32_t peerIp,
NW_IN NwU32T peerPort, NW_IN uint32_t peerPort,
NW_IN NwGtpv1uMsgT *pMsg); NW_IN NwGtpv1uMsgT *pMsg);
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -80,7 +80,7 @@ typedef NwPtrT NwGtpv1uTimerHandleT; /**< Gtpv2 Stack Timer ...@@ -80,7 +80,7 @@ typedef NwPtrT NwGtpv1uTimerHandleT; /**< Gtpv2 Stack Timer
typedef NwPtrT NwGtpv1uMsgHandleT; /**< Gtpv2 Msg Handle */ typedef NwPtrT NwGtpv1uMsgHandleT; /**< Gtpv2 Msg Handle */
typedef struct NwGtpv1uStackConfig { typedef struct NwGtpv1uStackConfig {
NwU16T udpSrcPort; uint16_t udpSrcPort;
} NwGtpv1uStackConfigT; } NwGtpv1uStackConfigT;
/*--------------------------------------------------------------------------* /*--------------------------------------------------------------------------*
...@@ -121,7 +121,7 @@ typedef enum { ...@@ -121,7 +121,7 @@ typedef enum {
*--------------------------------------------------------------------------*/ *--------------------------------------------------------------------------*/
typedef NwPtrT NwGtpv1uStackSessionHandleT;/**< Gtpv2 Stack session Handle */ typedef NwPtrT NwGtpv1uStackSessionHandleT;/**< Gtpv2 Stack session Handle */
typedef NwU8T NwGtpv1uMsgTypeT; /**< Gtpv2 Msg Type */ typedef uint8_t NwGtpv1uMsgTypeT; /**< Gtpv2 Msg Type */
typedef NwPtrT NwGtpv1uTrxnHandleT; /**< Gtpv2 Transaction Handle */ typedef NwPtrT NwGtpv1uTrxnHandleT; /**< Gtpv2 Transaction Handle */
typedef NwPtrT NwGtpv1uUlpTrxnHandleT; /**< Gtpv2 Ulp Transaction Handle */ typedef NwPtrT NwGtpv1uUlpTrxnHandleT; /**< Gtpv2 Ulp Transaction Handle */
typedef NwPtrT NwGtpv1uUlpSessionHandleT; /**< Gtpv2 Ulp session Handle */ typedef NwPtrT NwGtpv1uUlpSessionHandleT; /**< Gtpv2 Ulp session Handle */
...@@ -132,7 +132,7 @@ typedef NwPtrT NwGtpv1uUlpSessionHandleT; /**< Gtpv2 Ulp session Handle */ ...@@ -132,7 +132,7 @@ typedef NwPtrT NwGtpv1uUlpSessionHandleT; /**< Gtpv2 Ulp session Handle */
*/ */
typedef struct { typedef struct {
NW_IN NwU32T teid; NW_IN uint32_t teid;
NW_IN NwGtpv1uUlpSessionHandleT hUlpSession; NW_IN NwGtpv1uUlpSessionHandleT hUlpSession;
NW_OUT NwGtpv1uStackSessionHandleT hStackSession; NW_OUT NwGtpv1uStackSessionHandleT hStackSession;
} NwGtpv1uCreateTunnelEndPointT; } NwGtpv1uCreateTunnelEndPointT;
...@@ -153,10 +153,10 @@ typedef struct { ...@@ -153,10 +153,10 @@ typedef struct {
typedef struct { typedef struct {
NW_IN NwGtpv1uUlpTrxnHandleT hUlpTrxn; NW_IN NwGtpv1uUlpTrxnHandleT hUlpTrxn;
NW_IN NwU32T peerIp; NW_IN uint32_t peerIp;
NW_IN NwU32T peerPort; NW_IN uint32_t peerPort;
NW_IN NwU8T flags; NW_IN uint8_t flags;
NW_IN NwU32T teid; NW_IN uint32_t teid;
} NwGtpv1uInitialReqInfoT; } NwGtpv1uInitialReqInfoT;
/** /**
...@@ -166,11 +166,11 @@ typedef struct { ...@@ -166,11 +166,11 @@ typedef struct {
typedef struct { typedef struct {
NW_IN NwGtpv1uUlpTrxnHandleT hUlpTrxn; NW_IN NwGtpv1uUlpTrxnHandleT hUlpTrxn;
NW_IN NwU32T peerIp; NW_IN uint32_t peerIp;
NW_IN NwU32T peerPort; NW_IN uint32_t peerPort;
NW_IN NwU8T flags; NW_IN uint8_t flags;
NW_IN NwU32T teid; NW_IN uint32_t teid;
NW_IN NwU32T seqNum; NW_IN uint32_t seqNum;
NW_IN NwGtpv1uMsgHandleT hMsg; NW_IN NwGtpv1uMsgHandleT hMsg;
} NwGtpv1uTriggeredRspInfoT; } NwGtpv1uTriggeredRspInfoT;
...@@ -181,11 +181,11 @@ typedef struct { ...@@ -181,11 +181,11 @@ typedef struct {
typedef struct { typedef struct {
NW_IN NwGtpv1uUlpTrxnHandleT hUlpTrxn; NW_IN NwGtpv1uUlpTrxnHandleT hUlpTrxn;
NW_IN NwU32T peerIp; NW_IN uint32_t peerIp;
NW_IN NwU32T peerPort; NW_IN uint32_t peerPort;
NW_IN NwU8T flags; NW_IN uint8_t flags;
NW_IN NwU32T teid; NW_IN uint32_t teid;
NW_IN NwU32T seqNum; NW_IN uint32_t seqNum;
NW_IN NwGtpv1uMsgHandleT hMsg; NW_IN NwGtpv1uMsgHandleT hMsg;
} NwGtpv1uTriggeredReqInfoT; } NwGtpv1uTriggeredReqInfoT;
...@@ -196,9 +196,9 @@ typedef struct { ...@@ -196,9 +196,9 @@ typedef struct {
*/ */
typedef struct { typedef struct {
NW_IN NwU32T teid; NW_IN uint32_t teid;
NW_IN NwU32T ipAddr; NW_IN uint32_t ipAddr;
NW_IN NwU8T flags; NW_IN uint8_t flags;
NW_IN NwGtpv1uMsgHandleT hMsg; NW_IN NwGtpv1uMsgHandleT hMsg;
} NwGtpv1uSendtoInfoT; } NwGtpv1uSendtoInfoT;
...@@ -213,7 +213,7 @@ typedef struct { ...@@ -213,7 +213,7 @@ typedef struct {
NW_INOUT NwGtpv1uTrxnHandleT hTrxn; NW_INOUT NwGtpv1uTrxnHandleT hTrxn;
NW_IN NwGtpv1uUlpTrxnHandleT hUlpTrxn; NW_IN NwGtpv1uUlpTrxnHandleT hUlpTrxn;
NW_IN NwGtpv1uMsgTypeT msgType; NW_IN NwGtpv1uMsgTypeT msgType;
NW_IN NwU8T flags; NW_IN uint8_t flags;
NW_IN NwGtpv1uMsgHandleT hMsg; NW_IN NwGtpv1uMsgHandleT hMsg;
} NwGtpv1uSendMsgInfoT; } NwGtpv1uSendMsgInfoT;
...@@ -225,10 +225,10 @@ typedef struct { ...@@ -225,10 +225,10 @@ typedef struct {
typedef struct { typedef struct {
NW_IN NwGtpv1uUlpSessionHandleT hUlpSession; NW_IN NwGtpv1uUlpSessionHandleT hUlpSession;
NW_IN NwGtpv1uUlpTrxnHandleT hUlpTrxn; NW_IN NwGtpv1uUlpTrxnHandleT hUlpTrxn;
NW_IN NwU32T teid; NW_IN uint32_t teid;
NW_IN NwU32T peerIp; NW_IN uint32_t peerIp;
NW_IN NwU32T peerPort; NW_IN uint32_t peerPort;
NW_IN NwU32T msgType; /**< Message type */ NW_IN uint32_t msgType; /**< Message type */
NW_IN NwGtpv1uMsgHandleT hMsg; /**< Gtp Message handle */ NW_IN NwGtpv1uMsgHandleT hMsg; /**< Gtp Message handle */
} NwGtpv1uRecvMsgInfoT; } NwGtpv1uRecvMsgInfoT;
...@@ -297,11 +297,11 @@ typedef struct { ...@@ -297,11 +297,11 @@ typedef struct {
typedef struct { typedef struct {
NwGtpv1uUdpHandleT hUdp; NwGtpv1uUdpHandleT hUdp;
NwGtpv1uRcT (*udpDataReqCallback) ( NW_IN NwGtpv1uUdpHandleT udpHandle, NwGtpv1uRcT (*udpDataReqCallback) ( NW_IN NwGtpv1uUdpHandleT udpHandle,
NW_IN NwU8T* dataBuf, NW_IN uint8_t* dataBuf,
NW_IN NwU32T dataSize, NW_IN uint32_t dataSize,
NW_IN NwU32T dataOffset, NW_IN uint32_t dataOffset,
NW_IN NwU32T peerIP, NW_IN uint32_t peerIP,
NW_IN NwU16T peerPort); NW_IN uint16_t peerPort);
} NwGtpv1uUdpEntityT; } NwGtpv1uUdpEntityT;
/** /**
...@@ -311,14 +311,14 @@ typedef struct { ...@@ -311,14 +311,14 @@ typedef struct {
typedef struct { typedef struct {
NwGtpv1uMemMgrHandleT hMemMgr; NwGtpv1uMemMgrHandleT hMemMgr;
void* (*memAlloc)( NW_IN NwGtpv1uMemMgrHandleT hMemMgr, void* (*memAlloc)( NW_IN NwGtpv1uMemMgrHandleT hMemMgr,
NW_IN NwU32T memSize, NW_IN uint32_t memSize,
NW_IN NwCharT* fileName, NW_IN NwCharT* fileName,
NW_IN NwU32T lineNumber); NW_IN uint32_t lineNumber);
void (*memFree) ( NW_IN NwGtpv1uMemMgrHandleT hMemMgr, void (*memFree) ( NW_IN NwGtpv1uMemMgrHandleT hMemMgr,
NW_IN void* hMem, NW_IN void* hMem,
NW_IN NwCharT* fileName, NW_IN NwCharT* fileName,
NW_IN NwU32T lineNumber); NW_IN uint32_t lineNumber);
} NwGtpv1uMemMgrEntityT; } NwGtpv1uMemMgrEntityT;
...@@ -336,9 +336,9 @@ typedef struct { ...@@ -336,9 +336,9 @@ typedef struct {
typedef struct { typedef struct {
NwGtpv1uTimerMgrHandleT tmrMgrHandle; NwGtpv1uTimerMgrHandleT tmrMgrHandle;
NwGtpv1uRcT (*tmrStartCallback)( NW_IN NwGtpv1uTimerMgrHandleT tmrMgrHandle, NwGtpv1uRcT (*tmrStartCallback)( NW_IN NwGtpv1uTimerMgrHandleT tmrMgrHandle,
NW_IN NwU32T timeoutSecs, NW_IN uint32_t timeoutSecs,
NW_IN NwU32T timeoutUsec, NW_IN uint32_t timeoutUsec,
NW_IN NwU32T tmrType, NW_IN uint32_t tmrType,
NW_IN void* tmrArg, NW_IN void* tmrArg,
NW_OUT NwGtpv1uTimerHandleT* tmrHandle); NW_OUT NwGtpv1uTimerHandleT* tmrHandle);
...@@ -358,9 +358,9 @@ typedef struct { ...@@ -358,9 +358,9 @@ typedef struct {
typedef struct { typedef struct {
NwGtpv1uLogMgrHandleT logMgrHandle; NwGtpv1uLogMgrHandleT logMgrHandle;
NwGtpv1uRcT (*logReqCallback) (NW_IN NwGtpv1uLogMgrHandleT logMgrHandle, NwGtpv1uRcT (*logReqCallback) (NW_IN NwGtpv1uLogMgrHandleT logMgrHandle,
NW_IN NwU32T logLevel, NW_IN uint32_t logLevel,
NW_IN NwCharT* file, NW_IN NwCharT* file,
NW_IN NwU32T line, NW_IN uint32_t line,
NW_IN NwCharT* logStr); NW_IN NwCharT* logStr);
} NwGtpv1uLogMgrEntityT; } NwGtpv1uLogMgrEntityT;
...@@ -385,7 +385,7 @@ extern "C" { ...@@ -385,7 +385,7 @@ extern "C" {
*/ */
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uInitialize( NW_INOUT NwGtpv1uStackHandleT* phGtpv1uStackHandle, NwU32T stackType); nwGtpv1uInitialize( NW_INOUT NwGtpv1uStackHandleT* phGtpv1uStackHandle, uint32_t stackType);
/*--------------------------------------------------------------------------- /*---------------------------------------------------------------------------
* Destructor * Destructor
...@@ -493,7 +493,7 @@ nwGtpv1uSetLogMgrEntity( NW_IN NwGtpv1uStackHandleT hGtpv1uStackHandle, ...@@ -493,7 +493,7 @@ nwGtpv1uSetLogMgrEntity( NW_IN NwGtpv1uStackHandleT hGtpv1uStackHandle,
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uSetLogLevel( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, nwGtpv1uSetLogLevel( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
NW_IN NwU32T logLevel); NW_IN uint32_t logLevel);
/*--------------------------------------------------------------------------- /*---------------------------------------------------------------------------
* Process Request from Udp Layer * Process Request from Udp Layer
*--------------------------------------------------------------------------*/ *--------------------------------------------------------------------------*/
...@@ -511,10 +511,10 @@ nwGtpv1uSetLogLevel( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -511,10 +511,10 @@ nwGtpv1uSetLogLevel( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpv1uStackHandle, nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpv1uStackHandle,
NW_IN NwU8T* udpData, NW_IN uint8_t* udpData,
NW_IN NwU32T udpDataLen, NW_IN uint32_t udpDataLen,
NW_IN NwU16T peerPort, NW_IN uint16_t peerPort,
NW_IN NwU32T peerIP); NW_IN uint32_t peerIP);
/*--------------------------------------------------------------------------- /*---------------------------------------------------------------------------
* Process Request from Upper Layer * Process Request from Upper Layer
......
...@@ -53,23 +53,23 @@ extern "C" { ...@@ -53,23 +53,23 @@ extern "C" {
#pragma pack(1) #pragma pack(1)
typedef struct NwGtpv1uIeTv1 { typedef struct NwGtpv1uIeTv1 {
NwU8T t; uint8_t t;
NwU8T v; uint8_t v;
} NwGtpv1uIeTv1T; } NwGtpv1uIeTv1T;
typedef struct NwGtpv1uIeTv2 { typedef struct NwGtpv1uIeTv2 {
NwU8T t; uint8_t t;
NwU8T v; uint8_t v;
} NwGtpv1uIeTv2T; } NwGtpv1uIeTv2T;
typedef struct NwGtpv1uIeTv4 { typedef struct NwGtpv1uIeTv4 {
NwU8T t; uint8_t t;
NwU32T v; uint32_t v;
} NwGtpv1uIeTv4T; } NwGtpv1uIeTv4T;
typedef struct NwGtpv1uIeTlv { typedef struct NwGtpv1uIeTlv {
NwU8T t; uint8_t t;
NwU16T l; uint16_t l;
} NwGtpv1uIeTlvT; } NwGtpv1uIeTlvT;
#pragma pack() #pragma pack()
...@@ -87,14 +87,14 @@ typedef struct NwGtpv1uIeTlv { ...@@ -87,14 +87,14 @@ typedef struct NwGtpv1uIeTlv {
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, nwGtpv1uMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
NW_IN NwU8T seqNumFlag, NW_IN uint8_t seqNumFlag,
NW_IN NwU8T npduNumFlag, NW_IN uint8_t npduNumFlag,
NW_IN NwU8T extHdrFlag, NW_IN uint8_t extHdrFlag,
NW_IN NwU8T msgType, NW_IN uint8_t msgType,
NW_IN NwU8T teid, NW_IN uint8_t teid,
NW_IN NwU16T seqNum, NW_IN uint16_t seqNum,
NW_IN NwU8T npduNum, NW_IN uint8_t npduNum,
NW_IN NwU8T nextExtHeader, NW_IN uint8_t nextExtHeader,
NW_OUT NwGtpv1uMsgHandleT *phMsg); NW_OUT NwGtpv1uMsgHandleT *phMsg);
...@@ -112,12 +112,12 @@ nwGtpv1uMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -112,12 +112,12 @@ nwGtpv1uMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uGpduMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, nwGtpv1uGpduMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
NW_IN NwU32T teid, NW_IN uint32_t teid,
NW_IN NwU8T seqNumFlag, NW_IN uint8_t seqNumFlag,
NW_IN NwU16T seqNum, NW_IN uint16_t seqNum,
NW_IN NwU8T* tpdu, NW_IN uint8_t* tpdu,
NW_IN NwU16T tpduLength, NW_IN uint16_t tpduLength,
NW_IN NwU32T tpduOffset, NW_IN uint32_t tpduOffset,
NW_OUT NwGtpv1uMsgHandleT *phMsg); NW_OUT NwGtpv1uMsgHandleT *phMsg);
/** /**
...@@ -143,8 +143,8 @@ nwGtpv1uMsgFromMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -143,8 +143,8 @@ nwGtpv1uMsgFromMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uMsgFromBufferNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, nwGtpv1uMsgFromBufferNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
NW_IN NwU8T* pBuf, NW_IN uint8_t* pBuf,
NW_IN NwU32T bufLen, NW_IN uint32_t bufLen,
NW_OUT NwGtpv1uMsgHandleT *phMsg); NW_OUT NwGtpv1uMsgHandleT *phMsg);
/** /**
...@@ -166,7 +166,7 @@ nwGtpv1uMsgDelete( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -166,7 +166,7 @@ nwGtpv1uMsgDelete( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
*/ */
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uMsgSetTeid(NW_IN NwGtpv1uMsgHandleT hMsg, NwU32T teid); nwGtpv1uMsgSetTeid(NW_IN NwGtpv1uMsgHandleT hMsg, uint32_t teid);
/** /**
* Set TEID present flag for gtpv1u message. * Set TEID present flag for gtpv1u message.
...@@ -186,7 +186,7 @@ nwGtpv1uMsgSetTeidPresent(NW_IN NwGtpv1uMsgHandleT hMsg, NwBoolT teidPresent); ...@@ -186,7 +186,7 @@ nwGtpv1uMsgSetTeidPresent(NW_IN NwGtpv1uMsgHandleT hMsg, NwBoolT teidPresent);
*/ */
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uMsgSetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg, NwU32T seqNum); nwGtpv1uMsgSetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg, uint32_t seqNum);
/** /**
* Get TEID present for gtpv1u message. * Get TEID present for gtpv1u message.
...@@ -194,7 +194,7 @@ nwGtpv1uMsgSetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg, NwU32T seqNum); ...@@ -194,7 +194,7 @@ nwGtpv1uMsgSetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg, NwU32T seqNum);
* @param[in] hMsg : Message handle. * @param[in] hMsg : Message handle.
*/ */
NwU32T uint32_t
nwGtpv1uMsgGetTeid(NW_IN NwGtpv1uMsgHandleT hMsg); nwGtpv1uMsgGetTeid(NW_IN NwGtpv1uMsgHandleT hMsg);
/** /**
...@@ -212,7 +212,7 @@ nwGtpv1uMsgGetTeidPresent(NW_IN NwGtpv1uMsgHandleT hMsg); ...@@ -212,7 +212,7 @@ nwGtpv1uMsgGetTeidPresent(NW_IN NwGtpv1uMsgHandleT hMsg);
* @param[in] hMsg : Message handle. * @param[in] hMsg : Message handle.
*/ */
NwU32T uint32_t
nwGtpv1uMsgGetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg); nwGtpv1uMsgGetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg);
/** /**
...@@ -223,13 +223,13 @@ nwGtpv1uMsgGetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg); ...@@ -223,13 +223,13 @@ nwGtpv1uMsgGetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg);
* @param[out] hMsg : T-PDU length. * @param[out] hMsg : T-PDU length.
*/ */
NwU32T uint32_t
nwGtpv1uMsgGetTpdu(NW_IN NwGtpv1uMsgHandleT hMsg, NwU8T* pTpduBuf, NwU32T* pTpduLength); nwGtpv1uMsgGetTpdu(NW_IN NwGtpv1uMsgHandleT hMsg, uint8_t* pTpduBuf, uint32_t* pTpduLength);
NwU8T* uint8_t*
nwGtpv1uMsgGetTpduHandle(NW_IN NwGtpv1uMsgHandleT hMsg); nwGtpv1uMsgGetTpduHandle(NW_IN NwGtpv1uMsgHandleT hMsg);
NwU32T uint32_t
nwGtpv1uMsgGetTpduLength(NW_IN NwGtpv1uMsgHandleT hMsg); nwGtpv1uMsgGetTpduLength(NW_IN NwGtpv1uMsgHandleT hMsg);
/** /**
...@@ -242,8 +242,8 @@ nwGtpv1uMsgGetTpduLength(NW_IN NwGtpv1uMsgHandleT hMsg); ...@@ -242,8 +242,8 @@ nwGtpv1uMsgGetTpduLength(NW_IN NwGtpv1uMsgHandleT hMsg);
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uMsgAddIeTV1(NW_IN NwGtpv1uMsgHandleT hMsg, nwGtpv1uMsgAddIeTV1(NW_IN NwGtpv1uMsgHandleT hMsg,
NW_IN NwU8T type, NW_IN uint8_t type,
NW_IN NwU8T value); NW_IN uint8_t value);
/** /**
...@@ -256,9 +256,9 @@ nwGtpv1uMsgAddIeTV1(NW_IN NwGtpv1uMsgHandleT hMsg, ...@@ -256,9 +256,9 @@ nwGtpv1uMsgAddIeTV1(NW_IN NwGtpv1uMsgHandleT hMsg,
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uMsgAddIeTV2(NW_IN NwGtpv1uMsgHandleT hMsg, nwGtpv1uMsgAddIeTV2(NW_IN NwGtpv1uMsgHandleT hMsg,
NW_IN NwU8T type, NW_IN uint8_t type,
NW_IN NwU16T length, NW_IN uint16_t length,
NW_IN NwU16T value); NW_IN uint16_t value);
/** /**
...@@ -271,9 +271,9 @@ nwGtpv1uMsgAddIeTV2(NW_IN NwGtpv1uMsgHandleT hMsg, ...@@ -271,9 +271,9 @@ nwGtpv1uMsgAddIeTV2(NW_IN NwGtpv1uMsgHandleT hMsg,
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uMsgAddIeTV4(NW_IN NwGtpv1uMsgHandleT hMsg, nwGtpv1uMsgAddIeTV4(NW_IN NwGtpv1uMsgHandleT hMsg,
NW_IN NwU8T type, NW_IN uint8_t type,
NW_IN NwU16T length, NW_IN uint16_t length,
NW_IN NwU32T value); NW_IN uint32_t value);
/** /**
...@@ -287,9 +287,9 @@ nwGtpv1uMsgAddIeTV4(NW_IN NwGtpv1uMsgHandleT hMsg, ...@@ -287,9 +287,9 @@ nwGtpv1uMsgAddIeTV4(NW_IN NwGtpv1uMsgHandleT hMsg,
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uMsgAddIe(NW_IN NwGtpv1uMsgHandleT hMsg, nwGtpv1uMsgAddIe(NW_IN NwGtpv1uMsgHandleT hMsg,
NW_IN NwU8T type, NW_IN uint8_t type,
NW_IN NwU16T length, NW_IN uint16_t length,
NW_IN NwU8T* pVal); NW_IN uint8_t* pVal);
/** /**
* Dump the contents of gtpv1u mesasge. * Dump the contents of gtpv1u mesasge.
...@@ -301,7 +301,7 @@ nwGtpv1uMsgAddIe(NW_IN NwGtpv1uMsgHandleT hMsg, ...@@ -301,7 +301,7 @@ nwGtpv1uMsgAddIe(NW_IN NwGtpv1uMsgHandleT hMsg,
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uMsgHexDump(NwGtpv1uMsgHandleT hMsg, FILE* fp); nwGtpv1uMsgHexDump(NwGtpv1uMsgHandleT hMsg, FILE* fp);
NwU32T uint32_t
nwGtpv1uMsgGetMsgType(NW_IN NwGtpv1uMsgHandleT hMsg); nwGtpv1uMsgGetMsgType(NW_IN NwGtpv1uMsgHandleT hMsg);
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -68,15 +68,15 @@ extern "C" { ...@@ -68,15 +68,15 @@ extern "C" {
* IPv4 logging macros * IPv4 logging macros
*--------------------------------------------------------------------------*/ *--------------------------------------------------------------------------*/
#define NW_IPV4_ADDR "%u.%u.%u.%u" #define NW_IPV4_ADDR "%u.%u.%u.%u"
#define NW_IPV4_ADDR_FORMAT(__addr) (NwU8T)((__addr) & 0x000000ff), \ #define NW_IPV4_ADDR_FORMAT(__addr) (uint8_t)((__addr) & 0x000000ff), \
(NwU8T)(((__addr) & 0x0000ff00) >> 8 ), \ (uint8_t)(((__addr) & 0x0000ff00) >> 8 ), \
(NwU8T)(((__addr) & 0x00ff0000) >> 16), \ (uint8_t)(((__addr) & 0x00ff0000) >> 16), \
(NwU8T)(((__addr) & 0xff000000) >> 24) (uint8_t)(((__addr) & 0xff000000) >> 24)
#define NW_IPV4_ADDR_FORMATP(__paddr) (NwU8T)(*((NwU8T*)(__paddr)) & 0x000000ff), \ #define NW_IPV4_ADDR_FORMATP(__paddr) (uint8_t)(*((uint8_t*)(__paddr)) & 0x000000ff), \
(NwU8T)(*((NwU8T*)(__paddr + 1)) & 0x000000ff), \ (uint8_t)(*((uint8_t*)(__paddr + 1)) & 0x000000ff), \
(NwU8T)(*((NwU8T*)(__paddr + 2)) & 0x000000ff), \ (uint8_t)(*((uint8_t*)(__paddr + 2)) & 0x000000ff), \
(NwU8T)(*((NwU8T*)(__paddr + 3)) & 0x000000ff) (uint8_t)(*((uint8_t*)(__paddr + 3)) & 0x000000ff)
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -54,11 +54,6 @@ extern "C" { ...@@ -54,11 +54,6 @@ extern "C" {
#define NW_TRUE (1) /**< Truth value */ #define NW_TRUE (1) /**< Truth value */
#define NW_FALSE (0) /**< False value */ #define NW_FALSE (0) /**< False value */
typedef unsigned char NwU8T; /**< Unsigned 1 byte */
typedef unsigned short NwU16T; /**< Unsigned 2 byte */
typedef unsigned int NwU32T; /**< Unsigned 4 byte */
typedef unsigned long long NwU64T; /**< Unsigned 8 byte */
typedef signed char NwS8T; /**< Signed 1 byte */ typedef signed char NwS8T; /**< Signed 1 byte */
typedef signed short NwS16T; /**< Signed 2 byte */ typedef signed short NwS16T; /**< Signed 2 byte */
typedef signed int NwS32T; /**< Signed 4 byte */ typedef signed int NwS32T; /**< Signed 4 byte */
......
...@@ -52,10 +52,10 @@ ...@@ -52,10 +52,10 @@
( ( (x) & 0x0000ff00 ) << 8 ) | ( ( (x) & 0x000000ff) << 24 ) ) ( ( (x) & 0x0000ff00 ) << 8 ) | ( ( (x) & 0x000000ff) << 24 ) )
#define NW_HTONLL(x) ( \ #define NW_HTONLL(x) ( \
( ( ((NwU64T)x) & 0xff00000000000000ULL ) >> 56 ) | ( ( ((NwU64T)x) & 0x00ff000000000000ULL ) >> 40 ) | \ ( ( ((uint64_t)x) & 0xff00000000000000ULL ) >> 56 ) | ( ( ((uint64_t)x) & 0x00ff000000000000ULL ) >> 40 ) | \
( ( ((NwU64T)x) & 0x0000ff0000000000ULL ) >> 24 ) | ( ( ((NwU64T)x) & 0x000000ff00000000ULL ) >> 8 ) | \ ( ( ((uint64_t)x) & 0x0000ff0000000000ULL ) >> 24 ) | ( ( ((uint64_t)x) & 0x000000ff00000000ULL ) >> 8 ) | \
( ( ((NwU64T)x) & 0x000000000000ff00ULL ) << 40 ) | ( ( ((NwU64T)x) & 0x00000000000000ffULL ) << 56 ) | \ ( ( ((uint64_t)x) & 0x000000000000ff00ULL ) << 40 ) | ( ( ((uint64_t)x) & 0x00000000000000ffULL ) << 56 ) | \
( ( ((NwU64T)x) & 0x0000000000ff0000ULL ) << 24 ) | ( ( ((NwU64T)x) & 0x00000000ff000000ULL ) << 8 ) \ ( ( ((uint64_t)x) & 0x0000000000ff0000ULL ) << 24 ) | ( ( ((uint64_t)x) & 0x00000000ff000000ULL ) << 8 ) \
) )
#define NW_NTOHS NW_HTONS #define NW_NTOHS NW_HTONS
......
...@@ -196,11 +196,11 @@ nwGtpv1uCompareSeqNum(struct NwGtpv1uTrxn *a, struct NwGtpv1uTrxn *b) ...@@ -196,11 +196,11 @@ nwGtpv1uCompareSeqNum(struct NwGtpv1uTrxn *a, struct NwGtpv1uTrxn *b)
*/ */
static NwGtpv1uRcT static NwGtpv1uRcT
nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, NwU32T peerIp, NwU16T peerPort, nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, uint32_t peerIp, uint16_t peerPort,
NwGtpv1uMsgT *pMsg) NwGtpv1uMsgT *pMsg)
{ {
NwGtpv1uRcT rc = NW_GTPV1U_FAILURE; NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
NwU8T *msgHdr; uint8_t *msgHdr;
NW_ASSERT(thiz); NW_ASSERT(thiz);
NW_ASSERT(pMsg); NW_ASSERT(pMsg);
...@@ -219,10 +219,10 @@ nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, NwU32T peerIp, NwU16T peerPort, ...@@ -219,10 +219,10 @@ nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, NwU32T peerIp, NwU16T peerPort,
(pMsg->npduNumFlag); (pMsg->npduNumFlag);
*(msgHdr++) = (pMsg->msgType); *(msgHdr++) = (pMsg->msgType);
*((NwU16T *) msgHdr) = htons(pMsg->msgLen); *((uint16_t *) msgHdr) = htons(pMsg->msgLen);
msgHdr += 2; msgHdr += 2;
*((NwU32T *) msgHdr) = htonl(pMsg->teid); *((uint32_t *) msgHdr) = htonl(pMsg->teid);
msgHdr += 4; msgHdr += 4;
#if defined(LOG_GTPU) && LOG_GTPU > 0 #if defined(LOG_GTPU) && LOG_GTPU > 0
GTPU_DEBUG("nwGtpv1uCreateAndSendMsg to teid %u length %d offset %d\n", GTPU_DEBUG("nwGtpv1uCreateAndSendMsg to teid %u length %d offset %d\n",
...@@ -232,13 +232,13 @@ nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, NwU32T peerIp, NwU16T peerPort, ...@@ -232,13 +232,13 @@ nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, NwU32T peerIp, NwU16T peerPort,
#endif #endif
if(pMsg->seqNumFlag || pMsg->extHdrFlag || pMsg->npduNumFlag) { if(pMsg->seqNumFlag || pMsg->extHdrFlag || pMsg->npduNumFlag) {
*((NwU16T *) msgHdr) = (pMsg->seqNumFlag ? htons(pMsg->seqNum) : 0x0000); *((uint16_t *) msgHdr) = (pMsg->seqNumFlag ? htons(pMsg->seqNum) : 0x0000);
msgHdr += 2; msgHdr += 2;
*((NwU8T *) msgHdr) = (pMsg->npduNumFlag ? htons(pMsg->npduNum) : 0x00); *((uint8_t *) msgHdr) = (pMsg->npduNumFlag ? htons(pMsg->npduNum) : 0x00);
msgHdr++; msgHdr++;
*((NwU8T *) msgHdr) = (pMsg->extHdrFlag ? htons(pMsg->nextExtHdrType) : 0x00); *((uint8_t *) msgHdr) = (pMsg->extHdrFlag ? htons(pMsg->nextExtHdrType) : 0x00);
msgHdr++; msgHdr++;
} }
...@@ -264,13 +264,13 @@ nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, NwU32T peerIp, NwU16T peerPort, ...@@ -264,13 +264,13 @@ nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, NwU32T peerIp, NwU16T peerPort,
static NwGtpv1uRcT static NwGtpv1uRcT
nwGtpv1uSendUlpMessageIndication( NW_IN NwGtpv1uStackT *thiz, nwGtpv1uSendUlpMessageIndication( NW_IN NwGtpv1uStackT *thiz,
NW_IN NwU32T hUlpTrxn, NW_IN uint32_t hUlpTrxn,
NW_IN NwU32T apiType, NW_IN uint32_t apiType,
NW_IN NwU32T msgType, NW_IN uint32_t msgType,
NW_IN NwU32T peerIp, NW_IN uint32_t peerIp,
NW_IN NwU16T peerPort, NW_IN uint16_t peerPort,
NW_IN NwU8T *pMsgBuf, NW_IN uint8_t *pMsgBuf,
NW_IN NwU16T msgLength) NW_IN uint16_t msgLength)
{ {
NwGtpv1uRcT rc = NW_GTPV1U_FAILURE; NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
NwGtpv1uUlpApiT ulpApi; NwGtpv1uUlpApiT ulpApi;
...@@ -344,7 +344,7 @@ nwGtpv1uPeerRspTimeout(void *arg) ...@@ -344,7 +344,7 @@ nwGtpv1uPeerRspTimeout(void *arg)
static NwGtpv1uRcT static NwGtpv1uRcT
NwGtpv1uCreateTunnelEndPoint( NW_IN NwGtpv1uStackT *thiz, NwGtpv1uCreateTunnelEndPoint( NW_IN NwGtpv1uStackT *thiz,
NW_IN NwU32T teid, NW_IN uint32_t teid,
NW_IN NwGtpv1uUlpSessionHandleT hUlpSession, NW_IN NwGtpv1uUlpSessionHandleT hUlpSession,
NW_OUT NwGtpv1uStackSessionHandleT *phStackSession ) NW_OUT NwGtpv1uStackSessionHandleT *phStackSession )
{ {
...@@ -515,16 +515,16 @@ nwGtpv1uSendto( NwGtpv1uStackT *thiz, NW_IN NwGtpv1uUlpApiT *pUlpReq) ...@@ -515,16 +515,16 @@ nwGtpv1uSendto( NwGtpv1uStackT *thiz, NW_IN NwGtpv1uUlpApiT *pUlpReq)
static NwGtpv1uRcT static NwGtpv1uRcT
nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz, nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz,
NW_IN NwU8T *gpdu, NW_IN uint8_t *gpdu,
NW_IN NwU32T gpduLen, NW_IN uint32_t gpduLen,
NW_IN NwU32T peerIp) NW_IN uint32_t peerIp)
{ {
NwGtpv1uRcT rc = NW_GTPV1U_FAILURE; NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
NwGtpv1uMsgHeaderT *msgHdr = NULL; NwGtpv1uMsgHeaderT *msgHdr = NULL;
NwGtpv1uTunnelEndPointT *pTunnelEndPoint = NULL; NwGtpv1uTunnelEndPointT *pTunnelEndPoint = NULL;
NwGtpv1uTunnelEndPointT tunnelEndPointKey; NwGtpv1uTunnelEndPointT tunnelEndPointKey;
// NwU16T hdr_len = 0; // uint16_t hdr_len = 0;
#if defined(LOG_GTPU) && LOG_GTPU > 0 #if defined(LOG_GTPU) && LOG_GTPU > 0
NW_ENTER(thiz); NW_ENTER(thiz);
...@@ -542,14 +542,14 @@ nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz, ...@@ -542,14 +542,14 @@ nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz,
NwGtpv1uMsgHandleT hMsg; NwGtpv1uMsgHandleT hMsg;
rc = nwGtpv1uMsgFromBufferNew( (NwGtpv1uStackHandleT)thiz, rc = nwGtpv1uMsgFromBufferNew( (NwGtpv1uStackHandleT)thiz,
(NwU8T *)gpdu, (uint8_t *)gpdu,
gpduLen, gpduLen,
&hMsg); &hMsg);
/* /*
NwU8T* msgBuf; uint8_t* msgBuf;
NwU32T msgBufLen; uint32_t msgBufLen;
NwU32T msgBufOffset; uint32_t msgBufOffset;
*/ */
if(NW_GTPV1U_OK == rc) { if(NW_GTPV1U_OK == rc) {
NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg; NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg;
...@@ -596,17 +596,17 @@ nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz, ...@@ -596,17 +596,17 @@ nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz,
static NwGtpv1uRcT static NwGtpv1uRcT
nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz, nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz,
NW_IN NwU8T *msgBuf, NW_IN uint8_t *msgBuf,
NW_IN NwU32T msgBufLen, NW_IN uint32_t msgBufLen,
NW_IN NwU16T peerPort, NW_IN uint16_t peerPort,
NW_IN NwU32T peerIp) NW_IN uint32_t peerIp)
{ {
NwGtpv1uRcT rc = NW_GTPV1U_FAILURE; NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
NwU16T seqNum = 0; uint16_t seqNum = 0;
NwGtpv1uMsgHandleT hMsg = 0; NwGtpv1uMsgHandleT hMsg = 0;
int bufLen = 0; int bufLen = 0;
seqNum = ntohs(*(NwU16T *) (msgBuf + (((*msgBuf) & 0x02) ? 8 : 4))); seqNum = ntohs(*(uint16_t *) (msgBuf + (((*msgBuf) & 0x02) ? 8 : 4)));
MSC_LOG_RX_MESSAGE( MSC_LOG_RX_MESSAGE(
(thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_ENB:MSC_GTPU_SGW, (thiz->stackType == GTPU_STACK_ENB) ? MSC_GTPU_ENB:MSC_GTPU_SGW,
...@@ -678,7 +678,7 @@ nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz, ...@@ -678,7 +678,7 @@ nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz,
*--------------------------------------------------------------------------*/ *--------------------------------------------------------------------------*/
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uInitialize( NW_INOUT NwGtpv1uStackHandleT *hGtpuStackHandle, NwU32T stackType) nwGtpv1uInitialize( NW_INOUT NwGtpv1uStackHandleT *hGtpuStackHandle, uint32_t stackType)
{ {
NwGtpv1uRcT rc = NW_GTPV1U_FAILURE; NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
NwGtpv1uStackT *thiz; NwGtpv1uStackT *thiz;
...@@ -689,7 +689,7 @@ nwGtpv1uInitialize( NW_INOUT NwGtpv1uStackHandleT *hGtpuStackHandle, NwU32T stac ...@@ -689,7 +689,7 @@ nwGtpv1uInitialize( NW_INOUT NwGtpv1uStackHandleT *hGtpuStackHandle, NwU32T stac
if(thiz) { if(thiz) {
thiz->id = (NwPtrT)thiz; thiz->id = (NwPtrT)thiz;
thiz->stackType = stackType; thiz->stackType = stackType;
thiz->seq = (NwU16T) ((NwU32T)thiz) ; // FIXME interesting casts... don't know what this is good for... thiz->seq = (uint16_t) ((uint32_t)thiz) ; // FIXME interesting casts... don't know what this is good for...
RB_INIT(&(thiz->outstandingTxSeqNumMap)); RB_INIT(&(thiz->outstandingTxSeqNumMap));
RB_INIT(&(thiz->outstandingRxSeqNumMap)); RB_INIT(&(thiz->outstandingRxSeqNumMap));
RB_INIT(&(thiz->sessionMap)); RB_INIT(&(thiz->sessionMap));
...@@ -824,7 +824,7 @@ nwGtpv1uSetLogMgrEntity( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -824,7 +824,7 @@ nwGtpv1uSetLogMgrEntity( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uSetLogLevel( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, nwGtpv1uSetLogLevel( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
NW_IN NwU32T logLevel) NW_IN uint32_t logLevel)
{ {
NwGtpv1uStackT *thiz = (NwGtpv1uStackT *) hGtpuStackHandle; NwGtpv1uStackT *thiz = (NwGtpv1uStackT *) hGtpuStackHandle;
thiz->logLevel = logLevel; thiz->logLevel = logLevel;
...@@ -837,14 +837,14 @@ nwGtpv1uSetLogLevel( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -837,14 +837,14 @@ nwGtpv1uSetLogLevel( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
NW_IN NwU8T *udpData, NW_IN uint8_t *udpData,
NW_IN NwU32T udpDataLen, NW_IN uint32_t udpDataLen,
NW_IN NwU16T peerPort, NW_IN uint16_t peerPort,
NW_IN NwU32T peerIp) NW_IN uint32_t peerIp)
{ {
NwGtpv1uRcT ret = NW_GTPV1U_FAILURE; NwGtpv1uRcT ret = NW_GTPV1U_FAILURE;
NwGtpv1uStackT *thiz; NwGtpv1uStackT *thiz;
NwU16T msgType; uint16_t msgType;
#if defined(ENB_MODE) #if defined(ENB_MODE)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_UDP_REQ, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_UDP_REQ, VCD_FUNCTION_IN);
...@@ -853,7 +853,7 @@ nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -853,7 +853,7 @@ nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
NW_ASSERT(thiz); NW_ASSERT(thiz);
msgType = *((NwU8T *)(udpData + 1)); msgType = *((uint8_t *)(udpData + 1));
switch(msgType) { switch(msgType) {
case NW_GTP_ECHO_REQ: case NW_GTP_ECHO_REQ:
......
...@@ -60,14 +60,14 @@ static NwGtpv1uMsgT *gpGtpv1uMsgPool = NULL; ...@@ -60,14 +60,14 @@ static NwGtpv1uMsgT *gpGtpv1uMsgPool = NULL;
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, nwGtpv1uMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
NW_IN NwU8T seqNumFlag, NW_IN uint8_t seqNumFlag,
NW_IN NwU8T npduNumFlag, NW_IN uint8_t npduNumFlag,
NW_IN NwU8T extHdrFlag, NW_IN uint8_t extHdrFlag,
NW_IN NwU8T msgType, NW_IN uint8_t msgType,
NW_IN NwU8T teid, NW_IN uint8_t teid,
NW_IN NwU16T seqNum, NW_IN uint16_t seqNum,
NW_IN NwU8T npduNum, NW_IN uint8_t npduNum,
NW_IN NwU8T nextExtHeader, NW_IN uint8_t nextExtHeader,
NW_OUT NwGtpv1uMsgHandleT *phMsg) NW_OUT NwGtpv1uMsgHandleT *phMsg)
{ {
NwGtpv1uStackT *pStack = (NwGtpv1uStackT *) hGtpuStackHandle; NwGtpv1uStackT *pStack = (NwGtpv1uStackT *) hGtpuStackHandle;
...@@ -118,18 +118,18 @@ nwGtpv1uMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -118,18 +118,18 @@ nwGtpv1uMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uGpduMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, nwGtpv1uGpduMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
NW_IN NwU32T teid, NW_IN uint32_t teid,
NW_IN NwU8T seqNumFlag, NW_IN uint8_t seqNumFlag,
NW_IN NwU16T seqNum, NW_IN uint16_t seqNum,
NW_IN NwU8T *tpdu, NW_IN uint8_t *tpdu,
NW_IN NwU16T tpduLength, NW_IN uint16_t tpduLength,
NW_IN NwU32T tpduOffset, NW_IN uint32_t tpduOffset,
NW_OUT NwGtpv1uMsgHandleT *phMsg) NW_OUT NwGtpv1uMsgHandleT *phMsg)
{ {
NwGtpv1uStackT *pStack = (NwGtpv1uStackT *) hGtpuStackHandle; NwGtpv1uStackT *pStack = (NwGtpv1uStackT *) hGtpuStackHandle;
NwGtpv1uMsgT *pMsg; NwGtpv1uMsgT *pMsg;
//NwU32T header_len = 0; //uint32_t header_len = 0;
NwU32T msgExtraLen = 0; uint32_t msgExtraLen = 0;
if(gpGtpv1uMsgPool) { if(gpGtpv1uMsgPool) {
pMsg = gpGtpv1uMsgPool; pMsg = gpGtpv1uMsgPool;
...@@ -237,8 +237,8 @@ nwGtpv1uMsgFromMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -237,8 +237,8 @@ nwGtpv1uMsgFromMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uMsgFromBufferNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, nwGtpv1uMsgFromBufferNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
NW_IN NwU8T *pBuf, NW_IN uint8_t *pBuf,
NW_IN NwU32T bufLen, NW_IN uint32_t bufLen,
NW_OUT NwGtpv1uMsgHandleT *phMsg) NW_OUT NwGtpv1uMsgHandleT *phMsg)
{ {
NwGtpv1uStackT *pStack = (NwGtpv1uStackT *) hGtpuStackHandle; NwGtpv1uStackT *pStack = (NwGtpv1uStackT *) hGtpuStackHandle;
...@@ -267,17 +267,17 @@ nwGtpv1uMsgFromBufferNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -267,17 +267,17 @@ nwGtpv1uMsgFromBufferNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
pBuf += 2; pBuf += 2;
pMsg->teid = ntohl(*((NwU32T *)pBuf)); pMsg->teid = ntohl(*((uint32_t *)pBuf));
pBuf += 4; pBuf += 4;
if(pMsg->extHdrFlag || pMsg->seqNumFlag || pMsg->npduNumFlag) { if(pMsg->extHdrFlag || pMsg->seqNumFlag || pMsg->npduNumFlag) {
pMsg->seqNum = ntohs(*(((NwU16T *)pBuf))); pMsg->seqNum = ntohs(*(((uint16_t *)pBuf)));
pBuf += 2; pBuf += 2;
pMsg->npduNum = *(pBuf++); pMsg->npduNum = *(pBuf++);
pMsg->nextExtHdrType = *(pBuf++); pMsg->nextExtHdrType = *(pBuf++);
} }
pMsg->msgBufOffset = (NwU32T)(pBuf - pMsg->msgBuf); pMsg->msgBufOffset = (uint32_t)(pBuf - pMsg->msgBuf);
pMsg->msgBufLen = bufLen - pMsg->msgBufOffset; pMsg->msgBufLen = bufLen - pMsg->msgBufOffset;
pMsg->msgLen = bufLen; pMsg->msgLen = bufLen;
#if defined(LOG_GTPU) && LOG_GTPU > 0 #if defined(LOG_GTPU) && LOG_GTPU > 0
...@@ -308,7 +308,7 @@ nwGtpv1uMsgDelete( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -308,7 +308,7 @@ nwGtpv1uMsgDelete( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
*/ */
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uMsgSetTeid(NW_IN NwGtpv1uMsgHandleT hMsg, NwU32T teid) nwGtpv1uMsgSetTeid(NW_IN NwGtpv1uMsgHandleT hMsg, uint32_t teid)
{ {
NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg; NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
thiz->teid = teid; thiz->teid = teid;
...@@ -326,7 +326,7 @@ nwGtpv1uMsgSetTeid(NW_IN NwGtpv1uMsgHandleT hMsg, NwU32T teid) ...@@ -326,7 +326,7 @@ nwGtpv1uMsgSetTeid(NW_IN NwGtpv1uMsgHandleT hMsg, NwU32T teid)
*/ */
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uMsgSetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg, NwU32T seqNum) nwGtpv1uMsgSetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg, uint32_t seqNum)
{ {
NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg; NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
thiz->seqNum = seqNum; thiz->seqNum = seqNum;
...@@ -339,7 +339,7 @@ nwGtpv1uMsgSetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg, NwU32T seqNum) ...@@ -339,7 +339,7 @@ nwGtpv1uMsgSetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg, NwU32T seqNum)
* @param[in] hMsg : Message handle. * @param[in] hMsg : Message handle.
*/ */
NwU32T uint32_t
nwGtpv1uMsgGetTeid(NW_IN NwGtpv1uMsgHandleT hMsg) nwGtpv1uMsgGetTeid(NW_IN NwGtpv1uMsgHandleT hMsg)
{ {
NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg; NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
...@@ -353,7 +353,7 @@ nwGtpv1uMsgGetTeid(NW_IN NwGtpv1uMsgHandleT hMsg) ...@@ -353,7 +353,7 @@ nwGtpv1uMsgGetTeid(NW_IN NwGtpv1uMsgHandleT hMsg)
* @param[in] hMsg : Message handle. * @param[in] hMsg : Message handle.
*/ */
NwU32T uint32_t
nwGtpv1uMsgGetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg) nwGtpv1uMsgGetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg)
{ {
NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg; NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
...@@ -366,7 +366,7 @@ nwGtpv1uMsgGetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg) ...@@ -366,7 +366,7 @@ nwGtpv1uMsgGetSeqNumber(NW_IN NwGtpv1uMsgHandleT hMsg)
* @param[in] hMsg : Message handle. * @param[in] hMsg : Message handle.
*/ */
NwU32T uint32_t
nwGtpv1uMsgGetMsgType(NW_IN NwGtpv1uMsgHandleT hMsg) nwGtpv1uMsgGetMsgType(NW_IN NwGtpv1uMsgHandleT hMsg)
{ {
NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg; NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
...@@ -380,11 +380,11 @@ nwGtpv1uMsgGetMsgType(NW_IN NwGtpv1uMsgHandleT hMsg) ...@@ -380,11 +380,11 @@ nwGtpv1uMsgGetMsgType(NW_IN NwGtpv1uMsgHandleT hMsg)
*/ */
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uMsgGetTpdu(NW_IN NwGtpv1uMsgHandleT hMsg, NwU8T *pTpduBuf, nwGtpv1uMsgGetTpdu(NW_IN NwGtpv1uMsgHandleT hMsg, uint8_t *pTpduBuf,
NwU32T *pTpduLength) uint32_t *pTpduLength)
{ {
NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg; NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
NwU8T headerLength = ((thiz->seqNumFlag || thiz->extHdrFlag uint8_t headerLength = ((thiz->seqNumFlag || thiz->extHdrFlag
|| thiz->npduNumFlag) ? 12 : 8); || thiz->npduNumFlag) ? 12 : 8);
*pTpduLength = thiz->msgLen - headerLength; *pTpduLength = thiz->msgLen - headerLength;
...@@ -392,7 +392,7 @@ nwGtpv1uMsgGetTpdu(NW_IN NwGtpv1uMsgHandleT hMsg, NwU8T *pTpduBuf, ...@@ -392,7 +392,7 @@ nwGtpv1uMsgGetTpdu(NW_IN NwGtpv1uMsgHandleT hMsg, NwU8T *pTpduBuf,
return NW_GTPV1U_OK; return NW_GTPV1U_OK;
} }
NwU8T * uint8_t *
nwGtpv1uMsgGetTpduHandle(NW_IN NwGtpv1uMsgHandleT hMsg) nwGtpv1uMsgGetTpduHandle(NW_IN NwGtpv1uMsgHandleT hMsg)
{ {
NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg; NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
...@@ -400,7 +400,7 @@ nwGtpv1uMsgGetTpduHandle(NW_IN NwGtpv1uMsgHandleT hMsg) ...@@ -400,7 +400,7 @@ nwGtpv1uMsgGetTpduHandle(NW_IN NwGtpv1uMsgHandleT hMsg)
|| thiz->npduNumFlag) ? 12 : 8)); || thiz->npduNumFlag) ? 12 : 8));
} }
NwU32T uint32_t
nwGtpv1uMsgGetTpduLength(NW_IN NwGtpv1uMsgHandleT hMsg) nwGtpv1uMsgGetTpduLength(NW_IN NwGtpv1uMsgHandleT hMsg)
{ {
NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg; NwGtpv1uMsgT *thiz = (NwGtpv1uMsgT *) hMsg;
...@@ -410,8 +410,8 @@ nwGtpv1uMsgGetTpduLength(NW_IN NwGtpv1uMsgHandleT hMsg) ...@@ -410,8 +410,8 @@ nwGtpv1uMsgGetTpduLength(NW_IN NwGtpv1uMsgHandleT hMsg)
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uMsgAddIeTV1(NW_IN NwGtpv1uMsgHandleT hMsg, nwGtpv1uMsgAddIeTV1(NW_IN NwGtpv1uMsgHandleT hMsg,
NW_IN NwU8T type, NW_IN uint8_t type,
NW_IN NwU8T value) NW_IN uint8_t value)
{ {
NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg; NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg;
NwGtpv1uIeTv1T *pIe; NwGtpv1uIeTv1T *pIe;
...@@ -428,9 +428,9 @@ nwGtpv1uMsgAddIeTV1(NW_IN NwGtpv1uMsgHandleT hMsg, ...@@ -428,9 +428,9 @@ nwGtpv1uMsgAddIeTV1(NW_IN NwGtpv1uMsgHandleT hMsg,
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uMsgAddIeTV2(NW_IN NwGtpv1uMsgHandleT hMsg, nwGtpv1uMsgAddIeTV2(NW_IN NwGtpv1uMsgHandleT hMsg,
NW_IN NwU8T type, NW_IN uint8_t type,
NW_IN NwU16T length, NW_IN uint16_t length,
NW_IN NwU16T value) NW_IN uint16_t value)
{ {
NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg; NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg;
NwGtpv1uIeTv2T *pIe; NwGtpv1uIeTv2T *pIe;
...@@ -447,9 +447,9 @@ nwGtpv1uMsgAddIeTV2(NW_IN NwGtpv1uMsgHandleT hMsg, ...@@ -447,9 +447,9 @@ nwGtpv1uMsgAddIeTV2(NW_IN NwGtpv1uMsgHandleT hMsg,
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uMsgAddIeTV4(NW_IN NwGtpv1uMsgHandleT hMsg, nwGtpv1uMsgAddIeTV4(NW_IN NwGtpv1uMsgHandleT hMsg,
NW_IN NwU8T type, NW_IN uint8_t type,
NW_IN NwU16T length, NW_IN uint16_t length,
NW_IN NwU32T value) NW_IN uint32_t value)
{ {
NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg; NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg;
NwGtpv1uIeTv4T *pIe; NwGtpv1uIeTv4T *pIe;
...@@ -466,9 +466,9 @@ nwGtpv1uMsgAddIeTV4(NW_IN NwGtpv1uMsgHandleT hMsg, ...@@ -466,9 +466,9 @@ nwGtpv1uMsgAddIeTV4(NW_IN NwGtpv1uMsgHandleT hMsg,
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uMsgAddIe(NW_IN NwGtpv1uMsgHandleT hMsg, nwGtpv1uMsgAddIe(NW_IN NwGtpv1uMsgHandleT hMsg,
NW_IN NwU8T type, NW_IN uint8_t type,
NW_IN NwU16T length, NW_IN uint16_t length,
NW_IN NwU8T *pVal) NW_IN uint8_t *pVal)
{ {
NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg; NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg;
NwGtpv1uIeTlvT *pIe; NwGtpv1uIeTlvT *pIe;
...@@ -489,8 +489,8 @@ nwGtpv1uMsgHexDump(NwGtpv1uMsgHandleT hMsg, FILE *fp) ...@@ -489,8 +489,8 @@ nwGtpv1uMsgHexDump(NwGtpv1uMsgHandleT hMsg, FILE *fp)
{ {
NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg; NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg;
NwU8T *data = pMsg->msgBuf; uint8_t *data = pMsg->msgBuf;
NwU32T size = pMsg->msgLen; uint32_t size = pMsg->msgLen;
unsigned char *p = (unsigned char *)data; unsigned char *p = (unsigned char *)data;
unsigned char c; unsigned char c;
......
...@@ -232,7 +232,7 @@ nwGtpv1uTrxnNew( NW_IN NwGtpv1uStackT *thiz, ...@@ -232,7 +232,7 @@ nwGtpv1uTrxnNew( NW_IN NwGtpv1uStackT *thiz,
*/ */
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uTrxnWithSeqNew( NW_IN NwGtpv1uStackT *thiz, nwGtpv1uTrxnWithSeqNew( NW_IN NwGtpv1uStackT *thiz,
NW_IN NwU32T seqNum, NW_IN uint32_t seqNum,
NW_OUT NwGtpv1uTrxnT **ppTrxn) NW_OUT NwGtpv1uTrxnT **ppTrxn)
{ {
NwGtpv1uRcT rc = NW_GTPV1U_OK; NwGtpv1uRcT rc = NW_GTPV1U_OK;
...@@ -313,12 +313,12 @@ nwGtpv1uTrxnDelete( NW_INOUT NwGtpv1uTrxnT **pthiz) ...@@ -313,12 +313,12 @@ nwGtpv1uTrxnDelete( NW_INOUT NwGtpv1uTrxnT **pthiz)
NwGtpv1uRcT NwGtpv1uRcT
nwGtpv1uTrxnCreateAndSendMsg( NW_IN NwGtpv1uStackT *thiz, nwGtpv1uTrxnCreateAndSendMsg( NW_IN NwGtpv1uStackT *thiz,
NW_IN NwGtpv1uTrxnT *pTrxn, NW_IN NwGtpv1uTrxnT *pTrxn,
NW_IN NwU32T peerIp, NW_IN uint32_t peerIp,
NW_IN NwU32T peerPort, NW_IN uint32_t peerPort,
NW_IN NwGtpv1uMsgT *pMsg) NW_IN NwGtpv1uMsgT *pMsg)
{ {
NwGtpv1uRcT rc; NwGtpv1uRcT rc;
NwU8T *msgHdr; uint8_t *msgHdr;
NW_ASSERT(thiz); NW_ASSERT(thiz);
NW_ASSERT(pMsg); NW_ASSERT(pMsg);
...@@ -334,33 +334,33 @@ nwGtpv1uTrxnCreateAndSendMsg( NW_IN NwGtpv1uStackT *thiz, ...@@ -334,33 +334,33 @@ nwGtpv1uTrxnCreateAndSendMsg( NW_IN NwGtpv1uStackT *thiz,
(pMsg->npduNumFlag); (pMsg->npduNumFlag);
*(msgHdr++) = (pMsg->msgType); *(msgHdr++) = (pMsg->msgType);
*((NwU16T *) msgHdr) = htons(pMsg->msgLen); *((uint16_t *) msgHdr) = htons(pMsg->msgLen);
msgHdr += 2; msgHdr += 2;
*((NwU32T *) msgHdr) = htonl(pMsg->teid); *((uint32_t *) msgHdr) = htonl(pMsg->teid);
msgHdr += 4; msgHdr += 4;
if(pMsg->seqNumFlag | pMsg->extHdrFlag | pMsg->npduNumFlag) { if(pMsg->seqNumFlag | pMsg->extHdrFlag | pMsg->npduNumFlag) {
if(pMsg->seqNumFlag) { if(pMsg->seqNumFlag) {
*((NwU16T *) msgHdr) = htons((pTrxn ? pTrxn->seqNum : pMsg->seqNum)); *((uint16_t *) msgHdr) = htons((pTrxn ? pTrxn->seqNum : pMsg->seqNum));
} else { } else {
*((NwU16T *) msgHdr) = 0x0000; *((uint16_t *) msgHdr) = 0x0000;
} }
msgHdr += 2; msgHdr += 2;
if(pMsg->npduNumFlag) { if(pMsg->npduNumFlag) {
*((NwU8T *) msgHdr) = pMsg->npduNumFlag; *((uint8_t *) msgHdr) = pMsg->npduNumFlag;
} else { } else {
*((NwU8T *) msgHdr) = 0x00; *((uint8_t *) msgHdr) = 0x00;
} }
msgHdr++; msgHdr++;
if(pMsg->extHdrFlag) { if(pMsg->extHdrFlag) {
*((NwU8T *) msgHdr) = pMsg->extHdrFlag; *((uint8_t *) msgHdr) = pMsg->extHdrFlag;
} else { } else {
*((NwU8T *) msgHdr) = 0x00; *((uint8_t *) msgHdr) = 0x00;
} }
msgHdr++; msgHdr++;
......
...@@ -23,27 +23,27 @@ ...@@ -23,27 +23,27 @@
extern "C" { extern "C" {
#endif #endif
NwU32T g_log_level = NW_LOG_LEVEL_INFO; uint32_t g_log_level = NW_LOG_LEVEL_INFO;
/*--------------------------------------------------------------------------- /*---------------------------------------------------------------------------
* Public functions * Public functions
*--------------------------------------------------------------------------*/ *--------------------------------------------------------------------------*/
NwGtpv1uRcT nwMiniLogMgrInit(NwMiniLogMgrT *thiz, NwU32T logLevel ) NwGtpv1uRcT nwMiniLogMgrInit(NwMiniLogMgrT *thiz, uint32_t logLevel )
{ {
thiz->logLevel = logLevel; thiz->logLevel = logLevel;
return NW_GTPV1U_OK; return NW_GTPV1U_OK;
} }
NwGtpv1uRcT nwMiniLogMgrSetLogLevel(NwMiniLogMgrT *thiz, NwU32T logLevel) NwGtpv1uRcT nwMiniLogMgrSetLogLevel(NwMiniLogMgrT *thiz, uint32_t logLevel)
{ {
thiz->logLevel = logLevel; thiz->logLevel = logLevel;
} }
NwGtpv1uRcT nwMiniLogMgrLogRequest (NwGtpv1uLogMgrHandleT hLogMgr, NwGtpv1uRcT nwMiniLogMgrLogRequest (NwGtpv1uLogMgrHandleT hLogMgr,
NwU32T logLevel, uint32_t logLevel,
NwCharT *file, NwCharT *file,
NwU32T line, uint32_t line,
NwCharT *logStr) NwCharT *logStr)
{ {
NwMiniLogMgrT *thiz = (NwMiniLogMgrT *) hLogMgr; NwMiniLogMgrT *thiz = (NwMiniLogMgrT *) hLogMgr;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#ifndef __NW_MINI_LOG_MGR_H__ #ifndef __NW_MINI_LOG_MGR_H__
#define __NW_MINI_LOG_MGR_H__ #define __NW_MINI_LOG_MGR_H__
extern NwU32T g_log_level; extern uint32_t g_log_level;
#define NW_LOG( _logLevel, ...) \ #define NW_LOG( _logLevel, ...) \
...@@ -37,7 +37,7 @@ extern NwU32T g_log_level; ...@@ -37,7 +37,7 @@ extern NwU32T g_log_level;
} while(0) } while(0)
typedef struct { typedef struct {
NwU8T logLevel; uint8_t logLevel;
} NwMiniLogMgrT; } NwMiniLogMgrT;
#ifdef __cplusplus #ifdef __cplusplus
...@@ -45,9 +45,9 @@ extern "C" { ...@@ -45,9 +45,9 @@ extern "C" {
#endif #endif
NwGtpv1uRcT nwMiniLogMgrLogRequest (NwGtpv1uLogMgrHandleT logMgrHandle, NwGtpv1uRcT nwMiniLogMgrLogRequest (NwGtpv1uLogMgrHandleT logMgrHandle,
NwU32T logLevel, uint32_t logLevel,
NwCharT* file, NwCharT* file,
NwU32T line, uint32_t line,
NwCharT* logStr); NwCharT* logStr);
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -53,9 +53,9 @@ NW_TMR_CALLBACK(nwMiniTmrMgrHandleTimeout) ...@@ -53,9 +53,9 @@ NW_TMR_CALLBACK(nwMiniTmrMgrHandleTimeout)
*--------------------------------------------------------------------------*/ *--------------------------------------------------------------------------*/
NwGtpv1uRcT nwTimerStart( NwGtpv1uTimerMgrHandleT tmrMgrHandle, NwGtpv1uRcT nwTimerStart( NwGtpv1uTimerMgrHandleT tmrMgrHandle,
NwU32T timeoutSec, uint32_t timeoutSec,
NwU32T timeoutUsec, uint32_t timeoutUsec,
NwU32T tmrType, uint32_t tmrType,
void *timeoutArg, void *timeoutArg,
NwGtpv1uTimerHandleT *hTmr) NwGtpv1uTimerHandleT *hTmr)
{ {
......
...@@ -35,9 +35,9 @@ extern "C" { ...@@ -35,9 +35,9 @@ extern "C" {
#endif #endif
NwGtpv1uRcT nwTimerStart( NwGtpv1uTimerMgrHandleT tmrMgrHandle, NwGtpv1uRcT nwTimerStart( NwGtpv1uTimerMgrHandleT tmrMgrHandle,
NwU32T timeoutSec, uint32_t timeoutSec,
NwU32T timeoutUsec, uint32_t timeoutUsec,
NwU32T tmrType, uint32_t tmrType,
void* timeoutArg, void* timeoutArg,
NwGtpv1uTimerHandleT* hTmr); NwGtpv1uTimerHandleT* hTmr);
......
...@@ -44,9 +44,9 @@ static ...@@ -44,9 +44,9 @@ static
void NW_TMR_CALLBACK(nwUdpDataIndicationCallbackData) void NW_TMR_CALLBACK(nwUdpDataIndicationCallbackData)
{ {
NwGtpv1uRcT rc; NwGtpv1uRcT rc;
NwU8T udpBuf[MAX_UDP_PAYLOAD_LEN]; uint8_t udpBuf[MAX_UDP_PAYLOAD_LEN];
NwS32T bytesRead; NwS32T bytesRead;
NwU32T peerLen; uint32_t peerLen;
struct sockaddr_in peer; struct sockaddr_in peer;
NwMiniUdpEntityT *thiz = (NwMiniUdpEntityT *) arg; NwMiniUdpEntityT *thiz = (NwMiniUdpEntityT *) arg;
...@@ -71,7 +71,7 @@ void NW_TMR_CALLBACK(nwUdpDataIndicationCallbackData) ...@@ -71,7 +71,7 @@ void NW_TMR_CALLBACK(nwUdpDataIndicationCallbackData)
*--------------------------------------------------------------------------*/ *--------------------------------------------------------------------------*/
NwGtpv1uRcT nwMiniUdpInit(NwMiniUdpEntityT *thiz, NwGtpv1uRcT nwMiniUdpInit(NwMiniUdpEntityT *thiz,
NwGtpv1uStackHandleT hGtpv1uStack, NwU8T *ipAddr) NwGtpv1uStackHandleT hGtpv1uStack, uint8_t *ipAddr)
{ {
int sd; int sd;
struct sockaddr_in addr; struct sockaddr_in addr;
...@@ -109,10 +109,10 @@ NwGtpv1uRcT nwMiniUdpDestroy(NwMiniUdpEntityT *thiz) ...@@ -109,10 +109,10 @@ NwGtpv1uRcT nwMiniUdpDestroy(NwMiniUdpEntityT *thiz)
} }
NwGtpv1uRcT nwMiniUdpDataReq(NwGtpv1uUdpHandleT udpHandle, NwGtpv1uRcT nwMiniUdpDataReq(NwGtpv1uUdpHandleT udpHandle,
NwU8T *dataBuf, uint8_t *dataBuf,
NwU32T dataSize, uint32_t dataSize,
NwU32T peerIpAddr, uint32_t peerIpAddr,
NwU32T peerPort) uint32_t peerPort)
{ {
struct sockaddr_in peerAddr; struct sockaddr_in peerAddr;
NwS32T bytesSent; NwS32T bytesSent;
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#define __NW_MINI_UDP_ENTITY_H__ #define __NW_MINI_UDP_ENTITY_H__
typedef struct { typedef struct {
NwU32T hSocket; uint32_t hSocket;
NwEventT ev; NwEventT ev;
NwGtpv1uStackHandleT hGtpv1uStack; NwGtpv1uStackHandleT hGtpv1uStack;
} NwMiniUdpEntityT; } NwMiniUdpEntityT;
...@@ -34,15 +34,15 @@ typedef struct { ...@@ -34,15 +34,15 @@ typedef struct {
extern "C" { extern "C" {
#endif #endif
NwGtpv1uRcT nwMiniUdpInit(NwMiniUdpEntityT* thiz, NwGtpv1uStackHandleT hGtpv1uStack, NwU8T* ipAddr); NwGtpv1uRcT nwMiniUdpInit(NwMiniUdpEntityT* thiz, NwGtpv1uStackHandleT hGtpv1uStack, uint8_t* ipAddr);
NwGtpv1uRcT nwMiniUdpDestroy(NwMiniUdpEntityT* thiz); NwGtpv1uRcT nwMiniUdpDestroy(NwMiniUdpEntityT* thiz);
NwGtpv1uRcT nwMiniUdpDataReq(NwGtpv1uUdpHandleT udpHandle, NwGtpv1uRcT nwMiniUdpDataReq(NwGtpv1uUdpHandleT udpHandle,
NwU8T* dataBuf, uint8_t* dataBuf,
NwU32T dataSize, uint32_t dataSize,
NwU32T peerAddr, uint32_t peerAddr,
NwU32T peerPort); uint32_t peerPort);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -36,7 +36,7 @@ extern "C" { ...@@ -36,7 +36,7 @@ extern "C" {
#define MAX_UDP_PAYLOAD_LEN (4096) #define MAX_UDP_PAYLOAD_LEN (4096)
NwGtpv1uRcT NwGtpv1uRcT
nwMiniUlpSendEchoRequestToPeer(NwMiniUlpEntityT *thiz, NwU32T peerIp) nwMiniUlpSendEchoRequestToPeer(NwMiniUlpEntityT *thiz, uint32_t peerIp)
{ {
NwGtpv1uRcT rc; NwGtpv1uRcT rc;
NwGtpv1uUlpApiT ulpReq; NwGtpv1uUlpApiT ulpReq;
...@@ -82,9 +82,9 @@ void NW_EVT_CALLBACK(nwMiniUlpDataIndicationCallbackData) ...@@ -82,9 +82,9 @@ void NW_EVT_CALLBACK(nwMiniUlpDataIndicationCallbackData)
{ {
NwMiniUlpEntityT *thiz = (NwMiniUlpEntityT *) arg; NwMiniUlpEntityT *thiz = (NwMiniUlpEntityT *) arg;
NwGtpv1uRcT rc; NwGtpv1uRcT rc;
NwU8T udpBuf[MAX_UDP_PAYLOAD_LEN]; uint8_t udpBuf[MAX_UDP_PAYLOAD_LEN];
NwS32T bytesRead; NwS32T bytesRead;
NwU32T peerLen; uint32_t peerLen;
struct sockaddr_in peer; struct sockaddr_in peer;
peerLen = sizeof(peer); peerLen = sizeof(peer);
...@@ -123,7 +123,7 @@ nwMiniUlpDestroy(NwMiniUlpEntityT *thiz) ...@@ -123,7 +123,7 @@ nwMiniUlpDestroy(NwMiniUlpEntityT *thiz)
} }
NwGtpv1uRcT NwGtpv1uRcT
nwMiniUlpCreateConn(NwMiniUlpEntityT *thiz, char *localIpStr, NwU16T localport, nwMiniUlpCreateConn(NwMiniUlpEntityT *thiz, char *localIpStr, uint16_t localport,
char *peerIpStr) char *peerIpStr)
{ {
NwGtpv1uRcT rc; NwGtpv1uRcT rc;
...@@ -214,8 +214,8 @@ nwMiniUlpDestroyConn(NwMiniUlpEntityT *thiz) ...@@ -214,8 +214,8 @@ nwMiniUlpDestroyConn(NwMiniUlpEntityT *thiz)
NwGtpv1uRcT NwGtpv1uRcT
nwMiniUlpTpduSend(NwMiniUlpEntityT *thiz, NwU8T *tpduBuf, NwU32T tpduLen , nwMiniUlpTpduSend(NwMiniUlpEntityT *thiz, uint8_t *tpduBuf, uint32_t tpduLen ,
NwU16T fromPort) uint16_t fromPort)
{ {
NwGtpv1uRcT rc; NwGtpv1uRcT rc;
NwGtpv1uUlpApiT ulpReq; NwGtpv1uUlpApiT ulpReq;
...@@ -260,9 +260,9 @@ nwMiniUlpProcessStackReqCallback (NwGtpv1uUlpHandleT hUlp, ...@@ -260,9 +260,9 @@ nwMiniUlpProcessStackReqCallback (NwGtpv1uUlpHandleT hUlp,
case NW_GTPV1U_ULP_API_RECV_TPDU: { case NW_GTPV1U_ULP_API_RECV_TPDU: {
struct sockaddr_in peerAddr; struct sockaddr_in peerAddr;
NwS32T bytesSent; NwS32T bytesSent;
NwU8T dataBuf[4096]; uint8_t dataBuf[4096];
NwU32T dataSize; uint32_t dataSize;
NwU32T peerIpAddr = (inet_addr(thiz->peerIpStr)); uint32_t peerIpAddr = (inet_addr(thiz->peerIpStr));
NW_ASSERT( NW_GTPV1U_OK == nwGtpv1uMsgGetTpdu(pUlpApi->apiInfo.recvMsgInfo.hMsg, NW_ASSERT( NW_GTPV1U_OK == nwGtpv1uMsgGetTpdu(pUlpApi->apiInfo.recvMsgInfo.hMsg,
dataBuf, &dataSize) ); dataBuf, &dataSize) );
......
...@@ -21,11 +21,11 @@ ...@@ -21,11 +21,11 @@
typedef struct { typedef struct {
int hSocket; int hSocket;
NwU16T seqNum; uint16_t seqNum;
NwU8T restartCounter; uint8_t restartCounter;
NwU8T localIpStr[16]; uint8_t localIpStr[16];
NwU8T peerIpStr[16]; uint8_t peerIpStr[16];
NwU32T localPort[1025]; uint32_t localPort[1025];
NwEventT ev[1025]; NwEventT ev[1025];
NwGtpv1uStackHandleT hGtpv1uStack; NwGtpv1uStackHandleT hGtpv1uStack;
NwGtpv1uStackSessionHandleT hGtpv1uConn; NwGtpv1uStackSessionHandleT hGtpv1uConn;
...@@ -42,7 +42,7 @@ NwGtpv1uRcT ...@@ -42,7 +42,7 @@ NwGtpv1uRcT
nwMiniUlpDestroy(NwMiniUlpEntityT* thiz); nwMiniUlpDestroy(NwMiniUlpEntityT* thiz);
NwGtpv1uRcT NwGtpv1uRcT
nwMiniUlpCreateConn(NwMiniUlpEntityT* thiz, char* localIpStr, NwU16T localPort, char* peerIpStr); nwMiniUlpCreateConn(NwMiniUlpEntityT* thiz, char* localIpStr, uint16_t localPort, char* peerIpStr);
NwGtpv1uRcT NwGtpv1uRcT
nwMiniUlpDestroyConn(NwMiniUlpEntityT* thiz); nwMiniUlpDestroyConn(NwMiniUlpEntityT* thiz);
...@@ -51,7 +51,7 @@ NwGtpv1uRcT ...@@ -51,7 +51,7 @@ NwGtpv1uRcT
nwMiniUlpSendMsg(NwMiniUlpEntityT* thiz); nwMiniUlpSendMsg(NwMiniUlpEntityT* thiz);
NwGtpv1uRcT NwGtpv1uRcT
nwMiniUlpTpduSend(NwMiniUlpEntityT* thiz, NwU8T* tpduBuf, NwU32T tpduLen , NwU16T fromPort); nwMiniUlpTpduSend(NwMiniUlpEntityT* thiz, uint8_t* tpduBuf, uint32_t tpduLen , uint16_t fromPort);
NwGtpv1uRcT NwGtpv1uRcT
nwMiniUlpProcessStackReqCallback (NwGtpv1uUlpHandleT hUlp, nwMiniUlpProcessStackReqCallback (NwGtpv1uUlpHandleT hUlp,
......
...@@ -37,8 +37,8 @@ int main(int argc, char *argv[]) ...@@ -37,8 +37,8 @@ int main(int argc, char *argv[])
{ {
NwGtpv1uRcT rc; NwGtpv1uRcT rc;
char *logLevelStr; char *logLevelStr;
NwU32T logLevel; uint32_t logLevel;
NwU32T num_of_connections; uint32_t num_of_connections;
NwGtpv1uStackHandleT hGtpv1uStack = 0; NwGtpv1uStackHandleT hGtpv1uStack = 0;
NwMiniUlpEntityT ulpObj; NwMiniUlpEntityT ulpObj;
......
...@@ -43,25 +43,25 @@ ...@@ -43,25 +43,25 @@
*/ */
typedef struct { typedef struct {
NwU8T groupedIeType; uint8_t groupedIeType;
NwU16T mandatoryIeCount; uint16_t mandatoryIeCount;
NwGtpv2cStackHandleT hStack; NwGtpv2cStackHandleT hStack;
struct { struct {
NwU8T ieMinLength; uint8_t ieMinLength;
NwU8T iePresence; uint8_t iePresence;
} ieParseInfo[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM]; } ieParseInfo[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM];
} NwGtpv2cGroupedIeParseInfoT; } NwGtpv2cGroupedIeParseInfoT;
typedef struct { typedef struct {
NwU16T msgType; uint16_t msgType;
NwU16T mandatoryIeCount; uint16_t mandatoryIeCount;
NwGtpv2cStackHandleT hStack; NwGtpv2cStackHandleT hStack;
struct { struct {
NwU8T ieMinLength; uint8_t ieMinLength;
NwU8T iePresence; uint8_t iePresence;
NwGtpv2cGroupedIeParseInfoT* pGroupedIeInfo; NwGtpv2cGroupedIeParseInfoT* pGroupedIeInfo;
} ieParseInfo[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM]; } ieParseInfo[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM];
...@@ -72,7 +72,7 @@ extern "C" { ...@@ -72,7 +72,7 @@ extern "C" {
#endif #endif
NwGtpv2cMsgIeParseInfoT* NwGtpv2cMsgIeParseInfoT*
nwGtpv2cMsgIeParseInfoNew(NwGtpv2cStackHandleT hStack, NwU8T msgType); nwGtpv2cMsgIeParseInfoNew(NwGtpv2cStackHandleT hStack, uint8_t msgType);
NwRcT NwRcT
nwGtpv2cMsgIeParseInfoDelete(NwGtpv2cMsgIeParseInfoT* thiz); nwGtpv2cMsgIeParseInfoDelete(NwGtpv2cMsgIeParseInfoT* thiz);
......
...@@ -90,16 +90,16 @@ extern "C" { ...@@ -90,16 +90,16 @@ extern "C" {
*/ */
typedef struct NwGtpv2cStack { typedef struct NwGtpv2cStack {
NwU32T id; uint32_t id;
NwGtpv2cUlpEntityT ulp; NwGtpv2cUlpEntityT ulp;
NwGtpv2cUdpEntityT udp; NwGtpv2cUdpEntityT udp;
NwGtpv2cMemMgrEntityT memMgr; NwGtpv2cMemMgrEntityT memMgr;
NwGtpv2cTimerMgrEntityT tmrMgr; NwGtpv2cTimerMgrEntityT tmrMgr;
NwGtpv2cLogMgrEntityT logMgr; NwGtpv2cLogMgrEntityT logMgr;
NwU32T seqNum; uint32_t seqNum;
NwU32T logLevel; uint32_t logLevel;
NwU32T restartCounter; uint32_t restartCounter;
NwGtpv2cMsgIeParseInfoT *pGtpv2cMsgIeParseInfo[NW_GTP_MSG_END]; NwGtpv2cMsgIeParseInfoT *pGtpv2cMsgIeParseInfo[NW_GTP_MSG_END];
struct NwGtpv2cTimeoutInfo *activeTimerInfo; struct NwGtpv2cTimeoutInfo *activeTimerInfo;
...@@ -123,12 +123,12 @@ typedef struct NwGtpv2cStack { ...@@ -123,12 +123,12 @@ typedef struct NwGtpv2cStack {
typedef struct NwGtpv2cTimeoutInfo { typedef struct NwGtpv2cTimeoutInfo {
NwGtpv2cStackHandleT hStack; NwGtpv2cStackHandleT hStack;
struct timeval tvTimeout; struct timeval tvTimeout;
NwU32T tmrType; uint32_t tmrType;
void* timeoutArg; void* timeoutArg;
NwRcT (*timeoutCallbackFunc)(void*); NwRcT (*timeoutCallbackFunc)(void*);
NwGtpv2cTimerHandleT hTimer; NwGtpv2cTimerHandleT hTimer;
RB_ENTRY (NwGtpv2cTimeoutInfo) activeTimerListRbtNode; /**< RB Tree Data Structure Node */ RB_ENTRY (NwGtpv2cTimeoutInfo) activeTimerListRbtNode; /**< RB Tree Data Structure Node */
NwU32T timerMinHeapIndex; uint32_t timerMinHeapIndex;
struct NwGtpv2cTimeoutInfo *next; struct NwGtpv2cTimeoutInfo *next;
} NwGtpv2cTimeoutInfoT; } NwGtpv2cTimeoutInfoT;
...@@ -143,23 +143,23 @@ typedef struct NwGtpv2cTimeoutInfo { ...@@ -143,23 +143,23 @@ typedef struct NwGtpv2cTimeoutInfo {
* NwGtpv2cMsgT holds gtpv2c messages to/from the peer. * NwGtpv2cMsgT holds gtpv2c messages to/from the peer.
*/ */
typedef struct NwGtpv2cMsgS { typedef struct NwGtpv2cMsgS {
NwU8T version; uint8_t version;
NwU8T teidPresent; uint8_t teidPresent;
NwU8T msgType; uint8_t msgType;
NwU16T msgLen; uint16_t msgLen;
NwU32T teid; uint32_t teid;
NwU32T seqNum; uint32_t seqNum;
NwU8T* pMsgStart; uint8_t* pMsgStart;
#define NW_GTPV2C_MAX_GROUPED_IE_DEPTH (2) #define NW_GTPV2C_MAX_GROUPED_IE_DEPTH (2)
struct { struct {
NwGtpv2cIeTlvT *pIe[NW_GTPV2C_MAX_GROUPED_IE_DEPTH]; NwGtpv2cIeTlvT *pIe[NW_GTPV2C_MAX_GROUPED_IE_DEPTH];
NwU8T top; uint8_t top;
} groupedIeEncodeStack; } groupedIeEncodeStack;
NwBoolT isIeValid[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM]; NwBoolT isIeValid[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM];
NwU8T *pIe[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM]; uint8_t *pIe[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM];
NwU8T msgBuf[NW_GTPV2C_MAX_MSG_LEN]; uint8_t msgBuf[NW_GTPV2C_MAX_MSG_LEN];
NwGtpv2cStackHandleT hStack; NwGtpv2cStackHandleT hStack;
struct NwGtpv2cMsgS* next; struct NwGtpv2cMsgS* next;
} NwGtpv2cMsgT; } NwGtpv2cMsgT;
...@@ -169,11 +169,11 @@ typedef struct NwGtpv2cMsgS { ...@@ -169,11 +169,11 @@ typedef struct NwGtpv2cMsgS {
*/ */
typedef struct NwGtpv2cTrxn { typedef struct NwGtpv2cTrxn {
NwU32T seqNum; uint32_t seqNum;
NwU32T peerIp; uint32_t peerIp;
NwU32T peerPort; uint32_t peerPort;
NwU8T t3Timer; uint8_t t3Timer;
NwU8T maxRetries; uint8_t maxRetries;
NwGtpv2cMsgT* pMsg; NwGtpv2cMsgT* pMsg;
NwGtpv2cStackT* pStack; NwGtpv2cStackT* pStack;
NwGtpv2cTimerHandleT hRspTmr; /**< Handle to reponse timer */ NwGtpv2cTimerHandleT hRspTmr; /**< Handle to reponse timer */
...@@ -189,11 +189,11 @@ typedef struct NwGtpv2cTrxn { ...@@ -189,11 +189,11 @@ typedef struct NwGtpv2cTrxn {
*/ */
typedef struct NwGtpv2cPathS { typedef struct NwGtpv2cPathS {
NwU32T hUlpPath; /**< Handle to ULP path contect */ uint32_t hUlpPath; /**< Handle to ULP path contect */
NwU32T ipv4Address; uint32_t ipv4Address;
NwU32T restartCounter; uint32_t restartCounter;
NwU16T t3ResponseTimout; uint16_t t3ResponseTimout;
NwU16T n3RequestCount; uint16_t n3RequestCount;
NwGtpv2cTimerHandleT hKeepAliveTmr; /**< Handle to path keep alive echo timer */ NwGtpv2cTimerHandleT hKeepAliveTmr; /**< Handle to path keep alive echo timer */
RB_ENTRY (NwGtpv2cPathS) pathMapRbtNode; RB_ENTRY (NwGtpv2cPathS) pathMapRbtNode;
} NwGtpv2cPathT; } NwGtpv2cPathT;
...@@ -210,9 +210,9 @@ RB_PROTOTYPE(NwGtpv2cActiveTimerList, NwGtpv2cTimeoutInfo, activeTimerListRbtNod ...@@ -210,9 +210,9 @@ RB_PROTOTYPE(NwGtpv2cActiveTimerList, NwGtpv2cTimeoutInfo, activeTimerListRbtNod
NwRcT NwRcT
nwGtpv2cStartTimer(NwGtpv2cStackT* thiz, nwGtpv2cStartTimer(NwGtpv2cStackT* thiz,
NwU32T timeoutSec, uint32_t timeoutSec,
NwU32T timeoutUsec, uint32_t timeoutUsec,
NwU32T tmrType, uint32_t tmrType,
NwRcT (*timeoutCallbackFunc)(void*), NwRcT (*timeoutCallbackFunc)(void*),
void* timeoutCallbackArg, void* timeoutCallbackArg,
NwGtpv2cTimerHandleT *phTimer); NwGtpv2cTimerHandleT *phTimer);
......
...@@ -60,7 +60,7 @@ nwGtpv2cTrxnNew( NW_IN NwGtpv2cStackT* pStack); ...@@ -60,7 +60,7 @@ nwGtpv2cTrxnNew( NW_IN NwGtpv2cStackT* pStack);
*/ */
NwGtpv2cTrxnT* NwGtpv2cTrxnT*
nwGtpv2cTrxnWithSeqNumNew( NW_IN NwGtpv2cStackT* pStack, nwGtpv2cTrxnWithSeqNumNew( NW_IN NwGtpv2cStackT* pStack,
NW_IN NwU32T seqNum); NW_IN uint32_t seqNum);
/** /**
* Another overloaded constructor. Create transaction as outstanding * Another overloaded constructor. Create transaction as outstanding
...@@ -76,10 +76,10 @@ nwGtpv2cTrxnWithSeqNumNew( NW_IN NwGtpv2cStackT* pStack, ...@@ -76,10 +76,10 @@ nwGtpv2cTrxnWithSeqNumNew( NW_IN NwGtpv2cStackT* pStack,
NwGtpv2cTrxnT* NwGtpv2cTrxnT*
nwGtpv2cTrxnOutstandingRxNew( NW_IN NwGtpv2cStackT* pStack, nwGtpv2cTrxnOutstandingRxNew( NW_IN NwGtpv2cStackT* pStack,
NW_IN NwU32T teidLocal, NW_IN uint32_t teidLocal,
NW_IN NwU32T peerIp, NW_IN uint32_t peerIp,
NW_IN NwU32T peerPort, NW_IN uint32_t peerPort,
NW_IN NwU32T seqNum); NW_IN uint32_t seqNum);
NwRcT NwRcT
nwGtpv2cTrxnDelete( NW_INOUT NwGtpv2cTrxnT **ppTrxn); nwGtpv2cTrxnDelete( NW_INOUT NwGtpv2cTrxnT **ppTrxn);
......
...@@ -51,15 +51,15 @@ extern "C" { ...@@ -51,15 +51,15 @@ extern "C" {
struct NwGtpv2cStack; struct NwGtpv2cStack;
typedef struct NwGtpv2cTunnel { typedef struct NwGtpv2cTunnel {
NwU32T teid; uint32_t teid;
NwU32T ipv4AddrRemote; uint32_t ipv4AddrRemote;
NwGtpv2cUlpTunnelHandleT hUlpTunnel; NwGtpv2cUlpTunnelHandleT hUlpTunnel;
RB_ENTRY (NwGtpv2cTunnel) tunnelMapRbtNode; /**< RB Tree Data Structure Node */ RB_ENTRY (NwGtpv2cTunnel) tunnelMapRbtNode; /**< RB Tree Data Structure Node */
struct NwGtpv2cTunnel* next; struct NwGtpv2cTunnel* next;
} NwGtpv2cTunnelT; } NwGtpv2cTunnelT;
NwGtpv2cTunnelT* NwGtpv2cTunnelT*
nwGtpv2cTunnelNew(struct NwGtpv2cStack *hStack, NwU32T teid, NwU32T peerIpv4Addr, NwGtpv2cUlpTunnelHandleT hUlpTunnel); nwGtpv2cTunnelNew(struct NwGtpv2cStack *hStack, uint32_t teid, uint32_t peerIpv4Addr, NwGtpv2cUlpTunnelHandleT hUlpTunnel);
NwRcT NwRcT
nwGtpv2cTunnelDelete(struct NwGtpv2cStack *pStack, NwGtpv2cTunnelT* thiz); nwGtpv2cTunnelDelete(struct NwGtpv2cStack *pStack, NwGtpv2cTunnelT* thiz);
......
...@@ -120,10 +120,10 @@ typedef NwPtrT NwGtpv2cTunnelHandleT; /**< Gtpv2c Ulp ...@@ -120,10 +120,10 @@ typedef NwPtrT NwGtpv2cTunnelHandleT; /**< Gtpv2c Ulp
typedef NwPtrT NwGtpv2cUlpTrxnHandleT; /**< Gtpv2c Ulp Transaction Handle */ typedef NwPtrT NwGtpv2cUlpTrxnHandleT; /**< Gtpv2c Ulp Transaction Handle */
typedef NwPtrT NwGtpv2cUlpTunnelHandleT; /**< Gtpv2c Ulp Tunnel Handle */ typedef NwPtrT NwGtpv2cUlpTunnelHandleT; /**< Gtpv2c Ulp Tunnel Handle */
typedef NwU8T NwGtpv2cMsgTypeT; /**< Gtpv2c Msg Type */ typedef uint8_t NwGtpv2cMsgTypeT; /**< Gtpv2c Msg Type */
typedef struct NwGtpv2cStackConfigS { typedef struct NwGtpv2cStackConfigS {
NwU16T __tbd; uint16_t __tbd;
} NwGtpv2cStackConfigT; } NwGtpv2cStackConfigT;
/*--------------------------------------------------------------------------* /*--------------------------------------------------------------------------*
...@@ -172,11 +172,11 @@ typedef enum { ...@@ -172,11 +172,11 @@ typedef enum {
*/ */
typedef struct NwGtpv2cErrorS { typedef struct NwGtpv2cErrorS {
NW_IN NwU8T cause; NW_IN uint8_t cause;
NW_IN NwU8T flags; NW_IN uint8_t flags;
struct { struct {
NW_IN NwU8T type; NW_IN uint8_t type;
NW_IN NwU8T instance; NW_IN uint8_t instance;
} offendingIe; } offendingIe;
} NwGtpv2cErrorT; } NwGtpv2cErrorT;
...@@ -187,12 +187,12 @@ typedef struct NwGtpv2cErrorS { ...@@ -187,12 +187,12 @@ typedef struct NwGtpv2cErrorS {
typedef struct { typedef struct {
NW_INOUT NwGtpv2cTunnelHandleT hTunnel; /**< Tunnel handle over which the mesasge is to be sent.*/ NW_INOUT NwGtpv2cTunnelHandleT hTunnel; /**< Tunnel handle over which the mesasge is to be sent.*/
NW_IN NwU16T t3Timer; NW_IN uint16_t t3Timer;
NW_IN NwU16T maxRetries; NW_IN uint16_t maxRetries;
NW_IN NwGtpv2cUlpTrxnHandleT hUlpTrxn; /**< Optional handle to be returned in rsp of this msg. */ NW_IN NwGtpv2cUlpTrxnHandleT hUlpTrxn; /**< Optional handle to be returned in rsp of this msg. */
NW_IN NwU32T peerIp; /**< Required only in case when hTunnel == 0 */ NW_IN uint32_t peerIp; /**< Required only in case when hTunnel == 0 */
NW_IN NwU32T teidLocal; /**< Required only in case when hTunnel == 0 */ NW_IN uint32_t teidLocal; /**< Required only in case when hTunnel == 0 */
NW_IN NwGtpv2cUlpTunnelHandleT hUlpTunnel; /**< Required only in case when hTunnel == 0 */ NW_IN NwGtpv2cUlpTunnelHandleT hUlpTunnel; /**< Required only in case when hTunnel == 0 */
} NwGtpv2cInitialReqInfoT; } NwGtpv2cInitialReqInfoT;
...@@ -204,11 +204,11 @@ typedef struct { ...@@ -204,11 +204,11 @@ typedef struct {
typedef struct { typedef struct {
NW_IN NwGtpv2cTunnelHandleT hTunnel; /**< Tunnel handle over which the mesasge is to be sent */ NW_IN NwGtpv2cTunnelHandleT hTunnel; /**< Tunnel handle over which the mesasge is to be sent */
NW_IN NwGtpv2cTrxnHandleT hTrxn; /**< Request Trxn handle which to which triggered req is being sent */ NW_IN NwGtpv2cTrxnHandleT hTrxn; /**< Request Trxn handle which to which triggered req is being sent */
NW_IN NwU16T t3Timer; NW_IN uint16_t t3Timer;
NW_IN NwU16T maxRetries; NW_IN uint16_t maxRetries;
NW_IN NwGtpv2cUlpTrxnHandleT hUlpTrxn; /**< Optional handle to be returned in rsp of this msg. */ NW_IN NwGtpv2cUlpTrxnHandleT hUlpTrxn; /**< Optional handle to be returned in rsp of this msg. */
NW_IN NwU32T peerIp; /**< Required only in case when hTunnel == 0 */ NW_IN uint32_t peerIp; /**< Required only in case when hTunnel == 0 */
NW_IN NwU32T teidLocal; /**< Required only in case when hTunnel == 0 */ NW_IN uint32_t teidLocal; /**< Required only in case when hTunnel == 0 */
NW_IN NwGtpv2cUlpTunnelHandleT hUlpTunnel; /**< Required only in case when hTunnel == 0 */ NW_IN NwGtpv2cUlpTunnelHandleT hUlpTunnel; /**< Required only in case when hTunnel == 0 */
} NwGtpv2cTriggeredReqInfoT; } NwGtpv2cTriggeredReqInfoT;
...@@ -220,7 +220,7 @@ typedef struct { ...@@ -220,7 +220,7 @@ typedef struct {
typedef struct { typedef struct {
NW_IN NwGtpv2cTrxnHandleT hTrxn; /**< Request Trxn handle which to which triggered rsp is being sent */ NW_IN NwGtpv2cTrxnHandleT hTrxn; /**< Request Trxn handle which to which triggered rsp is being sent */
NW_IN NwU32T teidLocal; /**< Required only if NW_GTPV2C_ULP_API_FLAG_CREATE_LOCAL_TUNNEL is set to flags. */ NW_IN uint32_t teidLocal; /**< Required only if NW_GTPV2C_ULP_API_FLAG_CREATE_LOCAL_TUNNEL is set to flags. */
NW_IN NwGtpv2cUlpTunnelHandleT hUlpTunnel; /**< Required only if NW_GTPV2C_ULP_API_FLAG_CREATE_LOCAL_TUNNEL is set to flags. */ NW_IN NwGtpv2cUlpTunnelHandleT hUlpTunnel; /**< Required only if NW_GTPV2C_ULP_API_FLAG_CREATE_LOCAL_TUNNEL is set to flags. */
NW_OUT NwGtpv2cTunnelHandleT hTunnel; /**< Returned only in case flags is set to NW_OUT NwGtpv2cTunnelHandleT hTunnel; /**< Returned only in case flags is set to
...@@ -237,8 +237,8 @@ typedef struct { ...@@ -237,8 +237,8 @@ typedef struct {
NW_IN NwGtpv2cTrxnHandleT hTrxn; NW_IN NwGtpv2cTrxnHandleT hTrxn;
NW_IN NwGtpv2cUlpTrxnHandleT hUlpTrxn; NW_IN NwGtpv2cUlpTrxnHandleT hUlpTrxn;
NW_IN NwGtpv2cMsgTypeT msgType; NW_IN NwGtpv2cMsgTypeT msgType;
NW_IN NwU32T peerIp; NW_IN uint32_t peerIp;
NW_IN NwU32T peerPort; NW_IN uint32_t peerPort;
NW_IN NwGtpv2cUlpTunnelHandleT hUlpTunnel; NW_IN NwGtpv2cUlpTunnelHandleT hUlpTunnel;
NW_INOUT NwGtpv2cTunnelHandleT hTunnel; NW_INOUT NwGtpv2cTunnelHandleT hTunnel;
} NwGtpv2cInitialReqIndInfoT; } NwGtpv2cInitialReqIndInfoT;
...@@ -253,9 +253,9 @@ typedef struct { ...@@ -253,9 +253,9 @@ typedef struct {
NW_IN NwGtpv2cTrxnHandleT hTrxn; NW_IN NwGtpv2cTrxnHandleT hTrxn;
NW_IN NwGtpv2cUlpTrxnHandleT hUlpTrxn; NW_IN NwGtpv2cUlpTrxnHandleT hUlpTrxn;
NW_IN NwGtpv2cMsgTypeT msgType; NW_IN NwGtpv2cMsgTypeT msgType;
NW_IN NwU32T seqNum; NW_IN uint32_t seqNum;
NW_IN NwU32T teidLocal; NW_IN uint32_t teidLocal;
NW_IN NwU32T teidRemote; NW_IN uint32_t teidRemote;
NW_IN NwGtpv2cUlpTunnelHandleT hUlpTunnel; NW_IN NwGtpv2cUlpTunnelHandleT hUlpTunnel;
} NwGtpv2cTriggeredReqIndInfoT; } NwGtpv2cTriggeredReqIndInfoT;
...@@ -289,8 +289,8 @@ typedef struct { ...@@ -289,8 +289,8 @@ typedef struct {
typedef struct { typedef struct {
NW_OUT NwGtpv2cTunnelHandleT hTunnel; NW_OUT NwGtpv2cTunnelHandleT hTunnel;
NW_IN NwGtpv2cUlpTunnelHandleT hUlpTunnel; NW_IN NwGtpv2cUlpTunnelHandleT hUlpTunnel;
NW_IN NwU32T teidLocal; NW_IN uint32_t teidLocal;
NW_IN NwU32T peerIp; NW_IN uint32_t peerIp;
} NwGtpv2cCreateLocalTunnelInfoT; } NwGtpv2cCreateLocalTunnelInfoT;
...@@ -347,10 +347,10 @@ typedef struct { ...@@ -347,10 +347,10 @@ typedef struct {
typedef struct { typedef struct {
NwGtpv2cUdpHandleT hUdp; NwGtpv2cUdpHandleT hUdp;
NwRcT (*udpDataReqCallback) ( NW_IN NwGtpv2cUdpHandleT udpHandle, NwRcT (*udpDataReqCallback) ( NW_IN NwGtpv2cUdpHandleT udpHandle,
NW_IN NwU8T* dataBuf, NW_IN uint8_t* dataBuf,
NW_IN NwU32T dataSize, NW_IN uint32_t dataSize,
NW_IN NwU32T peerIp, NW_IN uint32_t peerIp,
NW_IN NwU32T peerPort); NW_IN uint32_t peerPort);
} NwGtpv2cUdpEntityT; } NwGtpv2cUdpEntityT;
/** /**
...@@ -360,14 +360,14 @@ typedef struct { ...@@ -360,14 +360,14 @@ typedef struct {
typedef struct { typedef struct {
NwGtpv2cMemMgrHandleT hMemMgr; NwGtpv2cMemMgrHandleT hMemMgr;
void* (*memAlloc)( NW_IN NwGtpv2cMemMgrHandleT hMemMgr, void* (*memAlloc)( NW_IN NwGtpv2cMemMgrHandleT hMemMgr,
NW_IN NwU32T memSize, NW_IN uint32_t memSize,
NW_IN NwCharT* fileName, NW_IN NwCharT* fileName,
NW_IN NwU32T lineNumber); NW_IN uint32_t lineNumber);
void (*memFree) ( NW_IN NwGtpv2cMemMgrHandleT hMemMgr, void (*memFree) ( NW_IN NwGtpv2cMemMgrHandleT hMemMgr,
NW_IN void* hMem, NW_IN void* hMem,
NW_IN NwCharT* fileName, NW_IN NwCharT* fileName,
NW_IN NwU32T lineNumber); NW_IN uint32_t lineNumber);
} NwGtpv2cMemMgrEntityT; } NwGtpv2cMemMgrEntityT;
...@@ -380,9 +380,9 @@ typedef struct { ...@@ -380,9 +380,9 @@ typedef struct {
typedef struct { typedef struct {
NwGtpv2cTimerMgrHandleT tmrMgrHandle; NwGtpv2cTimerMgrHandleT tmrMgrHandle;
NwRcT (*tmrStartCallback)( NW_IN NwGtpv2cTimerMgrHandleT tmrMgrHandle, NwRcT (*tmrStartCallback)( NW_IN NwGtpv2cTimerMgrHandleT tmrMgrHandle,
NW_IN NwU32T timeoutSec, NW_IN uint32_t timeoutSec,
NW_IN NwU32T timeoutUsec, NW_IN uint32_t timeoutUsec,
NW_IN NwU32T tmrType, NW_IN uint32_t tmrType,
NW_IN void* tmrArg, NW_IN void* tmrArg,
NW_OUT NwGtpv2cTimerHandleT* tmrHandle); NW_OUT NwGtpv2cTimerHandleT* tmrHandle);
...@@ -397,9 +397,9 @@ typedef struct { ...@@ -397,9 +397,9 @@ typedef struct {
typedef struct { typedef struct {
NwGtpv2cLogMgrHandleT logMgrHandle; NwGtpv2cLogMgrHandleT logMgrHandle;
NwRcT (*logReqCallback) (NW_IN NwGtpv2cLogMgrHandleT logMgrHandle, NwRcT (*logReqCallback) (NW_IN NwGtpv2cLogMgrHandleT logMgrHandle,
NW_IN NwU32T logLevel, NW_IN uint32_t logLevel,
NW_IN NwCharT* filename, NW_IN NwCharT* filename,
NW_IN NwU32T line, NW_IN uint32_t line,
NW_IN NwCharT* logStr); NW_IN NwCharT* logStr);
} NwGtpv2cLogMgrEntityT; } NwGtpv2cLogMgrEntityT;
...@@ -519,7 +519,7 @@ nwGtpv2cSetLogMgrEntity( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, ...@@ -519,7 +519,7 @@ nwGtpv2cSetLogMgrEntity( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle,
NwRcT NwRcT
nwGtpv2cSetLogLevel( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, nwGtpv2cSetLogLevel( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle,
NW_IN NwU32T logLevel); NW_IN uint32_t logLevel);
/** /**
...@@ -535,10 +535,10 @@ nwGtpv2cSetLogLevel( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, ...@@ -535,10 +535,10 @@ nwGtpv2cSetLogLevel( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle,
NwRcT NwRcT
nwGtpv2cProcessUdpReq( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, nwGtpv2cProcessUdpReq( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle,
NW_IN NwU8T* udpData, NW_IN uint8_t* udpData,
NW_IN NwU32T udpDataLen, NW_IN uint32_t udpDataLen,
NW_IN NwU16T peerPort, NW_IN uint16_t peerPort,
NW_IN NwU32T peerIP); NW_IN uint32_t peerIP);
/** /**
Process Request from ULP entity. Process Request from ULP entity.
......
...@@ -45,19 +45,19 @@ ...@@ -45,19 +45,19 @@
*/ */
typedef struct { typedef struct {
NwU16T msgType; uint16_t msgType;
NwU16T mandatoryIeCount; uint16_t mandatoryIeCount;
NwGtpv2cStackHandleT hStack; NwGtpv2cStackHandleT hStack;
NwRcT (*ieReadCallback) (NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T* ieValue, void* ieReadCallbackArg); NwRcT (*ieReadCallback) (uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t* ieValue, void* ieReadCallbackArg);
void* ieReadCallbackArg; void* ieReadCallbackArg;
struct { struct {
NwU8T iePresence; uint8_t iePresence;
NwRcT (*ieReadCallback) (NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T* ieValue, void* ieReadCallbackArg); NwRcT (*ieReadCallback) (uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t* ieValue, void* ieReadCallbackArg);
void* ieReadCallbackArg; void* ieReadCallbackArg;
} ieParseInfo[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM]; } ieParseInfo[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM];
NwU8T *pIe[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM]; uint8_t *pIe[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM];
} NwGtpv2cMsgParserT; } NwGtpv2cMsgParserT;
#ifdef __cplusplus #ifdef __cplusplus
...@@ -74,11 +74,11 @@ extern "C" { ...@@ -74,11 +74,11 @@ extern "C" {
NwRcT NwRcT
nwGtpv2cMsgParserNew( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, nwGtpv2cMsgParserNew( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle,
NW_IN NwU8T msgType, NW_IN uint8_t msgType,
NW_IN NwRcT (*ieReadCallback) (NwU8T ieType, NW_IN NwRcT (*ieReadCallback) (uint8_t ieType,
NwU8T ieLength, uint8_t ieLength,
NwU8T ieInstance, uint8_t ieInstance,
NwU8T* ieValue, uint8_t* ieValue,
void* ieReadCallbackArg), void* ieReadCallbackArg),
NW_IN void* ieReadCallbackArg, NW_IN void* ieReadCallbackArg,
NW_IN NwGtpv2cMsgParserT **pthiz); NW_IN NwGtpv2cMsgParserT **pthiz);
...@@ -97,23 +97,23 @@ nwGtpv2cMsgParserDelete( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, ...@@ -97,23 +97,23 @@ nwGtpv2cMsgParserDelete( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle,
NwRcT NwRcT
nwGtpv2cMsgParserUpdateIe( NW_IN NwGtpv2cMsgParserT* thiz, nwGtpv2cMsgParserUpdateIe( NW_IN NwGtpv2cMsgParserT* thiz,
NW_IN NwU8T ieType, NW_IN uint8_t ieType,
NW_IN NwU8T ieInstance, NW_IN uint8_t ieInstance,
NW_IN NwU8T iePresence, NW_IN uint8_t iePresence,
NW_IN NwRcT (*ieReadCallback) (NwU8T ieType, NW_IN NwRcT (*ieReadCallback) (uint8_t ieType,
NwU8T ieLength, uint8_t ieLength,
NwU8T ieInstance, uint8_t ieInstance,
NwU8T* ieValue, uint8_t* ieValue,
void* ieReadCallbackArg), void* ieReadCallbackArg),
NW_IN void* ieReadCallbackArg); NW_IN void* ieReadCallbackArg);
NwRcT NwRcT
nwGtpv2cMsgParserUpdateIeReadCallback( NW_IN NwGtpv2cMsgParserT* thiz, nwGtpv2cMsgParserUpdateIeReadCallback( NW_IN NwGtpv2cMsgParserT* thiz,
NW_IN NwRcT (*ieReadCallback) (NwU8T ieType, NW_IN NwRcT (*ieReadCallback) (uint8_t ieType,
NwU8T ieLength, uint8_t ieLength,
NwU8T ieInstance, uint8_t ieInstance,
NwU8T* ieValue, uint8_t* ieValue,
void* ieReadCallbackArg)); void* ieReadCallbackArg));
...@@ -123,22 +123,22 @@ nwGtpv2cMsgParserUpdateIeReadCallbackArg( NW_IN NwGtpv2cMsgParserT* thiz, ...@@ -123,22 +123,22 @@ nwGtpv2cMsgParserUpdateIeReadCallbackArg( NW_IN NwGtpv2cMsgParserT* thiz,
NwRcT NwRcT
nwGtpv2cMsgParserAddIe( NW_IN NwGtpv2cMsgParserT* thiz, nwGtpv2cMsgParserAddIe( NW_IN NwGtpv2cMsgParserT* thiz,
NW_IN NwU8T ieType, NW_IN uint8_t ieType,
NW_IN NwU8T ieInstance, NW_IN uint8_t ieInstance,
NW_IN NwU8T iePresence, NW_IN uint8_t iePresence,
NW_IN NwRcT (*ieReadCallback) (NwU8T ieType, NW_IN NwRcT (*ieReadCallback) (uint8_t ieType,
NwU8T ieLength, uint8_t ieLength,
NwU8T ieInstance, uint8_t ieInstance,
NwU8T* ieValue, uint8_t* ieValue,
void* ieReadCallbackArg), void* ieReadCallbackArg),
NW_IN void* ieReadCallbackArg); NW_IN void* ieReadCallbackArg);
NwRcT NwRcT
nwGtpv2cMsgParserRun( NW_IN NwGtpv2cMsgParserT *thiz, nwGtpv2cMsgParserRun( NW_IN NwGtpv2cMsgParserT *thiz,
NW_IN NwGtpv2cMsgHandleT hMsg, NW_IN NwGtpv2cMsgHandleT hMsg,
NW_OUT NwU8T *pOffendingIeType, NW_OUT uint8_t *pOffendingIeType,
NW_OUT NwU8T *pOffendingIeInstance, NW_OUT uint8_t *pOffendingIeInstance,
NW_OUT NwU16T *pOffendingIeLength); NW_OUT uint16_t *pOffendingIeLength);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -66,15 +66,15 @@ extern "C" { ...@@ -66,15 +66,15 @@ extern "C" {
*--------------------------------------------------------------------------*/ *--------------------------------------------------------------------------*/
#define NW_IPV4_ADDR "%u.%u.%u.%u" #define NW_IPV4_ADDR "%u.%u.%u.%u"
#define NW_IPV4_ADDR_FORMAT(__addr) (NwU8T)((__addr) & 0x000000ff), \ #define NW_IPV4_ADDR_FORMAT(__addr) (uint8_t)((__addr) & 0x000000ff), \
(NwU8T)(((__addr) & 0x0000ff00) >> 8 ), \ (uint8_t)(((__addr) & 0x0000ff00) >> 8 ), \
(NwU8T)(((__addr) & 0x00ff0000) >> 16), \ (uint8_t)(((__addr) & 0x00ff0000) >> 16), \
(NwU8T)(((__addr) & 0xff000000) >> 24) (uint8_t)(((__addr) & 0xff000000) >> 24)
#define NW_IPV4_ADDR_FORMATP(__paddr) (NwU8T)(*((NwU8T*)(__paddr)) & 0x000000ff), \ #define NW_IPV4_ADDR_FORMATP(__paddr) (uint8_t)(*((uint8_t*)(__paddr)) & 0x000000ff), \
(NwU8T)(*((NwU8T*)(__paddr + 1)) & 0x000000ff), \ (uint8_t)(*((uint8_t*)(__paddr + 1)) & 0x000000ff), \
(NwU8T)(*((NwU8T*)(__paddr + 2)) & 0x000000ff), \ (uint8_t)(*((uint8_t*)(__paddr + 2)) & 0x000000ff), \
(NwU8T)(*((NwU8T*)(__paddr + 3)) & 0x000000ff) (uint8_t)(*((uint8_t*)(__paddr + 3)) & 0x000000ff)
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -54,10 +54,10 @@ extern "C" { ...@@ -54,10 +54,10 @@ extern "C" {
#define NW_TRUE (1) /**< Truth value */ #define NW_TRUE (1) /**< Truth value */
#define NW_FALSE (0) /**< False value */ #define NW_FALSE (0) /**< False value */
typedef unsigned char NwU8T; /**< Unsigned 1 byte */ typedef unsigned char uint8_t; /**< Unsigned 1 byte */
typedef unsigned short NwU16T; /**< Unsigned 2 byte */ typedef unsigned short uint16_t; /**< Unsigned 2 byte */
typedef unsigned int NwU32T; /**< Unsigned 4 byte */ typedef unsigned int uint32_t; /**< Unsigned 4 byte */
typedef unsigned long long NwU64T; /**< Unsigned 8 byte */ typedef unsigned long long uint64_t; /**< Unsigned 8 byte */
typedef signed char NwS8T; /**< Signed 1 byte */ typedef signed char NwS8T; /**< Signed 1 byte */
typedef signed short NwS16T; /**< Signed 2 byte */ typedef signed short NwS16T; /**< Signed 2 byte */
......
...@@ -52,10 +52,10 @@ ...@@ -52,10 +52,10 @@
( ( (x) & 0x0000ff00 ) << 8 ) | ( ( (x) & 0x000000ff) << 24 ) ) ( ( (x) & 0x0000ff00 ) << 8 ) | ( ( (x) & 0x000000ff) << 24 ) )
#define NW_HTONLL(x) ( \ #define NW_HTONLL(x) ( \
( ( ((NwU64T)x) & 0xff00000000000000ULL ) >> 56 ) | ( ( ((NwU64T)x) & 0x00ff000000000000ULL ) >> 40 ) | \ ( ( ((uint64_t)x) & 0xff00000000000000ULL ) >> 56 ) | ( ( ((uint64_t)x) & 0x00ff000000000000ULL ) >> 40 ) | \
( ( ((NwU64T)x) & 0x0000ff0000000000ULL ) >> 24 ) | ( ( ((NwU64T)x) & 0x000000ff00000000ULL ) >> 8 ) | \ ( ( ((uint64_t)x) & 0x0000ff0000000000ULL ) >> 24 ) | ( ( ((uint64_t)x) & 0x000000ff00000000ULL ) >> 8 ) | \
( ( ((NwU64T)x) & 0x000000000000ff00ULL ) << 40 ) | ( ( ((NwU64T)x) & 0x00000000000000ffULL ) << 56 ) | \ ( ( ((uint64_t)x) & 0x000000000000ff00ULL ) << 40 ) | ( ( ((uint64_t)x) & 0x00000000000000ffULL ) << 56 ) | \
( ( ((NwU64T)x) & 0x0000000000ff0000ULL ) << 24 ) | ( ( ((NwU64T)x) & 0x00000000ff000000ULL ) << 8 ) \ ( ( ((uint64_t)x) & 0x0000000000ff0000ULL ) << 24 ) | ( ( ((uint64_t)x) & 0x00000000ff000000ULL ) << 8 ) \
) )
......
...@@ -50,10 +50,10 @@ extern "C" { ...@@ -50,10 +50,10 @@ extern "C" {
typedef struct NwGtpv2cMsgIeInfo { typedef struct NwGtpv2cMsgIeInfo {
NwU8T ieType; uint8_t ieType;
NwU8T ieMinLength; uint8_t ieMinLength;
NwU8T ieInstance; uint8_t ieInstance;
NwU8T iePresence; uint8_t iePresence;
struct NwGtpv2cMsgIeInfo *pGroupedIeInfo; struct NwGtpv2cMsgIeInfo *pGroupedIeInfo;
} NwGtpv2cMsgIeInfoT; } NwGtpv2cMsgIeInfoT;
...@@ -351,10 +351,10 @@ NwGtpv2cMsgIeInfoT forwardRelocationCompleteAckIeInfoTbl[] = { ...@@ -351,10 +351,10 @@ NwGtpv2cMsgIeInfoT forwardRelocationCompleteAckIeInfoTbl[] = {
* P R I V A T E F U N C T I O N S * * P R I V A T E F U N C T I O N S *
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
static NwU32T static uint32_t
nwGtpv2cMsgGroupedIeCount(NwGtpv2cMsgIeInfoT *pMsgIeInfo) nwGtpv2cMsgGroupedIeCount(NwGtpv2cMsgIeInfoT *pMsgIeInfo)
{ {
NwU32T count = 0; uint32_t count = 0;
NwGtpv2cMsgIeInfoT *pGroupedIeInfo = pMsgIeInfo; NwGtpv2cMsgIeInfoT *pGroupedIeInfo = pMsgIeInfo;
while (pGroupedIeInfo++) { while (pGroupedIeInfo++) {
...@@ -372,7 +372,7 @@ static NwRcT ...@@ -372,7 +372,7 @@ static NwRcT
nwGtpv2cMsgIeParseInfoUpdate(NwGtpv2cMsgIeParseInfoT *thiz, nwGtpv2cMsgIeParseInfoUpdate(NwGtpv2cMsgIeParseInfoT *thiz,
NwGtpv2cMsgIeInfoT *pMsgIeInfo) NwGtpv2cMsgIeInfoT *pMsgIeInfo)
{ {
NwU32T i, j; uint32_t i, j;
for (i = 0; pMsgIeInfo[i].ieType; i++) { for (i = 0; pMsgIeInfo[i].ieType; i++) {
if (pMsgIeInfo[i].pGroupedIeInfo) { if (pMsgIeInfo[i].pGroupedIeInfo) {
...@@ -411,10 +411,10 @@ nwGtpv2cMsgIeParseInfoUpdate(NwGtpv2cMsgIeParseInfoT *thiz, ...@@ -411,10 +411,10 @@ nwGtpv2cMsgIeParseInfoUpdate(NwGtpv2cMsgIeParseInfoT *thiz,
static NwRcT static NwRcT
nwGtpv2cMsgGroupedIeParse(NW_IN NwGtpv2cGroupedIeParseInfoT* thiz, nwGtpv2cMsgGroupedIeParse(NW_IN NwGtpv2cGroupedIeParseInfoT* thiz,
NW_IN NwU8T ieType, NW_IN uint8_t ieType,
NW_IN NwU16T ieLength, NW_IN uint16_t ieLength,
NW_IN NwU8T ieInstance, NW_IN uint8_t ieInstance,
NW_IN NwU8T *pIeValue) NW_IN uint8_t *pIeValue)
{ {
NW_ASSERT(thiz); NW_ASSERT(thiz);
...@@ -434,7 +434,7 @@ nwGtpv2cMsgGroupedIeParse(NW_IN NwGtpv2cGroupedIeParseInfoT* thiz, ...@@ -434,7 +434,7 @@ nwGtpv2cMsgGroupedIeParse(NW_IN NwGtpv2cGroupedIeParseInfoT* thiz,
*/ */
NwGtpv2cMsgIeParseInfoT* NwGtpv2cMsgIeParseInfoT*
nwGtpv2cMsgIeParseInfoNew(NwGtpv2cStackHandleT hStack, NwU8T msgType) nwGtpv2cMsgIeParseInfoNew(NwGtpv2cStackHandleT hStack, uint8_t msgType)
{ {
NwRcT rc; NwRcT rc;
NwGtpv2cMsgIeParseInfoT *thiz; NwGtpv2cMsgIeParseInfoT *thiz;
...@@ -578,21 +578,21 @@ nwGtpv2cMsgIeParse(NW_IN NwGtpv2cMsgIeParseInfoT* thiz, ...@@ -578,21 +578,21 @@ nwGtpv2cMsgIeParse(NW_IN NwGtpv2cMsgIeParseInfoT* thiz,
NW_INOUT NwGtpv2cErrorT *pError) NW_INOUT NwGtpv2cErrorT *pError)
{ {
NwRcT rc = NW_OK; NwRcT rc = NW_OK;
NwU16T mandatoryIeCount =0; uint16_t mandatoryIeCount =0;
NwU8T *pIeBufStart; uint8_t *pIeBufStart;
NwU8T *pIeBufEnd; uint8_t *pIeBufEnd;
NwU16T ieType; uint16_t ieType;
NwU16T ieLength; uint16_t ieLength;
NwU16T ieInstance; uint16_t ieInstance;
NwGtpv2cIeTlvT *pIe; NwGtpv2cIeTlvT *pIe;
NwGtpv2cMsgT *pMsg = (NwGtpv2cMsgT*) hMsg; NwGtpv2cMsgT *pMsg = (NwGtpv2cMsgT*) hMsg;
NwU8T flags = *((NwU8T*)(pMsg->msgBuf)); uint8_t flags = *((uint8_t*)(pMsg->msgBuf));
pIeBufStart = (NwU8T *) (pMsg->msgBuf + (flags & 0x08 ? 12: 8)); pIeBufStart = (uint8_t *) (pMsg->msgBuf + (flags & 0x08 ? 12: 8));
pIeBufEnd = (NwU8T *) (pMsg->msgBuf + pMsg->msgLen); pIeBufEnd = (uint8_t *) (pMsg->msgBuf + pMsg->msgLen);
//memset(pMsg->pIe, 0, sizeof(NwU8T*) * (NW_GTPV2C_IE_TYPE_MAXIMUM) * (NW_GTPV2C_IE_INSTANCE_MAXIMUM)); //memset(pMsg->pIe, 0, sizeof(uint8_t*) * (NW_GTPV2C_IE_TYPE_MAXIMUM) * (NW_GTPV2C_IE_INSTANCE_MAXIMUM));
memset(pMsg->isIeValid, (NW_FALSE), sizeof(NwU8T) * (NW_GTPV2C_IE_TYPE_MAXIMUM) * (NW_GTPV2C_IE_INSTANCE_MAXIMUM)); memset(pMsg->isIeValid, (NW_FALSE), sizeof(uint8_t) * (NW_GTPV2C_IE_TYPE_MAXIMUM) * (NW_GTPV2C_IE_INSTANCE_MAXIMUM));
while (pIeBufStart < pIeBufEnd) { while (pIeBufStart < pIeBufEnd) {
pIe = (NwGtpv2cIeTlvT*) pIeBufStart; pIe = (NwGtpv2cIeTlvT*) pIeBufStart;
...@@ -640,12 +640,12 @@ nwGtpv2cMsgIeParse(NW_IN NwGtpv2cMsgIeParseInfoT* thiz, ...@@ -640,12 +640,12 @@ nwGtpv2cMsgIeParse(NW_IN NwGtpv2cMsgIeParseInfoT* thiz,
continue; continue;
} }
pMsg->pIe[ieType][ieInstance] = (NwU8T*) pIeBufStart; pMsg->pIe[ieType][ieInstance] = (uint8_t*) pIeBufStart;
pMsg->isIeValid[ieType][ieInstance] = NW_TRUE; pMsg->isIeValid[ieType][ieInstance] = NW_TRUE;
if(thiz->ieParseInfo[ieType][ieInstance].pGroupedIeInfo) { if(thiz->ieParseInfo[ieType][ieInstance].pGroupedIeInfo) {
/* Parse the grouped IE */ /* Parse the grouped IE */
rc = nwGtpv2cMsgGroupedIeParse(thiz->ieParseInfo[ieType][ieInstance].pGroupedIeInfo, ieType, ieLength, ieInstance, ((NwU8T*) pIe) + 4); rc = nwGtpv2cMsgGroupedIeParse(thiz->ieParseInfo[ieType][ieInstance].pGroupedIeInfo, ieType, ieLength, ieInstance, ((uint8_t*) pIe) + 4);
if (rc != NW_OK) { if (rc != NW_OK) {
pError->cause = NW_GTPV2C_CAUSE_MANDATORY_IE_INCORRECT; pError->cause = NW_GTPV2C_CAUSE_MANDATORY_IE_INCORRECT;
......
...@@ -54,11 +54,11 @@ extern "C" { ...@@ -54,11 +54,11 @@ extern "C" {
NwRcT NwRcT
nwGtpv2cMsgParserNew( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, nwGtpv2cMsgParserNew( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle,
NW_IN NwU8T msgType, NW_IN uint8_t msgType,
NW_IN NwRcT (*ieReadCallback) (NwU8T ieType, NW_IN NwRcT (*ieReadCallback) (uint8_t ieType,
NwU8T ieLength, uint8_t ieLength,
NwU8T ieInstance, uint8_t ieInstance,
NwU8T* ieValue, uint8_t* ieValue,
void* ieReadCallbackArg), void* ieReadCallbackArg),
NW_IN void* ieReadCallbackArg, NW_IN void* ieReadCallbackArg,
NW_IN NwGtpv2cMsgParserT **pthiz) NW_IN NwGtpv2cMsgParserT **pthiz)
...@@ -97,10 +97,10 @@ nwGtpv2cMsgParserDelete( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, ...@@ -97,10 +97,10 @@ nwGtpv2cMsgParserDelete( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle,
NwRcT NwRcT
nwGtpv2cMsgParserUpdateIeReadCallback( NW_IN NwGtpv2cMsgParserT* thiz, nwGtpv2cMsgParserUpdateIeReadCallback( NW_IN NwGtpv2cMsgParserT* thiz,
NW_IN NwRcT (*ieReadCallback) (NwU8T ieType, NW_IN NwRcT (*ieReadCallback) (uint8_t ieType,
NwU8T ieLength, uint8_t ieLength,
NwU8T ieInstance, uint8_t ieInstance,
NwU8T* ieValue, uint8_t* ieValue,
void* ieReadCallbackArg)) void* ieReadCallbackArg))
{ {
if(thiz) { if(thiz) {
...@@ -125,13 +125,13 @@ nwGtpv2cMsgParserUpdateIeReadCallbackArg( NW_IN NwGtpv2cMsgParserT* thiz, ...@@ -125,13 +125,13 @@ nwGtpv2cMsgParserUpdateIeReadCallbackArg( NW_IN NwGtpv2cMsgParserT* thiz,
NwRcT NwRcT
nwGtpv2cMsgParserAddIe( NW_IN NwGtpv2cMsgParserT* thiz, nwGtpv2cMsgParserAddIe( NW_IN NwGtpv2cMsgParserT* thiz,
NW_IN NwU8T ieType, NW_IN uint8_t ieType,
NW_IN NwU8T ieInstance, NW_IN uint8_t ieInstance,
NW_IN NwU8T iePresence, NW_IN uint8_t iePresence,
NW_IN NwRcT (*ieReadCallback) (NwU8T ieType, NW_IN NwRcT (*ieReadCallback) (uint8_t ieType,
NwU8T ieLength, uint8_t ieLength,
NwU8T ieInstance, uint8_t ieInstance,
NwU8T* ieValue, uint8_t* ieValue,
void* ieReadCallbackArg), void* ieReadCallbackArg),
NW_IN void* ieReadCallbackArg) NW_IN void* ieReadCallbackArg)
{ {
...@@ -156,13 +156,13 @@ nwGtpv2cMsgParserAddIe( NW_IN NwGtpv2cMsgParserT* thiz, ...@@ -156,13 +156,13 @@ nwGtpv2cMsgParserAddIe( NW_IN NwGtpv2cMsgParserT* thiz,
NwRcT NwRcT
nwGtpv2cMsgParserUpdateIe( NW_IN NwGtpv2cMsgParserT* thiz, nwGtpv2cMsgParserUpdateIe( NW_IN NwGtpv2cMsgParserT* thiz,
NW_IN NwU8T ieType, NW_IN uint8_t ieType,
NW_IN NwU8T ieInstance, NW_IN uint8_t ieInstance,
NW_IN NwU8T iePresence, NW_IN uint8_t iePresence,
NW_IN NwRcT (*ieReadCallback) (NwU8T ieType, NW_IN NwRcT (*ieReadCallback) (uint8_t ieType,
NwU8T ieLength, uint8_t ieLength,
NwU8T ieInstance, uint8_t ieInstance,
NwU8T* ieValue, uint8_t* ieValue,
void* ieReadCallbackArg), void* ieReadCallbackArg),
NW_IN void* ieReadCallbackArg) NW_IN void* ieReadCallbackArg)
{ {
...@@ -186,26 +186,26 @@ nwGtpv2cMsgParserUpdateIe( NW_IN NwGtpv2cMsgParserT* thiz, ...@@ -186,26 +186,26 @@ nwGtpv2cMsgParserUpdateIe( NW_IN NwGtpv2cMsgParserT* thiz,
NwRcT NwRcT
nwGtpv2cMsgParserRun( NW_IN NwGtpv2cMsgParserT *thiz, nwGtpv2cMsgParserRun( NW_IN NwGtpv2cMsgParserT *thiz,
NW_IN NwGtpv2cMsgHandleT hMsg, NW_IN NwGtpv2cMsgHandleT hMsg,
NW_OUT NwU8T *pOffendingIeType, NW_OUT uint8_t *pOffendingIeType,
NW_OUT NwU8T *pOffendingIeInstance, NW_OUT uint8_t *pOffendingIeInstance,
NW_OUT NwU16T *pOffendingIeLength) NW_OUT uint16_t *pOffendingIeLength)
{ {
NwRcT rc = NW_OK; NwRcT rc = NW_OK;
NwU8T flags; uint8_t flags;
NwU16T mandatoryIeCount =0; uint16_t mandatoryIeCount =0;
NwGtpv2cIeTlvT *pIe; NwGtpv2cIeTlvT *pIe;
NwU8T *pIeStart; uint8_t *pIeStart;
NwU8T *pIeEnd; uint8_t *pIeEnd;
NwU16T ieLength; uint16_t ieLength;
NwGtpv2cMsgT *pMsg = (NwGtpv2cMsgT*) hMsg; NwGtpv2cMsgT *pMsg = (NwGtpv2cMsgT*) hMsg;
NW_ASSERT(pMsg); NW_ASSERT(pMsg);
flags = *((NwU8T*)(pMsg->msgBuf)); flags = *((uint8_t*)(pMsg->msgBuf));
pIeStart = (NwU8T *) (pMsg->msgBuf + (flags & 0x08 ? 12: 8)); pIeStart = (uint8_t *) (pMsg->msgBuf + (flags & 0x08 ? 12: 8));
pIeEnd = (NwU8T *) (pMsg->msgBuf + pMsg->msgLen); pIeEnd = (uint8_t *) (pMsg->msgBuf + pMsg->msgLen);
memset(thiz->pIe, 0, sizeof(NwU8T*) * (NW_GTPV2C_IE_TYPE_MAXIMUM) * (NW_GTPV2C_IE_INSTANCE_MAXIMUM)); memset(thiz->pIe, 0, sizeof(uint8_t*) * (NW_GTPV2C_IE_TYPE_MAXIMUM) * (NW_GTPV2C_IE_INSTANCE_MAXIMUM));
memset(pMsg->pIe, 0, sizeof(NwU8T*) * (NW_GTPV2C_IE_TYPE_MAXIMUM) * (NW_GTPV2C_IE_INSTANCE_MAXIMUM)); memset(pMsg->pIe, 0, sizeof(uint8_t*) * (NW_GTPV2C_IE_TYPE_MAXIMUM) * (NW_GTPV2C_IE_INSTANCE_MAXIMUM));
while (pIeStart < pIeEnd) { while (pIeStart < pIeEnd) {
pIe = (NwGtpv2cIeTlvT*) pIeStart; pIe = (NwGtpv2cIeTlvT*) pIeStart;
...@@ -219,8 +219,8 @@ nwGtpv2cMsgParserRun( NW_IN NwGtpv2cMsgParserT *thiz, ...@@ -219,8 +219,8 @@ nwGtpv2cMsgParserRun( NW_IN NwGtpv2cMsgParserT *thiz,
} }
if((thiz->ieParseInfo[pIe->t][pIe->i].iePresence)) { if((thiz->ieParseInfo[pIe->t][pIe->i].iePresence)) {
thiz->pIe[pIe->t][pIe->i] = (NwU8T*) pIeStart; thiz->pIe[pIe->t][pIe->i] = (uint8_t*) pIeStart;
pMsg->pIe[pIe->t][pIe->i] = (NwU8T*) pIeStart; pMsg->pIe[pIe->t][pIe->i] = (uint8_t*) pIeStart;
NW_LOG(thiz->hStack, NW_LOG_LEVEL_DEBG, "Received IE %u of length %u!", pIe->t, ieLength); NW_LOG(thiz->hStack, NW_LOG_LEVEL_DEBG, "Received IE %u of length %u!", pIe->t, ieLength);
...@@ -258,7 +258,7 @@ nwGtpv2cMsgParserRun( NW_IN NwGtpv2cMsgParserT *thiz, ...@@ -258,7 +258,7 @@ nwGtpv2cMsgParserRun( NW_IN NwGtpv2cMsgParserT *thiz,
} }
if((NW_OK == rc) && (mandatoryIeCount != thiz->mandatoryIeCount)) { if((NW_OK == rc) && (mandatoryIeCount != thiz->mandatoryIeCount)) {
NwU16T t, i; uint16_t t, i;
*pOffendingIeType = 0; *pOffendingIeType = 0;
*pOffendingIeInstance = 0; *pOffendingIeInstance = 0;
*pOffendingIeLength = 0; *pOffendingIeLength = 0;
......
...@@ -253,7 +253,7 @@ nwGtpv2cTrxnNew( NW_IN NwGtpv2cStackT* thiz) ...@@ -253,7 +253,7 @@ nwGtpv2cTrxnNew( NW_IN NwGtpv2cStackT* thiz)
*/ */
NwGtpv2cTrxnT* NwGtpv2cTrxnT*
nwGtpv2cTrxnWithSeqNumNew( NW_IN NwGtpv2cStackT* thiz, nwGtpv2cTrxnWithSeqNumNew( NW_IN NwGtpv2cStackT* thiz,
NW_IN NwU32T seqNum) NW_IN uint32_t seqNum)
{ {
NwGtpv2cTrxnT *pTrxn; NwGtpv2cTrxnT *pTrxn;
...@@ -292,10 +292,10 @@ nwGtpv2cTrxnWithSeqNumNew( NW_IN NwGtpv2cStackT* thiz, ...@@ -292,10 +292,10 @@ nwGtpv2cTrxnWithSeqNumNew( NW_IN NwGtpv2cStackT* thiz,
NwGtpv2cTrxnT* NwGtpv2cTrxnT*
nwGtpv2cTrxnOutstandingRxNew( NW_IN NwGtpv2cStackT* thiz, nwGtpv2cTrxnOutstandingRxNew( NW_IN NwGtpv2cStackT* thiz,
NW_IN NwU32T teidLocal, NW_IN uint32_t teidLocal,
NW_IN NwU32T peerIp, NW_IN uint32_t peerIp,
NW_IN NwU32T peerPort, NW_IN uint32_t peerPort,
NW_IN NwU32T seqNum) NW_IN uint32_t seqNum)
{ {
NwRcT rc; NwRcT rc;
NwGtpv2cTrxnT *pTrxn, *pCollision; NwGtpv2cTrxnT *pTrxn, *pCollision;
...@@ -321,7 +321,7 @@ nwGtpv2cTrxnOutstandingRxNew( NW_IN NwGtpv2cStackT* thiz, ...@@ -321,7 +321,7 @@ nwGtpv2cTrxnOutstandingRxNew( NW_IN NwGtpv2cStackT* thiz,
if(pCollision) { if(pCollision) {
NW_LOG(thiz, NW_LOG_LEVEL_WARN, "Duplicate request message received for seq num 0x%x!", NW_LOG(thiz, NW_LOG_LEVEL_WARN, "Duplicate request message received for seq num 0x%x!",
(NwU32T) seqNum); (uint32_t) seqNum);
/* Case of duplicate request message from peer. Retransmit response. */ /* Case of duplicate request message from peer. Retransmit response. */
if(pCollision->pMsg) { if(pCollision->pMsg) {
......
...@@ -48,7 +48,7 @@ extern "C" { ...@@ -48,7 +48,7 @@ extern "C" {
static NwGtpv2cTunnelT* gpGtpv2cTunnelPool = NULL; static NwGtpv2cTunnelT* gpGtpv2cTunnelPool = NULL;
NwGtpv2cTunnelT* NwGtpv2cTunnelT*
nwGtpv2cTunnelNew(struct NwGtpv2cStack *pStack, NwU32T teid, NwU32T ipv4AddrRemote, NwGtpv2cUlpTunnelHandleT hUlpTunnel) nwGtpv2cTunnelNew(struct NwGtpv2cStack *pStack, uint32_t teid, uint32_t ipv4AddrRemote, NwGtpv2cUlpTunnelHandleT hUlpTunnel)
{ {
NwGtpv2cTunnelT* thiz; NwGtpv2cTunnelT* thiz;
......
...@@ -30,10 +30,10 @@ NwCharT* gLogLevelStr[] = {"EMER", "ALER", "CRIT", "ERRO", "WARN", "NOTI", "INF ...@@ -30,10 +30,10 @@ NwCharT* gLogLevelStr[] = {"EMER", "ALER", "CRIT", "ERRO", "WARN", "NOTI", "INF
typedef struct NwEgtPingS { typedef struct NwEgtPingS {
NwU8T localIpStr[20]; uint8_t localIpStr[20];
NwU8T targetIpStr[20]; uint8_t targetIpStr[20];
NwU32T pingInterval; uint32_t pingInterval;
NwU32T pingCount; uint32_t pingCount;
NwGtpv2cNodeUlpT ulpObj; NwGtpv2cNodeUlpT ulpObj;
NwGtpv2cNodeUdpT udpObj; NwGtpv2cNodeUdpT udpObj;
} NwEgtPingT; } NwEgtPingT;
...@@ -136,8 +136,8 @@ nwEgtPingParseCmdLineOpts(int argc, char* argv[]) ...@@ -136,8 +136,8 @@ nwEgtPingParseCmdLineOpts(int argc, char* argv[])
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
NwRcT rc; NwRcT rc;
NwU32T logLevel; uint32_t logLevel;
NwU8T* logLevelStr; uint8_t* logLevelStr;
NwGtpv2cStackHandleT hGtpv2cStack = 0; NwGtpv2cStackHandleT hGtpv2cStack = 0;
......
...@@ -40,21 +40,21 @@ NwMiniLogMgrT* nwMiniLogMgrGetInstance() ...@@ -40,21 +40,21 @@ NwMiniLogMgrT* nwMiniLogMgrGetInstance()
return &(__gLogMgr); return &(__gLogMgr);
} }
NwRcT nwMiniLogMgrInit(NwMiniLogMgrT* thiz, NwU32T logLevel ) NwRcT nwMiniLogMgrInit(NwMiniLogMgrT* thiz, uint32_t logLevel )
{ {
thiz->logLevel = logLevel; thiz->logLevel = logLevel;
return NW_OK; return NW_OK;
} }
NwRcT nwMiniLogMgrSetLogLevel(NwMiniLogMgrT* thiz, NwU32T logLevel) NwRcT nwMiniLogMgrSetLogLevel(NwMiniLogMgrT* thiz, uint32_t logLevel)
{ {
thiz->logLevel = logLevel; thiz->logLevel = logLevel;
} }
NwRcT nwMiniLogMgrLogRequest (NwGtpv2cLogMgrHandleT hLogMgr, NwRcT nwMiniLogMgrLogRequest (NwGtpv2cLogMgrHandleT hLogMgr,
NwU32T logLevel, uint32_t logLevel,
NwCharT* file, NwCharT* file,
NwU32T line, uint32_t line,
NwCharT* logStr) NwCharT* logStr)
{ {
NwMiniLogMgrT* thiz = (NwMiniLogMgrT*) hLogMgr; NwMiniLogMgrT* thiz = (NwMiniLogMgrT*) hLogMgr;
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* MiniLogMgr Class Definition * MiniLogMgr Class Definition
*/ */
typedef struct NwMiniLogMgr { typedef struct NwMiniLogMgr {
NwU8T logLevel; /*< Log level */ uint8_t logLevel; /*< Log level */
} NwMiniLogMgrT; } NwMiniLogMgrT;
...@@ -59,14 +59,14 @@ NwMiniLogMgrT* nwMiniLogMgrGetInstance(); ...@@ -59,14 +59,14 @@ NwMiniLogMgrT* nwMiniLogMgrGetInstance();
* @param thiz : Pointer to global singleton MiniLogMgr instance * @param thiz : Pointer to global singleton MiniLogMgr instance
* @param logLevel : Log Level * @param logLevel : Log Level
*/ */
NwRcT nwMiniLogMgrInit(NwMiniLogMgrT* thiz, NwU32T logLevel ); NwRcT nwMiniLogMgrInit(NwMiniLogMgrT* thiz, uint32_t logLevel );
/** /**
* Set MiniLogMgr log level * Set MiniLogMgr log level
* @param thiz : Pointer to global singleton MiniLogMgr instance * @param thiz : Pointer to global singleton MiniLogMgr instance
* @param logLevel : Log Level * @param logLevel : Log Level
*/ */
NwRcT nwMiniLogMgrSetLogLevel(NwMiniLogMgrT* thiz, NwU32T logLevel); NwRcT nwMiniLogMgrSetLogLevel(NwMiniLogMgrT* thiz, uint32_t logLevel);
/** /**
* Process log request from stack * Process log request from stack
...@@ -77,9 +77,9 @@ NwRcT nwMiniLogMgrSetLogLevel(NwMiniLogMgrT* thiz, NwU32T logLevel); ...@@ -77,9 +77,9 @@ NwRcT nwMiniLogMgrSetLogLevel(NwMiniLogMgrT* thiz, NwU32T logLevel);
* @param logStr : Log string * @param logStr : Log string
*/ */
NwRcT nwMiniLogMgrLogRequest (NwGtpv2cLogMgrHandleT logMgrHandle, NwRcT nwMiniLogMgrLogRequest (NwGtpv2cLogMgrHandleT logMgrHandle,
NwU32T logLevel, uint32_t logLevel,
NwCharT* file, NwCharT* file,
NwU32T line, uint32_t line,
NwCharT* logStr); NwCharT* logStr);
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -55,9 +55,9 @@ NW_TMR_CALLBACK(nwGtpv2cNodeHandleStackTimerTimeout) ...@@ -55,9 +55,9 @@ NW_TMR_CALLBACK(nwGtpv2cNodeHandleStackTimerTimeout)
*--------------------------------------------------------------------------*/ *--------------------------------------------------------------------------*/
NwRcT nwTimerStart( NwGtpv2cTimerMgrHandleT tmrMgrHandle, NwRcT nwTimerStart( NwGtpv2cTimerMgrHandleT tmrMgrHandle,
NwU32T timeoutSec, uint32_t timeoutSec,
NwU32T timeoutUsec, uint32_t timeoutUsec,
NwU32T tmrType, uint32_t tmrType,
void* timeoutArg, void* timeoutArg,
NwGtpv2cTimerHandleT* hTmr) NwGtpv2cTimerHandleT* hTmr)
{ {
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#define __NW_MINI_TMR_MGR_H__ #define __NW_MINI_TMR_MGR_H__
typedef struct { typedef struct {
NwU8T _tbd; uint8_t _tbd;
} NwGtpv2cNodeTmrMgrT; } NwGtpv2cNodeTmrMgrT;
typedef struct { typedef struct {
...@@ -39,9 +39,9 @@ extern "C" { ...@@ -39,9 +39,9 @@ extern "C" {
#endif #endif
NwRcT nwTimerStart( NwGtpv2cTimerMgrHandleT tmrMgrHandle, NwRcT nwTimerStart( NwGtpv2cTimerMgrHandleT tmrMgrHandle,
NwU32T timeoutSec, uint32_t timeoutSec,
NwU32T timeoutUsec, uint32_t timeoutUsec,
NwU32T tmrType, uint32_t tmrType,
void* timeoutArg, void* timeoutArg,
NwGtpv2cTimerHandleT* hTmr); NwGtpv2cTimerHandleT* hTmr);
......
...@@ -47,10 +47,10 @@ static ...@@ -47,10 +47,10 @@ static
void NW_EVT_CALLBACK(nwUdpDataIndicationCallbackData) void NW_EVT_CALLBACK(nwUdpDataIndicationCallbackData)
{ {
NwRcT rc; NwRcT rc;
NwU8T udpBuf[MAX_UDP_PAYLOAD_LEN]; uint8_t udpBuf[MAX_UDP_PAYLOAD_LEN];
NwS32T bytesRead; NwS32T bytesRead;
struct sockaddr_in peer; struct sockaddr_in peer;
NwU32T peerLen; uint32_t peerLen;
NwGtpv2cNodeUdpT* thiz = (NwGtpv2cNodeUdpT*) arg; NwGtpv2cNodeUdpT* thiz = (NwGtpv2cNodeUdpT*) arg;
peerLen = sizeof(peer); peerLen = sizeof(peer);
...@@ -96,7 +96,7 @@ void NW_EVT_CALLBACK(nwUdpDataIndicationCallbackData) ...@@ -96,7 +96,7 @@ void NW_EVT_CALLBACK(nwUdpDataIndicationCallbackData)
* Public functions * Public functions
*--------------------------------------------------------------------------*/ *--------------------------------------------------------------------------*/
NwRcT nwGtpv2cUdpInit(NwGtpv2cNodeUdpT* thiz, NwGtpv2cStackHandleT hGtpv2cStack, NwU8T* ipAddrStr) NwRcT nwGtpv2cUdpInit(NwGtpv2cNodeUdpT* thiz, NwGtpv2cStackHandleT hGtpv2cStack, uint8_t* ipAddrStr)
{ {
int sd; int sd;
struct sockaddr_in addr; struct sockaddr_in addr;
...@@ -179,10 +179,10 @@ NwRcT nwGtpv2cUdpReset(NwGtpv2cNodeUdpT* thiz) ...@@ -179,10 +179,10 @@ NwRcT nwGtpv2cUdpReset(NwGtpv2cNodeUdpT* thiz)
} }
NwRcT nwGtpv2cUdpDataReq(NwGtpv2cUdpHandleT udpHandle, NwRcT nwGtpv2cUdpDataReq(NwGtpv2cUdpHandleT udpHandle,
NwU8T* dataBuf, uint8_t* dataBuf,
NwU32T dataSize, uint32_t dataSize,
NwU32T peerIp, uint32_t peerIp,
NwU32T peerPort) uint32_t peerPort)
{ {
struct sockaddr_in peerAddr; struct sockaddr_in peerAddr;
NwS32T bytesSent; NwS32T bytesSent;
......
...@@ -25,27 +25,27 @@ ...@@ -25,27 +25,27 @@
#define __NW_MINI_UDP_ENTITY_H__ #define __NW_MINI_UDP_ENTITY_H__
typedef struct { typedef struct {
NwU32T ipv4Addr; uint32_t ipv4Addr;
NwU32T hSocket; uint32_t hSocket;
NwEventT ev; NwEventT ev;
NwGtpv2cStackHandleT hGtpv2cStack; NwGtpv2cStackHandleT hGtpv2cStack;
NwU32T packetsSent; uint32_t packetsSent;
NwU32T packetsRcvd; uint32_t packetsRcvd;
} NwGtpv2cNodeUdpT; } NwGtpv2cNodeUdpT;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NwRcT nwGtpv2cUdpInit(NwGtpv2cNodeUdpT* thiz, NwGtpv2cStackHandleT hGtpv2cStack, NwU8T* ipAddrStr); NwRcT nwGtpv2cUdpInit(NwGtpv2cNodeUdpT* thiz, NwGtpv2cStackHandleT hGtpv2cStack, uint8_t* ipAddrStr);
NwRcT nwGtpv2cUdpDestroy(NwGtpv2cNodeUdpT* thiz); NwRcT nwGtpv2cUdpDestroy(NwGtpv2cNodeUdpT* thiz);
NwRcT nwGtpv2cUdpDataReq(NwGtpv2cUdpHandleT udpHandle, NwRcT nwGtpv2cUdpDataReq(NwGtpv2cUdpHandleT udpHandle,
NwU8T* dataBuf, uint8_t* dataBuf,
NwU32T dataSize, uint32_t dataSize,
NwU32T peerIp, uint32_t peerIp,
NwU32T peerPort); uint32_t peerPort);
NwRcT nwGtpv2cUdpReset(NwGtpv2cNodeUdpT* thiz); NwRcT nwGtpv2cUdpReset(NwGtpv2cNodeUdpT* thiz);
......
...@@ -56,18 +56,18 @@ nwGtpv2cUlpDestroy(NwGtpv2cNodeUlpT* thiz) ...@@ -56,18 +56,18 @@ nwGtpv2cUlpDestroy(NwGtpv2cNodeUlpT* thiz)
} }
typedef struct NwGtpv2cPeerS { typedef struct NwGtpv2cPeerS {
NwU32T ipv4Addr; uint32_t ipv4Addr;
NwU32T pingCount; uint32_t pingCount;
NwU32T pingInterval; uint32_t pingInterval;
NwU32T t3Time; uint32_t t3Time;
NwU32T n3Count; uint32_t n3Count;
NwU32T sendTimeStamp; uint32_t sendTimeStamp;
NwGtpv2cTunnelHandleT hTunnel; NwGtpv2cTunnelHandleT hTunnel;
} NwGtpv2cPeerT; } NwGtpv2cPeerT;
NwGtpv2cPeerT* NwGtpv2cPeerT*
nwGtpv2cUlpCreatePeerContext(NwGtpv2cNodeUlpT* thiz, NwU32T peerIp) nwGtpv2cUlpCreatePeerContext(NwGtpv2cNodeUlpT* thiz, uint32_t peerIp)
{ {
NwRcT rc; NwRcT rc;
NwGtpv2cUlpApiT ulpReq; NwGtpv2cUlpApiT ulpReq;
...@@ -135,11 +135,11 @@ nwGtpv2cUlpSendEchoRequestToPeer(NwGtpv2cNodeUlpT* thiz, NwGtpv2cPeerT *pPeer) ...@@ -135,11 +135,11 @@ nwGtpv2cUlpSendEchoRequestToPeer(NwGtpv2cNodeUlpT* thiz, NwGtpv2cPeerT *pPeer)
NwRcT NwRcT
nwGtpv2cUlpPing(NwGtpv2cNodeUlpT* thiz, nwGtpv2cUlpPing(NwGtpv2cNodeUlpT* thiz,
NwU32T peerIp, uint32_t peerIp,
NwU32T pingCount, uint32_t pingCount,
NwU32T pingInterval, uint32_t pingInterval,
NwU32T t3Time, uint32_t t3Time,
NwU32T n3Count) uint32_t n3Count)
{ {
NwRcT rc; NwRcT rc;
NwGtpv2cPeerT *pPeer; NwGtpv2cPeerT *pPeer;
...@@ -165,9 +165,9 @@ nwGtpv2cUlpProcessStackReqCallback (NwGtpv2cUlpHandleT hUlp, ...@@ -165,9 +165,9 @@ nwGtpv2cUlpProcessStackReqCallback (NwGtpv2cUlpHandleT hUlp,
NwGtpv2cUlpApiT *pUlpApi) NwGtpv2cUlpApiT *pUlpApi)
{ {
NwRcT rc; NwRcT rc;
NwU32T seqNum; uint32_t seqNum;
NwU32T len; uint32_t len;
NwU32T recvTimeStamp; uint32_t recvTimeStamp;
struct timeval tv; struct timeval tv;
NwGtpv2cPeerT *pPeer; NwGtpv2cPeerT *pPeer;
NwGtpv2cNodeUlpT* thiz; NwGtpv2cNodeUlpT* thiz;
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
#define __NW_MINI_ULP_H__ #define __NW_MINI_ULP_H__
typedef struct { typedef struct {
NwU8T peerIpStr[16]; uint8_t peerIpStr[16];
NwU32T restartCounter; uint32_t restartCounter;
NwGtpv2cStackHandleT hGtpv2cStack; NwGtpv2cStackHandleT hGtpv2cStack;
} NwGtpv2cNodeUlpT; } NwGtpv2cNodeUlpT;
...@@ -41,11 +41,11 @@ nwGtpv2cUlpProcessStackReqCallback (NwGtpv2cUlpHandleT hUlp, ...@@ -41,11 +41,11 @@ nwGtpv2cUlpProcessStackReqCallback (NwGtpv2cUlpHandleT hUlp,
NwRcT NwRcT
nwGtpv2cUlpPing(NwGtpv2cNodeUlpT* thiz, nwGtpv2cUlpPing(NwGtpv2cNodeUlpT* thiz,
NwU32T peerIp, uint32_t peerIp,
NwU32T pingCount, uint32_t pingCount,
NwU32T pingInterval, uint32_t pingInterval,
NwU32T t3Time, uint32_t t3Time,
NwU32T n3Count); uint32_t n3Count);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -40,21 +40,21 @@ NwMiniLogMgrT* nwMiniLogMgrGetInstance() ...@@ -40,21 +40,21 @@ NwMiniLogMgrT* nwMiniLogMgrGetInstance()
return &(__gLogMgr); return &(__gLogMgr);
} }
NwRcT nwMiniLogMgrInit(NwMiniLogMgrT* thiz, NwU32T logLevel ) NwRcT nwMiniLogMgrInit(NwMiniLogMgrT* thiz, uint32_t logLevel )
{ {
thiz->logLevel = logLevel; thiz->logLevel = logLevel;
return NW_OK; return NW_OK;
} }
NwRcT nwMiniLogMgrSetLogLevel(NwMiniLogMgrT* thiz, NwU32T logLevel) NwRcT nwMiniLogMgrSetLogLevel(NwMiniLogMgrT* thiz, uint32_t logLevel)
{ {
thiz->logLevel = logLevel; thiz->logLevel = logLevel;
} }
NwRcT nwMiniLogMgrLogRequest (NwGtpv2cLogMgrHandleT hLogMgr, NwRcT nwMiniLogMgrLogRequest (NwGtpv2cLogMgrHandleT hLogMgr,
NwU32T logLevel, uint32_t logLevel,
NwCharT* file, NwCharT* file,
NwU32T line, uint32_t line,
NwCharT* logStr) NwCharT* logStr)
{ {
NwMiniLogMgrT* thiz = (NwMiniLogMgrT*) hLogMgr; NwMiniLogMgrT* thiz = (NwMiniLogMgrT*) hLogMgr;
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* MiniLogMgr Class Definition * MiniLogMgr Class Definition
*/ */
typedef struct NwMiniLogMgr { typedef struct NwMiniLogMgr {
NwU8T logLevel; /*< Log level */ uint8_t logLevel; /*< Log level */
} NwMiniLogMgrT; } NwMiniLogMgrT;
...@@ -59,14 +59,14 @@ NwMiniLogMgrT* nwMiniLogMgrGetInstance(); ...@@ -59,14 +59,14 @@ NwMiniLogMgrT* nwMiniLogMgrGetInstance();
* @param thiz : Pointer to global singleton MiniLogMgr instance * @param thiz : Pointer to global singleton MiniLogMgr instance
* @param logLevel : Log Level * @param logLevel : Log Level
*/ */
NwRcT nwMiniLogMgrInit(NwMiniLogMgrT* thiz, NwU32T logLevel ); NwRcT nwMiniLogMgrInit(NwMiniLogMgrT* thiz, uint32_t logLevel );
/** /**
* Set MiniLogMgr log level * Set MiniLogMgr log level
* @param thiz : Pointer to global singleton MiniLogMgr instance * @param thiz : Pointer to global singleton MiniLogMgr instance
* @param logLevel : Log Level * @param logLevel : Log Level
*/ */
NwRcT nwMiniLogMgrSetLogLevel(NwMiniLogMgrT* thiz, NwU32T logLevel); NwRcT nwMiniLogMgrSetLogLevel(NwMiniLogMgrT* thiz, uint32_t logLevel);
/** /**
* Process log request from stack * Process log request from stack
...@@ -77,9 +77,9 @@ NwRcT nwMiniLogMgrSetLogLevel(NwMiniLogMgrT* thiz, NwU32T logLevel); ...@@ -77,9 +77,9 @@ NwRcT nwMiniLogMgrSetLogLevel(NwMiniLogMgrT* thiz, NwU32T logLevel);
* @param logStr : Log string * @param logStr : Log string
*/ */
NwRcT nwMiniLogMgrLogRequest (NwGtpv2cLogMgrHandleT logMgrHandle, NwRcT nwMiniLogMgrLogRequest (NwGtpv2cLogMgrHandleT logMgrHandle,
NwU32T logLevel, uint32_t logLevel,
NwCharT* file, NwCharT* file,
NwU32T line, uint32_t line,
NwCharT* logStr); NwCharT* logStr);
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -55,9 +55,9 @@ NW_TMR_CALLBACK(nwGtpv2cNodeHandleStackTimerTimeout) ...@@ -55,9 +55,9 @@ NW_TMR_CALLBACK(nwGtpv2cNodeHandleStackTimerTimeout)
*--------------------------------------------------------------------------*/ *--------------------------------------------------------------------------*/
NwRcT nwTimerStart( NwGtpv2cTimerMgrHandleT tmrMgrHandle, NwRcT nwTimerStart( NwGtpv2cTimerMgrHandleT tmrMgrHandle,
NwU32T timeoutSec, uint32_t timeoutSec,
NwU32T timeoutUsec, uint32_t timeoutUsec,
NwU32T tmrType, uint32_t tmrType,
void* timeoutArg, void* timeoutArg,
NwGtpv2cTimerHandleT* hTmr) NwGtpv2cTimerHandleT* hTmr)
{ {
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#define __NW_MINI_TMR_MGR_H__ #define __NW_MINI_TMR_MGR_H__
typedef struct { typedef struct {
NwU8T _tbd; uint8_t _tbd;
} NwGtpv2cNodeTmrMgrT; } NwGtpv2cNodeTmrMgrT;
typedef struct { typedef struct {
...@@ -39,9 +39,9 @@ extern "C" { ...@@ -39,9 +39,9 @@ extern "C" {
#endif #endif
NwRcT nwTimerStart( NwGtpv2cTimerMgrHandleT tmrMgrHandle, NwRcT nwTimerStart( NwGtpv2cTimerMgrHandleT tmrMgrHandle,
NwU32T timeoutSec, uint32_t timeoutSec,
NwU32T timeoutUsec, uint32_t timeoutUsec,
NwU32T tmrType, uint32_t tmrType,
void* timeoutArg, void* timeoutArg,
NwGtpv2cTimerHandleT* hTmr); NwGtpv2cTimerHandleT* hTmr);
......
...@@ -46,9 +46,9 @@ static ...@@ -46,9 +46,9 @@ static
void NW_EVT_CALLBACK(nwUdpDataIndicationCallbackData) void NW_EVT_CALLBACK(nwUdpDataIndicationCallbackData)
{ {
NwRcT rc; NwRcT rc;
NwU8T udpBuf[MAX_UDP_PAYLOAD_LEN]; uint8_t udpBuf[MAX_UDP_PAYLOAD_LEN];
NwS32T bytesRead; NwS32T bytesRead;
NwU32T peerLen; uint32_t peerLen;
struct sockaddr_in peer; struct sockaddr_in peer;
NwGtpv2cNodeUdpT* thiz = (NwGtpv2cNodeUdpT*) arg; NwGtpv2cNodeUdpT* thiz = (NwGtpv2cNodeUdpT*) arg;
...@@ -57,7 +57,7 @@ void NW_EVT_CALLBACK(nwUdpDataIndicationCallbackData) ...@@ -57,7 +57,7 @@ void NW_EVT_CALLBACK(nwUdpDataIndicationCallbackData)
bytesRead = recvfrom(fd, udpBuf, MAX_UDP_PAYLOAD_LEN , 0, (struct sockaddr *) &peer,(socklen_t*) &peerLen); bytesRead = recvfrom(fd, udpBuf, MAX_UDP_PAYLOAD_LEN , 0, (struct sockaddr *) &peer,(socklen_t*) &peerLen);
if(bytesRead) { if(bytesRead) {
NwU32T peerIp = (peer.sin_addr.s_addr); uint32_t peerIp = (peer.sin_addr.s_addr);
NW_LOG(NW_LOG_LEVEL_DEBG, "Received UDP message of size %u from peer %u.%u.%u.%u:%u", bytesRead, NW_LOG(NW_LOG_LEVEL_DEBG, "Received UDP message of size %u from peer %u.%u.%u.%u:%u", bytesRead,
(peerIp & 0x000000ff), (peerIp & 0x000000ff),
(peerIp & 0x0000ff00) >> 8, (peerIp & 0x0000ff00) >> 8,
...@@ -75,7 +75,7 @@ void NW_EVT_CALLBACK(nwUdpDataIndicationCallbackData) ...@@ -75,7 +75,7 @@ void NW_EVT_CALLBACK(nwUdpDataIndicationCallbackData)
* Public functions * Public functions
*--------------------------------------------------------------------------*/ *--------------------------------------------------------------------------*/
NwRcT nwGtpv2cUdpInit(NwGtpv2cNodeUdpT* thiz, NwGtpv2cStackHandleT hGtpv2cStack, NwU8T* ipv4Addr) NwRcT nwGtpv2cUdpInit(NwGtpv2cNodeUdpT* thiz, NwGtpv2cStackHandleT hGtpv2cStack, uint8_t* ipv4Addr)
{ {
int sd; int sd;
struct sockaddr_in addr; struct sockaddr_in addr;
...@@ -111,10 +111,10 @@ NwRcT nwGtpv2cUdpDestroy(NwGtpv2cNodeUdpT* thiz) ...@@ -111,10 +111,10 @@ NwRcT nwGtpv2cUdpDestroy(NwGtpv2cNodeUdpT* thiz)
} }
NwRcT nwGtpv2cUdpDataReq(NwGtpv2cUdpHandleT udpHandle, NwRcT nwGtpv2cUdpDataReq(NwGtpv2cUdpHandleT udpHandle,
NwU8T* dataBuf, uint8_t* dataBuf,
NwU32T dataSize, uint32_t dataSize,
NwU32T peerIp, uint32_t peerIp,
NwU32T peerPort) uint32_t peerPort)
{ {
struct sockaddr_in peerAddr; struct sockaddr_in peerAddr;
NwS32T bytesSent; NwS32T bytesSent;
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#define __NW_MINI_UDP_ENTITY_H__ #define __NW_MINI_UDP_ENTITY_H__
typedef struct { typedef struct {
NwU32T hSocket; uint32_t hSocket;
NwEventT ev; NwEventT ev;
NwGtpv2cStackHandleT hGtpv2cStack; NwGtpv2cStackHandleT hGtpv2cStack;
} NwGtpv2cNodeUdpT; } NwGtpv2cNodeUdpT;
...@@ -34,15 +34,15 @@ typedef struct { ...@@ -34,15 +34,15 @@ typedef struct {
extern "C" { extern "C" {
#endif #endif
NwRcT nwGtpv2cUdpInit(NwGtpv2cNodeUdpT* thiz, NwGtpv2cStackHandleT hGtpv2cStack, NwU8T* ipv4Addr); NwRcT nwGtpv2cUdpInit(NwGtpv2cNodeUdpT* thiz, NwGtpv2cStackHandleT hGtpv2cStack, uint8_t* ipv4Addr);
NwRcT nwGtpv2cUdpDestroy(NwGtpv2cNodeUdpT* thiz); NwRcT nwGtpv2cUdpDestroy(NwGtpv2cNodeUdpT* thiz);
NwRcT nwGtpv2cUdpDataReq(NwGtpv2cUdpHandleT udpHandle, NwRcT nwGtpv2cUdpDataReq(NwGtpv2cUdpHandleT udpHandle,
NwU8T* dataBuf, uint8_t* dataBuf,
NwU32T dataSize, uint32_t dataSize,
NwU32T peerIp, uint32_t peerIp,
NwU32T peerPort); uint32_t peerPort);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -34,7 +34,7 @@ static ...@@ -34,7 +34,7 @@ static
NwCharT* gLogLevelStr[] = {"EMER", "ALER", "CRIT", "ERRO", "WARN", "NOTI", "INFO", "DEBG"}; NwCharT* gLogLevelStr[] = {"EMER", "ALER", "CRIT", "ERRO", "WARN", "NOTI", "INFO", "DEBG"};
static NwRcT static NwRcT
nwGtpv2cCreateSessionRequestIeIndication(NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T* ieValue, void* arg) nwGtpv2cCreateSessionRequestIeIndication(uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t* ieValue, void* arg)
{ {
NW_LOG(NW_LOG_LEVEL_DEBG, "Received IE Parse Indication for of type %u, length %u, instance %u!", ieType, ieLength, ieInstance); NW_LOG(NW_LOG_LEVEL_DEBG, "Received IE Parse Indication for of type %u, length %u, instance %u!", ieType, ieLength, ieInstance);
return NW_OK; return NW_OK;
...@@ -62,7 +62,7 @@ nwGtpv2cUlpDestroy(NwGtpv2cNodeUlpT* thiz) ...@@ -62,7 +62,7 @@ nwGtpv2cUlpDestroy(NwGtpv2cNodeUlpT* thiz)
} }
NwRcT NwRcT
nwGtpv2cUlpSenEchoRequestToPeer(NwGtpv2cNodeUlpT* thiz, NwU32T peerIp) nwGtpv2cUlpSenEchoRequestToPeer(NwGtpv2cNodeUlpT* thiz, uint32_t peerIp)
{ {
NwRcT rc; NwRcT rc;
NwGtpv2cUlpApiT ulpReq; NwGtpv2cUlpApiT ulpReq;
...@@ -153,18 +153,18 @@ nwGtpv2cUlpProcessStackReqCallback (NwGtpv2cUlpHandleT hUlp, ...@@ -153,18 +153,18 @@ nwGtpv2cUlpProcessStackReqCallback (NwGtpv2cUlpHandleT hUlp,
if(pUlpApi->apiInfo.initialReqIndInfo.msgType == NW_GTP_CREATE_SESSION_REQ) { if(pUlpApi->apiInfo.initialReqIndInfo.msgType == NW_GTP_CREATE_SESSION_REQ) {
struct { struct {
NwU8T causeValue; uint8_t causeValue;
NwU8T spare:5; uint8_t spare:5;
NwU8T pce:1; uint8_t pce:1;
NwU8T bce:1; uint8_t bce:1;
NwU8T cs:1; uint8_t cs:1;
} cause; } cause;
rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_RECOVERY, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY, nwGtpv2cCreateSessionRequestIeIndication, NULL); rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_RECOVERY, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY, nwGtpv2cCreateSessionRequestIeIndication, NULL);
NW_ASSERT(NW_OK == rc); NW_ASSERT(NW_OK == rc);
NwU8T offendingIeType, OffendingIeLength; uint8_t offendingIeType, OffendingIeLength;
rc = nwGtpv2cMsgParserRun(pMsgParser, (pUlpApi->hMsg), &offendingIeType, &OffendingIeLength); rc = nwGtpv2cMsgParserRun(pMsgParser, (pUlpApi->hMsg), &offendingIeType, &OffendingIeLength);
if( rc != NW_OK ) { if( rc != NW_OK ) {
...@@ -198,7 +198,7 @@ nwGtpv2cUlpProcessStackReqCallback (NwGtpv2cUlpHandleT hUlp, ...@@ -198,7 +198,7 @@ nwGtpv2cUlpProcessStackReqCallback (NwGtpv2cUlpHandleT hUlp,
nwGtpv2cMsgGetSeqNumber(pUlpApi->hMsg), nwGtpv2cMsgGetSeqNumber(pUlpApi->hMsg),
&(ulpReq.hMsg)); &(ulpReq.hMsg));
rc = nwGtpv2cMsgAddIe((ulpReq.hMsg), NW_GTPV2C_IE_CAUSE, 2, 0, (NwU8T*)&cause); rc = nwGtpv2cMsgAddIe((ulpReq.hMsg), NW_GTPV2C_IE_CAUSE, 2, 0, (uint8_t*)&cause);
NW_ASSERT(NW_OK == rc); NW_ASSERT(NW_OK == rc);
NW_LOG(NW_LOG_LEVEL_NOTI, "Received NW_GTP_CREATE_SESSION_REQ, Sending NW_GTP_CREATE_SESSION_RSP!"); NW_LOG(NW_LOG_LEVEL_NOTI, "Received NW_GTP_CREATE_SESSION_REQ, Sending NW_GTP_CREATE_SESSION_RSP!");
...@@ -227,7 +227,7 @@ nwGtpv2cUlpProcessStackReqCallback (NwGtpv2cUlpHandleT hUlp, ...@@ -227,7 +227,7 @@ nwGtpv2cUlpProcessStackReqCallback (NwGtpv2cUlpHandleT hUlp,
rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_CAUSE, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY, nwGtpv2cCreateSessionRequestIeIndication, NULL); rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_CAUSE, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY, nwGtpv2cCreateSessionRequestIeIndication, NULL);
NW_ASSERT(NW_OK == rc); NW_ASSERT(NW_OK == rc);
NwU8T offendingIeType, OffendingIeLength; uint8_t offendingIeType, OffendingIeLength;
rc = nwGtpv2cMsgParserRun(pMsgParser, (pUlpApi->hMsg), &offendingIeType, &OffendingIeLength); rc = nwGtpv2cMsgParserRun(pMsgParser, (pUlpApi->hMsg), &offendingIeType, &OffendingIeLength);
if( rc != NW_OK ) { if( rc != NW_OK ) {
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
#define __NW_MINI_ULP_H__ #define __NW_MINI_ULP_H__
typedef struct { typedef struct {
NwU8T peerIpStr[16]; uint8_t peerIpStr[16];
NwU32T restartCounter; uint32_t restartCounter;
NwGtpv2cStackHandleT hGtpv2cStack; NwGtpv2cStackHandleT hGtpv2cStack;
} NwGtpv2cNodeUlpT; } NwGtpv2cNodeUlpT;
......
...@@ -40,8 +40,8 @@ NwCharT* gLogLevelStr[] = {"EMER", "ALER", "CRIT", "ERRO", "WARN", "NOTI", "INF ...@@ -40,8 +40,8 @@ NwCharT* gLogLevelStr[] = {"EMER", "ALER", "CRIT", "ERRO", "WARN", "NOTI", "INF
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
NwRcT rc; NwRcT rc;
NwU32T logLevel; uint32_t logLevel;
NwU8T* logLevelStr; uint8_t* logLevelStr;
NwGtpv2cStackHandleT hGtpv2cStack = 0; NwGtpv2cStackHandleT hGtpv2cStack = 0;
......
...@@ -34,10 +34,10 @@ ...@@ -34,10 +34,10 @@
#include "s11_common.h" #include "s11_common.h"
NwRcT s11_ie_indication_generic(NwU8T ieType, NwRcT s11_ie_indication_generic(uint8_t ieType,
NwU8T ieLength, uint8_t ieLength,
NwU8T ieInstance, uint8_t ieInstance,
NwU8T *ieValue, uint8_t *ieValue,
void *arg) void *arg)
{ {
S11_DEBUG("Received IE Parse Indication for of type %u, length %u, " S11_DEBUG("Received IE Parse Indication for of type %u, length %u, "
......
...@@ -34,10 +34,10 @@ ...@@ -34,10 +34,10 @@
#define S11_WARN(x, args...) fprintf(stdout, "[S11] [W]"x, ##args) #define S11_WARN(x, args...) fprintf(stdout, "[S11] [W]"x, ##args)
#define S11_ERROR(x, args...) fprintf(stderr, "[S11] [E]"x, ##args) #define S11_ERROR(x, args...) fprintf(stderr, "[S11] [E]"x, ##args)
NwRcT s11_ie_indication_generic(NwU8T ieType, NwRcT s11_ie_indication_generic(uint8_t ieType,
NwU8T ieLength, uint8_t ieLength,
NwU8T ieInstance, uint8_t ieInstance,
NwU8T *ieValue, uint8_t *ieValue,
void *arg); void *arg);
#endif /* S11_COMMON_H_ */ #endif /* S11_COMMON_H_ */
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#include "s11_ie_formatter.h" #include "s11_ie_formatter.h"
NwRcT s11_imsi_ie_get( NwRcT s11_imsi_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
Imsi_t *imsi; Imsi_t *imsi;
uint8_t i; uint8_t i;
...@@ -108,7 +108,7 @@ int s11_imsi_ie_set(NwGtpv2cMsgHandleT *msg, const Imsi_t *imsi) ...@@ -108,7 +108,7 @@ int s11_imsi_ie_set(NwGtpv2cMsgHandleT *msg, const Imsi_t *imsi)
} }
NwRcT s11_msisdn_ie_get( NwRcT s11_msisdn_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
Msisdn_t *msisdn; Msisdn_t *msisdn;
uint8_t i; uint8_t i;
...@@ -143,7 +143,7 @@ NwRcT s11_msisdn_ie_get( ...@@ -143,7 +143,7 @@ NwRcT s11_msisdn_ie_get(
} }
NwRcT s11_mei_ie_get( NwRcT s11_mei_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
Mei_t *mei = (Mei_t *)arg; Mei_t *mei = (Mei_t *)arg;
...@@ -155,7 +155,7 @@ NwRcT s11_mei_ie_get( ...@@ -155,7 +155,7 @@ NwRcT s11_mei_ie_get(
} }
NwRcT s11_pdn_type_ie_get( NwRcT s11_pdn_type_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
pdn_type_t *pdn_type = (pdn_type_t *)arg; pdn_type_t *pdn_type = (pdn_type_t *)arg;
...@@ -207,14 +207,14 @@ int s11_pdn_type_ie_set(NwGtpv2cMsgHandleT *msg, const pdn_type_t *pdn_type) ...@@ -207,14 +207,14 @@ int s11_pdn_type_ie_set(NwGtpv2cMsgHandleT *msg, const pdn_type_t *pdn_type)
return -1; return -1;
} }
rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_PDN_TYPE, 1, 0, (NwU8T*)&value); rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_PDN_TYPE, 1, 0, (uint8_t*)&value);
DevAssert(NW_OK == rc); DevAssert(NW_OK == rc);
return 0; return 0;
} }
NwRcT s11_rat_type_ie_get( NwRcT s11_rat_type_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
rat_type_t *rat_type = (rat_type_t *)arg; rat_type_t *rat_type = (rat_type_t *)arg;
...@@ -295,7 +295,7 @@ int s11_rat_type_ie_set(NwGtpv2cMsgHandleT *msg, const rat_type_t *rat_type) ...@@ -295,7 +295,7 @@ int s11_rat_type_ie_set(NwGtpv2cMsgHandleT *msg, const rat_type_t *rat_type)
return -1; return -1;
} }
rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_RAT_TYPE, 1, 0, (NwU8T*)&value); rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_RAT_TYPE, 1, 0, (uint8_t*)&value);
DevAssert(NW_OK == rc); DevAssert(NW_OK == rc);
return 0; return 0;
...@@ -316,7 +316,7 @@ int s11_ebi_ie_set(NwGtpv2cMsgHandleT *msg, const unsigned ebi) ...@@ -316,7 +316,7 @@ int s11_ebi_ie_set(NwGtpv2cMsgHandleT *msg, const unsigned ebi)
} }
NwRcT s11_ebi_ie_get( NwRcT s11_ebi_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
uint8_t *ebi = (uint8_t *)arg; uint8_t *ebi = (uint8_t *)arg;
...@@ -330,7 +330,7 @@ NwRcT s11_ebi_ie_get( ...@@ -330,7 +330,7 @@ NwRcT s11_ebi_ie_get(
} }
NwRcT s11_cause_ie_get( NwRcT s11_cause_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
SGWCause_t *cause = (SGWCause_t *)arg; SGWCause_t *cause = (SGWCause_t *)arg;
...@@ -371,7 +371,7 @@ int s11_cause_ie_set(NwGtpv2cMsgHandleT *msg, ...@@ -371,7 +371,7 @@ int s11_cause_ie_set(NwGtpv2cMsgHandleT *msg,
} }
NwRcT s11_bearer_context_ie_get( NwRcT s11_bearer_context_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
bearer_to_create_t *bearer_to_create = (bearer_to_create_t *)arg; bearer_to_create_t *bearer_to_create = (bearer_to_create_t *)arg;
uint8_t read = 0; uint8_t read = 0;
...@@ -428,7 +428,7 @@ int s11_bearer_context_to_create_ie_set( ...@@ -428,7 +428,7 @@ int s11_bearer_context_to_create_ie_set(
} }
NwRcT s11_bearer_context_to_modifiy_ie_get( NwRcT s11_bearer_context_to_modifiy_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
bearer_context_to_modify_t *bearer_to_modify = (bearer_context_to_modify_t *)arg; bearer_context_to_modify_t *bearer_to_modify = (bearer_context_to_modify_t *)arg;
uint8_t read = 0; uint8_t read = 0;
...@@ -467,7 +467,7 @@ NwRcT s11_bearer_context_to_modifiy_ie_get( ...@@ -467,7 +467,7 @@ NwRcT s11_bearer_context_to_modifiy_ie_get(
} }
NwRcT s11_bearer_context_created_ie_get( NwRcT s11_bearer_context_created_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
bearer_context_created_t *bearer_created = (bearer_context_created_t *)arg; bearer_context_created_t *bearer_created = (bearer_context_created_t *)arg;
uint8_t read = 0; uint8_t read = 0;
...@@ -534,7 +534,7 @@ int s11_bearer_context_created_ie_set( ...@@ -534,7 +534,7 @@ int s11_bearer_context_created_ie_set(
bearer->s1u_sgw_fteid.interface_type, bearer->s1u_sgw_fteid.interface_type,
bearer->s1u_sgw_fteid.teid, bearer->s1u_sgw_fteid.teid,
bearer->s1u_sgw_fteid.ipv4 ? htonl(bearer->s1u_sgw_fteid.ipv4_address) : 0, bearer->s1u_sgw_fteid.ipv4 ? htonl(bearer->s1u_sgw_fteid.ipv4_address) : 0,
bearer->s1u_sgw_fteid.ipv6 ? (NwU8T*)bearer->s1u_sgw_fteid.ipv6_address : NULL); bearer->s1u_sgw_fteid.ipv6 ? (uint8_t*)bearer->s1u_sgw_fteid.ipv6_address : NULL);
DevAssert(NW_OK == rc); DevAssert(NW_OK == rc);
/* End section for grouped IE: bearer context created */ /* End section for grouped IE: bearer context created */
...@@ -558,14 +558,14 @@ int s11_apn_restriction_ie_set( ...@@ -558,14 +558,14 @@ int s11_apn_restriction_ie_set(
DevAssert(msg != NULL); DevAssert(msg != NULL);
rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_APN_RESTRICTION, 1, 0, rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_APN_RESTRICTION, 1, 0,
(NwU8T *)&apn_restriction); (uint8_t *)&apn_restriction);
DevAssert(NW_OK == rc); DevAssert(NW_OK == rc);
return 0; return 0;
} }
NwRcT s11_serving_network_ie_get( NwRcT s11_serving_network_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
ServingNetwork_t *serving_net = (ServingNetwork_t *)arg; ServingNetwork_t *serving_net = (ServingNetwork_t *)arg;
...@@ -628,7 +628,7 @@ int s11_serving_network_ie_set( ...@@ -628,7 +628,7 @@ int s11_serving_network_ie_set(
} }
NwRcT s11_fteid_ie_get( NwRcT s11_fteid_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
uint8_t offset = 0; uint8_t offset = 0;
FTeid_t *fteid = (FTeid_t *)arg; FTeid_t *fteid = (FTeid_t *)arg;
...@@ -670,7 +670,7 @@ NwRcT s11_fteid_ie_get( ...@@ -670,7 +670,7 @@ NwRcT s11_fteid_ie_get(
} }
NwRcT s11_paa_ie_get( NwRcT s11_paa_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
uint8_t offset = 0; uint8_t offset = 0;
PAA_t *paa = (PAA_t *)arg; PAA_t *paa = (PAA_t *)arg;
...@@ -756,7 +756,7 @@ int s11_paa_ie_set(NwGtpv2cMsgHandleT *msg, const PAA_t *paa) ...@@ -756,7 +756,7 @@ int s11_paa_ie_set(NwGtpv2cMsgHandleT *msg, const PAA_t *paa)
* and the hyphen (-). * and the hyphen (-).
*/ */
NwRcT s11_apn_ie_get( NwRcT s11_apn_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
uint8_t read = 1; uint8_t read = 1;
uint8_t word_length; uint8_t word_length;
...@@ -831,7 +831,7 @@ int s11_apn_ie_set(NwGtpv2cMsgHandleT *msg, const char *apn) ...@@ -831,7 +831,7 @@ int s11_apn_ie_set(NwGtpv2cMsgHandleT *msg, const char *apn)
} }
NwRcT s11_ambr_ie_get( NwRcT s11_ambr_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
ambr_t *ambr = (ambr_t *)arg; ambr_t *ambr = (ambr_t *)arg;
...@@ -847,7 +847,7 @@ NwRcT s11_ambr_ie_get( ...@@ -847,7 +847,7 @@ NwRcT s11_ambr_ie_get(
} }
NwRcT s11_uli_ie_get( NwRcT s11_uli_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
Uli_t *uli = (Uli_t *)arg; Uli_t *uli = (Uli_t *)arg;
...@@ -886,7 +886,7 @@ int s11_bearer_qos_ie_set(NwGtpv2cMsgHandleT *msg, const BearerQOS_t *bearer_qos ...@@ -886,7 +886,7 @@ int s11_bearer_qos_ie_set(NwGtpv2cMsgHandleT *msg, const BearerQOS_t *bearer_qos
} }
NwRcT s11_ip_address_ie_get( NwRcT s11_ip_address_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
gtp_ip_address_t *ip_address = (gtp_ip_address_t *)arg; gtp_ip_address_t *ip_address = (gtp_ip_address_t *)arg;
...@@ -915,7 +915,7 @@ int s11_ip_address_ie_set(NwGtpv2cMsgHandleT *msg, ...@@ -915,7 +915,7 @@ int s11_ip_address_ie_set(NwGtpv2cMsgHandleT *msg,
} }
NwRcT s11_delay_value_ie_get( NwRcT s11_delay_value_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
DelayValue_t *delay_value = (DelayValue_t *)arg; DelayValue_t *delay_value = (DelayValue_t *)arg;
...@@ -943,14 +943,14 @@ int s11_delay_value_ie_set(NwGtpv2cMsgHandleT *msg, ...@@ -943,14 +943,14 @@ int s11_delay_value_ie_set(NwGtpv2cMsgHandleT *msg,
value = *delay_value; value = *delay_value;
rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_DELAY_VALUE, 1, 0, (NwU8T*)&value); rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_DELAY_VALUE, 1, 0, (uint8_t*)&value);
DevAssert(NW_OK == rc); DevAssert(NW_OK == rc);
return 0; return 0;
} }
NwRcT s11_ue_time_zone_ie_get( NwRcT s11_ue_time_zone_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
UETimeZone_t *ue_time_zone = (UETimeZone_t *)arg; UETimeZone_t *ue_time_zone = (UETimeZone_t *)arg;
...@@ -988,7 +988,7 @@ int s11_ue_time_zone_ie_set(NwGtpv2cMsgHandleT *msg, ...@@ -988,7 +988,7 @@ int s11_ue_time_zone_ie_set(NwGtpv2cMsgHandleT *msg,
} }
NwRcT s11_target_identification_ie_get( NwRcT s11_target_identification_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
target_identification_t *target_identification = (target_identification_t *)arg; target_identification_t *target_identification = (target_identification_t *)arg;
...@@ -1055,7 +1055,7 @@ NwRcT s11_target_identification_ie_get( ...@@ -1055,7 +1055,7 @@ NwRcT s11_target_identification_ie_get(
} }
NwRcT s11_bearer_flags_ie_get( NwRcT s11_bearer_flags_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
bearer_flags_t *bearer_flags = (bearer_flags_t *)arg; bearer_flags_t *bearer_flags = (bearer_flags_t *)arg;
...@@ -1082,14 +1082,14 @@ int s11_bearer_flags_ie_set(NwGtpv2cMsgHandleT *msg, ...@@ -1082,14 +1082,14 @@ int s11_bearer_flags_ie_set(NwGtpv2cMsgHandleT *msg,
value = (bearer_flags->vb << 1) | bearer_flags->ppc; value = (bearer_flags->vb << 1) | bearer_flags->ppc;
rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_BEARER_FLAGS, 1, 0, (NwU8T*)&value); rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_BEARER_FLAGS, 1, 0, (uint8_t*)&value);
DevAssert(NW_OK == rc); DevAssert(NW_OK == rc);
return 0; return 0;
} }
NwRcT s11_indication_flags_ie_get( NwRcT s11_indication_flags_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
indication_flags_t *indication_flags = (indication_flags_t*)arg; indication_flags_t *indication_flags = (indication_flags_t*)arg;
...@@ -1107,7 +1107,7 @@ NwRcT s11_indication_flags_ie_get( ...@@ -1107,7 +1107,7 @@ NwRcT s11_indication_flags_ie_get(
} }
NwRcT s11_fqcsid_ie_get( NwRcT s11_fqcsid_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg) uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg)
{ {
FQ_CSID_t *fq_csid = (FQ_CSID_t *)arg; FQ_CSID_t *fq_csid = (FQ_CSID_t *)arg;
......
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
* octet n+4 | Number digit m | Number digit m-1 | * octet n+4 | Number digit m | Number digit m-1 |
*/ */
NwRcT s11_imsi_ie_get( NwRcT s11_imsi_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
int s11_imsi_ie_set(NwGtpv2cMsgHandleT *msg, const Imsi_t *imsi); int s11_imsi_ie_set(NwGtpv2cMsgHandleT *msg, const Imsi_t *imsi);
NwRcT s11_msisdn_ie_get( NwRcT s11_msisdn_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
/* PDN Type Information Element /* PDN Type Information Element
* 3GPP TS 29.274 #8.34 * 3GPP TS 29.274 #8.34
...@@ -52,7 +52,7 @@ NwRcT s11_msisdn_ie_get( ...@@ -52,7 +52,7 @@ NwRcT s11_msisdn_ie_get(
* * 3 = IPv4v6 * * 3 = IPv4v6
*/ */
NwRcT s11_pdn_type_ie_get( NwRcT s11_pdn_type_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
int s11_pdn_type_ie_set(NwGtpv2cMsgHandleT *msg, const pdn_type_t *pdn_type); int s11_pdn_type_ie_set(NwGtpv2cMsgHandleT *msg, const pdn_type_t *pdn_type);
...@@ -61,7 +61,7 @@ int s11_pdn_type_ie_set(NwGtpv2cMsgHandleT *msg, const pdn_type_t *pdn_type); ...@@ -61,7 +61,7 @@ int s11_pdn_type_ie_set(NwGtpv2cMsgHandleT *msg, const pdn_type_t *pdn_type);
* for S11 interface defined in 3GPP TS 29.274 #8.17. * for S11 interface defined in 3GPP TS 29.274 #8.17.
*/ */
NwRcT s11_rat_type_ie_get( NwRcT s11_rat_type_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
int s11_rat_type_ie_set(NwGtpv2cMsgHandleT *msg, const rat_type_t *rat_type); int s11_rat_type_ie_set(NwGtpv2cMsgHandleT *msg, const rat_type_t *rat_type);
...@@ -69,7 +69,7 @@ int s11_rat_type_ie_set(NwGtpv2cMsgHandleT *msg, const rat_type_t *rat_type); ...@@ -69,7 +69,7 @@ int s11_rat_type_ie_set(NwGtpv2cMsgHandleT *msg, const rat_type_t *rat_type);
* 3GPP TS 29.274 #8.8 * 3GPP TS 29.274 #8.8
*/ */
NwRcT s11_ebi_ie_get( NwRcT s11_ebi_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
int s11_ebi_ie_set(NwGtpv2cMsgHandleT *msg, const unsigned ebi); int s11_ebi_ie_set(NwGtpv2cMsgHandleT *msg, const unsigned ebi);
...@@ -77,13 +77,13 @@ int s11_ebi_ie_set(NwGtpv2cMsgHandleT *msg, const unsigned ebi); ...@@ -77,13 +77,13 @@ int s11_ebi_ie_set(NwGtpv2cMsgHandleT *msg, const unsigned ebi);
* 3GPP TS 29.274 Table 7.2.1-2. * 3GPP TS 29.274 Table 7.2.1-2.
*/ */
NwRcT s11_bearer_context_ie_get( NwRcT s11_bearer_context_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
int s11_bearer_context_to_create_ie_set( int s11_bearer_context_to_create_ie_set(
NwGtpv2cMsgHandleT *msg, const bearer_to_create_t *bearer_to_create); NwGtpv2cMsgHandleT *msg, const bearer_to_create_t *bearer_to_create);
NwRcT s11_bearer_context_to_modifiy_ie_get( NwRcT s11_bearer_context_to_modifiy_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
/* EPS Bearer Id Information Element /* EPS Bearer Id Information Element
* 3GPP TS 29.274 #8.8 * 3GPP TS 29.274 #8.8
...@@ -93,14 +93,14 @@ int s11_ebi_ie_set(NwGtpv2cMsgHandleT *msg, const unsigned ebi); ...@@ -93,14 +93,14 @@ int s11_ebi_ie_set(NwGtpv2cMsgHandleT *msg, const unsigned ebi);
/* Cause Information Element */ /* Cause Information Element */
NwRcT s11_cause_ie_get( NwRcT s11_cause_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
int s11_cause_ie_set(NwGtpv2cMsgHandleT *msg, int s11_cause_ie_set(NwGtpv2cMsgHandleT *msg,
const gtp_cause_t *cause); const gtp_cause_t *cause);
/* Bearer Context Created grouped Information Element */ /* Bearer Context Created grouped Information Element */
NwRcT s11_bearer_context_created_ie_get( NwRcT s11_bearer_context_created_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
int s11_bearer_context_created_ie_set( int s11_bearer_context_created_ie_set(
NwGtpv2cMsgHandleT *msg, const bearer_context_created_t *bearer); NwGtpv2cMsgHandleT *msg, const bearer_context_created_t *bearer);
...@@ -109,18 +109,18 @@ int s11_bearer_context_created_ie_set( ...@@ -109,18 +109,18 @@ int s11_bearer_context_created_ie_set(
* 3GPP TS 29.274 #8.18 * 3GPP TS 29.274 #8.18
*/ */
NwRcT s11_serving_network_ie_get( NwRcT s11_serving_network_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
int s11_serving_network_ie_set( int s11_serving_network_ie_set(
NwGtpv2cMsgHandleT *msg, NwGtpv2cMsgHandleT *msg,
const ServingNetwork_t *serving_network); const ServingNetwork_t *serving_network);
NwRcT s11_fteid_ie_get( NwRcT s11_fteid_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
/* PDN Address Allocation Information Element */ /* PDN Address Allocation Information Element */
NwRcT s11_paa_ie_get( NwRcT s11_paa_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
int s11_paa_ie_set(NwGtpv2cMsgHandleT *msg, const PAA_t *paa); int s11_paa_ie_set(NwGtpv2cMsgHandleT *msg, const PAA_t *paa);
...@@ -131,18 +131,18 @@ int s11_paa_ie_set(NwGtpv2cMsgHandleT *msg, const PAA_t *paa); ...@@ -131,18 +131,18 @@ int s11_paa_ie_set(NwGtpv2cMsgHandleT *msg, const PAA_t *paa);
* The encoding of the APN field follows 3GPP TS 23.003 subclause 9.1 * The encoding of the APN field follows 3GPP TS 23.003 subclause 9.1
*/ */
NwRcT s11_apn_ie_get( NwRcT s11_apn_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
int s11_apn_ie_set(NwGtpv2cMsgHandleT *msg, const char *apn); int s11_apn_ie_set(NwGtpv2cMsgHandleT *msg, const char *apn);
NwRcT s11_ambr_ie_get( NwRcT s11_ambr_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
NwRcT s11_mei_ie_get( NwRcT s11_mei_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
NwRcT s11_uli_ie_get( NwRcT s11_uli_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
/* APN restrtiction Information Element */ /* APN restrtiction Information Element */
int s11_apn_restriction_ie_set( int s11_apn_restriction_ie_set(
...@@ -157,7 +157,7 @@ int s11_bearer_qos_ie_set(NwGtpv2cMsgHandleT *msg, const BearerQOS_t *bearer_qos ...@@ -157,7 +157,7 @@ int s11_bearer_qos_ie_set(NwGtpv2cMsgHandleT *msg, const BearerQOS_t *bearer_qos
* 3GPP TS 29.274 #8.9 * 3GPP TS 29.274 #8.9
*/ */
NwRcT s11_ip_address_ie_get( NwRcT s11_ip_address_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
int s11_ip_address_ie_set(NwGtpv2cMsgHandleT *msg, int s11_ip_address_ie_set(NwGtpv2cMsgHandleT *msg,
const gtp_ip_address_t *ip_address); const gtp_ip_address_t *ip_address);
...@@ -166,7 +166,7 @@ int s11_ip_address_ie_set(NwGtpv2cMsgHandleT *msg, ...@@ -166,7 +166,7 @@ int s11_ip_address_ie_set(NwGtpv2cMsgHandleT *msg,
* 3GPP TS 29.274 #8.27 * 3GPP TS 29.274 #8.27
*/ */
NwRcT s11_delay_value_ie_get( NwRcT s11_delay_value_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
int s11_delay_value_ie_set(NwGtpv2cMsgHandleT *msg, int s11_delay_value_ie_set(NwGtpv2cMsgHandleT *msg,
const DelayValue_t *delay_value); const DelayValue_t *delay_value);
...@@ -175,7 +175,7 @@ int s11_delay_value_ie_set(NwGtpv2cMsgHandleT *msg, ...@@ -175,7 +175,7 @@ int s11_delay_value_ie_set(NwGtpv2cMsgHandleT *msg,
* 3GPP TS 29.274 #8.44 * 3GPP TS 29.274 #8.44
*/ */
NwRcT s11_ue_time_zone_ie_get( NwRcT s11_ue_time_zone_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
int s11_ue_time_zone_ie_set(NwGtpv2cMsgHandleT *msg, int s11_ue_time_zone_ie_set(NwGtpv2cMsgHandleT *msg,
const UETimeZone_t *ue_time_zone); const UETimeZone_t *ue_time_zone);
...@@ -184,25 +184,25 @@ int s11_ue_time_zone_ie_set(NwGtpv2cMsgHandleT *msg, ...@@ -184,25 +184,25 @@ int s11_ue_time_zone_ie_set(NwGtpv2cMsgHandleT *msg,
* 3GPP TS 29.274 #8.51 * 3GPP TS 29.274 #8.51
*/ */
NwRcT s11_target_identification_ie_get( NwRcT s11_target_identification_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
/* Bearer Flags Information Element /* Bearer Flags Information Element
* 3GPP TS 29.274 #8.32 * 3GPP TS 29.274 #8.32
*/ */
NwRcT s11_bearer_flags_ie_get( NwRcT s11_bearer_flags_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
int s11_bearer_flags_ie_set(NwGtpv2cMsgHandleT *msg, int s11_bearer_flags_ie_set(NwGtpv2cMsgHandleT *msg,
const bearer_flags_t *bearer_flags); const bearer_flags_t *bearer_flags);
NwRcT s11_indication_flags_ie_get( NwRcT s11_indication_flags_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
/* FQ-CSID Information Element /* FQ-CSID Information Element
* 3GPP TS 29.274 #8.62 * 3GPP TS 29.274 #8.62
*/ */
NwRcT s11_fqcsid_ie_get( NwRcT s11_fqcsid_ie_get(
NwU8T ieType, NwU8T ieLength, NwU8T ieInstance, NwU8T *ieValue, void *arg); uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg);
#endif /* S11_IE_FORMATTER_H_ */ #endif /* S11_IE_FORMATTER_H_ */
...@@ -70,7 +70,7 @@ int s11_mme_create_session_request(NwGtpv2cStackHandleT *stack_p, ...@@ -70,7 +70,7 @@ int s11_mme_create_session_request(NwGtpv2cStackHandleT *stack_p,
/* Add recovery if contacting the peer for the first time */ /* Add recovery if contacting the peer for the first time */
rc = nwGtpv2cMsgAddIe((ulp_req.hMsg), NW_GTPV2C_IE_RECOVERY, 1, 0, rc = nwGtpv2cMsgAddIe((ulp_req.hMsg), NW_GTPV2C_IE_RECOVERY, 1, 0,
(NwU8T*)&restart_counter); (uint8_t*)&restart_counter);
DevAssert(NW_OK == rc); DevAssert(NW_OK == rc);
/* Putting the information Elements */ /* Putting the information Elements */
...@@ -114,8 +114,8 @@ int s11_mme_handle_create_session_response(NwGtpv2cStackHandleT *stack_p, ...@@ -114,8 +114,8 @@ int s11_mme_handle_create_session_response(NwGtpv2cStackHandleT *stack_p,
NwGtpv2cUlpApiT *pUlpApi) NwGtpv2cUlpApiT *pUlpApi)
{ {
NwRcT rc = NW_OK; NwRcT rc = NW_OK;
NwU8T offendingIeType, offendingIeInstance; uint8_t offendingIeType, offendingIeInstance;
NwU16T offendingIeLength; uint16_t offendingIeLength;
SgwCreateSessionResponse *create_session_resp_p; SgwCreateSessionResponse *create_session_resp_p;
MessageDef *message_p; MessageDef *message_p;
......
...@@ -55,9 +55,9 @@ static NwGtpv2cStackHandleT s11_mme_stack_handle; ...@@ -55,9 +55,9 @@ static NwGtpv2cStackHandleT s11_mme_stack_handle;
static static
NwRcT s11_mme_log_wrapper(NwGtpv2cLogMgrHandleT hLogMgr, NwRcT s11_mme_log_wrapper(NwGtpv2cLogMgrHandleT hLogMgr,
NwU32T logLevel, uint32_t logLevel,
NwCharT* file, NwCharT* file,
NwU32T line, uint32_t line,
NwCharT* logStr) NwCharT* logStr)
{ {
S11_DEBUG("%s\n", logStr); S11_DEBUG("%s\n", logStr);
...@@ -101,10 +101,10 @@ NwRcT s11_mme_ulp_process_stack_req_cb( ...@@ -101,10 +101,10 @@ NwRcT s11_mme_ulp_process_stack_req_cb(
static static
NwRcT s11_mme_send_udp_msg( NwRcT s11_mme_send_udp_msg(
NwGtpv2cUdpHandleT udpHandle, NwGtpv2cUdpHandleT udpHandle,
NwU8T *buffer, uint8_t *buffer,
NwU32T buffer_len, uint32_t buffer_len,
NwU32T peerIpAddr, uint32_t peerIpAddr,
NwU32T peerPort) uint32_t peerPort)
{ {
// Create and alloc new message // Create and alloc new message
MessageDef *message_p; MessageDef *message_p;
...@@ -128,9 +128,9 @@ NwRcT s11_mme_send_udp_msg( ...@@ -128,9 +128,9 @@ NwRcT s11_mme_send_udp_msg(
static static
NwRcT s11_mme_start_timer_wrapper( NwRcT s11_mme_start_timer_wrapper(
NwGtpv2cTimerMgrHandleT tmrMgrHandle, NwGtpv2cTimerMgrHandleT tmrMgrHandle,
NwU32T timeoutSec, uint32_t timeoutSec,
NwU32T timeoutUsec, uint32_t timeoutUsec,
NwU32T tmrType, uint32_t tmrType,
void *timeoutArg, void *timeoutArg,
NwGtpv2cTimerHandleT *hTmr) NwGtpv2cTimerHandleT *hTmr)
{ {
......
...@@ -104,10 +104,10 @@ NwRcT s11_sgw_ulp_process_stack_req_cb( ...@@ -104,10 +104,10 @@ NwRcT s11_sgw_ulp_process_stack_req_cb(
static static
NwRcT s11_sgw_send_udp_msg( NwRcT s11_sgw_send_udp_msg(
NwGtpv2cUdpHandleT udpHandle, NwGtpv2cUdpHandleT udpHandle,
NwU8T *buffer, uint8_t *buffer,
NwU32T buffer_len, uint32_t buffer_len,
NwU32T peerIpAddr, uint32_t peerIpAddr,
NwU32T peerPort) uint32_t peerPort)
{ {
// Create and alloc new message // Create and alloc new message
MessageDef *message_p; MessageDef *message_p;
...@@ -130,9 +130,9 @@ NwRcT s11_sgw_send_udp_msg( ...@@ -130,9 +130,9 @@ NwRcT s11_sgw_send_udp_msg(
static static
NwRcT s11_sgw_log_wrapper(NwGtpv2cLogMgrHandleT hLogMgr, NwRcT s11_sgw_log_wrapper(NwGtpv2cLogMgrHandleT hLogMgr,
NwU32T logLevel, uint32_t logLevel,
NwCharT* file, NwCharT* file,
NwU32T line, uint32_t line,
NwCharT* logStr) NwCharT* logStr)
{ {
S11_DEBUG("%s\n", logStr); S11_DEBUG("%s\n", logStr);
...@@ -142,9 +142,9 @@ NwRcT s11_sgw_log_wrapper(NwGtpv2cLogMgrHandleT hLogMgr, ...@@ -142,9 +142,9 @@ NwRcT s11_sgw_log_wrapper(NwGtpv2cLogMgrHandleT hLogMgr,
static static
NwRcT s11_sgw_start_timer_wrapper( NwRcT s11_sgw_start_timer_wrapper(
NwGtpv2cTimerMgrHandleT tmrMgrHandle, NwGtpv2cTimerMgrHandleT tmrMgrHandle,
NwU32T timeoutSec, uint32_t timeoutSec,
NwU32T timeoutUsec, uint32_t timeoutUsec,
NwU32T tmrType, uint32_t tmrType,
void *timeoutArg, void *timeoutArg,
NwGtpv2cTimerHandleT *hTmr) NwGtpv2cTimerHandleT *hTmr)
{ {
......
...@@ -50,8 +50,8 @@ int s11_sgw_handle_modify_bearer_request(NwGtpv2cStackHandleT *stack_p, ...@@ -50,8 +50,8 @@ int s11_sgw_handle_modify_bearer_request(NwGtpv2cStackHandleT *stack_p,
NwGtpv2cUlpApiT *pUlpApi) NwGtpv2cUlpApiT *pUlpApi)
{ {
NwRcT rc = NW_OK; NwRcT rc = NW_OK;
NwU8T offendingIeType, offendingIeInstance; uint8_t offendingIeType, offendingIeInstance;
NwU16T offendingIeLength; uint16_t offendingIeLength;
SgwModifyBearerRequest *modify_bearer_request_p; SgwModifyBearerRequest *modify_bearer_request_p;
MessageDef *message_p; MessageDef *message_p;
......
...@@ -50,8 +50,8 @@ int s11_sgw_handle_create_session_request(NwGtpv2cStackHandleT *stack_p, ...@@ -50,8 +50,8 @@ int s11_sgw_handle_create_session_request(NwGtpv2cStackHandleT *stack_p,
NwGtpv2cUlpApiT *pUlpApi) NwGtpv2cUlpApiT *pUlpApi)
{ {
NwRcT rc = NW_OK; NwRcT rc = NW_OK;
NwU8T offendingIeType, offendingIeInstance; uint8_t offendingIeType, offendingIeInstance;
NwU16T offendingIeLength; uint16_t offendingIeLength;
SgwCreateSessionRequest *create_session_request_p; SgwCreateSessionRequest *create_session_request_p;
MessageDef *message_p; MessageDef *message_p;
...@@ -352,8 +352,8 @@ int s11_sgw_handle_delete_session_request(NwGtpv2cStackHandleT *stack_p, ...@@ -352,8 +352,8 @@ int s11_sgw_handle_delete_session_request(NwGtpv2cStackHandleT *stack_p,
NwGtpv2cUlpApiT *pUlpApi) NwGtpv2cUlpApiT *pUlpApi)
{ {
NwRcT rc = NW_OK; NwRcT rc = NW_OK;
NwU8T offendingIeType, offendingIeInstance; uint8_t offendingIeType, offendingIeInstance;
NwU16T offendingIeLength; uint16_t offendingIeLength;
SgwDeleteSessionRequest *delete_session_request_p; SgwDeleteSessionRequest *delete_session_request_p;
MessageDef *message_p; MessageDef *message_p;
......
...@@ -168,18 +168,18 @@ typedef enum core_network_s { ...@@ -168,18 +168,18 @@ typedef enum core_network_s {
/* SAE Temporary Mobile Subscriber Identity */ /* SAE Temporary Mobile Subscriber Identity */
typedef struct as_stmsi_s { typedef struct as_stmsi_s {
UInt8_t MMEcode; /* MME code that allocated the GUTI */ uint8_t MMEcode; /* MME code that allocated the GUTI */
UInt32_t m_tmsi; /* M-Temporary Mobile Subscriber Identity */ uint32_t m_tmsi; /* M-Temporary Mobile Subscriber Identity */
} as_stmsi_t; } as_stmsi_t;
/* Dedicated NAS information */ /* Dedicated NAS information */
typedef struct as_nas_info_s { typedef struct as_nas_info_s {
UInt32_t length; /* Length of the NAS information data */ uint32_t length; /* Length of the NAS information data */
Byte_t* data; /* Dedicated NAS information data container */ Byte_t* data; /* Dedicated NAS information data container */
} as_nas_info_t; } as_nas_info_t;
/* Radio Access Bearer identity */ /* Radio Access Bearer identity */
typedef UInt8_t as_rab_id_t; typedef uint8_t as_rab_id_t;
/****************************************************************************/ /****************************************************************************/
/************************ G L O B A L T Y P E S ************************/ /************************ G L O B A L T Y P E S ************************/
...@@ -235,12 +235,12 @@ typedef struct cell_info_req_s { ...@@ -235,12 +235,12 @@ typedef struct cell_info_req_s {
* is selected to camp on. * is selected to camp on.
*/ */
typedef struct cell_info_cnf_s { typedef struct cell_info_cnf_s {
UInt8_t errCode; /* Error code */ uint8_t errCode; /* Error code */
ci_t cellID; /* Identity of the cell serving the selected PLMN */ ci_t cellID; /* Identity of the cell serving the selected PLMN */
tac_t tac; /* Code of the tracking area the cell belongs to */ tac_t tac; /* Code of the tracking area the cell belongs to */
AcT_t rat; /* Radio access technology supported by the cell */ AcT_t rat; /* Radio access technology supported by the cell */
UInt8_t rsrq; /* Reference signal received quality */ uint8_t rsrq; /* Reference signal received quality */
UInt8_t rsrp; /* Reference signal received power */ uint8_t rsrp; /* Reference signal received power */
} cell_info_cnf_t; } cell_info_cnf_t;
/* /*
...@@ -273,7 +273,7 @@ typedef enum paging_cause_s { ...@@ -273,7 +273,7 @@ typedef enum paging_cause_s {
*/ */
typedef struct paging_req_s { typedef struct paging_req_s {
as_stmsi_t s_tmsi; /* UE identity */ as_stmsi_t s_tmsi; /* UE identity */
UInt8_t CN_domain; /* Core network domain */ uint8_t CN_domain; /* Core network domain */
} paging_req_t; } paging_req_t;
/* /*
...@@ -328,7 +328,7 @@ typedef struct nas_establish_req_s { ...@@ -328,7 +328,7 @@ typedef struct nas_establish_req_s {
* AS transfers the initial NAS message to the NAS. * AS transfers the initial NAS message to the NAS.
*/ */
typedef struct nas_establish_ind_s { typedef struct nas_establish_ind_s {
UInt32_t UEid; /* UE lower layer identifier */ uint32_t UEid; /* UE lower layer identifier */
tac_t tac; /* Code of the tracking area the initiating tac_t tac; /* Code of the tracking area the initiating
* UE belongs to */ * UE belongs to */
as_cause_t asCause; /* Establishment cause */ as_cause_t asCause; /* Establishment cause */
...@@ -341,11 +341,11 @@ typedef struct nas_establish_ind_s { ...@@ -341,11 +341,11 @@ typedef struct nas_establish_ind_s {
* the UE. * the UE.
*/ */
typedef struct nas_establish_rsp_s { typedef struct nas_establish_rsp_s {
UInt32_t UEid; /* UE lower layer identifier */ uint32_t UEid; /* UE lower layer identifier */
as_stmsi_t s_tmsi; /* UE identity */ as_stmsi_t s_tmsi; /* UE identity */
nas_error_code_t errCode; /* Transaction status */ nas_error_code_t errCode; /* Transaction status */
as_nas_info_t nasMsg; /* NAS message to transfer */ as_nas_info_t nasMsg; /* NAS message to transfer */
UInt32_t nas_ul_count; /* UL NAS COUNT */ uint32_t nas_ul_count; /* UL NAS COUNT */
uint16_t selected_encryption_algorithm; uint16_t selected_encryption_algorithm;
uint16_t selected_integrity_algorithm; uint16_t selected_integrity_algorithm;
} nas_establish_rsp_t; } nas_establish_rsp_t;
...@@ -355,10 +355,10 @@ typedef struct nas_establish_rsp_s { ...@@ -355,10 +355,10 @@ typedef struct nas_establish_rsp_s {
* AS transfers the initial answer message to the NAS. * AS transfers the initial answer message to the NAS.
*/ */
typedef struct nas_establish_cnf_s { typedef struct nas_establish_cnf_s {
UInt32_t UEid; /* UE lower layer identifier */ uint32_t UEid; /* UE lower layer identifier */
nas_error_code_t errCode; /* Transaction status */ nas_error_code_t errCode; /* Transaction status */
as_nas_info_t nasMsg; /* NAS message to transfer */ as_nas_info_t nasMsg; /* NAS message to transfer */
UInt32_t ul_nas_count; uint32_t ul_nas_count;
uint16_t selected_encryption_algorithm; uint16_t selected_encryption_algorithm;
uint16_t selected_integrity_algorithm; uint16_t selected_integrity_algorithm;
} nas_establish_cnf_t; } nas_establish_cnf_t;
...@@ -380,7 +380,7 @@ typedef enum release_cause_s { ...@@ -380,7 +380,7 @@ typedef enum release_cause_s {
* NAS requests the termination of the connection with the UE. * NAS requests the termination of the connection with the UE.
*/ */
typedef struct nas_release_req_s { typedef struct nas_release_req_s {
UInt32_t UEid; /* UE lower layer identifier */ uint32_t UEid; /* UE lower layer identifier */
as_stmsi_t s_tmsi; /* UE identity */ as_stmsi_t s_tmsi; /* UE identity */
release_cause_t cause; /* Release cause */ release_cause_t cause; /* Release cause */
} nas_release_req_t; } nas_release_req_t;
...@@ -405,7 +405,7 @@ typedef struct nas_release_ind_s { ...@@ -405,7 +405,7 @@ typedef struct nas_release_ind_s {
* operates at the network side. * operates at the network side.
*/ */
typedef struct ul_info_transfer_req_s { typedef struct ul_info_transfer_req_s {
UInt32_t UEid; /* UE lower layer identifier */ uint32_t UEid; /* UE lower layer identifier */
as_stmsi_t s_tmsi; /* UE identity */ as_stmsi_t s_tmsi; /* UE identity */
as_nas_info_t nasMsg; /* Uplink NAS message */ as_nas_info_t nasMsg; /* Uplink NAS message */
} ul_info_transfer_req_t; } ul_info_transfer_req_t;
...@@ -416,7 +416,7 @@ typedef struct ul_info_transfer_req_s { ...@@ -416,7 +416,7 @@ typedef struct ul_info_transfer_req_s {
* successfully sent to the network or not. * successfully sent to the network or not.
*/ */
typedef struct ul_info_transfer_cnf_s { typedef struct ul_info_transfer_cnf_s {
UInt32_t UEid; /* UE lower layer identifier */ uint32_t UEid; /* UE lower layer identifier */
nas_error_code_t errCode; /* Transaction status */ nas_error_code_t errCode; /* Transaction status */
} ul_info_transfer_cnf_t; } ul_info_transfer_cnf_t;
...@@ -426,7 +426,7 @@ typedef struct ul_info_transfer_cnf_s { ...@@ -426,7 +426,7 @@ typedef struct ul_info_transfer_cnf_s {
* at the network side. * at the network side.
*/ */
typedef struct ul_info_transfer_ind_s { typedef struct ul_info_transfer_ind_s {
UInt32_t UEid; /* UE lower layer identifier */ uint32_t UEid; /* UE lower layer identifier */
as_nas_info_t nasMsg; /* Uplink NAS message */ as_nas_info_t nasMsg; /* Uplink NAS message */
} ul_info_transfer_ind_t; } ul_info_transfer_ind_t;
...@@ -530,7 +530,7 @@ typedef struct rab_release_ind_s { ...@@ -530,7 +530,7 @@ typedef struct rab_release_ind_s {
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
typedef struct as_message_s { typedef struct as_message_s {
UInt16_t msgID; uint16_t msgID;
union { union {
broadcast_info_ind_t broadcast_info_ind; broadcast_info_ind_t broadcast_info_ind;
cell_info_req_t cell_info_req; cell_info_req_t cell_info_req;
......
...@@ -412,12 +412,14 @@ typedef struct eNB_RRC_INST_s { ...@@ -412,12 +412,14 @@ typedef struct eNB_RRC_INST_s {
rcc_eNB_carrier_data_t carrier[MAX_NUM_CCs]; rcc_eNB_carrier_data_t carrier[MAX_NUM_CCs];
uid_allocator_t uid_allocator; // for rrc_ue_head uid_allocator_t uid_allocator; // for rrc_ue_head
RB_HEAD(rrc_ue_tree_s, rrc_eNB_ue_context_s) rrc_ue_head; // ue_context tree key search by rnti RB_HEAD(rrc_ue_tree_s, rrc_eNB_ue_context_s) rrc_ue_head; // ue_context tree key search by rnti
RB_HEAD(rrc_rnti_tree_s, rrc_ue_s1ap_ids_s) rrc_rnti_head; // ue-rnti tree key search by S1AP ids
uint8_t HO_flag; uint8_t HO_flag;
uint8_t Nb_ue; uint8_t Nb_ue;
#if defined(ENABLE_RAL) #if defined(ENABLE_RAL)
obj_hash_table_t *ral_meas_thresholds; obj_hash_table_t *ral_meas_thresholds;
#endif #endif
hash_table_t *initial_id2_s1ap_ids; // key is content is rrc_ue_s1ap_ids_t
hash_table_t *s1ap_id2_s1ap_ids ; // key is content is rrc_ue_s1ap_ids_t
#ifdef LOCALIZATION #ifdef LOCALIZATION
/// localization type, 0: power based, 1: time based /// localization type, 0: power based, 1: time based
uint8_t loc_type; uint8_t loc_type;
......
...@@ -3303,11 +3303,15 @@ openair_rrc_lite_eNB_init( ...@@ -3303,11 +3303,15 @@ openair_rrc_lite_eNB_init(
uid_linear_allocator_init(&eNB_rrc_inst[ctxt.module_id].uid_allocator); uid_linear_allocator_init(&eNB_rrc_inst[ctxt.module_id].uid_allocator);
RB_INIT(&eNB_rrc_inst[ctxt.module_id].rrc_ue_head); RB_INIT(&eNB_rrc_inst[ctxt.module_id].rrc_ue_head);
RB_INIT(&eNB_rrc_inst[ctxt.module_id].rrc_rnti_head);
// for (j = 0; j < (NUMBER_OF_UE_MAX + 1); j++) { // for (j = 0; j < (NUMBER_OF_UE_MAX + 1); j++) {
// eNB_rrc_inst[enb_mod_idP].Srb2[j].Active = 0; // eNB_rrc_inst[enb_mod_idP].Srb2[j].Active = 0;
// } // }
eNB_rrc_inst[ctxt.module_id].initial_id2_s1ap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL);
eNB_rrc_inst[ctxt.module_id].s1ap_id2_s1ap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL);
/// System Information INIT /// System Information INIT
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Checking release \n", LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Checking release \n",
......
...@@ -80,49 +80,10 @@ static const uint16_t S1AP_INTEGRITY_EIA2_MASK = 0x4000; ...@@ -80,49 +80,10 @@ static const uint16_t S1AP_INTEGRITY_EIA2_MASK = 0x4000;
#endif #endif
#endif #endif
# if defined(ENABLE_ITTI)
//------------------------------------------------------------------------------
int
rrc_eNB_S1AP_compare_ue_ids(
struct rrc_ue_s1ap_ids_s* c1_pP,
struct rrc_ue_s1ap_ids_s* c2_pP
)
//------------------------------------------------------------------------------
{
LOG_T(RRC, "rrc_eNB_S1AP_compare_ue_ids() c1.ue_initial_id %x c2.ue_initial_id %x c1.eNB_ue_s1ap_id %x c2.eNB_ue_s1ap_id %x\n",
c1_pP->ue_initial_id,
c2_pP->ue_initial_id,
c1_pP->eNB_ue_s1ap_id,
c2_pP->eNB_ue_s1ap_id);
if ((c1_pP->eNB_ue_s1ap_id == 0) || (c2_pP->eNB_ue_s1ap_id == 0)) {
if (c1_pP->ue_initial_id > c2_pP->ue_initial_id) {
return 1;
}
if (c1_pP->ue_initial_id < c2_pP->ue_initial_id) {
return -1;
}
return 0;
}
if (c1_pP->eNB_ue_s1ap_id > c2_pP->eNB_ue_s1ap_id) {
return 1;
}
if (c1_pP->eNB_ue_s1ap_id < c2_pP->eNB_ue_s1ap_id) {
return -1;
}
return 0;
}
//------------------------------------------------------------------------------
/* Generate the tree management functions */
RB_GENERATE(rrc_rnti_tree_s, rrc_ue_s1ap_ids_s, entries, rrc_eNB_S1AP_compare_ue_ids);
//------------------------------------------------------------------------------
# if defined(ENABLE_ITTI)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
struct rrc_ue_s1ap_ids_s* struct rrc_ue_s1ap_ids_s*
rrc_eNB_S1AP_get_ue_ids( rrc_eNB_S1AP_get_ue_ids(
...@@ -132,12 +93,41 @@ rrc_eNB_S1AP_get_ue_ids( ...@@ -132,12 +93,41 @@ rrc_eNB_S1AP_get_ue_ids(
) )
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
{ {
rrc_ue_s1ap_ids_t temp; rrc_ue_s1ap_ids_t *result = NULL;
memset(&temp, 0, sizeof(struct rrc_ue_s1ap_ids_s)); rrc_ue_s1ap_ids_t *result2 = NULL;
/* eNB ue rrc id = 24 bits wide */ hashtable_rc_t h_rc;
temp.ue_initial_id = ue_initial_id;
temp.eNB_ue_s1ap_id = eNB_ue_s1ap_id; // we assume that a rrc_ue_s1ap_ids_s is initially inserted in initial_id2_s1ap_ids
return RB_FIND(rrc_rnti_tree_s, &rrc_instance_pP->rrc_rnti_head, &temp); if (eNB_ue_s1ap_id > 0) {
h_rc = hashtable_get(rrc_instance_pP->s1ap_id2_s1ap_ids, (hash_key_t)eNB_ue_s1ap_id, (void**)&result);
if (h_rc == HASH_TABLE_OK) {
return result;
}
}
if (ue_initial_id != UE_INITIAL_ID_INVALID) {
h_rc = hashtable_get(rrc_instance_pP->initial_id2_s1ap_ids, (hash_key_t)ue_initial_id, (void**)&result);
if (h_rc == HASH_TABLE_OK) {
if (eNB_ue_s1ap_id != 0) {
h_rc = hashtable_get(rrc_instance_pP->s1ap_id2_s1ap_ids, (hash_key_t)eNB_ue_s1ap_id, (void**)&result2);
if (h_rc != HASH_TABLE_OK) {
result2 = malloc(sizeof(*result2));
if (NULL != result2) {
*result2 = *result;
result2->eNB_ue_s1ap_id = eNB_ue_s1ap_id;
result->eNB_ue_s1ap_id = eNB_ue_s1ap_id;
h_rc = hashtable_insert(rrc_instance_pP->s1ap_id2_s1ap_ids,
(hash_key_t)eNB_ue_s1ap_id,
result2);
LOG_E(S1AP, "[eNB %u] Error while hashtable_insert in s1ap_id2_s1ap_ids eNB_ue_s1ap_id %u\n",
rrc_instance_pP - eNB_rrc_inst, eNB_ue_s1ap_id);
}
}
}
return result;
}
}
return NULL;
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void void
...@@ -147,6 +137,9 @@ rrc_eNB_S1AP_remove_ue_ids( ...@@ -147,6 +137,9 @@ rrc_eNB_S1AP_remove_ue_ids(
) )
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
{ {
const uint16_t ue_initial_id = ue_ids_pP->ue_initial_id;
const uint32_t eNB_ue_s1ap_id = ue_ids_pP->eNB_ue_s1ap_id;
hashtable_rc_t h_rc;
if (rrc_instance_pP == NULL) { if (rrc_instance_pP == NULL) {
LOG_E(RRC, "Bad RRC instance\n"); LOG_E(RRC, "Bad RRC instance\n");
return; return;
...@@ -157,8 +150,19 @@ rrc_eNB_S1AP_remove_ue_ids( ...@@ -157,8 +150,19 @@ rrc_eNB_S1AP_remove_ue_ids(
return; return;
} }
RB_REMOVE(rrc_rnti_tree_s, &rrc_instance_pP->rrc_rnti_head, ue_ids_pP); if (eNB_ue_s1ap_id > 0) {
free(ue_ids_pP); h_rc = hashtable_remove(rrc_instance_pP->s1ap_id2_s1ap_ids, (hash_key_t)eNB_ue_s1ap_id);
if (h_rc != HASH_TABLE_OK) {
LOG_W(RRC, "S1AP Did not find entry in hashtable s1ap_id2_s1ap_ids for eNB_ue_s1ap_id %u\n", eNB_ue_s1ap_id);
}
}
if (ue_initial_id != UE_INITIAL_ID_INVALID) {
h_rc = hashtable_remove(rrc_instance_pP->initial_id2_s1ap_ids, (hash_key_t)ue_initial_id);
if (h_rc != HASH_TABLE_OK) {
LOG_W(RRC, "S1AP Did not find entry in hashtable initial_id2_s1ap_ids for ue_initial_id %u\n", ue_initial_id);
}
}
} }
/*! \fn uint16_t get_next_ue_initial_id(uint8_t mod_id) /*! \fn uint16_t get_next_ue_initial_id(uint8_t mod_id)
...@@ -210,10 +214,6 @@ rrc_eNB_get_ue_context_from_s1ap_ids( ...@@ -210,10 +214,6 @@ rrc_eNB_get_ue_context_from_s1ap_ids(
eNB_ue_s1ap_idP); eNB_ue_s1ap_idP);
if (temp) { if (temp) {
// found by ue_initial_id, fill now eNB_ue_s1ap_idP
if (temp->eNB_ue_s1ap_id != eNB_ue_s1ap_idP) {
temp->eNB_ue_s1ap_id = eNB_ue_s1ap_idP;
}
return rrc_eNB_get_ue_context( return rrc_eNB_get_ue_context(
&eNB_rrc_inst[ENB_INSTANCE_TO_MODULE_ID(instanceP)], &eNB_rrc_inst[ENB_INSTANCE_TO_MODULE_ID(instanceP)],
...@@ -616,6 +616,7 @@ rrc_eNB_send_S1AP_NAS_FIRST_REQ( ...@@ -616,6 +616,7 @@ rrc_eNB_send_S1AP_NAS_FIRST_REQ(
{ {
MessageDef* message_p = NULL; MessageDef* message_p = NULL;
rrc_ue_s1ap_ids_t* rrc_ue_s1ap_ids_p = NULL; rrc_ue_s1ap_ids_t* rrc_ue_s1ap_ids_p = NULL;
hashtable_rc_t h_rc;
message_p = itti_alloc_new_message (TASK_RRC_ENB, S1AP_NAS_FIRST_REQ); message_p = itti_alloc_new_message (TASK_RRC_ENB, S1AP_NAS_FIRST_REQ);
memset(&message_p->ittiMsg.s1ap_nas_first_req, 0, sizeof(s1ap_nas_first_req_t)); memset(&message_p->ittiMsg.s1ap_nas_first_req, 0, sizeof(s1ap_nas_first_req_t));
...@@ -628,7 +629,12 @@ rrc_eNB_send_S1AP_NAS_FIRST_REQ( ...@@ -628,7 +629,12 @@ rrc_eNB_send_S1AP_NAS_FIRST_REQ(
rrc_ue_s1ap_ids_p->eNB_ue_s1ap_id = UE_INITIAL_ID_INVALID; rrc_ue_s1ap_ids_p->eNB_ue_s1ap_id = UE_INITIAL_ID_INVALID;
rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rnti; rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rnti;
RB_INSERT(rrc_rnti_tree_s, &eNB_rrc_inst[ctxt_pP->module_id].rrc_rnti_head, rrc_ue_s1ap_ids_p); h_rc = hashtable_insert(eNB_rrc_inst[ctxt_pP->module_id].initial_id2_s1ap_ids,
(hash_key_t)ue_context_pP->ue_context.ue_initial_id,
rrc_ue_s1ap_ids_p);
LOG_E(S1AP, "[eNB %d] Error while hashtable_insert in initial_id2_s1ap_ids ue_initial_id %u\n",
ctxt_pP->module_id, ue_context_pP->ue_context.ue_initial_id);
/* Assume that cause is coded in the same way in RRC and S1ap, just check that the value is in S1ap range */ /* Assume that cause is coded in the same way in RRC and S1ap, just check that the value is in S1ap range */
AssertFatal(ue_context_pP->ue_context.establishment_cause < RRC_CAUSE_LAST, AssertFatal(ue_context_pP->ue_context.establishment_cause < RRC_CAUSE_LAST,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment