From 9514cbee1d9f57046d75fae8f63a57367a2fcddc Mon Sep 17 00:00:00 2001 From: Lionel Gauthier Date: Thu, 6 Nov 2014 10:16:29 +0000 Subject: [PATCH] git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5994 818b1a75-f10b-46b9-bf7c-635c3b92a50f --- openair-cn/GTPV1-U/gtpv1u_eNB.c | 1 + openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c | 2 +- openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1uMsg.c | 13 ++++++++----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/openair-cn/GTPV1-U/gtpv1u_eNB.c b/openair-cn/GTPV1-U/gtpv1u_eNB.c index 0767b5f642..2277b2965c 100644 --- a/openair-cn/GTPV1-U/gtpv1u_eNB.c +++ b/openair-cn/GTPV1-U/gtpv1u_eNB.c @@ -200,6 +200,7 @@ NwGtpv1uRcT gtpv1u_eNB_send_udp_msg( message_p = itti_alloc_new_message(TASK_GTPV1_U, UDP_DATA_REQ); if (message_p) { + LOG_D(GTPU, "Sending UDP_DATA_REQ length %u offset %u", buffer_len, buffer_offset); udp_data_req_p = &message_p->ittiMsg.udp_data_req; udp_data_req_p->peer_address = peerIpAddr; udp_data_req_p->peer_port = peerPort; diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c b/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c index e9def841d0..ab2c3be188 100644 --- a/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c +++ b/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c @@ -231,7 +231,7 @@ nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, NwU32T peerIp, NwU16T peerPort, rc = thiz->udp.udpDataReqCallback(thiz->udp.hUdp, pMsg->msgBuf, - pMsg->msgLen, + pMsg->msgBufLen, pMsg->msgBufOffset, peerIp, peerPort); diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1uMsg.c b/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1uMsg.c index 8d59bf6ade..61b5ff3515 100644 --- a/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1uMsg.c +++ b/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1uMsg.c @@ -143,6 +143,9 @@ nwGtpv1uGpduMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, pMsg->msgBuf = tpdu; pMsg->msgBufLen = tpduLength + msgExtraLen + NW_GTPV1U_EPC_MIN_HEADER_SIZE; pMsg->msgBufOffset = tpduOffset - (msgExtraLen + NW_GTPV1U_EPC_MIN_HEADER_SIZE); + LOG_E(GTPU, "MSG length %u, offset %u -> length %u offset %u\n", + tpduLength, tpduOffset, + pMsg->msgBufLen, pMsg->msgBufOffset); // Version field: This field is used to determine the version of the GTP-U protocol. // The version number shall be set to '1'. @@ -178,11 +181,11 @@ nwGtpv1uGpduMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, // mandatory part of the GTP header (that is the first 8 octets). // The Sequence Number, the N-PDU Number or any Extension headers shall be considered to be part of the payload, // i.e. included in the length count. - header_len = ((pMsg->seqNumFlag || pMsg->npduNumFlag || pMsg->extHdrFlag ) ? - NW_GTPV1U_EPC_SPECIFIC_HEADER_SIZE : NW_GTPV1U_EPC_MIN_HEADER_SIZE); - pMsg->msgLen = ((pMsg->seqNumFlag || pMsg->npduNumFlag - || pMsg->extHdrFlag ) ? - (NW_GTPV1U_EPC_SPECIFIC_HEADER_SIZE - NW_GTPV1U_EPC_MIN_HEADER_SIZE) + tpduLength : tpduLength); + //header_len = ((pMsg->seqNumFlag || pMsg->npduNumFlag || pMsg->extHdrFlag ) ? + // NW_GTPV1U_EPC_SPECIFIC_HEADER_SIZE : NW_GTPV1U_EPC_MIN_HEADER_SIZE); + //pMsg->msgLen = ((pMsg->seqNumFlag || pMsg->npduNumFlag + // || pMsg->extHdrFlag ) ? + // (NW_GTPV1U_EPC_SPECIFIC_HEADER_SIZE - NW_GTPV1U_EPC_MIN_HEADER_SIZE) + tpduLength : tpduLength); // Tunnel Endpoint Identifier (TEID): This field unambiguously identifies a tunnel endpoint in the receiving // GTP-U protocol entity. The receiving end side of a GTP tunnel locally assigns the TEID value the transmitting