A Discrete-Event Network Simulator
API
ns3::olsr::MessageHeader::Hna Struct Reference


HNA (Host Network Association) Message Format More...

#include "olsr-header.h"

+ Collaboration diagram for ns3::olsr::MessageHeader::Hna:

Classes

struct  Association
 Association item structure. 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. More...
 
uint32_t GetSerializedSize (void) const
 Returns the expected size of the header. More...
 
void Print (std::ostream &os) const
 This method is used to print the content of a MID message. More...
 
void Serialize (Buffer::Iterator start) const
 This method is used by Packet::AddHeader to store a header into the byte buffer of a packet. More...
 

Public Attributes

std::vector< Associationassociations
 Association container. More...
 

Detailed Description


HNA (Host Network Association) 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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                         Network Address                       |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                             Netmask                           |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                         Network Address                       |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                             Netmask                           |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                              ...                              |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Definition at line 514 of file olsr-header.h.

Member Function Documentation

◆ Deserialize()

uint32_t ns3::olsr::MessageHeader::Hna::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.

Parameters
startan iterator which points to where the header should read from.
messageSizethe message size.
Returns
the number of bytes read.

Definition at line 502 of file olsr-header.cc.

References first::address, IPV4_ADDRESS_SIZE, sample-rng-plot::n, NS_ASSERT, ns3::Buffer::Iterator::ReadNtohU32(), and visualizer.core::start().

+ Here is the call graph for this function:

◆ GetSerializedSize()

uint32_t ns3::olsr::MessageHeader::Hna::GetSerializedSize ( void  ) const

Returns the expected size of the header.

Returns
the expected size of the header.

Definition at line 478 of file olsr-header.cc.

References IPV4_ADDRESS_SIZE.

◆ Print()

void ns3::olsr::MessageHeader::Hna::Print ( std::ostream &  os) const

This method is used to print the content of a MID message.

Parameters
osoutput stream
Todo:

Definition at line 484 of file olsr-header.cc.

◆ Serialize()

void ns3::olsr::MessageHeader::Hna::Serialize ( Buffer::Iterator  start) const

This method is used by Packet::AddHeader to store a header into the byte buffer of a packet.

Parameters
startan iterator which points to where the header should be written.

Definition at line 490 of file olsr-header.cc.

References first::address, sample-rng-plot::n, visualizer.core::start(), and ns3::Buffer::Iterator::WriteHtonU32().

+ Here is the call graph for this function:

Member Data Documentation

◆ associations

std::vector<Association> ns3::olsr::MessageHeader::Hna::associations

The documentation for this struct was generated from the following files: