33#include "ns3/address-utils.h"
34#include "ns3/assert.h"
36#include "ns3/header.h"
37#include "ns3/ipv4-address.h"
39#include "ns3/packet.h"
153 static TypeId tid =
TypeId(
"ns3::dsr::DsrOptionPad1Header")
155 .SetParent<DsrOptionHeader>()
156 .SetGroupName(
"Dsr");
210 static TypeId tid =
TypeId(
"ns3::dsr::DsrOptionPadnHeader")
212 .SetParent<DsrOptionHeader>()
213 .SetGroupName(
"Dsr");
226 NS_ASSERT_MSG(pad >= 2,
"PadN must be at least 2 bytes long");
254 for (
int padding = 0; padding <
GetLength(); padding++)
276 static TypeId tid =
TypeId(
"ns3::dsr::DsrOptionRreqHeader")
278 .SetParent<DsrOptionHeader>()
279 .SetGroupName(
"Dsr");
333std::vector<Ipv4Address>
374 for (std::vector<Ipv4Address>::const_iterator it =
m_ipv4Address.begin();
445 static TypeId tid =
TypeId(
"ns3::dsr::DsrOptionRrepHeader")
447 .SetParent<DsrOptionHeader>()
448 .SetGroupName(
"Dsr");
483std::vector<Ipv4Address>
512 for (std::vector<Ipv4Address>::const_iterator it =
m_ipv4Address.begin();
583 static TypeId tid =
TypeId(
"ns3::dsr::DsrOptionSRHeader")
585 .SetParent<DsrOptionHeader>()
586 .SetGroupName(
"Dsr");
646std::vector<Ipv4Address>
675 for (std::vector<Ipv4Address>::const_iterator it =
m_ipv4Address.begin();
746 static TypeId tid =
TypeId(
"ns3::dsr::DsrOptionRerrHeader")
748 .SetParent<DsrOptionHeader>()
749 .SetGroupName(
"Dsr");
882 static TypeId tid =
TypeId(
"ns3::dsr::DsrOptionRerrUnreachHeader")
884 .SetParent<DsrOptionRerrHeader>()
885 .SetGroupName(
"Dsr");
1026 static TypeId tid =
TypeId(
"ns3::dsr::DsrOptionRerrUnsupportHeader")
1028 .SetParent<DsrOptionRerrHeader>()
1029 .SetGroupName(
"Dsr");
1105 <<
" unsupported option = " <<
m_unsupport <<
" )";
1156 static TypeId tid =
TypeId(
"ns3::dsr::DsrOptionAckReqHeader")
1158 .SetParent<DsrOptionHeader>()
1159 .SetGroupName(
"Dsr");
1170 : m_identification(0)
1240 static TypeId tid =
TypeId(
"ns3::dsr::DsrOptionAckHeader")
1242 .SetParent<DsrOptionHeader>()
1243 .SetGroupName(
"Dsr");
1254 : m_identification(0)
iterator in a Buffer instance
void WriteU8(uint8_t data)
void Write(const uint8_t *buffer, uint32_t size)
void WriteU16(uint16_t data)
void Read(uint8_t *buffer, uint32_t size)
void WriteHtonU16(uint16_t data)
void Next()
go forward by one byte
automatically resized byte buffer
Buffer::Iterator Begin() const
void AddAtEnd(uint32_t end)
Buffer::Iterator End() const
Ipv4 addresses are stored in host order in this class.
static Ipv4Address Deserialize(const uint8_t buf[4])
a unique identifier for an interface.
TypeId AddConstructor()
Record in this TypeId the fact that the default constructor is accessible.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void WriteTo(Buffer::Iterator &i, Ipv4Address ad)
Write an Ipv4Address to a Buffer.
void ReadFrom(Buffer::Iterator &i, Ipv4Address &ad)
Read an Ipv4Address from a Buffer.