20 #ifndef PACKET_TAG_LIST_H 21 #define PACKET_TAG_LIST_H 30 #include "ns3/type-id.h" 185 void Add (
Tag const&tag)
const;
244 (
Tag & tag,
bool preMerge,
~PacketTagList()
Destructor.
bool Remove(Tag &tag)
Remove (the first instance of) tag from the list.
struct TagData * next
Pointer to next in list.
List of the packet tags stored in a packet.
const struct PacketTagList::TagData * Head(void) const
static TagData * CreateTagData(size_t dataSize)
Allocate and construct a TagData struct, sizing the data area large enough to serialize dataSize byte...
bool ReplaceWriter(Tag &tag, bool preMerge, struct TagData *cur, struct TagData **prevNext)
Copy-on-write implementing Replace.
Tree node for sharing serialized tags.
bool(PacketTagList::* COWWriter)(Tag &tag, bool preMerge, struct TagData *cur, struct TagData **prevNext)
Typedef of method function pointer for copy-on-write operations.
bool Replace(Tag &tag)
Replace the value of a tag.
bool RemoveWriter(Tag &tag, bool preMerge, struct TagData *cur, struct TagData **prevNext)
Copy-on-write implementing Remove.
uint32_t size
Size of the data buffer.
PacketTagList()
Create a new PacketTagList.
uint8_t data[1]
Serialization buffer.
tag a set of bytes in a packet
bool COWTraverse(Tag &tag, PacketTagList::COWWriter Writer)
Traverse the list implementing copy-on-write, using Writer.
struct TagData * m_next
Pointer to first TagData on the list.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool Peek(Tag &tag) const
Find a tag and return its value.
void Add(Tag const &tag) const
Add a tag to the head of this branch.
TypeId tid
Type of the tag serialized into data.
PacketTagList & operator=(PacketTagList const &o)
Assignment.
void RemoveAll(void)
Remove all tags from this list (up to the first merge).
a unique identifier for an interface.
uint32_t count
Number of incoming links.