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];
 
  111   i.
Read (data, dataLength);
 
  123   i.
Write (data, 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);
 
  595   uint8_t addressNum = m_length / 2;
 
  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. 
 
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. 
 
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function. 
 
Buffer m_optionData
Data payload. 
 
uint32_t ReadNtohU32(void)
 
iterator in a Buffer instance 
 
NS_ASSERT_MSG(false,"Ipv4AddressGenerator::MaskToIndex(): Impossible")
 
Option field for 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 
 
Buffer::Iterator Begin(void) const 
 
uint32_t m_optionsOffset
Offset. 
 
void AddAtEnd(uint32_t end)
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
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)
 
uint32_t GetSize(void) const 
 
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
 
void Serialize(Buffer::Iterator start) const 
Serialize all added options. 
 
Describes an IPv6 address. 
 
uint32_t CalculatePad(Ipv6OptionHeader::Alignment alignment) const 
Calculate padding. 
 
void WriteU8(uint8_t data)
 
uint32_t GetOptionsOffset()
Get the offset where the options begin, measured from the start of the extension header. 
 
void Write(uint8_t const *buffer, uint32_t size)
 
uint32_t GetSerializedSize() const 
Get the serialized size of the packet. 
 
OptionField(uint32_t optionsOffset)
Constructor. 
 
uint16_t ReadNtohU16(void)
 
void WriteU32(uint32_t data)
 
a unique identifier for an interface.