A Discrete-Event Network Simulator
API
ns3::PacketTagIterator Class Reference

Iterator over the set of packet tags in a packet. More...

#include "packet.h"

+ Collaboration diagram for ns3::PacketTagIterator:

Classes

class  Item
 Identifies a packet tag within a packet. More...
 

Public Member Functions

bool HasNext (void) const
 
Item Next (void)
 

Private Member Functions

 PacketTagIterator (const struct PacketTagList::TagData *head)
 Constructor. More...
 

Private Attributes

const struct PacketTagList::TagDatam_current
 actual position over the set of tags in a packet More...
 

Friends

class Packet
 Friend class. More...
 

Detailed Description

Iterator over the set of packet tags in a packet.

This is a java-style iterator.

Definition at line 131 of file packet.h.

Constructor & Destructor Documentation

◆ PacketTagIterator()

ns3::PacketTagIterator::PacketTagIterator ( const struct PacketTagList::TagData head)
private

Constructor.

Parameters
headhead of the items

Definition at line 84 of file packet.cc.

Member Function Documentation

◆ HasNext()

bool ns3::PacketTagIterator::HasNext ( void  ) const
Returns
true if calling Next is safe, false otherwise.

Definition at line 89 of file packet.cc.

References m_current.

Referenced by Next(), and ns3::Packet::PrintPacketTags().

+ Here is the caller graph for this function:

◆ Next()

PacketTagIterator::Item ns3::PacketTagIterator::Next ( void  )
Returns
the next item found and prepare for the next one.

Definition at line 94 of file packet.cc.

References HasNext(), m_current, ns3::PacketTagList::TagData::next, NS_ASSERT, and prev.

Referenced by ns3::Packet::PrintPacketTags().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ Packet

friend class Packet
friend

Friend class.

Definition at line 173 of file packet.h.

Member Data Documentation

◆ m_current

const struct PacketTagList::TagData* ns3::PacketTagIterator::m_current
private

actual position over the set of tags in a packet

Definition at line 179 of file packet.h.

Referenced by HasNext(), and Next().


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