Iterator class for metadata items. More...
#include "packet-metadata.h"
Public Member Functions | |
ItemIterator (const PacketMetadata *metadata, Buffer buffer) | |
Constructor. | |
bool | HasNext () const |
Checks if there is another metadata item. | |
Item | Next () |
Retrieve the next metadata item. | |
Private Attributes | |
Buffer | m_buffer |
buffer the metadata refers to | |
uint16_t | m_current |
current position | |
bool | m_hasReadTail |
true if the metadata tail has been read | |
const PacketMetadata * | m_metadata |
pointer to the metadata | |
uint32_t | m_offset |
offset | |
Iterator class for metadata items.
Definition at line 125 of file packet-metadata.h.
ns3::PacketMetadata::ItemIterator::ItemIterator | ( | const PacketMetadata * | metadata, |
Buffer | buffer ) |
Constructor.
metadata | a pointer to the metadata |
buffer | the buffer the metadata refers to |
Definition at line 1028 of file packet-metadata.cc.
References NS_LOG_FUNCTION.
bool ns3::PacketMetadata::ItemIterator::HasNext | ( | ) | const |
Checks if there is another metadata item.
Definition at line 1039 of file packet-metadata.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::PyViz::FilterPacket(), and ns3::Packet::Print().
PacketMetadata::Item ns3::PacketMetadata::ItemIterator::Next | ( | ) |
Retrieve the next metadata item.
Definition at line 1054 of file packet-metadata.cc.
References ns3::PacketMetadata::Item::current, ns3::PacketMetadata::Item::currentSize, ns3::PacketMetadata::Item::currentTrimmedFromEnd, ns3::PacketMetadata::Item::currentTrimmedFromStart, ns3::PacketMetadata::ExtraItem::fragmentEnd, ns3::PacketMetadata::ExtraItem::fragmentStart, ns3::Header::GetTypeId(), ns3::Trailer::GetTypeId(), ns3::PacketMetadata::Item::HEADER, ns3::TypeId::IsChildOf(), ns3::PacketMetadata::Item::isFragment, ns3::Buffer::Iterator::Next(), ns3::PacketMetadata::SmallItem::next, NS_ASSERT, NS_LOG_FUNCTION, ns3::PacketMetadata::Item::PAYLOAD, ns3::Buffer::Iterator::Prev(), ns3::TypeId::SetUid(), ns3::PacketMetadata::SmallItem::size, ns3::PacketMetadata::Item::tid, ns3::PacketMetadata::Item::TRAILER, ns3::PacketMetadata::Item::type, and ns3::PacketMetadata::SmallItem::typeUid.
Referenced by ns3::PyViz::FilterPacket(), and ns3::Packet::Print().
|
private |
buffer the metadata refers to
Definition at line 147 of file packet-metadata.h.
|
private |
current position
Definition at line 148 of file packet-metadata.h.
|
private |
true if the metadata tail has been read
Definition at line 150 of file packet-metadata.h.
|
private |
pointer to the metadata
Definition at line 146 of file packet-metadata.h.
|
private |
offset
Definition at line 149 of file packet-metadata.h.