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();
420 for (std::size_t index = 0; index <
m_ipv4Address.size(); index++)
442 static TypeId tid =
TypeId(
"ns3::dsr::DsrOptionRrepHeader")
444 .SetParent<DsrOptionHeader>()
445 .SetGroupName(
"Dsr");
480std::vector<Ipv4Address>
509 for (std::vector<Ipv4Address>::const_iterator it =
m_ipv4Address.begin();
555 for (std::size_t index = 0; index <
m_ipv4Address.size(); index++)
577 static TypeId tid =
TypeId(
"ns3::dsr::DsrOptionSRHeader")
579 .SetParent<DsrOptionHeader>()
580 .SetGroupName(
"Dsr");
640std::vector<Ipv4Address>
669 for (std::vector<Ipv4Address>::const_iterator it =
m_ipv4Address.begin();
715 for (std::size_t index = 0; index <
m_ipv4Address.size(); index++)
737 static TypeId tid =
TypeId(
"ns3::dsr::DsrOptionRerrHeader")
739 .SetParent<DsrOptionHeader>()
740 .SetGroupName(
"Dsr");
873 static TypeId tid =
TypeId(
"ns3::dsr::DsrOptionRerrUnreachHeader")
875 .SetParent<DsrOptionRerrHeader>()
876 .SetGroupName(
"Dsr");
1017 static TypeId tid =
TypeId(
"ns3::dsr::DsrOptionRerrUnsupportedHeader")
1019 .SetParent<DsrOptionRerrHeader>()
1020 .SetGroupName(
"Dsr");
1147 static TypeId tid =
TypeId(
"ns3::dsr::DsrOptionAckReqHeader")
1149 .SetParent<DsrOptionHeader>()
1150 .SetGroupName(
"Dsr");
1161 : m_identification(0)
1231 static TypeId tid =
TypeId(
"ns3::dsr::DsrOptionAckHeader")
1233 .SetParent<DsrOptionHeader>()
1234 .SetGroupName(
"Dsr");
1245 : 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.