A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::PacketTagList::TagData Struct Reference

#include <packet-tag-list.h>

+ Collaboration diagram for ns3::PacketTagList::TagData:

Public Types

enum  TagData_e { MAX_SIZE = 20 }
 Packet Tag maximum size. More...
 

Public Attributes

uint32_t count
 
uint8_t data [MAX_SIZE]
 
struct TagDatanext
 
TypeId tid
 

Detailed Description

Tree node for sharing serialized tags.

See PacketTagList for a discussion of the data structure.

See TagData::TagData_e for a discussion of the size limit on tag serialization.

Definition at line 140 of file packet-tag-list.h.

Member Enumeration Documentation

Packet Tag maximum size.

The maximum size (in bytes) of a Tag is stored in this constant.

Internal:
Ideally, TagData would be 32 bytes in size, so they require no padding on 64-bit architectures. (The architecture affects the size because of the next pointer.) This would leave 18 bytes for data. However, ns3:Ipv6PacketInfoTag needs 19 bytes! The current implementation allows 20 bytes, which gives TagData a size of 30 bytes on 32-byte machines (which gets padded with 2 bytes), and 34 bytes on 64-bit machines, which gets padded to 40 bytes.
Enumerator
MAX_SIZE 

Size of serialization buffer data

Definition at line 159 of file packet-tag-list.h.

Member Data Documentation

uint8_t ns3::PacketTagList::TagData::data[MAX_SIZE]
TypeId ns3::PacketTagList::TagData::tid

Type of the tag serialized into data

Definition at line 166 of file packet-tag-list.h.

Referenced by ns3::PacketTagList::Add(), ns3::PacketTagList::COWTraverse(), and ns3::PacketTagList::ReplaceWriter().


The documentation for this struct was generated from the following file: