ns-3
|
tag a set of bytes in a packet More...
#include <tag.h>
Public Member Functions | |
virtual uint32_t | GetSerializedSize (void) const =0 |
virtual void | Serialize (TagBuffer i) const =0 |
virtual void | Deserialize (TagBuffer i)=0 |
virtual void | Print (std::ostream &os) const =0 |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::Tag. |
tag a set of bytes in a packet
New kinds of tags can be created by subclassing this base class.
virtual void ns3::Tag::Deserialize | ( | TagBuffer | i | ) | [pure virtual] |
i | the buffer to read data from. |
Read the content of the tag from the provided tag buffer. DO NOT attempt to read more bytes than you wrote with Tag::Serialize.
Implemented in ns3::SocketSetDontFragmentTag, ns3::SocketIpTtlTag, ns3::SocketAddressTag, ns3::AnimByteTag, ns3::QosTag, ns3::flame::FlameTag, ns3::Ipv6PacketInfoTag, ns3::Ipv4PacketInfoTag, ns3::dot11s::HwmpTag, and ns3::FlowIdTag.
Referenced by ns3::ByteTagIterator::Item::GetTag(), ns3::PacketTagIterator::Item::GetTag(), and ns3::PacketTagList::Remove().
virtual uint32_t ns3::Tag::GetSerializedSize | ( | void | ) | const [pure virtual] |
This method is typically invoked by Packet::AddPacketTag or Packet::AddByteTag just prior to calling Tag::Serialize.
Implemented in ns3::SocketSetDontFragmentTag, ns3::SocketIpTtlTag, ns3::SocketAddressTag, ns3::AnimByteTag, ns3::QosTag, ns3::flame::FlameTag, ns3::Ipv6PacketInfoTag, ns3::Ipv4PacketInfoTag, ns3::dot11s::HwmpTag, and ns3::FlowIdTag.
Referenced by ns3::Packet::AddByteTag(), ns3::Packet::AddPacketTag(), and ns3::Packet::RemovePacketTag().
TypeId ns3::Tag::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::Tag.
No Attributes defined for this type.
No TraceSources defined for this type.
Reimplemented from ns3::ObjectBase.
Reimplemented in ns3::SocketSetDontFragmentTag, ns3::SocketIpTtlTag, ns3::SocketAddressTag, ns3::AnimByteTag, ns3::flame::FlameTag, ns3::Ipv6PacketInfoTag, ns3::QosTag, ns3::Ipv4PacketInfoTag, ns3::dot11s::HwmpTag, and ns3::FlowIdTag.
References ns3::TypeId::SetParent().
virtual void ns3::Tag::Print | ( | std::ostream & | os | ) | const [pure virtual] |
os | the stream to print to |
This method is typically invoked from the Packet::PrintByteTags or Packet::PrintPacketTags methods.
Implemented in ns3::SocketSetDontFragmentTag, ns3::SocketIpTtlTag, ns3::SocketAddressTag, ns3::AnimByteTag, ns3::QosTag, ns3::flame::FlameTag, ns3::Ipv6PacketInfoTag, ns3::Ipv4PacketInfoTag, ns3::dot11s::HwmpTag, and ns3::FlowIdTag.
Referenced by ns3::Packet::PrintByteTags(), and ns3::Packet::PrintPacketTags().
virtual void ns3::Tag::Serialize | ( | TagBuffer | i | ) | const [pure virtual] |
i | the buffer to write data into. |
Write the content of the tag in the provided tag buffer. DO NOT attempt to write more bytes than you requested with Tag::GetSerializedSize.
Implemented in ns3::SocketSetDontFragmentTag, ns3::SocketIpTtlTag, ns3::SocketAddressTag, ns3::AnimByteTag, ns3::QosTag, ns3::flame::FlameTag, ns3::Ipv6PacketInfoTag, ns3::Ipv4PacketInfoTag, ns3::dot11s::HwmpTag, and ns3::FlowIdTag.
Referenced by ns3::Packet::AddByteTag().