remove deprecated Packet::PeekData()
authorTom Henderson <tomh@tomh.org>
Tue, 14 Oct 2014 09:36:10 -0700
changeset 11021 af43f85b4dc6
parent 11020 e15cd6420301
child 11022 89cb222b9e60
remove deprecated Packet::PeekData()
src/network/model/packet.cc
src/network/model/packet.h
--- a/src/network/model/packet.cc	Tue Oct 14 08:15:46 2014 -0700
+++ b/src/network/model/packet.cc	Tue Oct 14 09:36:10 2014 -0700
@@ -364,19 +364,6 @@
   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<ByteTagList &>(m_byteTagList).AddAtStart (newStart - oldStart, newStart);
-  return data;
-}
-
 uint32_t 
 Packet::CopyData (uint8_t *buffer, uint32_t size) const
 {
--- a/src/network/model/packet.h	Tue Oct 14 08:15:46 2014 -0700
+++ b/src/network/model/packet.h	Tue Oct 14 09:36:10 2014 -0700
@@ -388,21 +388,6 @@
   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.
    *
    * \param buffer a pointer to a byte buffer where the packet data