From 37bab66bfee8a413f78c5d9e47477ab38526b8bd Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Tue, 14 Oct 2014 09:36:10 -0700 Subject: [PATCH] remove deprecated Packet::PeekData() --- src/network/model/packet.cc | 13 ------------- src/network/model/packet.h | 15 --------------- 2 files changed, 28 deletions(-) diff --git a/src/network/model/packet.cc b/src/network/model/packet.cc index c9b05331f..9815dabc3 100644 --- a/src/network/model/packet.cc +++ b/src/network/model/packet.cc @@ -364,19 +364,6 @@ Packet::RemoveAllByteTags (void) m_byteTagList.RemoveAll (); } -uint8_t const * -Packet::PeekData (void) const -{ - NS_LOG_FUNCTION (this); - uint32_t oldStart = m_buffer.GetCurrentStartOffset (); - uint8_t const * data = m_buffer.PeekData (); - uint32_t newStart = m_buffer.GetCurrentStartOffset (); - - // Update tag offsets if buffer offsets were changed - const_cast(m_byteTagList).AddAtStart (newStart - oldStart, newStart); - return data; -} - uint32_t Packet::CopyData (uint8_t *buffer, uint32_t size) const { diff --git a/src/network/model/packet.h b/src/network/model/packet.h index 4555f3a42..050e36c6f 100644 --- a/src/network/model/packet.h +++ b/src/network/model/packet.h @@ -387,21 +387,6 @@ public: */ void RemoveAtStart (uint32_t size); - /** - * \returns a pointer to the internal buffer of the packet. - * - * If you try to change the content of the buffer - * returned by this method, you will die. - * - * \deprecated - * Note that this method is now deprecated and will be removed in - * a future version of ns-3. To get access to the content - * of the byte buffer of a packet, call CopyData"()" to perform - * an explicit copy. - * - */ - uint8_t const *PeekData (void) const NS_DEPRECATED; - /** * \brief Copy the packet contents to a byte buffer. *