ns-3
|
Source Route (SR) Message Format. More...
#include <dsr-option-header.h>
Public Member Functions | |
virtual TypeId | GetInstanceTypeId () const |
Get the instance type ID. | |
DsrOptionSRHeader () | |
Constructor. | |
virtual | ~DsrOptionSRHeader () |
Destructor. | |
void | SetSegmentsLeft (uint8_t segmentsLeft) |
uint8_t | GetSegmentsLeft () const |
void | SetNumberAddress (uint8_t n) |
Set the number of ipv4 address. | |
void | SetNodesAddress (std::vector< Ipv4Address > ipv4Address) |
Set the vector of ipv4 address. | |
std::vector< Ipv4Address > | GetNodesAddress () const |
Get the vector of ipv4 address. | |
uint8_t | GetNodeListSize () const |
void | SetNodeAddress (uint8_t index, Ipv4Address addr) |
Set a Node IPv4 Address. | |
Ipv4Address | GetNodeAddress (uint8_t index) const |
Get a Node IPv4 Address. | |
void | SetSalvage (uint8_t salvage) |
uint8_t | GetSalvage () const |
virtual void | Print (std::ostream &os) const |
Print some informations about the packet. | |
virtual uint32_t | GetSerializedSize () const |
Get the serialized size of the packet. | |
virtual void | Serialize (Buffer::Iterator start) const |
Serialize the packet. | |
virtual uint32_t | Deserialize (Buffer::Iterator start) |
Deserialize the packet. | |
virtual Alignment | GetAlignment () const |
Get the Alignment requirement of this option header. | |
![]() | |
DsrOptionHeader () | |
Constructor. | |
virtual | ~DsrOptionHeader () |
Destructor. | |
void | SetType (uint8_t type) |
Set the type of the option. | |
uint8_t | GetType () const |
Get the type of the option. | |
void | SetLength (uint8_t length) |
Set the option length. | |
uint8_t | GetLength () const |
Get the option length. |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the type identificator. |
Source Route (SR) Message Format.
Header of Dsr Option Source Route.
| 0 | 1 | 2 | 3 | 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Opt Data Len |F|L|Reservd|Salvage| Segs Left | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[1] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[2] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address[n] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
virtual |
Deserialize the packet.
start | Buffer iterator |
Reimplemented from ns3::dsr::DsrOptionHeader.
References ns3::Ipv4Address::Deserialize(), GetSerializedSize(), ns3::Buffer::Iterator::Read(), ns3::Buffer::Iterator::ReadU8(), ns3::dsr::DsrOptionHeader::SetLength(), SetNodeAddress(), and ns3::dsr::DsrOptionHeader::SetType().
|
virtual |
Get the Alignment requirement of this option header.
Reimplemented from ns3::dsr::DsrOptionHeader.
|
virtual |
Get the instance type ID.
Reimplemented from ns3::dsr::DsrOptionHeader.
References GetTypeId().
Ipv4Address ns3::dsr::DsrOptionSRHeader::GetNodeAddress | ( | uint8_t | index | ) | const |
index | the index of the IPv4 Address |
Referenced by ns3::dsr::DsrOptionRerr::DoSendError(), and ns3::dsr::DsrOptionSR::Process().
std::vector< Ipv4Address > ns3::dsr::DsrOptionSRHeader::GetNodesAddress | ( | ) | const |
Get the vector of ipv4 address.
Referenced by ns3::dsr::DsrOptionRerr::DoSendError(), and ns3::dsr::DsrOptionSR::Process().
|
virtual |
Get the serialized size of the packet.
Reimplemented from ns3::dsr::DsrOptionHeader.
Referenced by Deserialize(), ns3::dsr::DsrOptionRerr::DoSendError(), and ns3::dsr::DsrOptionSR::Process().
|
static |
Get the type identificator.
This method returns the TypeId associated to ns3::dsr::DsrOptionSRHeader.
No Attributes defined for this type.
No TraceSources defined for this type.
Reimplemented from ns3::dsr::DsrOptionHeader.
References ns3::TypeId::AddConstructor().
Referenced by GetInstanceTypeId().
|
virtual |
Print some informations about the packet.
os | output stream |
Reimplemented from ns3::dsr::DsrOptionHeader.
References ns3::dsr::DsrOptionHeader::GetLength(), and ns3::dsr::DsrOptionHeader::GetType().
|
virtual |
Serialize the packet.
start | Buffer iterator |
Reimplemented from ns3::dsr::DsrOptionHeader.
References ns3::dsr::DsrOptionHeader::GetLength(), ns3::dsr::DsrOptionHeader::GetType(), ns3::Buffer::Iterator::Write(), and ns3::Buffer::Iterator::WriteU8().
void ns3::dsr::DsrOptionSRHeader::SetNodeAddress | ( | uint8_t | index, |
Ipv4Address | addr | ||
) |
Referenced by Deserialize().
void ns3::dsr::DsrOptionSRHeader::SetNodesAddress | ( | std::vector< Ipv4Address > | ipv4Address | ) |
Set the vector of ipv4 address.
ipv4Address | the vector of ipv4 address |
References ns3::dsr::DsrOptionHeader::SetLength().
Referenced by ns3::dsr::DsrRouting::CheckSendBuffer(), ns3::dsr::DsrOptionRerr::DoSendError(), ns3::dsr::DsrRouting::PacketNewRoute(), ns3::dsr::DsrOptionRreq::Process(), ns3::dsr::DsrOptionRrep::Process(), and ns3::dsr::DsrOptionSR::Process().
void ns3::dsr::DsrOptionSRHeader::SetNumberAddress | ( | uint8_t | n | ) |
Set the number of ipv4 address.
n | the number of ipv4' address |
Referenced by ns3::dsr::DsrOptionRerr::DoSendError(), and ns3::dsr::DsrOptionSR::Process().