20 #ifndef BYTE_TAG_LIST_H
21 #define BYTE_TAG_LIST_H
24 #include "ns3/type-id.h"
29 struct ByteTagListData;
129 Iterator (uint8_t *
start, uint8_t *end, int32_t offsetStart, int32_t offsetEnd);
216 void AddAtEnd (int32_t adjustment, int32_t appendOffset);
226 void AddAtStart (int32_t adjustment, int32_t prependOffset);
ByteTagList & operator=(const ByteTagList &o)
Assignment operator, deallocates current data and assigns value of passed in ByteTagList.
Iterator(uint8_t *start, uint8_t *end, int32_t offsetStart, int32_t offsetEnd)
Constructor.
struct ByteTagListData * m_data
the ByteTagListData structure
keep track of the byte tags stored in a packet.
bool HasNext(void) const
Used to determine if the iterator is at the end of the byteTagList.
TagBuffer Add(TypeId tid, uint32_t bufferSize, int32_t start, int32_t end)
uint32_t m_nextTid
TypeId of the next tag.
void Deallocate(struct ByteTagListData *data)
Deallocates a ByteTagListData.
uint8_t * m_current
Current tag.
int32_t m_offsetEnd
Offset to the end of the tag from the virtual byte buffer.
void PrepareForNext(void)
Prepare the iterator for the next tag.
void RemoveAll(void)
Removes all of the tags from the ByteTagList.
Internal representation of the byte tags stored in a packet.
uint32_t m_nextSize
Size of the next tag.
uint16_t m_used
the number of used bytes in the buffer
int32_t start
offset to the start of the tag from the virtual byte buffer
void AddAtEnd(int32_t adjustment, int32_t appendOffset)
Adjust the offsets stored internally by the adjustment delta and make sure that all offsets are small...
struct ByteTagList::Iterator::Item Next(void)
Returns the next Item from the ByteTagList.
struct ByteTagListData * Allocate(uint32_t size)
Allocate the memory for the ByteTagListData.
int32_t m_nextStart
Start of the next tag.
uint32_t GetOffsetStart(void) const
Returns the offset from the start of the virtual byte buffer to the ByteTagList.
int32_t end
offset to the end of the tag from the virtual byte buffer
ByteTagList::Iterator BeginAll(void) const
Returns an iterator pointing to the very first tag in this list.
int32_t m_offsetStart
Offset to the start of the tag from the virtual byte buffer.
TypeId tid
type of the tag
uint32_t size
size of tag data
bool IsDirtyAtStart(int32_t prependOffset)
Check that all offsets are bigger than prependOffset.
ByteTagList::Iterator Begin(int32_t offsetStart, int32_t offsetEnd) const
TagBuffer buf
the data for the tag as generated by Tag::Serialize
An iterator for iterating through a byte tag list.
int32_t m_nextEnd
End of the next tag.
Item(TagBuffer buf)
constructs an item with the given TagBuffer
bool IsDirtyAtEnd(int32_t appendOffset)
Check that all offsets are smaller than appendOffset.
a unique identifier for an interface.
void AddAtStart(int32_t adjustment, int32_t prependOffset)
Adjust the offsets stored internally by the adjustment delta and make sure that all offsets are bigge...
An item specifies an individual tag within a byte buffer.