Iterator class for metadata items. More...
#include "packet-metadata.h"
Public Member Functions | |
ItemIterator (const PacketMetadata *metadata, Buffer buffer) | |
Constructor. More... | |
bool | HasNext (void) const |
Checks if there is another metadata item. More... | |
Item | Next (void) |
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 128 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 1051 of file packet-metadata.cc.
References NS_LOG_FUNCTION.
bool ns3::PacketMetadata::ItemIterator::HasNext | ( | void | ) | const |
Checks if there is another metadata item.
Definition at line 1061 of file packet-metadata.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::PyViz::FilterPacket(), and ns3::Packet::Print().
PacketMetadata::Item ns3::PacketMetadata::ItemIterator::Next | ( | void | ) |
Retrieve the next metadata item.
Definition at line 1075 of file packet-metadata.cc.
References ns3::PacketMetadata::Item::current, ns3::PacketMetadata::Item::currentSize, ns3::PacketMetadata::Item::currentTrimedFromEnd, ns3::PacketMetadata::Item::currentTrimedFromStart, 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 149 of file packet-metadata.h.
|
private |
current position
Definition at line 150 of file packet-metadata.h.
|
private |
true if the metadata tail has been read
Definition at line 152 of file packet-metadata.h.
|
private |
pointer to the metadata
Definition at line 148 of file packet-metadata.h.
|
private |
offset
Definition at line 151 of file packet-metadata.h.