A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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.
 
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 PacketMetadatam_metadata
 pointer to the metadata
 
uint32_t m_offset
 offset
 

Detailed Description

Iterator class for metadata items.

Definition at line 125 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 1028 of file packet-metadata.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ HasNext()

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

Checks if there is another metadata item.

Returns
true if there is another item

Definition at line 1039 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 147 of file packet-metadata.h.

◆ m_current

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

current position

Definition at line 148 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 150 of file packet-metadata.h.

◆ m_metadata

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

pointer to the metadata

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

◆ m_offset

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

offset

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


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