29 #include "ns3/fatal-error.h"
65 else if (cur->
tid == tid)
67 NS_LOG_INFO (
"found tid before initial merge, calling writer");
68 found = (this->*Writer)(tag,
true, cur, prevNext);
74 prevNext = &cur->
next;
80 if (cur == 0 || found)
82 NS_LOG_INFO (
"returning after header with found: " << found);
90 for (it = cur; it != 0; it = it->
next)
131 while ( cur->
tid != tid)
143 prevNext = ©->
next;
152 found = (this->*Writer)(tag,
false, cur, prevNext);
175 *prevNext = cur->
next;
uint8_t data[MAX_SIZE]
Serialization buffer.
bool Remove(Tag &tag)
Remove (the first instance of) tag from the list.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
struct TagData * next
Pointer to next in list.
virtual uint32_t GetSerializedSize(void) const =0
const struct PacketTagList::TagData * Head(void) const
List of the packet tags stored in a packet.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
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.
bool ReplaceWriter(Tag &tag, bool preMerge, struct TagData *cur, struct TagData **prevNext)
Copy-on-write implementing Replace.
Tree node for sharing serialized tags.
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.
Defines a linked list of Packet tags, including copy-on-write semantics.
virtual void Serialize(TagBuffer i) const =0
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.
virtual void Deserialize(TagBuffer i)=0
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Size of serialization buffer data.
virtual TypeId GetInstanceTypeId(void) const =0
Get the most derived TypeId for this Object.
TypeId tid
Type of the tag serialized into data.
bool(PacketTagList::* COWWriter)(Tag &tag, bool preMerge, struct TagData *cur, struct TagData **prevNext)
Typedef of method function pointer for copy-on-write operations.
a unique identifier for an interface.
uint32_t count
Number of incoming links.