ns-3
|
Dsr fixed size header Format. More...
#include <dsr-fs-header.h>
Public Member Functions | |
virtual TypeId | GetInstanceTypeId () const |
Get the instance type ID. | |
DsrFsHeader () | |
Constructor. | |
virtual | ~DsrFsHeader () |
Destructor. | |
void | SetNextHeader (uint8_t protocol) |
Set the "Next header" field. | |
uint8_t | GetNextHeader () const |
Get the next header. | |
void | SetMessageType (uint8_t messageType) |
uint8_t | GetMessageType () const |
void | SetSourceId (uint16_t sourceId) |
uint16_t | GetSourceId () const |
void | SetDestId (uint16_t destId) |
uint16_t | GetDestId () const |
void | SetPayloadLength (uint16_t length) |
uint16_t | GetPayloadLength () const |
Get the payload length of the header. | |
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. |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the type identificator. |
Dsr fixed size header Format.
| 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header |F| Reservd | Payload Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Options | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The modified version of Dsr fixed size header Format
| 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header |F| Message Type | Payload Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source Id | Dest Id | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Options | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
virtual |
Deserialize the packet.
start | Buffer iterator |
Implements ns3::Header.
Reimplemented in ns3::dsr::DsrRoutingHeader.
References ns3::Buffer::AddAtEnd(), ns3::Buffer::Begin(), GetPayloadLength(), GetSerializedSize(), ns3::Buffer::GetSize(), ns3::Buffer::Iterator::Read(), ns3::Buffer::Iterator::ReadU16(), ns3::Buffer::Iterator::ReadU8(), ns3::Buffer::RemoveAtEnd(), and ns3::Buffer::Iterator::Write().
uint16_t ns3::dsr::DsrFsHeader::GetDestId | ( | ) | const |
brief Get the dest id of the header.
Referenced by Print(), ns3::dsr::DsrRoutingHeader::Print(), and ns3::dsr::DsrRoutingHeader::Serialize().
|
virtual |
Get the instance type ID.
Implements ns3::ObjectBase.
Reimplemented in ns3::dsr::DsrRoutingHeader.
References GetTypeId().
uint8_t ns3::dsr::DsrFsHeader::GetMessageType | ( | ) | const |
brief Get the message type of the header.
Referenced by Print(), ns3::dsr::DsrRoutingHeader::Print(), and ns3::dsr::DsrRoutingHeader::Serialize().
uint8_t ns3::dsr::DsrFsHeader::GetNextHeader | ( | ) | const |
Get the next header.
Referenced by Print(), ns3::dsr::DsrRoutingHeader::Print(), ns3::dsr::DsrRouting::Receive(), and ns3::dsr::DsrRoutingHeader::Serialize().
uint16_t ns3::dsr::DsrFsHeader::GetPayloadLength | ( | ) | const |
Get the payload length of the header.
Referenced by Deserialize(), ns3::dsr::DsrRoutingHeader::Deserialize(), Print(), ns3::dsr::DsrRoutingHeader::Print(), and ns3::dsr::DsrRoutingHeader::Serialize().
|
virtual |
Get the serialized size of the packet.
Implements ns3::Header.
Reimplemented in ns3::dsr::DsrRoutingHeader.
Referenced by Deserialize().
uint16_t ns3::dsr::DsrFsHeader::GetSourceId | ( | ) | const |
brief Get the source id of the header.
Referenced by Print(), ns3::dsr::DsrRoutingHeader::Print(), ns3::dsr::DsrRouting::Receive(), and ns3::dsr::DsrRoutingHeader::Serialize().
|
static |
Get the type identificator.
This method returns the TypeId associated to ns3::dsr::DsrFsHeader.
No Attributes defined for this type.
No TraceSources defined for this type.
Reimplemented from ns3::Header.
Reimplemented in ns3::dsr::DsrRoutingHeader.
References ns3::TypeId::AddConstructor().
Referenced by GetInstanceTypeId().
|
virtual |
Print some informations about the packet.
os | output stream |
Implements ns3::Header.
Reimplemented in ns3::dsr::DsrRoutingHeader.
References GetDestId(), GetMessageType(), GetNextHeader(), GetPayloadLength(), and GetSourceId().
|
virtual |
Serialize the packet.
start | Buffer iterator |
Implements ns3::Header.
Reimplemented in ns3::dsr::DsrRoutingHeader.
References ns3::Buffer::GetSize(), ns3::Buffer::PeekData(), ns3::Buffer::Iterator::Write(), ns3::Buffer::Iterator::WriteU16(), and ns3::Buffer::Iterator::WriteU8().
void ns3::dsr::DsrFsHeader::SetDestId | ( | uint16_t | destId | ) |
brief Set the dest id of the header.
dest | id the dest id of the header |
Referenced by ns3::dsr::DsrRouting::CheckSendBuffer(), ns3::dsr::DsrRoutingHeader::Deserialize(), ns3::dsr::DsrRouting::PacketNewRoute(), ns3::dsr::DsrOptionRreq::Process(), ns3::dsr::DsrOptionRrep::Process(), and ns3::dsr::DsrRouting::SendGratuitousReply().
void ns3::dsr::DsrFsHeader::SetMessageType | ( | uint8_t | messageType | ) |
brief Set the message type of the header.
message | type the message type of the header |
Referenced by ns3::dsr::DsrRouting::CheckSendBuffer(), ns3::dsr::DsrRoutingHeader::Deserialize(), ns3::dsr::DsrRouting::PacketNewRoute(), ns3::dsr::DsrOptionRreq::Process(), ns3::dsr::DsrOptionRrep::Process(), and ns3::dsr::DsrRouting::SendGratuitousReply().
void ns3::dsr::DsrFsHeader::SetNextHeader | ( | uint8_t | protocol | ) |
Set the "Next header" field.
nextHeader | the next header number |
Referenced by ns3::dsr::DsrRouting::CheckSendBuffer(), ns3::dsr::DsrRoutingHeader::Deserialize(), ns3::dsr::DsrRouting::PacketNewRoute(), ns3::dsr::DsrOptionRreq::Process(), ns3::dsr::DsrOptionRrep::Process(), and ns3::dsr::DsrRouting::SendGratuitousReply().
void ns3::dsr::DsrFsHeader::SetPayloadLength | ( | uint16_t | length | ) |
brief Set the payload length of the header.
length | the payload length of the header in bytes |
Referenced by ns3::dsr::DsrRouting::CheckSendBuffer(), ns3::dsr::DsrRoutingHeader::Deserialize(), ns3::dsr::DsrRouting::PacketNewRoute(), ns3::dsr::DsrOptionRreq::Process(), ns3::dsr::DsrOptionRrep::Process(), and ns3::dsr::DsrRouting::SendGratuitousReply().
void ns3::dsr::DsrFsHeader::SetSourceId | ( | uint16_t | sourceId | ) |
brief Set the source id of the header.
source | id the source id of the header |
Referenced by ns3::dsr::DsrRouting::CheckSendBuffer(), ns3::dsr::DsrRoutingHeader::Deserialize(), ns3::dsr::DsrRouting::PacketNewRoute(), ns3::dsr::DsrOptionRreq::Process(), ns3::dsr::DsrOptionRrep::Process(), and ns3::dsr::DsrRouting::SendGratuitousReply().