A Discrete-Event Network Simulator
API
ns3::ByteTagIterator::Item Class Reference

Identifies a byte tag and a set of bytes within a packet to which the tag applies. More...

#include "packet.h"

+ Collaboration diagram for ns3::ByteTagIterator::Item:

Public Member Functions

uint32_t GetEnd (void) const
 The index is an offset from the start of the packet. More...
 
uint32_t GetStart (void) const
 The index is an offset from the start of the packet. More...
 
void GetTag (Tag &tag) const
 Read the requested tag and store it in the user-provided tag instance. More...
 
TypeId GetTypeId (void) const
 

Private Member Functions

 Item (TypeId tid, uint32_t start, uint32_t end, TagBuffer buffer)
 Constructor. More...
 

Private Attributes

TagBuffer m_buffer
 the buffer associated with this tag. More...
 
uint32_t m_end
 the index of the last byte tagged by this tag. More...
 
uint32_t m_start
 the index of the first byte tagged by this tag. More...
 
TypeId m_tid
 the ns3::TypeId associated to this tag. More...
 

Friends

class ByteTagIterator
 Friend class. More...
 

Detailed Description

Identifies a byte tag and a set of bytes within a packet to which the tag applies.

Definition at line 61 of file packet.h.

Constructor & Destructor Documentation

◆ Item()

ns3::ByteTagIterator::Item::Item ( TypeId  tid,
uint32_t  start,
uint32_t  end,
TagBuffer  buffer 
)
private

Constructor.

Parameters
tidthe ns3::TypeId associated to this tag.
startthe index of the first byte tagged by this tag.
endthe index of the last byte tagged by this tag.
bufferthe buffer associated with this tag.

Definition at line 57 of file packet.cc.

Member Function Documentation

◆ GetEnd()

uint32_t ns3::ByteTagIterator::Item::GetEnd ( void  ) const

The index is an offset from the start of the packet.

Returns
the index of the last byte tagged by this tag.

Definition at line 44 of file packet.cc.

Referenced by PacketTest::DoCheck(), PacketTest::DoCheckData(), Ipv4FragmentationTest::DoRun(), Ipv6FragmentationTest::DoRun(), and ns3::Packet::PrintByteTags().

+ Here is the caller graph for this function:

◆ GetStart()

uint32_t ns3::ByteTagIterator::Item::GetStart ( void  ) const

The index is an offset from the start of the packet.

Returns
the index of the first byte tagged by this tag.

Definition at line 39 of file packet.cc.

Referenced by PacketTest::DoCheck(), PacketTest::DoCheckData(), Ipv4FragmentationTest::DoRun(), Ipv6FragmentationTest::DoRun(), and ns3::Packet::PrintByteTags().

+ Here is the caller graph for this function:

◆ GetTag()

void ns3::ByteTagIterator::Item::GetTag ( Tag tag) const

Read the requested tag and store it in the user-provided tag instance.

Parameters
tagthe user tag to which the data should be copied.

This method will crash if the type of the tag provided by the user does not match the type of the underlying tag.

Definition at line 49 of file packet.cc.

References ns3::Tag::Deserialize(), ns3::ObjectBase::GetInstanceTypeId(), and NS_FATAL_ERROR.

Referenced by PacketTest::DoCheck(), PacketTest::DoCheckData(), Ipv4FragmentationTest::DoRun(), Ipv6FragmentationTest::DoRun(), ns3::Packet::FindFirstMatchingByteTag(), ns3::AnimationInterface::GetAnimUidFromPacket(), and ns3::Packet::PrintByteTags().

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

◆ GetTypeId()

TypeId ns3::ByteTagIterator::Item::GetTypeId ( void  ) const

Friends And Related Function Documentation

◆ ByteTagIterator

friend class ByteTagIterator
friend

Friend class.

Definition at line 91 of file packet.h.

Member Data Documentation

◆ m_buffer

TagBuffer ns3::ByteTagIterator::Item::m_buffer
private

the buffer associated with this tag.

Definition at line 104 of file packet.h.

◆ m_end

uint32_t ns3::ByteTagIterator::Item::m_end
private

the index of the last byte tagged by this tag.

Definition at line 103 of file packet.h.

◆ m_start

uint32_t ns3::ByteTagIterator::Item::m_start
private

the index of the first byte tagged by this tag.

Definition at line 102 of file packet.h.

◆ m_tid

TypeId ns3::ByteTagIterator::Item::m_tid
private

the ns3::TypeId associated to this tag.

Definition at line 101 of file packet.h.

Referenced by GetTypeId().


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