Identifies a byte tag and a set of bytes within a packet to which the tag applies. More...
#include "packet.h"
Public Member Functions | |
uint32_t | GetEnd () const |
The index is an offset from the start of the packet. | |
uint32_t | GetStart () const |
The index is an offset from the start of the packet. | |
void | GetTag (Tag &tag) const |
Read the requested tag and store it in the user-provided tag instance. | |
TypeId | GetTypeId () const |
Private Member Functions | |
Item (TypeId tid, uint32_t start, uint32_t end, TagBuffer buffer) | |
Constructor. | |
Private Attributes | |
TagBuffer | m_buffer |
the buffer associated with this tag. | |
uint32_t | m_end |
the index of the last byte tagged by this tag. | |
uint32_t | m_start |
the index of the first byte tagged by this tag. | |
TypeId | m_tid |
the ns3::TypeId associated to this tag. | |
Friends | |
class | ByteTagIterator |
Friend class. | |
Identifies a byte tag and a set of bytes within a packet to which the tag applies.
|
private |
Constructor.
tid | the ns3::TypeId associated to this tag. |
start | the index of the first byte tagged by this tag. |
end | the index of the last byte tagged by this tag. |
buffer | the buffer associated with this tag. |
uint32_t ns3::ByteTagIterator::Item::GetEnd | ( | ) | const |
The index is an offset from the start of the packet.
Definition at line 37 of file packet.cc.
Referenced by PacketTest::DoCheck(), PacketTest::DoCheckData(), Ipv4FragmentationTest::DoRun(), Ipv6FragmentationTest::DoRun(), and ns3::Packet::PrintByteTags().
uint32_t ns3::ByteTagIterator::Item::GetStart | ( | ) | const |
The index is an offset from the start of the packet.
Definition at line 31 of file packet.cc.
Referenced by PacketTest::DoCheck(), PacketTest::DoCheckData(), Ipv4FragmentationTest::DoRun(), Ipv6FragmentationTest::DoRun(), and ns3::Packet::PrintByteTags().
void ns3::ByteTagIterator::Item::GetTag | ( | Tag & | tag | ) | const |
Read the requested tag and store it in the user-provided tag instance.
tag | the 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 43 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().
TypeId ns3::ByteTagIterator::Item::GetTypeId | ( | ) | const |
Definition at line 25 of file packet.cc.
References m_tid.
Referenced by PacketTest::DoCheck(), PacketTest::DoCheckData(), Ipv4FragmentationTest::DoRun(), Ipv6FragmentationTest::DoRun(), ns3::Packet::FindFirstMatchingByteTag(), ns3::AnimationInterface::GetAnimUidFromPacket(), and ns3::Packet::PrintByteTags().
|
friend |
|
private |
|
private |
|
private |
|
private |
the ns3::TypeId associated to this tag.
Definition at line 92 of file packet.h.
Referenced by GetTypeId().