Commit 11d4bdd5 authored by Lionel Gauthier's avatar Lionel Gauthier

Now compile but does not work, take latest version of yesterday

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5986 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 882f1fbe
......@@ -49,6 +49,7 @@
#include "NwGtpv1uMsg.h"
#include "NwLog.h"
#include "gtpv1u_sgw_defs.h"
#include "NwGtpv1uPrivate.h"
//static NwGtpv1uStackHandleT gtpv1u_stack = 0;
static gtpv1u_data_t gtpv1u_sgw_data;
......
......@@ -314,6 +314,7 @@ typedef struct
NwGtpv1uRcT (*udpDataReqCallback) ( NW_IN NwGtpv1uUdpHandleT udpHandle,
NW_IN NwU8T* dataBuf,
NW_IN NwU32T dataSize,
NW_IN NwU32T dataOffset,
NW_IN NwU32T peerIP,
NW_IN NwU16T peerPort);
} NwGtpv1uUdpEntityT;
......
......@@ -229,7 +229,7 @@ nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, NwU32T peerIp, NwU16T peerPort,
rc = thiz->udp.udpDataReqCallback(thiz->udp.hUdp,
pMsg->msgBuf,
pMsg->msgLen,
pMsg->msgOffset,
pMsg->msgBufOffset,
peerIp,
peerPort);
......@@ -292,6 +292,7 @@ nwGtpv1uPeerRspTimeout(void *arg)
rc = thiz->pStack->udp.udpDataReqCallback(thiz->pStack->udp.hUdp,
thiz->pMsg->msgBuf,
thiz->pMsg->msgLen,
thiz->pMsg->msgBufOffset,
thiz->peerIp,
thiz->peerPort);
......@@ -520,8 +521,8 @@ nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz,
GTPU_DEBUG("Received T-PDU over tunnel end-point '%x' of size %u (decapsulated %u)from "NW_IPV4_ADDR"\n",
ntohl(msgHdr->teid), gpduLen, pMsg->msgLen, NW_IPV4_ADDR_FORMAT((peerIp)));
AssertFatal(gpduLen == (pMsg->msgLen + pMsg->msgOffset),
"Mismatch gpduLen %d / buffer offset %d / msg len %d / buffer len",
AssertFatal(gpduLen == (pMsg->msgLen + pMsg->msgBufOffset),
"Mismatch gpduLen %u / buffer offset %u / msg len %u / buffer len %u",
gpduLen, pMsg->msgBufOffset, pMsg->msgLen, pMsg->msgBufLen);
rc = nwGtpSessionSendMsgApiToUlpEntity(pTunnelEndPoint, pMsg);
......
......@@ -42,6 +42,7 @@
#include "NwGtpv1u.h"
#include "NwGtpv1uPrivate.h"
#include "NwGtpv1uMsg.h"
#include "assertions.h"
#include "gtpv1u.h"
#if defined(ENB_MODE)
......@@ -132,11 +133,10 @@ nwGtpv1uGpduMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
NW_GTPV1U_MALLOC(pStack, sizeof(NwGtpv1uMsgT), pMsg, NwGtpv1uMsgT *);
}
if(pMsg) {
msgExtraLen = (((seqNumFlag) || (NW_FALSE) || (NW_FALSE) ) ?
(NW_GTPV1U_EPC_SPECIFIC_HEADER_SIZE - NW_GTPV1U_EPC_MIN_HEADER_SIZE) : 0);
AssertFatal((msgExtraLen + NW_GTPV1U_EPC_MIN_HEADER_SIZE) <= tpduOffset);
AssertFatal((msgExtraLen + NW_GTPV1U_EPC_MIN_HEADER_SIZE) <= tpduOffset, "Mismatch GTPU len");
pMsg->msgBuf = tpdu;
pMsg->msgBufLen = tpduLength + msgExtraLen + NW_GTPV1U_EPC_MIN_HEADER_SIZE;
pMsg->msgBufOffset = tpduOffset - (msgExtraLen + NW_GTPV1U_EPC_MIN_HEADER_SIZE);
......@@ -264,8 +264,8 @@ nwGtpv1uMsgFromBufferNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
pMsg->npduNum = *(pBuf++);
pMsg->nextExtHdrType = *(pBuf++);
}
pMsg->msgOffset = (NwU32T)(pBuf - pMsg->msgBuf);
pMsg->msgLen = bufLen - pMsg->msgOffset;
pMsg->msgBufOffset = (NwU32T)(pBuf - pMsg->msgBuf);
pMsg->msgLen = bufLen - pMsg->msgBufOffset;
*phMsg = (NwGtpv1uMsgHandleT) pMsg;
return NW_GTPV1U_OK;
}
......
......@@ -72,6 +72,7 @@ nwGtpv1uTrxnSendMsgRetransmission(NwGtpv1uTrxnT *thiz)
rc = thiz->pStack->udp.udpDataReqCallback(thiz->pStack->udp.hUdp,
thiz->pMsg->msgBuf,
thiz->pMsg->msgLen,
thiz->pMsg->msgBufOffset,
thiz->peerIp,
thiz->peerPort);
......@@ -364,6 +365,7 @@ nwGtpv1uTrxnCreateAndSendMsg( NW_IN NwGtpv1uStackT *thiz,
rc = thiz->udp.udpDataReqCallback(thiz->udp.hUdp,
pMsg->msgBuf,
pMsg->msgLen,
pMsg->msgBufOffset,
peerIp,
peerPort);
......
......@@ -37,6 +37,7 @@ AM_CFLAGS = @ADD_CFLAGS@ \
-I$(top_srcdir)/NAS/EURECOM-NAS/src/emm/msg \
-I$(top_srcdir)/NAS/EURECOM-NAS/src/esm/msg \
-I$(top_srcdir)/NAS/EURECOM-NAS/src/util \
-I$(top_srcdir)/GTPV1-U \
-I$(top_srcdir)/INTERTASK_INTERFACE
noinst_LTLIBRARIES = libsgi.la
......
......@@ -39,6 +39,7 @@
#include "sgi.h"
#include "gtpv1u.h"
#include "intertask_interface.h"
#include "assertions.h"
......
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