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 http://wiki.ittc.ku.edu/resilinets
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 
42 namespace ns3 {
43 
44 class Time;
45 namespace dsr {
50 class DsrOptionHeader : public Header
51 {
52 public:
57  struct Alignment
58  {
59  uint8_t factor;
60  uint8_t offset;
61  };
66  static TypeId GetTypeId ();
71  virtual TypeId GetInstanceTypeId () const;
75  DsrOptionHeader ();
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;
105  virtual void Print (std::ostream &os) const;
110  virtual uint32_t GetSerializedSize () const;
115  virtual void Serialize (Buffer::Iterator start) const;
121  virtual uint32_t Deserialize (Buffer::Iterator start);
129  virtual Alignment GetAlignment () const;
130 
131 private:
135  uint8_t m_type;
139  uint8_t m_length;
144 };
145 
151 {
152 public:
157  static TypeId GetTypeId ();
162  virtual TypeId GetInstanceTypeId () const;
170  virtual ~DsrOptionPad1Header ();
176  virtual void Print (std::ostream &os) const;
181  virtual uint32_t GetSerializedSize () const;
186  virtual void Serialize (Buffer::Iterator start) const;
192  virtual uint32_t Deserialize (Buffer::Iterator start);
193 };
194 
200 {
201 public:
206  static TypeId GetTypeId ();
211  virtual TypeId GetInstanceTypeId () const;
216  DsrOptionPadnHeader (uint32_t pad = 2);
220  virtual ~DsrOptionPadnHeader ();
226  virtual void Print (std::ostream &os) const;
231  virtual uint32_t GetSerializedSize () const;
236  virtual void Serialize (Buffer::Iterator start) const;
242  virtual uint32_t Deserialize (Buffer::Iterator start);
243 };
244 
273 {
274 public:
279  static TypeId GetTypeId ();
284  virtual TypeId GetInstanceTypeId () const;
292  virtual ~DsrOptionRreqHeader ();
297  void SetNumberAddress (uint8_t n);
307  void SetTarget (Ipv4Address target);
312  void SetNodesAddress (std::vector<Ipv4Address> ipv4Address);
317  std::vector<Ipv4Address> GetNodesAddresses () const;
322  uint32_t GetNodesNumber () const;
327  void AddNodeAddress (Ipv4Address ipv4);
333  void SetNodeAddress (uint8_t index, Ipv4Address addr);
339  Ipv4Address GetNodeAddress (uint8_t index) const;
344  void SetId (uint16_t identification);
349  uint16_t GetId () const;
355  virtual void Print (std::ostream &os) const;
360  virtual uint32_t GetSerializedSize () const;
365  virtual void Serialize (Buffer::Iterator start) const;
371  virtual uint32_t Deserialize (Buffer::Iterator start);
376  virtual Alignment GetAlignment () const;
377 
378 private:
394  typedef std::vector<Ipv4Address> VectorIpv4Address_t;
399 };
400 
426 // The Route Reply header modified for ns-3 implementation
449 {
450 public:
455  static TypeId GetTypeId ();
460  virtual TypeId GetInstanceTypeId () const;
468  virtual ~DsrOptionRrepHeader ();
473  void SetNumberAddress (uint8_t n);
478  void SetNodesAddress (std::vector<Ipv4Address> ipv4Address);
483  std::vector<Ipv4Address> GetNodesAddress () const;
489  Ipv4Address GetTargetAddress (std::vector<Ipv4Address> ipv4Address) const;
495  void SetNodeAddress (uint8_t index, Ipv4Address addr);
501  Ipv4Address GetNodeAddress (uint8_t index) const;
507  virtual void Print (std::ostream &os) const;
512  virtual uint32_t GetSerializedSize () const;
517  virtual void Serialize (Buffer::Iterator start) const;
523  virtual uint32_t Deserialize (Buffer::Iterator start);
528  virtual Alignment GetAlignment () const;
529 
530 private:
538  typedef std::vector<Ipv4Address> VectorIpv4Address_t;
543 };
544 
571 {
572 public:
577  static TypeId GetTypeId ();
582  virtual TypeId GetInstanceTypeId () const;
590  virtual ~DsrOptionSRHeader ();
595  void SetSegmentsLeft (uint8_t segmentsLeft);
600  uint8_t GetSegmentsLeft () const;
605  void SetNumberAddress (uint8_t n);
610  void SetNodesAddress (std::vector<Ipv4Address> ipv4Address);
615  std::vector<Ipv4Address> GetNodesAddress () const;
620  uint8_t GetNodeListSize () const;
626  void SetNodeAddress (uint8_t index, Ipv4Address addr);
632  Ipv4Address GetNodeAddress (uint8_t index) const;
637  void SetSalvage (uint8_t salvage);
642  uint8_t GetSalvage () const;
648  virtual void Print (std::ostream &os) const;
653  virtual uint32_t GetSerializedSize () const;
658  virtual void Serialize (Buffer::Iterator start) const;
664  virtual uint32_t Deserialize (Buffer::Iterator start);
669  virtual Alignment GetAlignment () const;
670 
676  typedef void (*TracedCallback)(const DsrOptionSRHeader & header);
677 
678 private:
686  uint8_t m_segmentsLeft;
690  uint8_t m_salvage;
694  typedef std::vector<Ipv4Address> VectorIpv4Address_t;
699 };
700 
726 enum ErrorType
728 {
729  NODE_UNREACHABLE = 1, // !< NODE_UNREACHABLE
730  FLOW_STATE_NOT_SUPPORTED = 2, // !< FLOW_STATE_NOT_SUPPORTED
731  OPTION_NOT_SUPPORTED = 3, // !< OPTION_NOT_SUPPORTED
732 };
733 
735 {
736 public:
741  static TypeId GetTypeId ();
746  virtual TypeId GetInstanceTypeId () const;
754  virtual ~DsrOptionRerrHeader ();
759  void SetErrorType (uint8_t errorType);
764  uint8_t GetErrorType () const;
769  virtual void SetErrorSrc (Ipv4Address errorSrcAddress);
774  virtual Ipv4Address GetErrorSrc () const;
779  virtual void SetSalvage (uint8_t salvage);
784  virtual uint8_t GetSalvage () const;
789  virtual void SetErrorDst (Ipv4Address errorDstAddress);
794  virtual Ipv4Address GetErrorDst () const;
800  virtual void Print (std::ostream &os) const;
805  virtual uint32_t GetSerializedSize () const;
810  virtual void Serialize (Buffer::Iterator start) const;
816  virtual uint32_t Deserialize (Buffer::Iterator start);
821  virtual Alignment GetAlignment () const;
822 
823 private:
827  uint8_t m_errorType;
831  uint8_t m_salvage;
835  uint16_t m_errorLength;
848 };
849 
869 /*
870  * \brief The type-specific info field
871  * \verbatim
872  | 0 | 1 | 2 | 3 |
873  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
874  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
875  | Unreachable Node Address |
876  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
877  \endverbatim
878  */
879 
881 {
882 public:
887  static TypeId GetTypeId ();
892  virtual TypeId GetInstanceTypeId () const;
900  virtual ~DsrOptionRerrUnreachHeader ();
905  virtual void SetErrorSrc (Ipv4Address errorSrcAddress);
910  virtual Ipv4Address GetErrorSrc () const;
915  virtual void SetSalvage (uint8_t salvage);
920  virtual uint8_t GetSalvage () const;
925  virtual void SetErrorDst (Ipv4Address errorDstAddress);
930  virtual Ipv4Address GetErrorDst () const;
935  void SetUnreachNode (Ipv4Address unreachNode);
940  Ipv4Address GetUnreachNode () const;
945  void SetOriginalDst (Ipv4Address originalDst);
950  Ipv4Address GetOriginalDst () const;
956  virtual void Print (std::ostream &os) const;
961  virtual uint32_t GetSerializedSize () const;
966  virtual void Serialize (Buffer::Iterator start) const;
972  virtual uint32_t Deserialize (Buffer::Iterator start);
977  virtual Alignment GetAlignment () const;
978 
979 private:
983  uint8_t m_errorType;
987  uint8_t m_salvage;
1004 };
1005 
1025 /*
1026  * \brief The type-specific info field
1027  * \unsupported option
1028  * \verbatim
1029  | 0 |
1030  0 1 2 3 4 5 6 7
1031  +-+-+-+-+-+-+-+-+
1032  |Unsupported Opt|
1033  +-+-+-+-+-+-+-+-+
1034  \endverbatim
1035  */
1036 
1038 {
1039 public:
1044  static TypeId GetTypeId ();
1049  virtual TypeId GetInstanceTypeId () const;
1057  virtual ~DsrOptionRerrUnsupportHeader ();
1062  virtual void SetErrorSrc (Ipv4Address errorSrcAddress);
1067  virtual Ipv4Address GetErrorSrc () const;
1072  virtual void SetSalvage (uint8_t salvage);
1077  virtual uint8_t GetSalvage () const;
1082  virtual void SetErrorDst (Ipv4Address errorDstAddress);
1087  virtual Ipv4Address GetErrorDst () const;
1092  void SetUnsupported (uint16_t optionType);
1097  uint16_t GetUnsupported () const;
1103  virtual void Print (std::ostream &os) const;
1108  virtual uint32_t GetSerializedSize () const;
1113  virtual void Serialize (Buffer::Iterator start) const;
1119  virtual uint32_t Deserialize (Buffer::Iterator start);
1124  virtual Alignment GetAlignment () const;
1125 
1126 private:
1130  uint8_t m_errorType;
1134  uint8_t m_salvage;
1146  uint16_t m_unsupport;
1147 };
1148 
1167 {
1168 public:
1173  static TypeId GetTypeId ();
1178  virtual TypeId GetInstanceTypeId () const;
1186  virtual ~DsrOptionAckReqHeader ();
1191  void SetAckId (uint16_t identification);
1196  uint16_t GetAckId () const;
1202  virtual void Print (std::ostream &os) const;
1207  virtual uint32_t GetSerializedSize () const;
1212  virtual void Serialize (Buffer::Iterator start) const;
1218  virtual uint32_t Deserialize (Buffer::Iterator start);
1223  virtual Alignment GetAlignment () const;
1224 
1225 private:
1230 };
1231 
1254 {
1255 public:
1260  static TypeId GetTypeId ();
1265  virtual TypeId GetInstanceTypeId () const;
1269  DsrOptionAckHeader ();
1273  virtual ~DsrOptionAckHeader ();
1278  void SetAckId (uint16_t identification);
1283  uint16_t GetAckId () const;
1288  void SetRealSrc (Ipv4Address realSrcAddress);
1293  Ipv4Address GetRealSrc () const;
1298  void SetRealDst (Ipv4Address realDstAddress);
1303  Ipv4Address GetRealDst () const;
1309  virtual void Print (std::ostream &os) const;
1314  virtual uint32_t GetSerializedSize () const;
1319  virtual void Serialize (Buffer::Iterator start) const;
1325  virtual uint32_t Deserialize (Buffer::Iterator start);
1330  virtual Alignment GetAlignment () const;
1331 
1332 private:
1345 };
1346 
1347 static inline std::ostream & operator<< (std::ostream& os, const DsrOptionSRHeader & sr)
1348 {
1349  sr.Print (os);
1350  return os;
1351 }
1352 
1353 } // namespace dsr
1354 } // namespace ns3
1355 
1356 #endif /* DSR_OPTION_HEADER_H */
std::vector< Ipv4Address > GetNodesAddresses() const
Get the vector of ipv4 address.
Protocol header serialization and deserialization.
Definition: header.h:42
virtual Ipv4Address GetErrorSrc() const
Get the route error source address.
Ipv4Address GetNodeAddress(uint8_t index) const
Get a Node IPv4 Address.
uint16_t GetAckId() const
Set the Ack id number.
uint8_t m_errorType
The error type or route error option.
void AddNodeAddress(Ipv4Address ipv4)
Add one node address.
virtual void SetErrorSrc(Ipv4Address errorSrcAddress)
Set the route error source address.
virtual Ipv4Address GetErrorDst() const
Get the error destination ip address.
Ipv4Address GetTargetAddress(std::vector< Ipv4Address > ipv4Address) const
Get the target node Ip address.
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
uint16_t m_unsupport
The unsupported option.
virtual Ipv4Address GetErrorDst() const
Get the error destination ip address.
virtual void Print(std::ostream &os) const
Print some information about the packet.
void SetAckId(uint16_t identification)
Set the Ack request id number.
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
uint16_t GetId() const
Set the request id number.
DsrOptionPadnHeader(uint32_t pad=2)
Constructor.
virtual void Print(std::ostream &os) const
Print some information about the packet.
Ipv4Address GetNodeAddress(uint8_t index) const
Get a Node IPv4 Address.
Ipv4Address GetTarget()
Get the target ipv4 address.
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 TypeId GetInstanceTypeId() const
Get the instance type ID.
static TypeId GetTypeId()
Get the type identificator.
std::vector< Ipv4Address > VectorIpv4Address_t
A vector of IPv4 Address.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
automatically resized byte buffer
Definition: buffer.h:92
def start()
Definition: core.py:1858
Forward calls to a chain of Callback.
Introspection did not find any typical Config paths.
Ipv4Address m_unreachNode
The unreachable node address.
virtual uint32_t GetSerializedSize() const
Get the serialized size of the packet.
Ipv4Address m_target
Ipv4 address of target node.
virtual void SetErrorDst(Ipv4Address errorDstAddress)
Set the error destination ip address.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
Ipv4Address m_errorDstAddress
The error destination address.
virtual void SetErrorSrc(Ipv4Address errorSrcAddress)
Set the route error source address.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
void SetSegmentsLeft(uint8_t segmentsLeft)
Set the number of segments left to send.
uint8_t GetErrorType() const
Get the route error type.
virtual ~DsrOptionAckReqHeader()
Destructor.
Ipv4Address m_address
The Ip address to write to when deserialize the packet.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition: nstime.h:743
virtual uint32_t GetSerializedSize() const
Get the serialized size of the packet.
Ipv4Address GetRealSrc() const
Get Error source ip address.
void SetUnsupported(uint16_t optionType)
Set the unsupported option type value.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
Source Route (SR) Message Format.
uint16_t GetUnsupported() const
Get the unsupported option type value.
virtual ~DsrOptionPadnHeader()
Destructor.
virtual void Print(std::ostream &os) const
Print some information about the packet.
virtual Ipv4Address GetErrorSrc() const
Get the route error source address.
Acknowledgement Request (ACK_RREQ) Message Format.
represents the alignment requirements of an option header
void SetNodeAddress(uint8_t index, Ipv4Address addr)
Set a Node IPv4 Address.
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
Ipv4Address m_address
Ipv4 address to write when desearizing the packet.
iterator in a Buffer instance
Definition: buffer.h:98
uint32_t GetNodesNumber() const
Get the number of nodes.
static TypeId GetTypeId()
Get the type identificator.
uint8_t GetLength() const
Get the option length.
virtual void Print(std::ostream &os) const
Print some information about the packet.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
ErrorType
Route Error (RERR) Message Format.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
virtual void SetSalvage(uint8_t salvage)
Set the salvage value of the packet.
uint16_t m_identification
identification field
Ipv4Address m_errorDstAddress
The error destination address.
Route Reply (RREP) Message Format.
uint16_t m_identification
Identifier of the packet.
Ipv4Address m_errorSrcAddress
The error source address.
Ipv4Address GetOriginalDst() const
Get the unreachable node ip address.
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
static TypeId GetTypeId()
Get the type identificator.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
static TypeId GetTypeId()
Get the type identificator.
VectorIpv4Address_t m_ipv4Address
The vector of Nodes&#39; IPv4 Address.
virtual void SetErrorSrc(Ipv4Address errorSrcAddress)
Set the route error source address.
virtual void SetErrorDst(Ipv4Address errorDstAddress)
Set the error destination ip address.
virtual void SetErrorDst(Ipv4Address errorDstAddress)
Set the error destination ip address.
uint8_t m_salvage
The salavage field.
Buffer m_data
The anonymous data of this option.
virtual ~DsrOptionRerrUnsupportHeader()
Destructor.
uint16_t GetAckId() const
Set the Ack request id number.
std::vector< Ipv4Address > VectorIpv4Address_t
A vector of IPv4 Address.
virtual ~DsrOptionSRHeader()
Destructor.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
uint8_t m_salvage
The salavage field.
virtual uint8_t GetSalvage() const
Get the salvage value of the packet.
Ipv4Address GetUnreachNode() const
Get the unreachable node ip address.
static TypeId GetTypeId()
Get the type identificator.
void SetErrorType(uint8_t errorType)
Set the route error type.
void SetNodesAddress(std::vector< Ipv4Address > ipv4Address)
Set the vector of ipv4 address.
virtual uint32_t GetSerializedSize() const
Get the serialized size of 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 void Print(std::ostream &os) const
Print some information about the packet.
std::vector< Ipv4Address > GetNodesAddress() const
Get the vector of ipv4 address.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
virtual ~DsrOptionHeader()
Destructor.
Acknowledgement (ACK) Message Format.
void SetTarget(Ipv4Address target)
Set the target ipv4 address.
void SetRealDst(Ipv4Address realDstAddress)
Set Error source ip address.
static TypeId GetTypeId()
Get the type identificator.
void SetNodeAddress(uint8_t index, Ipv4Address addr)
Set a Node IPv4 Address.
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
Route Error (RERR) Unsupported option Message Format.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ipv4Address m_realSrcAddress
ack source address
uint8_t GetType() const
Get the type of the option.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
uint8_t m_type
The type of the option.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
virtual uint8_t GetSalvage() const
Get the salvage value of the packet.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
virtual void SetSalvage(uint8_t salvage)
Set the salvage value of the packet.
Ipv4Address m_address
The ip address header deserilize to.
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
VectorIpv4Address_t m_ipv4Address
The vector of Nodes&#39; IPv4 Address.
Route Request (RREQ) Message Format.
Ipv4Address GetNodeAddress(uint8_t index) const
Get a Node IPv4 Address.
void SetId(uint16_t identification)
Set the request id number.
uint8_t m_length
The option length.
void SetNodesAddress(std::vector< Ipv4Address > ipv4Address)
Set the vector of ipv4 address.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
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 GetSerializedSize() const
Get the serialized size of the packet.
uint16_t m_identification
The identification field.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
static TypeId GetTypeId()
Get the type identificator.
void SetUnreachNode(Ipv4Address unreachNode)
Set the unreachable node ip address.
virtual Ipv4Address GetErrorDst() const
Get the error destination ip address.
uint8_t m_salvage
The salavage field.
virtual ~DsrOptionAckHeader()
Destructor.
Ipv4Address m_originalDst
The original destination address.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
virtual ~DsrOptionRerrUnreachHeader()
Destructor.
void SetNodesAddress(std::vector< Ipv4Address > ipv4Address)
Set the vector of ipv4 address.
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:40
static TypeId GetTypeId()
Get the type identificator.
static TypeId GetTypeId()
Get the type identificator.
uint8_t m_errorType
The error type or route error option.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
virtual uint8_t GetSalvage() const
Get the salvage value of the packet.
virtual void Print(std::ostream &os) const
Print some information about the packet.
Introspection did not find any typical Config paths.
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
Route Error (RERR) Unreachable node address option Message Format.
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
void SetNumberAddress(uint8_t n)
Set the number of ipv4 address.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
void SetRealSrc(Ipv4Address realSrcAddress)
Set Error source ip address.
void SetType(uint8_t type)
Set the type of the option.
Introspection did not find any typical Config paths.
virtual ~DsrOptionRerrHeader()
Destructor.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
uint8_t m_errorType
The error type or route error option.
void SetNumberAddress(uint8_t n)
Set the number of ipv4 address.
Ipv4Address GetRealDst() const
Get Error source ip address.
Ipv4Address m_realDstAddress
ack destination address
void SetNumberAddress(uint8_t n)
Set the number of ipv4 address.
virtual void Print(std::ostream &os) const
Print some information about the packet.
VectorIpv4Address_t m_ipv4Address
The vector of Nodes&#39; IPv4 Address.
virtual ~DsrOptionRreqHeader()
Destructor.
virtual uint32_t GetSerializedSize() const
Get the serialized size of the packet.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
Ipv4Address m_errorDstAddress
The error destination address.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
virtual ~DsrOptionRrepHeader()
Destructor.
static std::ostream & operator<<(std::ostream &os, const DsrRoutingHeader &dsr)
uint8_t GetSegmentsLeft() const
Get the number of segments left to send.
uint8_t GetNodeListSize() const
Get the node list size which is the number of ip address of the route.
uint8_t m_segmentsLeft
Number of left segments.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
virtual ~DsrOptionPad1Header()
Destructor.
void SetAckId(uint16_t identification)
Set the Ack id number.
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.
void SetLength(uint8_t length)
Set the option length.
Ipv4Address m_errorSrcAddress
The error source address.
Buffer m_errorData
The anonymous data of this option.
void SetNodeAddress(uint8_t index, Ipv4Address addr)
Set a Node IPv4 Address.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
a unique identifier for an interface.
Definition: type-id.h:58
uint16_t m_errorLength
The specific error message length.
void SetSalvage(uint8_t salvage)
Set the salvage value for a packet.
uint8_t GetSalvage() const
Get the salvage value for a packet.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
Ipv4Address m_errorSrcAddress
The error source address.
Introspection did not find any typical Config paths.
std::vector< Ipv4Address > GetNodesAddress() const
Get the vector of ipv4 address.
void SetOriginalDst(Ipv4Address originalDst)
Set the unreachable node ip address.
virtual uint32_t GetSerializedSize() const
Get the serialized size of the packet.
virtual uint32_t GetSerializedSize() const
Get the serialized size of the packet.
std::vector< Ipv4Address > VectorIpv4Address_t
type def A vector of IPv4 Address.
static TypeId GetTypeId()
Get the type identificator.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
virtual void SetSalvage(uint8_t salvage)
Set the salvage value of the packet.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
static TypeId GetTypeId()
Get the type identificator.
virtual Ipv4Address GetErrorSrc() const
Get the route error source address.
uint8_t m_salvage
Number of savlage times for a packet.