32 #include "ns3/assert.h" 34 #include "ns3/header.h" 161 uint8_t
data[dataLength];
181 m_optionsOffset (optionsOffset)
200 NS_LOG_LOGIC (
"fill with " << fill <<
" bytes padding");
217 start.Read (buf, length);
269 .SetParent<DsrFsHeader> ()
~DsrOptionField()
Destructor.
uint32_t CalculatePad(DsrOptionHeader::Alignment alignment) const
Calculate padding.
TypeId AddConstructor(void)
Record in this TypeId the fact that the default constructor is accessible.
void RemoveAtEnd(uint32_t end)
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
uint32_t Deserialize(Buffer::Iterator start, uint32_t length)
Deserialize the packet.
automatically resized byte buffer
uint32_t m_optionsOffset
Offset.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
uint8_t const * PeekData(void) const
Option field for an DsrFsHeader Enables adding options to an DsrFsHeader.
iterator in a Buffer instance
uint32_t GetDsrOptionsOffset()
Get the offset where the options begin, measured from the start of the extension header.
void Prev(void)
go backward by one byte
void WriteU16(uint16_t data)
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
void AddAtEnd(uint32_t end)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t GetSerializedSize() const
Get the serialized size of the packet.
void Read(uint8_t *buffer, uint32_t size)
Buffer::Iterator End(void) const
void WriteU8(uint8_t data)
DsrOptionField(uint32_t optionsOffset)
Constructor.
void AddDsrOption(DsrOptionHeader const &option)
Serialize the option, prepending pad1 or padn option as necessary.
uint32_t GetSize(void) const
void Write(uint8_t const *buffer, uint32_t size)
void Serialize(Buffer::Iterator start) const
Serialize all added options.
a unique identifier for an interface.
Buffer::Iterator Begin(void) const
Buffer m_optionData
Data payload.
Buffer GetDsrOptionBuffer()
Get the buffer.