A Discrete-Event Network Simulator
API
dsr-option-header.h
Go to the documentation of this file.
1/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2011 Yufei Cheng
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Yufei Cheng <yfcheng@ittc.ku.edu>
19 *
20 * James P.G. Sterbenz <jpgs@ittc.ku.edu>, director
21 * ResiliNets Research Group https://resilinets.org/
22 * Information and Telecommunication Technology Center (ITTC)
23 * and Department of Electrical Engineering and Computer Science
24 * The University of Kansas Lawrence, KS USA.
25 *
26 * Work supported in part by NSF FIND (Future Internet Design) Program
27 * under grant CNS-0626918 (Postmodern Internet Architecture),
28 * NSF grant CNS-1050226 (Multilayer Network Resilience Analysis and Experimentation on GENI),
29 * US Department of Defense (DoD), and ITTC at The University of Kansas.
30 */
31
32#ifndef DSR_OPTION_HEADER_H
33#define DSR_OPTION_HEADER_H
34
35#include <ostream>
36#include <algorithm>
37
38#include "ns3/header.h"
39#include "ns3/ipv4-address.h"
40#include "ns3/simulator.h"
41
42namespace ns3 {
43
44class Time;
45namespace dsr {
50class DsrOptionHeader : public Header
51{
52public:
57 struct Alignment
58 {
59 uint8_t factor;
60 uint8_t offset;
61 };
66 static TypeId GetTypeId ();
71 virtual TypeId GetInstanceTypeId () const;
79 virtual ~DsrOptionHeader ();
84 void SetType (uint8_t type);
89 uint8_t GetType () const;
94 void SetLength (uint8_t length);
99 uint8_t GetLength () const;
104 virtual void Print (std::ostream &os) const;
109 virtual uint32_t GetSerializedSize () const;
114 virtual void Serialize (Buffer::Iterator start) const;
128 virtual Alignment GetAlignment () const;
129
130private:
134 uint8_t m_type;
138 uint8_t m_length;
143};
144
150{
151public:
156 static TypeId GetTypeId ();
161 virtual TypeId GetInstanceTypeId () const;
169 virtual ~DsrOptionPad1Header ();
174 virtual void Print (std::ostream &os) const;
179 virtual uint32_t GetSerializedSize () const;
184 virtual void Serialize (Buffer::Iterator start) const;
191};
192
198{
199public:
204 static TypeId GetTypeId ();
209 virtual TypeId GetInstanceTypeId () const;
218 virtual ~DsrOptionPadnHeader ();
223 virtual void Print (std::ostream &os) const;
228 virtual uint32_t GetSerializedSize () const;
233 virtual void Serialize (Buffer::Iterator start) const;
240};
241
270{
271public:
276 static TypeId GetTypeId ();
281 virtual TypeId GetInstanceTypeId () const;
289 virtual ~DsrOptionRreqHeader ();
294 void SetNumberAddress (uint8_t n);
304 void SetTarget (Ipv4Address target);
309 void SetNodesAddress (std::vector<Ipv4Address> ipv4Address);
314 std::vector<Ipv4Address> GetNodesAddresses () const;
319 uint32_t GetNodesNumber () const;
324 void AddNodeAddress (Ipv4Address ipv4);
330 void SetNodeAddress (uint8_t index, Ipv4Address addr);
336 Ipv4Address GetNodeAddress (uint8_t index) const;
341 void SetId (uint16_t identification);
346 uint16_t GetId () const;
351 virtual void Print (std::ostream &os) const;
356 virtual uint32_t GetSerializedSize () const;
361 virtual void Serialize (Buffer::Iterator start) const;
372 virtual Alignment GetAlignment () const;
373
374private:
390 typedef std::vector<Ipv4Address> VectorIpv4Address_t;
395};
396
422// The Route Reply header modified for ns-3 implementation
445{
446public:
451 static TypeId GetTypeId ();
456 virtual TypeId GetInstanceTypeId () const;
464 virtual ~DsrOptionRrepHeader ();
469 void SetNumberAddress (uint8_t n);
474 void SetNodesAddress (std::vector<Ipv4Address> ipv4Address);
479 std::vector<Ipv4Address> GetNodesAddress () const;
485 Ipv4Address GetTargetAddress (std::vector<Ipv4Address> ipv4Address) const;
491 void SetNodeAddress (uint8_t index, Ipv4Address addr);
497 Ipv4Address GetNodeAddress (uint8_t index) const;
502 virtual void Print (std::ostream &os) const;
507 virtual uint32_t GetSerializedSize () const;
512 virtual void Serialize (Buffer::Iterator start) const;
523 virtual Alignment GetAlignment () const;
524
525private:
533 typedef std::vector<Ipv4Address> VectorIpv4Address_t;
538};
539
566{
567public:
572 static TypeId GetTypeId ();
577 virtual TypeId GetInstanceTypeId () const;
585 virtual ~DsrOptionSRHeader ();
590 void SetSegmentsLeft (uint8_t segmentsLeft);
595 uint8_t GetSegmentsLeft () const;
600 void SetNumberAddress (uint8_t n);
605 void SetNodesAddress (std::vector<Ipv4Address> ipv4Address);
610 std::vector<Ipv4Address> GetNodesAddress () const;
615 uint8_t GetNodeListSize () const;
621 void SetNodeAddress (uint8_t index, Ipv4Address addr);
627 Ipv4Address GetNodeAddress (uint8_t index) const;
632 void SetSalvage (uint8_t salvage);
637 uint8_t GetSalvage () const;
642 virtual void Print (std::ostream &os) const;
647 virtual uint32_t GetSerializedSize () const;
652 virtual void Serialize (Buffer::Iterator start) const;
663 virtual Alignment GetAlignment () const;
664
670 typedef void (*TracedCallback)(const DsrOptionSRHeader & header);
671
672private:
684 uint8_t m_salvage;
688 typedef std::vector<Ipv4Address> VectorIpv4Address_t;
693};
694
722{
723 NODE_UNREACHABLE = 1, // !< NODE_UNREACHABLE
724 FLOW_STATE_NOT_SUPPORTED = 2, // !< FLOW_STATE_NOT_SUPPORTED
725 OPTION_NOT_SUPPORTED = 3, // !< OPTION_NOT_SUPPORTED
726};
727
729{
730public:
735 static TypeId GetTypeId ();
740 virtual TypeId GetInstanceTypeId () const;
748 virtual ~DsrOptionRerrHeader ();
753 void SetErrorType (uint8_t errorType);
758 uint8_t GetErrorType () const;
763 virtual void SetErrorSrc (Ipv4Address errorSrcAddress);
768 virtual Ipv4Address GetErrorSrc () const;
773 virtual void SetSalvage (uint8_t salvage);
778 virtual uint8_t GetSalvage () const;
783 virtual void SetErrorDst (Ipv4Address errorDstAddress);
788 virtual Ipv4Address GetErrorDst () const;
793 virtual void Print (std::ostream &os) const;
798 virtual uint32_t GetSerializedSize () const;
803 virtual void Serialize (Buffer::Iterator start) const;
814 virtual Alignment GetAlignment () const;
815
816private:
820 uint8_t m_errorType;
824 uint8_t m_salvage;
841};
842
862/*
863 * \brief The type-specific info field
864 * \verbatim
865 | 0 | 1 | 2 | 3 |
866 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
867 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
868 | Unreachable Node Address |
869 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
870 \endverbatim
871 */
872
874{
875public:
880 static TypeId GetTypeId ();
885 virtual TypeId GetInstanceTypeId () const;
898 virtual void SetErrorSrc (Ipv4Address errorSrcAddress);
903 virtual Ipv4Address GetErrorSrc () const;
908 virtual void SetSalvage (uint8_t salvage);
913 virtual uint8_t GetSalvage () const;
918 virtual void SetErrorDst (Ipv4Address errorDstAddress);
923 virtual Ipv4Address GetErrorDst () const;
928 void SetUnreachNode (Ipv4Address unreachNode);
938 void SetOriginalDst (Ipv4Address originalDst);
948 virtual void Print (std::ostream &os) const;
953 virtual uint32_t GetSerializedSize () const;
958 virtual void Serialize (Buffer::Iterator start) const;
969 virtual Alignment GetAlignment () const;
970
971private:
975 uint8_t m_errorType;
979 uint8_t m_salvage;
996};
997
1017/*
1018 * \brief The type-specific info field
1019 * \unsupported option
1020 * \verbatim
1021 | 0 |
1022 0 1 2 3 4 5 6 7
1023 +-+-+-+-+-+-+-+-+
1024 |Unsupported Opt|
1025 +-+-+-+-+-+-+-+-+
1026 \endverbatim
1027 */
1028
1030{
1031public:
1036 static TypeId GetTypeId ();
1041 virtual TypeId GetInstanceTypeId () const;
1054 virtual void SetErrorSrc (Ipv4Address errorSrcAddress);
1059 virtual Ipv4Address GetErrorSrc () const;
1064 virtual void SetSalvage (uint8_t salvage);
1069 virtual uint8_t GetSalvage () const;
1074 virtual void SetErrorDst (Ipv4Address errorDstAddress);
1079 virtual Ipv4Address GetErrorDst () const;
1084 void SetUnsupported (uint16_t optionType);
1089 uint16_t GetUnsupported () const;
1094 virtual void Print (std::ostream &os) const;
1099 virtual uint32_t GetSerializedSize () const;
1104 virtual void Serialize (Buffer::Iterator start) const;
1115 virtual Alignment GetAlignment () const;
1116
1117private:
1125 uint8_t m_salvage;
1137 uint16_t m_unsupport;
1138};
1139
1158{
1159public:
1164 static TypeId GetTypeId ();
1169 virtual TypeId GetInstanceTypeId () const;
1177 virtual ~DsrOptionAckReqHeader ();
1182 void SetAckId (uint16_t identification);
1187 uint16_t GetAckId () const;
1192 virtual void Print (std::ostream &os) const;
1197 virtual uint32_t GetSerializedSize () const;
1202 virtual void Serialize (Buffer::Iterator start) const;
1213 virtual Alignment GetAlignment () const;
1214
1215private:
1220};
1221
1244{
1245public:
1250 static TypeId GetTypeId ();
1255 virtual TypeId GetInstanceTypeId () const;
1263 virtual ~DsrOptionAckHeader ();
1268 void SetAckId (uint16_t identification);
1273 uint16_t GetAckId () const;
1278 void SetRealSrc (Ipv4Address realSrcAddress);
1283 Ipv4Address GetRealSrc () const;
1288 void SetRealDst (Ipv4Address realDstAddress);
1293 Ipv4Address GetRealDst () const;
1298 virtual void Print (std::ostream &os) const;
1303 virtual uint32_t GetSerializedSize () const;
1308 virtual void Serialize (Buffer::Iterator start) const;
1319 virtual Alignment GetAlignment () const;
1320
1321private:
1334};
1335
1336static inline std::ostream & operator<< (std::ostream& os, const DsrOptionSRHeader & sr)
1337{
1338 sr.Print (os);
1339 return os;
1340}
1341
1342} // namespace dsr
1343} // namespace ns3
1344
1345#endif /* DSR_OPTION_HEADER_H */
iterator in a Buffer instance
Definition: buffer.h:99
automatically resized byte buffer
Definition: buffer.h:93
Protocol header serialization and deserialization.
Definition: header.h:43
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:41
Forward calls to a chain of Callback.
a unique identifier for an interface.
Definition: type-id.h:59
Acknowledgement (ACK) Message Format.
void SetAckId(uint16_t identification)
Set the Ack id number.
virtual ~DsrOptionAckHeader()
Destructor.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
uint16_t GetAckId() const
Set the Ack id number.
uint16_t m_identification
identification field
static TypeId GetTypeId()
Get the type identificator.
void SetRealSrc(Ipv4Address realSrcAddress)
Set Error source ip address.
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
void SetRealDst(Ipv4Address realDstAddress)
Set Error source ip address.
virtual void Print(std::ostream &os) const
Print some information about the packet.
Ipv4Address m_realDstAddress
ack destination address
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
Ipv4Address GetRealDst() const
Get Error source ip address.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
virtual uint32_t GetSerializedSize() const
Get the serialized size of the packet.
Ipv4Address m_realSrcAddress
ack source address
Ipv4Address GetRealSrc() const
Get Error source ip address.
Acknowledgement Request (ACK_RREQ) Message Format.
virtual void Print(std::ostream &os) const
Print some information about the packet.
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
void SetAckId(uint16_t identification)
Set the Ack request id number.
uint16_t m_identification
The identification field.
virtual uint32_t GetSerializedSize() const
Get the serialized size of the packet.
uint16_t GetAckId() const
Set the Ack request id number.
virtual ~DsrOptionAckReqHeader()
Destructor.
static TypeId GetTypeId()
Get the type identificator.
Header for Dsr Options.
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
static TypeId GetTypeId()
Get the type identificator.
Buffer m_data
The anonymous data of this option.
uint8_t GetType() const
Get the type of the option.
virtual ~DsrOptionHeader()
Destructor.
void SetType(uint8_t type)
Set the type of the option.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
uint8_t m_length
The option length.
uint8_t m_type
The type of the option.
virtual void Print(std::ostream &os) const
Print some information about the packet.
virtual uint32_t GetSerializedSize() const
Get the serialized size of the packet.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
void SetLength(uint8_t length)
Set the option length.
uint8_t GetLength() const
Get the option length.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
Header of Dsr Option Pad1.
virtual ~DsrOptionPad1Header()
Destructor.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
virtual uint32_t GetSerializedSize() const
Get the serialized size of the packet.
virtual void Print(std::ostream &os) const
Print some information about the packet.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
static TypeId GetTypeId()
Get the type identificator.
Header of Dsr Option Padn.
DsrOptionPadnHeader(uint32_t pad=2)
Constructor.
virtual void Print(std::ostream &os) const
Print some information about the packet.
virtual uint32_t GetSerializedSize() const
Get the serialized size of the packet.
virtual ~DsrOptionPadnHeader()
Destructor.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
static TypeId GetTypeId()
Get the type identificator.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
Header of Dsr Option Route Error.
uint8_t GetErrorType() const
Get the route error type.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
virtual void Print(std::ostream &os) const
Print some information about the packet.
Buffer m_errorData
The anonymous data of this option.
virtual void SetSalvage(uint8_t salvage)
Set the salvage value of the packet.
virtual Ipv4Address GetErrorSrc() const
Get the route error source address.
void SetErrorType(uint8_t errorType)
Set the route error type.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
Ipv4Address m_errorSrcAddress
The error source address.
static TypeId GetTypeId()
Get the type identificator.
uint8_t m_salvage
The salavage field.
virtual ~DsrOptionRerrHeader()
Destructor.
virtual void SetErrorDst(Ipv4Address errorDstAddress)
Set the error destination ip address.
virtual Ipv4Address GetErrorDst() const
Get the error destination ip address.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
Ipv4Address m_errorDstAddress
The error destination address.
virtual uint32_t GetSerializedSize() const
Get the serialized size of the packet.
uint16_t m_errorLength
The specific error message length.
uint8_t m_errorType
The error type or route error option.
virtual uint8_t GetSalvage() const
Get the salvage value of the packet.
virtual void SetErrorSrc(Ipv4Address errorSrcAddress)
Set the route error source address.
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
Route Error (RERR) Unreachable node address option Message Format.
void SetOriginalDst(Ipv4Address originalDst)
Set the unreachable node ip address.
virtual void SetErrorSrc(Ipv4Address errorSrcAddress)
Set the route error source address.
static TypeId GetTypeId()
Get the type identificator.
virtual void Print(std::ostream &os) const
Print some information about the packet.
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
Ipv4Address m_unreachNode
The unreachable node address.
Ipv4Address GetOriginalDst() const
Get the unreachable node ip address.
void SetUnreachNode(Ipv4Address unreachNode)
Set the unreachable node ip address.
virtual void SetErrorDst(Ipv4Address errorDstAddress)
Set the error destination ip address.
virtual Ipv4Address GetErrorSrc() const
Get the route error source address.
virtual ~DsrOptionRerrUnreachHeader()
Destructor.
virtual uint8_t GetSalvage() const
Get the salvage value of the packet.
uint8_t m_errorType
The error type or route error option.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
virtual uint32_t GetSerializedSize() const
Get the serialized size of the packet.
virtual void SetSalvage(uint8_t salvage)
Set the salvage value of the packet.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
Ipv4Address m_errorSrcAddress
The error source address.
uint8_t m_salvage
The salavage field.
Ipv4Address m_originalDst
The original destination address.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
Ipv4Address m_errorDstAddress
The error destination address.
virtual Ipv4Address GetErrorDst() const
Get the error destination ip address.
Ipv4Address GetUnreachNode() const
Get the unreachable node ip address.
Route Error (RERR) Unsupported option Message Format.
virtual uint8_t GetSalvage() const
Get the salvage value of the packet.
virtual ~DsrOptionRerrUnsupportHeader()
Destructor.
static TypeId GetTypeId()
Get the type identificator.
virtual void SetSalvage(uint8_t salvage)
Set the salvage value of the packet.
void SetUnsupported(uint16_t optionType)
Set the unsupported option type value.
uint16_t m_unsupport
The unsupported option.
virtual uint32_t GetSerializedSize() const
Get the serialized size of the packet.
Ipv4Address m_errorDstAddress
The error destination address.
virtual Ipv4Address GetErrorDst() const
Get the error destination ip address.
uint8_t m_errorType
The error type or route error option.
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
uint16_t GetUnsupported() const
Get the unsupported option type value.
virtual void Print(std::ostream &os) const
Print some information about the packet.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
virtual void SetErrorSrc(Ipv4Address errorSrcAddress)
Set the route error source address.
virtual void SetErrorDst(Ipv4Address errorDstAddress)
Set the error destination ip address.
virtual Ipv4Address GetErrorSrc() const
Get the route error source address.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
Ipv4Address m_errorSrcAddress
The error source address.
Route Reply (RREP) Message Format.
Ipv4Address GetTargetAddress(std::vector< Ipv4Address > ipv4Address) const
Get the target node Ip address.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
virtual void Print(std::ostream &os) const
Print some information about the packet.
Ipv4Address m_address
The Ip address to write to when deserialize the packet.
void SetNodeAddress(uint8_t index, Ipv4Address addr)
Set a Node IPv4 Address.
void SetNumberAddress(uint8_t n)
Set the number of ipv4 address.
std::vector< Ipv4Address > GetNodesAddress() const
Get the vector of ipv4 address.
VectorIpv4Address_t m_ipv4Address
The vector of Nodes' IPv4 Address.
Ipv4Address GetNodeAddress(uint8_t index) const
Get a Node IPv4 Address.
std::vector< Ipv4Address > VectorIpv4Address_t
type def A vector of IPv4 Address.
static TypeId GetTypeId()
Get the type identificator.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
virtual ~DsrOptionRrepHeader()
Destructor.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
void SetNodesAddress(std::vector< Ipv4Address > ipv4Address)
Set the vector of ipv4 address.
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
virtual uint32_t GetSerializedSize() const
Get the serialized size of the packet.
Route Request (RREQ) Message Format.
static TypeId GetTypeId()
Get the type identificator.
void SetNodesAddress(std::vector< Ipv4Address > ipv4Address)
Set the vector of ipv4 address.
Ipv4Address m_target
Ipv4 address of target node.
void SetNumberAddress(uint8_t n)
Set the number of ipv4 address.
virtual uint32_t GetSerializedSize() const
Get the serialized size of the packet.
Ipv4Address m_address
Ipv4 address to write when desearizing the packet.
void SetNodeAddress(uint8_t index, Ipv4Address addr)
Set a Node IPv4 Address.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
virtual ~DsrOptionRreqHeader()
Destructor.
Ipv4Address GetNodeAddress(uint8_t index) const
Get a Node IPv4 Address.
std::vector< Ipv4Address > VectorIpv4Address_t
A vector of IPv4 Address.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
uint16_t m_identification
Identifier of the packet.
void SetTarget(Ipv4Address target)
Set the target ipv4 address.
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
virtual void Print(std::ostream &os) const
Print some information about the packet.
Ipv4Address GetTarget()
Get the target ipv4 address.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
std::vector< Ipv4Address > GetNodesAddresses() const
Get the vector of ipv4 address.
VectorIpv4Address_t m_ipv4Address
The vector of Nodes' IPv4 Address.
uint32_t GetNodesNumber() const
Get the number of nodes.
void AddNodeAddress(Ipv4Address ipv4)
Add one node address.
uint16_t GetId() const
Set the request id number.
void SetId(uint16_t identification)
Set the request id number.
Source Route (SR) Message Format.
Ipv4Address GetNodeAddress(uint8_t index) const
Get a Node IPv4 Address.
virtual ~DsrOptionSRHeader()
Destructor.
uint8_t m_segmentsLeft
Number of left segments.
std::vector< Ipv4Address > GetNodesAddress() const
Get the vector of ipv4 address.
Ipv4Address m_address
The ip address header deserilize to.
void SetNumberAddress(uint8_t n)
Set the number of ipv4 address.
static TypeId GetTypeId()
Get the type identificator.
virtual uint32_t GetSerializedSize() const
Get the serialized size of the packet.
void SetSalvage(uint8_t salvage)
Set the salvage value for a packet.
VectorIpv4Address_t m_ipv4Address
The vector of Nodes' IPv4 Address.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
void SetNodeAddress(uint8_t index, Ipv4Address addr)
Set a Node IPv4 Address.
void SetSegmentsLeft(uint8_t segmentsLeft)
Set the number of segments left to send.
std::vector< Ipv4Address > VectorIpv4Address_t
A vector of IPv4 Address.
uint8_t GetSalvage() const
Get the salvage value for a packet.
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
uint8_t GetNodeListSize() const
Get the node list size which is the number of ip address of the route.
uint8_t m_salvage
Number of savlage times for a packet.
virtual void Print(std::ostream &os) const
Print some information about the packet.
void SetNodesAddress(std::vector< Ipv4Address > ipv4Address)
Set the vector of ipv4 address.
uint8_t GetSegmentsLeft() const
Get the number of segments left to send.
ErrorType
Route Error (RERR) Message Format.
@ FLOW_STATE_NOT_SUPPORTED
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition: nstime.h:794
static std::ostream & operator<<(std::ostream &os, const DsrRoutingHeader &dsr)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
def start()
Definition: core.py:1852
represents the alignment requirements of an option header