tag a set of bytes in a packet More...
#include "tag.h"
Public Member Functions | |
virtual void | Deserialize (TagBuffer i)=0 |
virtual uint32_t | GetSerializedSize () const =0 |
virtual void | Print (std::ostream &os) const =0 |
virtual void | Serialize (TagBuffer i) const =0 |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. More... | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising errors. More... | |
virtual TypeId | GetInstanceTypeId () const =0 |
Get the most derived TypeId for this Object. More... | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. More... | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. More... | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. More... | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. More... | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. More... | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the type ID. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId () |
Get the type ID. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. More... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
tag a set of bytes in a packet
New kinds of tags can be created by subclassing from this abstract base class.
|
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::SnrTag, ns3::MuSnrTag, ns3::AmpduTag, ns3::TimestampTag, ns3::SimpleTag, ns3::DeviceNameTag, ns3::PacketSocketTag, ns3::SocketIpv6TclassTag, ns3::SocketPriorityTag, ns3::SocketIpTosTag, ns3::SocketSetDontFragmentTag, ns3::SocketIpv6HopLimitTag, ns3::SocketIpTtlTag, MyTag, ns3::AnimByteTag, ns3::flame::FlameTag, ns3::dot11s::HwmpTag, ns3::RlcTag, ns3::LteRlcSduStatusTag, ns3::LteRadioBearerTag, ns3::LtePhyTag, ns3::PdcpTag, ns3::EpsBearerTag, ns3::LrWpanLqiTag, ns3::Ipv6PacketInfoTag, ns3::Ipv4PacketInfoTag, ns3::dsdv::DeferredRouteOutputTag, ns3::aodv::DeferredRouteOutputTag, IPv6TestTag, IPv4TestTag, BenchTag< N >, ns3::PyVizPacketTag, ns3::FlowIdTag, anonymous_namespace{packet-test-suite.cc}::ALargeTestTag, anonymous_namespace{packet-test-suite.cc}::ATestTag< N >, ns3::Ipv6FlowProbeTag, and ns3::Ipv4FlowProbeTag.
Referenced by ns3::ByteTagIterator::Item::GetTag(), ns3::PacketTagIterator::Item::GetTag(), ns3::PacketTagList::Peek(), and ns3::PacketTagList::RemoveWriter().
|
pure virtual |
This method is typically invoked by Packet::AddPacketTag or Packet::AddByteTag just prior to calling Tag::Serialize.
Implemented in BenchTag< N >, ns3::SnrTag, ns3::MuSnrTag, ns3::AmpduTag, ns3::PyVizPacketTag, ns3::TimestampTag, ns3::SimpleTag, ns3::DeviceNameTag, ns3::PacketSocketTag, ns3::FlowIdTag, anonymous_namespace{packet-test-suite.cc}::ALargeTestTag, anonymous_namespace{packet-test-suite.cc}::ATestTag< N >, ns3::SocketIpv6TclassTag, ns3::SocketPriorityTag, ns3::SocketIpTosTag, ns3::SocketSetDontFragmentTag, ns3::SocketIpv6HopLimitTag, ns3::SocketIpTtlTag, MyTag, ns3::AnimByteTag, ns3::flame::FlameTag, ns3::dot11s::HwmpTag, ns3::RlcTag, ns3::LteRlcSduStatusTag, ns3::LteRadioBearerTag, ns3::LtePhyTag, ns3::PdcpTag, ns3::EpsBearerTag, ns3::LrWpanLqiTag, IPv6TestTag, IPv4TestTag, ns3::Ipv6PacketInfoTag, ns3::Ipv4PacketInfoTag, ns3::Ipv6FlowProbeTag, ns3::Ipv4FlowProbeTag, ns3::dsdv::DeferredRouteOutputTag, and ns3::aodv::DeferredRouteOutputTag.
Referenced by ns3::PacketTagList::Add(), ns3::Packet::AddByteTag(), ns3::Packet::AddPacketTag(), ns3::Packet::RemovePacketTag(), ns3::Packet::ReplacePacketTag(), and ns3::PacketTagList::ReplaceWriter().
|
static |
Get the type ID.
Definition at line 27 of file tag.cc.
References ns3::TypeId::SetParent().
|
pure virtual |
os | the stream to print to |
This method is typically invoked from the Packet::PrintByteTags or Packet::PrintPacketTags methods.
Implemented in BenchTag< N >, ns3::SnrTag, ns3::MuSnrTag, ns3::AmpduTag, ns3::PyVizPacketTag, ns3::TimestampTag, ns3::SimpleTag, ns3::DeviceNameTag, ns3::PacketSocketTag, ns3::FlowIdTag, anonymous_namespace{packet-test-suite.cc}::ALargeTestTag, anonymous_namespace{packet-test-suite.cc}::ATestTag< N >, ns3::SocketIpv6TclassTag, ns3::SocketPriorityTag, ns3::SocketIpTosTag, ns3::SocketSetDontFragmentTag, ns3::SocketIpv6HopLimitTag, ns3::SocketIpTtlTag, MyTag, ns3::AnimByteTag, ns3::flame::FlameTag, ns3::dot11s::HwmpTag, ns3::RlcTag, ns3::LteRlcSduStatusTag, ns3::LteRadioBearerTag, ns3::LtePhyTag, ns3::PdcpTag, ns3::EpsBearerTag, ns3::LrWpanLqiTag, IPv6TestTag, IPv4TestTag, ns3::Ipv6PacketInfoTag, ns3::Ipv4PacketInfoTag, ns3::Ipv6FlowProbeTag, ns3::Ipv4FlowProbeTag, ns3::dsdv::DeferredRouteOutputTag, and ns3::aodv::DeferredRouteOutputTag.
Referenced by ns3::Packet::PrintByteTags(), and ns3::Packet::PrintPacketTags().
|
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::SnrTag, ns3::MuSnrTag, ns3::AmpduTag, ns3::TimestampTag, ns3::SimpleTag, ns3::DeviceNameTag, ns3::PacketSocketTag, ns3::SocketIpv6TclassTag, ns3::SocketPriorityTag, ns3::SocketIpTosTag, ns3::SocketSetDontFragmentTag, ns3::SocketIpv6HopLimitTag, ns3::SocketIpTtlTag, MyTag, ns3::AnimByteTag, ns3::flame::FlameTag, ns3::dot11s::HwmpTag, ns3::RlcTag, ns3::LteRlcSduStatusTag, ns3::LteRadioBearerTag, ns3::LtePhyTag, ns3::PdcpTag, ns3::EpsBearerTag, ns3::LrWpanLqiTag, ns3::Ipv6PacketInfoTag, ns3::Ipv4PacketInfoTag, ns3::dsdv::DeferredRouteOutputTag, ns3::aodv::DeferredRouteOutputTag, IPv6TestTag, IPv4TestTag, BenchTag< N >, ns3::PyVizPacketTag, ns3::FlowIdTag, anonymous_namespace{packet-test-suite.cc}::ALargeTestTag, anonymous_namespace{packet-test-suite.cc}::ATestTag< N >, ns3::Ipv6FlowProbeTag, and ns3::Ipv4FlowProbeTag.
Referenced by ns3::PacketTagList::Add(), ns3::Packet::AddByteTag(), and ns3::PacketTagList::ReplaceWriter().