Iterator class for metadata items. More...
#include "packet-metadata.h"
Public Member Functions | |
ItemIterator (const PacketMetadata *metadata, Buffer buffer) | |
Constructor. More... | |
bool | HasNext () const |
Checks if there is another metadata item. More... | |
Item | Next () |
Retrieve the next metadata item. More... | |
Private Attributes | |
Buffer | m_buffer |
buffer the metadata refers to More... | |
uint16_t | m_current |
current position More... | |
bool | m_hasReadTail |
true if the metadata tail has been read More... | |
const PacketMetadata * | m_metadata |
pointer to the metadata More... | |
uint32_t | m_offset |
offset More... | |
Iterator class for metadata items.
Definition at line 136 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 1039 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 1050 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 1065 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 158 of file packet-metadata.h.
|
private |
current position
Definition at line 159 of file packet-metadata.h.
|
private |
true if the metadata tail has been read
Definition at line 161 of file packet-metadata.h.
|
private |
pointer to the metadata
Definition at line 157 of file packet-metadata.h.
|
private |
offset
Definition at line 160 of file packet-metadata.h.