21 #include "ns3/assert.h"
23 #include "ns3/header.h"
38 .SetGroupName (
"Internet")
106 uint8_t*
data =
new uint8_t[dataLength];
107 i.
Read (data, dataLength);
119 i.
Write (data, dataLength);
127 m_optionsOffset (optionsOffset)
144 NS_LOG_LOGIC (
"fill with " << fill <<
" bytes padding");
157 uint8_t* buf =
new uint8_t[length];
158 start.
Read (buf, length);
207 static TypeId tid =
TypeId (
"ns3::Ipv6ExtensionHopByHopHeader")
209 .SetParent<Ipv6ExtensionHeader> ()
210 .SetGroupName (
"Internet")
263 static TypeId tid =
TypeId (
"ns3::Ipv6ExtensionDestinationHeader")
265 .SetParent<Ipv6ExtensionHeader> ()
266 .SetGroupName (
"Internet")
319 static TypeId tid =
TypeId (
"ns3::Ipv6ExtensionFragmentHeader")
321 .SetParent<Ipv6ExtensionHeader> ()
322 .SetGroupName (
"Internet")
413 static TypeId tid =
TypeId (
"ns3::Ipv6ExtensionRoutingHeader")
415 .SetParent<Ipv6ExtensionHeader> ()
416 .SetGroupName (
"Internet")
493 static TypeId tid =
TypeId (
"ns3::Ipv6ExtensionLooseRoutingHeader")
495 .SetParent<Ipv6ExtensionRoutingHeader> ()
496 .SetGroupName (
"Internet")
507 : m_routersAddress (0)
572 it->Serialize (buff);
601 static TypeId tid =
TypeId (
"ns3::Ipv6ExtensionESPHeader")
603 .SetParent<Ipv6ExtensionHeader> ()
604 .SetGroupName (
"Internet")
648 static TypeId tid =
TypeId (
"ns3::Ipv6ExtensionAHHeader")
650 .SetParent<Ipv6ExtensionHeader> ()
651 .SetGroupName (
"Internet")
TypeId AddConstructor(void)
void RemoveAtEnd(uint32_t end)
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
uint32_t CalculatePad(Ipv6OptionHeader::Alignment alignment) const
Calculate padding.
automatically resized byte buffer
#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.
Buffer m_optionData
Data payload.
OptionField(uint32_t optionsOffset)
Constructor.
uint32_t ReadNtohU32(void)
iterator in a Buffer instance
uint32_t GetSerializedSize() const
Get the serialized size of the packet.
Option field for an IPv6ExtensionHeader Enables adding options to an IPv6ExtensionHeader.
void Prev(void)
go backward by one byte
void WriteHtonU16(uint16_t data)
Buffer::Iterator End(void) const
uint8_t const * PeekData(void) const
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Buffer::Iterator Begin(void) const
uint32_t m_optionsOffset
Offset.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t GetOptionsOffset()
Get the offset where the options begin, measured from the start of the extension header.
void Read(uint8_t *buffer, uint32_t size)
void WriteHtonU32(uint32_t data)
uint32_t GetSize(void) const
bool AddAtEnd(uint32_t end)
Describes an IPv6 address.
void WriteU8(uint8_t data)
void AddOption(Ipv6OptionHeader const &option)
Serialize the option, prepending pad1 or padn option as necessary.
~OptionField()
Destructor.
uint32_t Deserialize(Buffer::Iterator start, uint32_t length)
Deserialize the packet.
Buffer GetOptionBuffer()
Get the buffer.
void Write(uint8_t const *buffer, uint32_t size)
void Serialize(Buffer::Iterator start) const
Serialize all added options.
uint16_t ReadNtohU16(void)
void WriteU32(uint32_t data)
a unique identifier for an interface.