1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 /* Defines API exchanged between DU_APP and EGTP */
27 #define EGTP_TNL_MGMT_ADD 1
28 #define EGTP_TNL_MGMT_MOD 2
29 #define EGTP_TNL_MGMT_DEL 3
31 typedef enum egtpMsgType
36 EGTPU_MSG_ERROR_IND = 26,
37 EGTPU_MSG_SUPP_EXT_HDR_NTF = 31,
38 EGTPU_MSG_END_MARKER = 254,
43 typedef struct egtpIpAddr
49 typedef struct egtpConfig
59 typedef struct egtpTnlEvt
68 typedef struct egtpExtHdr
70 TknU16 udpPort; /**< UDP Port */
71 TknU16 pdcpNmb; /**< PDCP Number */
74 /*Structure for MsgHdr */
75 typedef struct egtpMsgHdr
77 TknU8 nPdu; /**< N-PDU Number */
78 TknU32 seqNum; /**< Sequence Number */
79 EgtpExtHdr extHdr; /**< Extension headers present flag */
80 U32 teId; /**< Tunnel Endpoint Id */
81 U8 msgType; /**< eGTP-U Message Type */
84 typedef struct egtpMsg
90 typedef S16 (*EgtpCfgReq) ARGS((Pst *pst, EgtpConfig egtpCfg));
91 typedef S16 (*EgtpCfgCfm) ARGS((CmStatus cfm));
92 typedef S16 (*EgtpInitReq) ARGS((Buffer *mBuf));
93 typedef S16 (*EgtpSrvOpenReq) ARGS(());
94 typedef S16 (*EgtpSrvOpenCfm) ARGS((CmStatus cfm));
95 typedef S16 (*EgtpTnlMgmtReq) ARGS((Pst *pst, EgtpTnlEvt tnlEvt));
96 typedef S16 (*EgtpTnlMgmtCfm) ARGS((EgtpTnlEvt tnlEvt));
97 typedef S16 (*EgtpSlotInd) ARGS(());
99 S16 packEgtpCfgReq(Pst *pst, EgtpConfig egtpCfg);
100 S16 unpackEgtpCfgReq(EgtpCfgReq func , Pst *pst, Buffer *mBuf);
101 S16 packEgtpCfgCfm(Pst *pst, CmStatus cfm);
102 S16 unpackEgtpCfgCfm(EgtpCfgCfm func, Buffer *mBuf);
103 S16 packEgtpSrvOpenReq(Pst *pst);
104 S16 unpackkEgtpSrvOpenReq(EgtpSrvOpenReq func, Pst *pst, Buffer *mBuf);
105 S16 packEgtpSrvOpenCfm(Pst *pst, CmStatus cfm);
106 S16 unpackEgtpSrvOpenCfm(EgtpSrvOpenCfm func, Buffer *mBuf);
107 S16 packEgtpTnlMgmtReq(Pst *pst, EgtpTnlEvt tnlEvt);
108 S16 unpackEgtpTnlMgmtReq(EgtpTnlMgmtReq func, Pst *pst, Buffer *mBuf);
109 S16 packEgtpTnlMgmtCfm(Pst *pst, EgtpTnlEvt tnlEvt);
110 S16 unpackEgtpTnlMgmtCfm(EgtpTnlMgmtCfm func, Buffer *mBuf);
111 S16 packEgtpSlotInd(Pst *pst);
112 S16 unpackEgtpSlotInd(EgtpSlotInd func, Pst *pst, Buffer *mBuf);