X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fcu_stub%2Fcu_stub_egtp.h;h=0ca75fc20b7cef091e4138a9d8a706c8dbc68934;hb=6eda577056855df28788aef28ee0a29c9128d1f5;hp=cdc65a9d49fdc164d6959342af2340ae403fe938;hpb=def50dc175cebc67238db5f1acd5ff322a2279bd;p=o-du%2Fl2.git diff --git a/src/cu_stub/cu_stub_egtp.h b/src/cu_stub/cu_stub_egtp.h index cdc65a9d4..0ca75fc20 100644 --- a/src/cu_stub/cu_stub_egtp.h +++ b/src/cu_stub/cu_stub_egtp.h @@ -21,13 +21,6 @@ #ifndef __CU_STUB_EGTP_H__ #define __CU_STUB_EGTP_H__ -#include "cu_stub.h" -#include "cm_inet.h" -#include "cm_tpt.h" - -#include "cm_inet.x" -#include "cm_tpt.x" - #define EGTP_DFLT_PORT 2152 #define EGTP_TNL_MGMT_ADD 1 #define EGTP_TNL_MGMT_MOD 2 @@ -47,6 +40,13 @@ #define EGTP_MASK_BIT7 0x40 #define EGTP_MASK_BIT8 0x80 +/*VALID Tunnel ID*/ +#define MIN_TEID 1 /*[Spec 29.281,Sec 5.1]: All Zero TEIDs are never assigned for setting up GTP-U Tunnel*/ +#define MAX_TEID MAX_NUM_DRB * MAX_NUM_UE /*[Spec 29.281]: Max limit is not mentioned but as per GTP-U Header Format, TEID occupies 4 octets */ + +#define NUM_TUNNEL_TO_PUMP_DATA 9 +#define NUM_DL_PACKETS 1 + uint8_t sockType; uint8_t protType; @@ -118,13 +118,25 @@ typedef struct egtpDstCb CmHashListCp teIdLst; /* Tunnel Id list for this destination */ }EgtpDstCb; +typedef struct egtpParams +{ + SctpIpAddr localIp; + uint16_t localPort; + SctpIpAddr destIp; + uint16_t destPort; + uint32_t currTunnelId; + uint32_t minTunnelId; + uint32_t maxTunnelId; +}EgtpParams; + typedef struct egtpGlobalCb { EgtpParams egtpCfg; /* EGTP configuration */ EgtpTptSrvr recvTptSrvr; /* Transport server for receiving UDP msg */ EgtpDstCb dstCb; /* Destination endpoint */ + uint8_t gCntPdu[MAX_TEID+1]; /* Maintaining PDU count for each bearer */ }EgtpGlobalCb; -extern EgtpGlobalCb egtpCb; /* EGTP global control block */ +EgtpGlobalCb egtpCb; /* EGTP global control block */ S16 egtpActvInit(); S16 cuEgtpCfgReq(); @@ -135,7 +147,7 @@ S16 cuEgtpTnlMod(EgtpTnlEvt tnlEvt); S16 cuEgtpTnlDel(EgtpTnlEvt tnlEvt); S16 cuEgtpEncodeHdr(uint8_t *preEncodedHdr, EgtpMsgHdr *preDefHdr, uint8_t *hdrIdx); S16 cuEgtpHdlRecvMsg(Buffer *mBuf); -S16 cuEgtpDatReq(); +uint16_t cuEgtpDatReq(uint8_t teId); S16 BuildAppMsg(EgtpMsg *egtpMsg); S16 BuildEgtpMsg(EgtpMsg *egtpMsg); S16 cuEgtpSendMsg(Buffer *mBuf);