A Discrete-Event Network Simulator
API
ns3::PacketMetadata::ItemIterator Class Reference

Iterator class for metadata items. More...

#include "packet-metadata.h"

+ Collaboration diagram for ns3::PacketMetadata::ItemIterator:

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 PacketMetadatam_metadata
 pointer to the metadata More...
 
uint32_t m_offset
 offset More...
 

Detailed Description

Iterator class for metadata items.

Definition at line 128 of file packet-metadata.h.

Constructor & Destructor Documentation

◆ ItemIterator()

ns3::PacketMetadata::ItemIterator::ItemIterator ( const PacketMetadata metadata,
Buffer  buffer 
)

Constructor.

Parameters
metadataa pointer to the metadata
bufferthe buffer the metadata refers to

Definition at line 1051 of file packet-metadata.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ HasNext()

bool ns3::PacketMetadata::ItemIterator::HasNext ( void  ) const

Checks if there is another metadata item.

Returns
true if there is another item

Definition at line 1061 of file packet-metadata.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::PyViz::FilterPacket(), and ns3::Packet::Print().

+ Here is the caller graph for this function:

◆ Next()

Member Data Documentation

◆ m_buffer

Buffer ns3::PacketMetadata::ItemIterator::m_buffer
private

buffer the metadata refers to

Definition at line 149 of file packet-metadata.h.

◆ m_current

uint16_t ns3::PacketMetadata::ItemIterator::m_current
private

current position

Definition at line 150 of file packet-metadata.h.

◆ m_hasReadTail

bool ns3::PacketMetadata::ItemIterator::m_hasReadTail
private

true if the metadata tail has been read

Definition at line 152 of file packet-metadata.h.

◆ m_metadata

const PacketMetadata* ns3::PacketMetadata::ItemIterator::m_metadata
private

pointer to the metadata

Definition at line 148 of file packet-metadata.h.

◆ m_offset

uint32_t ns3::PacketMetadata::ItemIterator::m_offset
private

offset

Definition at line 151 of file packet-metadata.h.


The documentation for this class was generated from the following files: