21 #include "ns3/assert.h"    23 #include "ns3/header.h"    38     .SetGroupName (
"Internet")
    71   NS_ASSERT_MSG (!(length & 0x7), 
"Invalid Ipv6ExtensionHeader Length, must be a multiple of 8 bytes.");
    72   NS_ASSERT_MSG (length > 0, 
"Invalid Ipv6ExtensionHeader Length, must be greater than 0.");
    73   NS_ASSERT_MSG (length < 2048, 
"Invalid Ipv6ExtensionHeader Length, must be a lower than 2048.");
   110   uint8_t* 
data = 
new uint8_t[dataLength];
   131     m_optionsOffset (optionsOffset)
   148   NS_LOG_LOGIC (
"fill with " << fill << 
" bytes padding");
   161   uint8_t* buf = 
new uint8_t[length];
   162   start.Read (buf, length);
   211   static TypeId tid = 
TypeId (
"ns3::Ipv6ExtensionHopByHopHeader")
   213     .SetParent<Ipv6ExtensionHeader> ()
   214     .SetGroupName (
"Internet")
   267   static TypeId tid = 
TypeId (
"ns3::Ipv6ExtensionDestinationHeader")
   269     .SetParent<Ipv6ExtensionHeader> ()
   270     .SetGroupName (
"Internet")
   323   static TypeId tid = 
TypeId (
"ns3::Ipv6ExtensionFragmentHeader")
   325     .SetParent<Ipv6ExtensionHeader> ()
   326     .SetGroupName (
"Internet")
   418   static TypeId tid = 
TypeId (
"ns3::Ipv6ExtensionRoutingHeader")
   420     .SetParent<Ipv6ExtensionHeader> ()
   421     .SetGroupName (
"Internet")
   498   static TypeId tid = 
TypeId (
"ns3::Ipv6ExtensionLooseRoutingHeader")
   500     .SetParent<Ipv6ExtensionRoutingHeader> ()
   501     .SetGroupName (
"Internet")
   512   : m_routersAddress (0)
   579       it->Serialize (buff);
   597   for (uint8_t index = 0; index < addressNum; index++)
   610   static TypeId tid = 
TypeId (
"ns3::Ipv6ExtensionESPHeader")
   612     .SetParent<Ipv6ExtensionHeader> ()
   613     .SetGroupName (
"Internet")
   657   static TypeId tid = 
TypeId (
"ns3::Ipv6ExtensionAHHeader")
   659     .SetParent<Ipv6ExtensionHeader> ()
   660     .SetGroupName (
"Internet")
 
uint32_t Deserialize(Buffer::Iterator start, uint32_t length)
Deserialize the packet. 
 
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
 
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. 
 
Buffer GetOptionBuffer()
Get the buffer. 
 
~OptionField()
Destructor. 
 
 automatically resized byte buffer 
 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
 
Buffer m_optionData
Data payload. 
 
uint8_t const  * PeekData(void) const
 
uint32_t ReadNtohU32(void)
 
iterator in a Buffer instance 
 
Option field for an IPv6ExtensionHeader. 
 
void Prev(void)
go backward by one byte 
 
void WriteHtonU16(uint16_t data)
 
uint32_t CalculatePad(Ipv6OptionHeader::Alignment alignment) const
Calculate padding. 
 
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC. 
 
uint32_t m_optionsOffset
Offset. 
 
void AddAtEnd(uint32_t end)
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
void Serialize(Buffer::Iterator start) const
Serialize all added options. 
 
void AddOption(Ipv6OptionHeader const &option)
Serialize the option, prepending pad1 or padn option as necessary. 
 
void Read(uint8_t *buffer, uint32_t size)
 
void WriteHtonU32(uint32_t data)
 
Buffer::Iterator End(void) const
 
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
 
Describes an IPv6 address. 
 
void WriteU8(uint8_t data)
 
uint32_t GetOptionsOffset()
Get the offset where the options begin, measured from the start of the extension header. 
 
uint32_t GetSerializedSize() const
Get the serialized size of the packet. 
 
uint32_t GetSize(void) const
 
void Write(uint8_t const *buffer, uint32_t size)
 
OptionField(uint32_t optionsOffset)
Constructor. 
 
uint16_t ReadNtohU16(void)
 
void WriteU32(uint32_t data)
 
a unique identifier for an interface. 
 
Buffer::Iterator Begin(void) const