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

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

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 m_current, m_hasReadTail, and NS_LOG_FUNCTION.

Referenced by PacketMetadataTest::CheckHistory(), ns3::PyViz::FilterPacket(), ns3::QKDCrypto::PacketToString(), and ns3::Packet::Print().

+ Here is the caller graph for this function:

Member Data Documentation

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

buffer the metadata refers to

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

Referenced by Next().

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

current position

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

Referenced by HasNext(), and Next().

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

true if the metadata tail has been read

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

Referenced by HasNext(), and Next().

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

pointer to the metadata

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

Referenced by Next().

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

offset

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

Referenced by Next().


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