A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::ByteTagIterator::Item Class Reference

#include <packet.h>

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

Public Member Functions

uint32_t GetEnd (void) const
uint32_t GetStart (void) const
void GetTag (Tag &tag) const
TypeId GetTypeId (void) const

Private Member Functions

 Item (TypeId tid, uint32_t start, uint32_t end, TagBuffer buffer)

Private Attributes

TagBuffer m_buffer
uint32_t m_end
uint32_t m_start
TypeId m_tid

Friends

class ByteTagIterator

Detailed Description

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

Definition at line 57 of file packet.h.

Constructor & Destructor Documentation

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

Definition at line 57 of file packet.cc.

Member Function Documentation

uint32_t ns3::ByteTagIterator::Item::GetEnd ( void  ) const
Returns
the index of the last byte tagged by this tag.

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

Definition at line 44 of file packet.cc.

Referenced by ns3::PacketTest::DoCheck(), and ns3::Packet::PrintByteTags().

+ Here is the caller graph for this function:

uint32_t ns3::ByteTagIterator::Item::GetStart ( void  ) const
Returns
the index of the first byte tagged by this tag.

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

Definition at line 39 of file packet.cc.

Referenced by ns3::PacketTest::DoCheck(), and ns3::Packet::PrintByteTags().

+ Here is the caller graph for this function:

void ns3::ByteTagIterator::Item::GetTag ( Tag tag) const
Parameters
tagthe user tag to which the data should be copied.

Read the requested tag and store it in the user-provided tag instance. 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 ns3::PacketTest::DoCheck(), 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:

TypeId ns3::ByteTagIterator::Item::GetTypeId ( void  ) const
Returns
the ns3::TypeId associated to this tag.

Definition at line 34 of file packet.cc.

References m_tid.

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

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class ByteTagIterator
friend

Definition at line 86 of file packet.h.

Member Data Documentation

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

Definition at line 91 of file packet.h.

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

Definition at line 90 of file packet.h.

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

Definition at line 89 of file packet.h.

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

Definition at line 88 of file packet.h.

Referenced by GetTypeId().


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