HELLO Message Format. More...
#include "olsr-header.h"
Collaboration diagram for ns3::olsr::MessageHeader::Hello:Classes | |
| struct | LinkMessage |
| Link message item. More... | |
Public Member Functions | |
| uint32_t | Deserialize (Buffer::Iterator start, uint32_t messageSize) |
| This method is used by Packet::RemoveHeader to re-create a header from the byte buffer of a packet. | |
| Time | GetHTime () const |
| Get the HELLO emission interval. | |
| uint32_t | GetSerializedSize () const |
| Returns the expected size of the header. | |
| void | Print (std::ostream &os) const |
| This method is used to print the content of a Hello message. | |
| void | Serialize (Buffer::Iterator start) const |
| This method is used by Packet::AddHeader to store a header into the byte buffer of a packet. | |
| void | SetHTime (Time time) |
| Set the HELLO emission interval. | |
Public Attributes | |
| uint8_t | hTime |
| HELLO emission interval (coded) | |
| std::vector< LinkMessage > | linkMessages |
| Link messages container. | |
| Willingness | willingness |
| The willingness of a node to carry and forward traffic for other nodes. | |
HELLO Message Format.
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reserved | Htime | Willingness | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Link Code | Reserved | Link Message Size | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Neighbor Interface Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Neighbor Interface Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ : . . . : : : +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Link Code | Reserved | Link Message Size | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Neighbor Interface Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Neighbor Interface Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ : : (etc.)
Definition at line 374 of file olsr-header.h.
| uint32_t ns3::olsr::MessageHeader::Hello::Deserialize | ( | Buffer::Iterator | start, |
| uint32_t | messageSize | ||
| ) |
This method is used by Packet::RemoveHeader to re-create a header from the byte buffer of a packet.
| start | an iterator which points to where the header should read from. |
| messageSize | the message size. |
Definition at line 444 of file olsr-header.cc.
References ns3::Create(), IPV4_ADDRESS_SIZE, and NS_ASSERT.
Here is the call graph for this function:
|
inline |
Get the HELLO emission interval.
Definition at line 401 of file olsr-header.h.
References ns3::olsr::EmfToSeconds(), and ns3::Seconds().
Here is the call graph for this function:| uint32_t ns3::olsr::MessageHeader::Hello::GetSerializedSize | ( | ) | const |
Returns the expected size of the header.
Definition at line 372 of file olsr-header.cc.
References ns3::Create(), and IPV4_ADDRESS_SIZE.
Here is the call graph for this function:| void ns3::olsr::MessageHeader::Hello::Print | ( | std::ostream & | os | ) | const |
This method is used to print the content of a Hello message.
| os | output stream |
Definition at line 385 of file olsr-header.cc.
References ns3::Create(), and ns3::olsr::EmfToSeconds().
Here is the call graph for this function:| void ns3::olsr::MessageHeader::Hello::Serialize | ( | Buffer::Iterator | start | ) | const |
This method is used by Packet::AddHeader to store a header into the byte buffer of a packet.
| start | an iterator which points to where the header should be written. |
Definition at line 413 of file olsr-header.cc.
References ns3::Create(), and IPV4_ADDRESS_SIZE.
Here is the call graph for this function:Set the HELLO emission interval.
| time | The HELLO emission interval. |
Definition at line 392 of file olsr-header.h.
References ns3::Time::GetSeconds(), and ns3::olsr::SecondsToEmf().
Referenced by OlsrHelloTestCase::DoRun(), and ns3::olsr::RoutingProtocol::SendHello().
Here is the call graph for this function:
Here is the caller graph for this function:| uint8_t ns3::olsr::MessageHeader::Hello::hTime |
HELLO emission interval (coded)
Definition at line 386 of file olsr-header.h.
| std::vector<LinkMessage> ns3::olsr::MessageHeader::Hello::linkMessages |
Link messages container.
Definition at line 408 of file olsr-header.h.
Referenced by ns3::olsr::RoutingProtocol::LinkSensing(), ns3::olsr::RoutingProtocol::PopulateMprSelectorSet(), ns3::olsr::RoutingProtocol::PopulateTwoHopNeighborSet(), ns3::olsr::HelloRegressionTest::ReceivePktProbeA(), ns3::olsr::TcRegressionTest::ReceivePktProbeA(), ns3::olsr::HelloRegressionTest::ReceivePktProbeB(), ns3::olsr::TcRegressionTest::ReceivePktProbeB(), ns3::olsr::TcRegressionTest::ReceivePktProbeC(), and ns3::olsr::RoutingProtocol::SendHello().
| Willingness ns3::olsr::MessageHeader::Hello::willingness |
The willingness of a node to carry and forward traffic for other nodes.
Definition at line 406 of file olsr-header.h.
Referenced by ns3::olsr::RoutingProtocol::LinkSensing(), ns3::olsr::RoutingProtocol::PopulateNeighborSet(), and ns3::olsr::RoutingProtocol::SendHello().