X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcu_stub%2Fcu_stub_egtp.h;h=519c7652b0f69f6536b99c15343bccd4ca6e871a;hb=22b9cbea0d857b740c9e7268e61262ac9c0c9bdc;hp=0ca75fc20b7cef091e4138a9d8a706c8dbc68934;hpb=a5f35b2204dd87ebe347f11282000852b55810ad;p=o-du%2Fl2.git diff --git a/src/cu_stub/cu_stub_egtp.h b/src/cu_stub/cu_stub_egtp.h index 0ca75fc20..519c7652b 100644 --- a/src/cu_stub/cu_stub_egtp.h +++ b/src/cu_stub/cu_stub_egtp.h @@ -21,7 +21,6 @@ #ifndef __CU_STUB_EGTP_H__ #define __CU_STUB_EGTP_H__ -#define EGTP_DFLT_PORT 2152 #define EGTP_TNL_MGMT_ADD 1 #define EGTP_TNL_MGMT_MOD 2 #define EGTP_TNL_MGMT_DEL 3 @@ -44,7 +43,7 @@ #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_TUNNEL_TO_PUMP_DATA 4 #define NUM_DL_PACKETS 1 uint8_t sockType; @@ -92,12 +91,6 @@ typedef struct egtpTnlEvt uint32_t remTeid; }EgtpTnlEvt; -typedef struct egtpTptSrvr -{ - CmInetAddr addr; - CmInetFd sockFd; /* Socket file descriptor */ -}EgtpTptSrvr; - typedef struct EgtpTeIdCb { uint32_t teId; /* Local tunnel id */ @@ -111,29 +104,36 @@ typedef struct EgtpTeIdCb typedef struct egtpDstCb { - CmInetIpAddr dstIp; /* destination IP */ - uint16_t dstPort; /* Remote port that sends data */ - EgtpTptSrvr sendTptSrvr; /* Transport server for sending UDP msg to */ + uint32_t duId; + CmInetAddr dstAddr; uint32_t numTunn; /* Number of tunnels */ CmHashListCp teIdLst; /* Tunnel Id list for this destination */ }EgtpDstCb; -typedef struct egtpParams +typedef struct egtpDstCfg +{ + SctpIpAddr dstIp; + uint16_t dstPort; +}EgtpDstCfg; + +typedef struct cuEgtpParams { - SctpIpAddr localIp; - uint16_t localPort; - SctpIpAddr destIp; - uint16_t destPort; - uint32_t currTunnelId; - uint32_t minTunnelId; - uint32_t maxTunnelId; -}EgtpParams; + uint32_t currTunnelId; + uint32_t minTunnelId; + uint32_t maxTunnelId; + uint8_t numDu; + SctpIpAddr localIp; + uint16_t localPort; + EgtpDstCfg dstCfg[MAX_DU_SUPPORTED]; +}CuEgtpParams; typedef struct egtpGlobalCb { - EgtpParams egtpCfg; /* EGTP configuration */ - EgtpTptSrvr recvTptSrvr; /* Transport server for receiving UDP msg */ - EgtpDstCb dstCb; /* Destination endpoint */ + CuEgtpParams egtpCfg; /* EGTP configuration */ + CmInetAddr localAddr; + CmInetFd sockFd; /* Socket file descriptor */ + uint8_t numDu; + EgtpDstCb dstCb[MAX_DU_SUPPORTED]; /* Destination endpoint */ uint8_t gCntPdu[MAX_TEID+1]; /* Maintaining PDU count for each bearer */ }EgtpGlobalCb; EgtpGlobalCb egtpCb; /* EGTP global control block */ @@ -141,16 +141,16 @@ EgtpGlobalCb egtpCb; /* EGTP global control block */ S16 egtpActvInit(); S16 cuEgtpCfgReq(); S16 cuEgtpSrvOpenReq(); -S16 cuEgtpTnlMgmtReq(EgtpTnlEvt tnlEvt); -S16 cuEgtpTnlAdd(EgtpTnlEvt tnlEvt); -S16 cuEgtpTnlMod(EgtpTnlEvt tnlEvt); -S16 cuEgtpTnlDel(EgtpTnlEvt tnlEvt); +S16 cuEgtpTnlMgmtReq(uint32_t duId,EgtpTnlEvt tnlEvt); +S16 cuEgtpTnlAdd(uint32_t duId, EgtpTnlEvt tnlEvt); +S16 cuEgtpTnlMod(uint32_t duId,EgtpTnlEvt tnlEvt); +S16 cuEgtpTnlDel(uint32_t duId,EgtpTnlEvt tnlEvt); S16 cuEgtpEncodeHdr(uint8_t *preEncodedHdr, EgtpMsgHdr *preDefHdr, uint8_t *hdrIdx); S16 cuEgtpHdlRecvMsg(Buffer *mBuf); -uint16_t cuEgtpDatReq(uint8_t teId); -S16 BuildAppMsg(EgtpMsg *egtpMsg); -S16 BuildEgtpMsg(EgtpMsg *egtpMsg); -S16 cuEgtpSendMsg(Buffer *mBuf); +uint16_t cuEgtpDatReq(uint32_t duId, uint8_t teId); +S16 BuildAppMsg(uint32_t duId, EgtpMsg *egtpMsg); +S16 BuildEgtpMsg(uint32_t duId, EgtpMsg *egtpMsg); +S16 cuEgtpSendMsg(uint32_t duId, Buffer *mBuf); S16 cuEgtpDecodeHdr(Buffer *mBuf); #endif