A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::anonymous_namespace{packet.cc} Namespace Reference

Functions

constexpr uint32_t AlignToBoundary (uint32_t bytes)
 Round a byte count up to the next serialization boundary.

Variables

constexpr uint32_t SECTION_LENGTH_FIELD_SIZE = sizeof(uint32_t)
 Bytes occupied by the length prefix word that precedes each serialized section.
constexpr uint32_t SERIALIZATION_ALIGNMENT = sizeof(uint32_t)
 Serialized sections are padded so that each one starts on a 4-byte boundary.

Function Documentation

◆ AlignToBoundary()

uint32_t ns3::anonymous_namespace{packet.cc}::AlignToBoundary ( uint32_t bytes)
constexpr

Round a byte count up to the next serialization boundary.

Parameters
bytesthe unpadded byte count
Returns
bytes rounded up to a multiple of SERIALIZATION_ALIGNMENT

Definition at line 614 of file packet.cc.

References AlignToBoundary(), and SERIALIZATION_ALIGNMENT.

Referenced by AlignToBoundary().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ SECTION_LENGTH_FIELD_SIZE

uint32_t ns3::anonymous_namespace{packet.cc}::SECTION_LENGTH_FIELD_SIZE = sizeof(uint32_t)
constexpr

Bytes occupied by the length prefix word that precedes each serialized section.

Definition at line 603 of file packet.cc.

◆ SERIALIZATION_ALIGNMENT

uint32_t ns3::anonymous_namespace{packet.cc}::SERIALIZATION_ALIGNMENT = sizeof(uint32_t)
constexpr

Serialized sections are padded so that each one starts on a 4-byte boundary.

Definition at line 606 of file packet.cc.

Referenced by AlignToBoundary().