A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
olsr-header.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2007 INESC Porto
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
18
*/
19
20
#ifndef OLSR_HEADER_H
21
#define OLSR_HEADER_H
22
23
#include "ns3/header.h"
24
#include "ns3/ipv4-address.h"
25
#include "ns3/nstime.h"
26
27
#include <stdint.h>
28
#include <vector>
29
30
namespace
ns3
31
{
32
namespace
olsr
33
{
34
35
double
EmfToSeconds
(uint8_t emf);
36
uint8_t
SecondsToEmf
(
double
seconds);
37
76
class
PacketHeader
:
public
Header
77
{
78
public
:
79
PacketHeader
();
80
~PacketHeader
()
override
;
81
86
void
SetPacketLength
(uint16_t length)
87
{
88
m_packetLength
= length;
89
}
90
95
uint16_t
GetPacketLength
()
const
96
{
97
return
m_packetLength
;
98
}
99
104
void
SetPacketSequenceNumber
(uint16_t seqnum)
105
{
106
m_packetSequenceNumber
= seqnum;
107
}
108
113
uint16_t
GetPacketSequenceNumber
()
const
114
{
115
return
m_packetSequenceNumber
;
116
}
117
118
private
:
119
uint16_t
m_packetLength
;
120
uint16_t
m_packetSequenceNumber
;
121
122
public
:
127
static
TypeId
GetTypeId
();
128
TypeId
GetInstanceTypeId
()
const override
;
129
void
Print
(std::ostream& os)
const override
;
130
uint32_t
GetSerializedSize
()
const override
;
131
void
Serialize
(
Buffer::Iterator
start
)
const override
;
132
uint32_t
Deserialize
(
Buffer::Iterator
start
)
override
;
133
};
134
158
class
MessageHeader
:
public
Header
159
{
160
public
:
164
enum
MessageType
165
{
166
HELLO_MESSAGE
= 1,
167
TC_MESSAGE
= 2,
168
MID_MESSAGE
= 3,
169
HNA_MESSAGE
= 4,
170
};
171
172
MessageHeader
();
173
~MessageHeader
()
override
;
174
179
void
SetMessageType
(
MessageType
messageType)
180
{
181
m_messageType
= messageType;
182
}
183
188
MessageType
GetMessageType
()
const
189
{
190
return
m_messageType
;
191
}
192
197
void
SetVTime
(
Time
time)
198
{
199
m_vTime
=
SecondsToEmf
(time.
GetSeconds
());
200
}
201
206
Time
GetVTime
()
const
207
{
208
return
Seconds
(
EmfToSeconds
(
m_vTime
));
209
}
210
215
void
SetOriginatorAddress
(
Ipv4Address
originatorAddress)
216
{
217
m_originatorAddress
= originatorAddress;
218
}
219
224
Ipv4Address
GetOriginatorAddress
()
const
225
{
226
return
m_originatorAddress
;
227
}
228
233
void
SetTimeToLive
(uint8_t timeToLive)
234
{
235
m_timeToLive
= timeToLive;
236
}
237
242
uint8_t
GetTimeToLive
()
const
243
{
244
return
m_timeToLive
;
245
}
246
251
void
SetHopCount
(uint8_t hopCount)
252
{
253
m_hopCount
= hopCount;
254
}
255
260
uint8_t
GetHopCount
()
const
261
{
262
return
m_hopCount
;
263
}
264
269
void
SetMessageSequenceNumber
(uint16_t messageSequenceNumber)
270
{
271
m_messageSequenceNumber
= messageSequenceNumber;
272
}
273
278
uint16_t
GetMessageSequenceNumber
()
const
279
{
280
return
m_messageSequenceNumber
;
281
}
282
283
private
:
284
MessageType
m_messageType
;
285
uint8_t
m_vTime
;
286
Ipv4Address
m_originatorAddress
;
287
uint8_t
m_timeToLive
;
288
uint8_t
m_hopCount
;
289
uint16_t
m_messageSequenceNumber
;
290
uint16_t
m_messageSize
;
291
292
public
:
297
static
TypeId
GetTypeId
();
298
TypeId
GetInstanceTypeId
()
const override
;
299
void
Print
(std::ostream& os)
const override
;
300
uint32_t
GetSerializedSize
()
const override
;
301
void
Serialize
(
Buffer::Iterator
start
)
const override
;
302
uint32_t
Deserialize
(
Buffer::Iterator
start
)
override
;
303
320
struct
Mid
321
{
322
std::vector<Ipv4Address>
interfaceAddresses
;
327
void
Print
(std::ostream& os)
const
;
332
uint32_t
GetSerializedSize
()
const
;
340
void
Serialize
(
Buffer::Iterator
start
)
const
;
350
uint32_t
Deserialize
(
Buffer::Iterator
start
, uint32_t messageSize);
351
};
352
383
struct
Hello
384
{
388
struct
LinkMessage
389
{
390
uint8_t
linkCode
;
391
std::vector<Ipv4Address>
392
neighborInterfaceAddresses
;
393
};
394
395
uint8_t
hTime
;
396
401
void
SetHTime
(
Time
time)
402
{
403
this->hTime =
SecondsToEmf
(time.
GetSeconds
());
404
}
405
410
Time
GetHTime
()
const
411
{
412
return
Seconds
(
EmfToSeconds
(this->hTime));
413
}
414
415
uint8_t
willingness
;
417
std::vector<LinkMessage>
linkMessages
;
418
423
void
Print
(std::ostream& os)
const
;
428
uint32_t
GetSerializedSize
()
const
;
436
void
Serialize
(
Buffer::Iterator
start
)
const
;
446
uint32_t
Deserialize
(
Buffer::Iterator
start
, uint32_t messageSize);
447
};
448
467
struct
Tc
468
{
469
std::vector<Ipv4Address>
neighborAddresses
;
470
uint16_t
ansn
;
471
476
void
Print
(std::ostream& os)
const
;
481
uint32_t
GetSerializedSize
()
const
;
489
void
Serialize
(
Buffer::Iterator
start
)
const
;
499
uint32_t
Deserialize
(
Buffer::Iterator
start
, uint32_t messageSize);
500
};
501
522
struct
Hna
523
{
527
struct
Association
528
{
529
Ipv4Address
address
;
530
Ipv4Mask
mask
;
531
};
532
533
std::vector<Association>
associations
;
534
539
void
Print
(std::ostream& os)
const
;
544
uint32_t
GetSerializedSize
()
const
;
552
void
Serialize
(
Buffer::Iterator
start
)
const
;
562
uint32_t
Deserialize
(
Buffer::Iterator
start
, uint32_t messageSize);
563
};
564
565
private
:
569
struct
570
{
571
Mid
mid
;
572
Hello
hello
;
573
Tc
tc
;
574
Hna
hna
;
575
}
m_message
;
576
577
public
:
582
Mid
&
GetMid
()
583
{
584
if
(
m_messageType
== 0)
585
{
586
m_messageType
=
MID_MESSAGE
;
587
}
588
else
589
{
590
NS_ASSERT
(
m_messageType
==
MID_MESSAGE
);
591
}
592
return
m_message
.mid;
593
}
594
599
Hello
&
GetHello
()
600
{
601
if
(
m_messageType
== 0)
602
{
603
m_messageType
=
HELLO_MESSAGE
;
604
}
605
else
606
{
607
NS_ASSERT
(
m_messageType
==
HELLO_MESSAGE
);
608
}
609
return
m_message
.hello;
610
}
611
616
Tc
&
GetTc
()
617
{
618
if
(
m_messageType
== 0)
619
{
620
m_messageType
=
TC_MESSAGE
;
621
}
622
else
623
{
624
NS_ASSERT
(
m_messageType
==
TC_MESSAGE
);
625
}
626
return
m_message
.tc;
627
}
628
633
Hna
&
GetHna
()
634
{
635
if
(
m_messageType
== 0)
636
{
637
m_messageType
=
HNA_MESSAGE
;
638
}
639
else
640
{
641
NS_ASSERT
(
m_messageType
==
HNA_MESSAGE
);
642
}
643
return
m_message
.hna;
644
}
645
650
const
Mid
&
GetMid
()
const
651
{
652
NS_ASSERT
(
m_messageType
==
MID_MESSAGE
);
653
return
m_message
.mid;
654
}
655
660
const
Hello
&
GetHello
()
const
661
{
662
NS_ASSERT
(
m_messageType
==
HELLO_MESSAGE
);
663
return
m_message
.hello;
664
}
665
670
const
Tc
&
GetTc
()
const
671
{
672
NS_ASSERT
(
m_messageType
==
TC_MESSAGE
);
673
return
m_message
.tc;
674
}
675
680
const
Hna
&
GetHna
()
const
681
{
682
NS_ASSERT
(
m_messageType
==
HNA_MESSAGE
);
683
return
m_message
.hna;
684
}
685
};
686
687
static
inline
std::ostream&
688
operator<<
(std::ostream& os,
const
PacketHeader
& packet)
689
{
690
packet.
Print
(os);
691
return
os;
692
}
693
694
static
inline
std::ostream&
695
operator<<
(std::ostream& os,
const
MessageHeader
& message)
696
{
697
message.
Print
(os);
698
return
os;
699
}
700
701
typedef
std::vector<MessageHeader>
MessageList
;
702
703
static
inline
std::ostream&
704
operator<<
(std::ostream& os,
const
MessageList
& messages)
705
{
706
os <<
"["
;
707
for
(std::vector<MessageHeader>::const_iterator messageIter = messages.begin();
708
messageIter != messages.end();
709
messageIter++)
710
{
711
messageIter->Print(os);
712
if
(messageIter + 1 != messages.end())
713
{
714
os <<
", "
;
715
}
716
}
717
os <<
"]"
;
718
return
os;
719
}
720
721
}
// namespace olsr
722
}
// namespace ns3
723
724
#endif
/* OLSR_HEADER_H */
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:100
ns3::Header
Protocol header serialization and deserialization.
Definition:
header.h:44
ns3::Header::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)=0
Deserialize the object from a buffer iterator.
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition:
ipv4-address.h:43
ns3::Ipv4Mask
a class to represent an Ipv4 address mask
Definition:
ipv4-address.h:258
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
ns3::Time::GetSeconds
double GetSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
Definition:
nstime.h:402
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:60
ns3::olsr::MessageHeader
This header can store HELP, TC, MID and HNA messages.
Definition:
olsr-header.h:159
ns3::olsr::MessageHeader::mid
Mid mid
MID message (optional).
Definition:
olsr-header.h:571
ns3::olsr::MessageHeader::~MessageHeader
~MessageHeader() override
Definition:
olsr-header.cc:166
ns3::olsr::MessageHeader::SetOriginatorAddress
void SetOriginatorAddress(Ipv4Address originatorAddress)
Set the originator address.
Definition:
olsr-header.h:215
ns3::olsr::MessageHeader::GetOriginatorAddress
Ipv4Address GetOriginatorAddress() const
Get the originator address.
Definition:
olsr-header.h:224
ns3::olsr::MessageHeader::SetHopCount
void SetHopCount(uint8_t hopCount)
Set the hop count.
Definition:
olsr-header.h:251
ns3::olsr::MessageHeader::Print
void Print(std::ostream &os) const override
Definition:
olsr-header.cc:213
ns3::olsr::MessageHeader::m_messageType
MessageType m_messageType
The message type.
Definition:
olsr-header.h:284
ns3::olsr::MessageHeader::GetHello
Hello & GetHello()
Set the message type to HELLO and return the message content.
Definition:
olsr-header.h:599
ns3::olsr::MessageHeader::GetTimeToLive
uint8_t GetTimeToLive() const
Get the time to live.
Definition:
olsr-header.h:242
ns3::olsr::MessageHeader::GetTc
Tc & GetTc()
Set the message type to TC and return the message content.
Definition:
olsr-header.h:616
ns3::olsr::MessageHeader::GetHna
const Hna & GetHna() const
Get the HNA message.
Definition:
olsr-header.h:680
ns3::olsr::MessageHeader::m_hopCount
uint8_t m_hopCount
The hop count.
Definition:
olsr-header.h:288
ns3::olsr::MessageHeader::hello
Hello hello
HELLO message (optional).
Definition:
olsr-header.h:572
ns3::olsr::MessageHeader::m_originatorAddress
Ipv4Address m_originatorAddress
The originator address.
Definition:
olsr-header.h:286
ns3::olsr::MessageHeader::hna
Hna hna
HNA message (optional).
Definition:
olsr-header.h:574
ns3::olsr::MessageHeader::m_vTime
uint8_t m_vTime
The validity time.
Definition:
olsr-header.h:285
ns3::olsr::MessageHeader::SetMessageSequenceNumber
void SetMessageSequenceNumber(uint16_t messageSequenceNumber)
Set the message sequence number.
Definition:
olsr-header.h:269
ns3::olsr::MessageHeader::m_timeToLive
uint8_t m_timeToLive
The time to live.
Definition:
olsr-header.h:287
ns3::olsr::MessageHeader::tc
Tc tc
TC message (optional).
Definition:
olsr-header.h:573
ns3::olsr::MessageHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition:
olsr-header.cc:181
ns3::olsr::MessageHeader::SetMessageType
void SetMessageType(MessageType messageType)
Set the message type.
Definition:
olsr-header.h:179
ns3::olsr::MessageHeader::GetHopCount
uint8_t GetHopCount() const
Get the hop count.
Definition:
olsr-header.h:260
ns3::olsr::MessageHeader::GetHello
const Hello & GetHello() const
Get the HELLO message.
Definition:
olsr-header.h:660
ns3::olsr::MessageHeader::MessageHeader
MessageHeader()
Definition:
olsr-header.cc:161
ns3::olsr::MessageHeader::GetTc
const Tc & GetTc() const
Get the TC message.
Definition:
olsr-header.h:670
ns3::olsr::MessageHeader::GetMessageType
MessageType GetMessageType() const
Get the message type.
Definition:
olsr-header.h:188
ns3::olsr::MessageHeader::m_message
struct ns3::olsr::MessageHeader::@69 m_message
Structure holding the message content.
ns3::olsr::MessageHeader::GetVTime
Time GetVTime() const
Get the validity time.
Definition:
olsr-header.h:206
ns3::olsr::MessageHeader::GetMid
const Mid & GetMid() const
Get the MID message.
Definition:
olsr-header.h:650
ns3::olsr::MessageHeader::SetTimeToLive
void SetTimeToLive(uint8_t timeToLive)
Set the time to live.
Definition:
olsr-header.h:233
ns3::olsr::MessageHeader::GetHna
Hna & GetHna()
Set the message type to HNA and return the message content.
Definition:
olsr-header.h:633
ns3::olsr::MessageHeader::m_messageSize
uint16_t m_messageSize
The message size.
Definition:
olsr-header.h:290
ns3::olsr::MessageHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition:
olsr-header.cc:187
ns3::olsr::MessageHeader::GetMessageSequenceNumber
uint16_t GetMessageSequenceNumber() const
Get the message sequence number.
Definition:
olsr-header.h:278
ns3::olsr::MessageHeader::GetMid
Mid & GetMid()
Set the message type to MID and return the message content.
Definition:
olsr-header.h:582
ns3::olsr::MessageHeader::SetVTime
void SetVTime(Time time)
Set the validity time.
Definition:
olsr-header.h:197
ns3::olsr::MessageHeader::m_messageSequenceNumber
uint16_t m_messageSequenceNumber
The message sequence number.
Definition:
olsr-header.h:289
ns3::olsr::MessageHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Definition:
olsr-header.cc:258
ns3::olsr::MessageHeader::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
olsr-header.cc:171
ns3::olsr::MessageHeader::MessageType
MessageType
Message type.
Definition:
olsr-header.h:165
ns3::olsr::MessageHeader::TC_MESSAGE
@ TC_MESSAGE
Definition:
olsr-header.h:167
ns3::olsr::MessageHeader::HNA_MESSAGE
@ HNA_MESSAGE
Definition:
olsr-header.h:169
ns3::olsr::MessageHeader::MID_MESSAGE
@ MID_MESSAGE
Definition:
olsr-header.h:168
ns3::olsr::MessageHeader::HELLO_MESSAGE
@ HELLO_MESSAGE
Definition:
olsr-header.h:166
ns3::olsr::PacketHeader
The basic layout of any packet in OLSR is as follows (omitting IP and UDP headers):
Definition:
olsr-header.h:77
ns3::olsr::PacketHeader::PacketHeader
PacketHeader()
Definition:
olsr-header.cc:104
ns3::olsr::PacketHeader::SetPacketSequenceNumber
void SetPacketSequenceNumber(uint16_t seqnum)
Set the packet sequence number.
Definition:
olsr-header.h:104
ns3::olsr::PacketHeader::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
olsr-header.cc:113
ns3::olsr::PacketHeader::~PacketHeader
~PacketHeader() override
Definition:
olsr-header.cc:108
ns3::olsr::PacketHeader::SetPacketLength
void SetPacketLength(uint16_t length)
Set the packet total length.
Definition:
olsr-header.h:86
ns3::olsr::PacketHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition:
olsr-header.cc:129
ns3::olsr::PacketHeader::m_packetLength
uint16_t m_packetLength
The packet length.
Definition:
olsr-header.h:119
ns3::olsr::PacketHeader::GetPacketLength
uint16_t GetPacketLength() const
Get the packet total length.
Definition:
olsr-header.h:95
ns3::olsr::PacketHeader::Print
void Print(std::ostream &os) const override
Definition:
olsr-header.cc:135
ns3::olsr::PacketHeader::m_packetSequenceNumber
uint16_t m_packetSequenceNumber
The packet sequence number.
Definition:
olsr-header.h:120
ns3::olsr::PacketHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Definition:
olsr-header.cc:141
ns3::olsr::PacketHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition:
olsr-header.cc:123
ns3::olsr::PacketHeader::GetPacketSequenceNumber
uint16_t GetPacketSequenceNumber() const
Get the packet sequence number.
Definition:
olsr-header.h:113
NS_ASSERT
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition:
assert.h:66
ns3::Seconds
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition:
nstime.h:1336
ns3::olsr::EmfToSeconds
double EmfToSeconds(uint8_t olsrFormat)
Converts a number of seconds in the mantissa/exponent format to a decimal number.
Definition:
olsr-header.cc:92
ns3::olsr::SecondsToEmf
uint8_t SecondsToEmf(double seconds)
Converts a decimal number of seconds to the mantissa/exponent format.
Definition:
olsr-header.cc:49
ns3::olsr::MessageList
std::vector< MessageHeader > MessageList
Definition:
olsr-header.h:701
ns3::olsr::operator<<
static std::ostream & operator<<(std::ostream &os, const PacketHeader &packet)
Definition:
olsr-header.h:688
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
olsr
Definition:
olsr.py:1
two-ray-to-three-gpp-ch-calibration.start
start
Definition:
two-ray-to-three-gpp-ch-calibration.py:474
ns3::olsr::MessageHeader::Hello::LinkMessage
Link message item.
Definition:
olsr-header.h:389
ns3::olsr::MessageHeader::Hello::LinkMessage::linkCode
uint8_t linkCode
Link code.
Definition:
olsr-header.h:390
ns3::olsr::MessageHeader::Hello::LinkMessage::neighborInterfaceAddresses
std::vector< Ipv4Address > neighborInterfaceAddresses
Neighbor interface address container.
Definition:
olsr-header.h:392
ns3::olsr::MessageHeader::Hello
HELLO Message Format.
Definition:
olsr-header.h:384
ns3::olsr::MessageHeader::Hello::SetHTime
void SetHTime(Time time)
Set the HELLO emission interval.
Definition:
olsr-header.h:401
ns3::olsr::MessageHeader::Hello::Deserialize
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.
Definition:
olsr-header.cc:461
ns3::olsr::MessageHeader::Hello::willingness
uint8_t willingness
The willingness of a node to carry and forward traffic for other nodes.
Definition:
olsr-header.h:415
ns3::olsr::MessageHeader::Hello::Print
void Print(std::ostream &os) const
This method is used to print the content of a Hello message.
Definition:
olsr-header.cc:399
ns3::olsr::MessageHeader::Hello::linkMessages
std::vector< LinkMessage > linkMessages
Link messages container.
Definition:
olsr-header.h:417
ns3::olsr::MessageHeader::Hello::hTime
uint8_t hTime
HELLO emission interval (coded)
Definition:
olsr-header.h:395
ns3::olsr::MessageHeader::Hello::GetSerializedSize
uint32_t GetSerializedSize() const
Returns the expected size of the header.
Definition:
olsr-header.cc:384
ns3::olsr::MessageHeader::Hello::GetHTime
Time GetHTime() const
Get the HELLO emission interval.
Definition:
olsr-header.h:410
ns3::olsr::MessageHeader::Hello::Serialize
void Serialize(Buffer::Iterator start) const
This method is used by Packet::AddHeader to store a header into the byte buffer of a packet.
Definition:
olsr-header.cc:427
ns3::olsr::MessageHeader::Hna::Association
Association item structure.
Definition:
olsr-header.h:528
ns3::olsr::MessageHeader::Hna::Association::mask
Ipv4Mask mask
IPv4 netmask.
Definition:
olsr-header.h:530
ns3::olsr::MessageHeader::Hna::Association::address
Ipv4Address address
IPv4 Address.
Definition:
olsr-header.h:529
ns3::olsr::MessageHeader::Hna
HNA (Host Network Association) Message Format.
Definition:
olsr-header.h:523
ns3::olsr::MessageHeader::Hna::Serialize
void Serialize(Buffer::Iterator start) const
This method is used by Packet::AddHeader to store a header into the byte buffer of a packet.
Definition:
olsr-header.cc:592
ns3::olsr::MessageHeader::Hna::Deserialize
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.
Definition:
olsr-header.cc:604
ns3::olsr::MessageHeader::Hna::associations
std::vector< Association > associations
Association container.
Definition:
olsr-header.h:533
ns3::olsr::MessageHeader::Hna::Print
void Print(std::ostream &os) const
This method is used to print the content of a Hna message.
Definition:
olsr-header.cc:572
ns3::olsr::MessageHeader::Hna::GetSerializedSize
uint32_t GetSerializedSize() const
Returns the expected size of the header.
Definition:
olsr-header.cc:566
ns3::olsr::MessageHeader::Mid
MID Message Format.
Definition:
olsr-header.h:321
ns3::olsr::MessageHeader::Mid::GetSerializedSize
uint32_t GetSerializedSize() const
Returns the expected size of the header.
Definition:
olsr-header.cc:325
ns3::olsr::MessageHeader::Mid::interfaceAddresses
std::vector< Ipv4Address > interfaceAddresses
Interface Address container.
Definition:
olsr-header.h:322
ns3::olsr::MessageHeader::Mid::Serialize
void Serialize(Buffer::Iterator start) const
This method is used by Packet::AddHeader to store a header into the byte buffer of a packet.
Definition:
olsr-header.cc:351
ns3::olsr::MessageHeader::Mid::Print
void Print(std::ostream &os) const
This method is used to print the content of a MID message.
Definition:
olsr-header.cc:331
ns3::olsr::MessageHeader::Mid::Deserialize
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.
Definition:
olsr-header.cc:364
ns3::olsr::MessageHeader::Tc
TC Message Format.
Definition:
olsr-header.h:468
ns3::olsr::MessageHeader::Tc::ansn
uint16_t ansn
Advertised Neighbor Sequence Number.
Definition:
olsr-header.h:470
ns3::olsr::MessageHeader::Tc::neighborAddresses
std::vector< Ipv4Address > neighborAddresses
Neighbor address container.
Definition:
olsr-header.h:469
ns3::olsr::MessageHeader::Tc::Serialize
void Serialize(Buffer::Iterator start) const
This method is used by Packet::AddHeader to store a header into the byte buffer of a packet.
Definition:
olsr-header.cc:526
ns3::olsr::MessageHeader::Tc::GetSerializedSize
uint32_t GetSerializedSize() const
Returns the expected size of the header.
Definition:
olsr-header.cc:499
ns3::olsr::MessageHeader::Tc::Print
void Print(std::ostream &os) const
This method is used to print the content of a Tc message.
Definition:
olsr-header.cc:505
ns3::olsr::MessageHeader::Tc::Deserialize
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.
Definition:
olsr-header.cc:542
src
olsr
model
olsr-header.h
Generated on Fri Mar 31 2023 13:30:49 for ns-3 by
1.9.1