remove deprecated Packet::PeekData()

This commit is contained in:
Tom Henderson committed 2014-10-14 09:36:10 -07:00
1 parent cd7311b76c
commit 37bab66bfe
2 files changed
-28

No files matched your search

-13
View File
@@ -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<ByteTagList &>(m_byteTagList).AddAtStart (newStart - oldStart, newStart);
return data;
}
uint32_t
Packet::CopyData (uint8_t *buffer, uint32_t size) const
{
-15
View File
@@ -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.
*