32 #include "ns3/assert.h" 
   34 #include "ns3/header.h" 
   36 #include "ns3/ipv4-address.h" 
   37 #include "ns3/address-utils.h" 
   38 #include "ns3/packet.h" 
   96   os << 
"( type = " << (uint32_t)
m_type << 
" length = " << (uint32_t)
m_length << 
" )";
 
  140   static TypeId tid = 
TypeId (
"ns3::dsr::DsrOptionPad1Header")
 
  142     .SetParent<DsrOptionHeader> ()
 
  143     .SetGroupName (
"Dsr")
 
  164   os << 
"( type = " << (uint32_t)
GetType () << 
" )";
 
  192   static TypeId tid = 
TypeId (
"ns3::dsr::DsrOptionPadnHeader")
 
  194     .SetParent<DsrOptionHeader> ()
 
  195     .SetGroupName (
"Dsr")
 
  208   NS_ASSERT_MSG (pad >= 2, 
"PadN must be at least 2 bytes long");
 
  218   os << 
"( type = " << (uint32_t)
GetType () << 
" length = " << (uint32_t)
GetLength () << 
" )";
 
  233   for (
int padding = 0; padding < 
GetLength (); padding++)
 
  253   static TypeId tid = 
TypeId (
"ns3::dsr::DsrOptionRreqHeader")
 
  255     .SetParent<DsrOptionHeader> ()
 
  256     .SetGroupName (
"Dsr")
 
  337   os << 
"( type = " << (uint32_t)
GetType () << 
" length = " << (uint32_t)
GetLength () << 
"";
 
  364       it->Serialize (buff);
 
  401   static TypeId tid = 
TypeId (
"ns3::dsr::DsrOptionRrepHeader")
 
  403     .SetParent<DsrOptionHeader> ()
 
  404     .SetGroupName (
"Dsr")
 
  459   os << 
"( type = " << (uint32_t)
GetType () << 
" length = " << (uint32_t)
GetLength () << 
"";
 
  486       it->Serialize (buff);
 
  523   static TypeId tid = 
TypeId (
"ns3::dsr::DsrOptionSRHeader")
 
  525     .SetParent<DsrOptionHeader> ()
 
  526     .SetGroupName (
"Dsr")
 
  537   : m_segmentsLeft (0),
 
  602   os << 
"( type = " << (uint32_t)
GetType () << 
" length = " << (uint32_t)
GetLength () << 
"";
 
  629       it->Serialize (buff);
 
  666   static TypeId tid = 
TypeId (
"ns3::dsr::DsrOptionRerrHeader")
 
  668     .SetParent<DsrOptionHeader> ()
 
  669     .SetGroupName (
"Dsr")
 
  734   os << 
"( type = " << (uint32_t)
GetType () << 
" length = " << (uint32_t)
GetLength ()
 
  789   static TypeId tid = 
TypeId (
"ns3::dsr::DsrOptionRerrUnreachHeader")
 
  791     .SetParent<DsrOptionRerrHeader> ()
 
  792     .SetGroupName (
"Dsr")
 
  867   os << 
"( type = " << (uint32_t)
GetType () << 
" length = " << (uint32_t)
GetLength ()
 
  918   static TypeId tid = 
TypeId (
"ns3::dsr::DsrOptionRerrUnsupportHeader")
 
  920     .SetParent<DsrOptionRerrHeader> ()
 
  921     .SetGroupName (
"Dsr")
 
  986   os << 
"( type = " << (uint32_t)
GetType () << 
" length = " << (uint32_t)
GetLength ()
 
  989      << 
" unsupported option = " <<  
m_unsupport << 
" )";
 
 1037   static TypeId tid = 
TypeId (
"ns3::dsr::DsrOptionAckReqHeader")
 
 1039     .SetParent<DsrOptionHeader> ()
 
 1040     .SetGroupName (
"Dsr")
 
 1051   : m_identification (0)
 
 1074   os << 
"( type = " << (uint32_t)
GetType () << 
" length = " << (uint32_t)
GetLength ()
 
 1113   static TypeId tid = 
TypeId (
"ns3::dsr::DsrOptionAckHeader")
 
 1115     .SetParent<DsrOptionHeader> ()
 
 1116     .SetGroupName (
"Dsr")
 
 1127   :    m_identification (0)
 
 1169   os << 
"( type = " << (uint32_t)
GetType () << 
" length = " << (uint32_t)
GetLength ()
 
static Ipv4Address Deserialize(const uint8_t buf[4])
 
TypeId AddConstructor(void)
Record in this TypeId the fact that the default constructor is accessible. 
 
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system. 
 
void ReadFrom(Buffer::Iterator &i, Ipv4Address &ad)
Read an Ipv4Address from a Buffer. 
 
automatically resized byte buffer 
 
void WriteTo(Buffer::Iterator &i, Ipv4Address ad)
Write an Ipv4Address to a Buffer. 
 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
 
iterator in a Buffer instance 
 
void WriteU16(uint16_t data)
 
void WriteHtonU16(uint16_t data)
 
Buffer::Iterator End(void) const 
 
void Next(void)
go forward by one byte 
 
Buffer::Iterator Begin(void) const 
 
void AddAtEnd(uint32_t end)
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
void Read(uint8_t *buffer, uint32_t size)
 
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
 
Ipv4 addresses are stored in host order in this class. 
 
void WriteU8(uint8_t data)
 
void Write(uint8_t const *buffer, uint32_t size)
 
uint16_t ReadNtohU16(void)
 
a unique identifier for an interface.