A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
icmpv6-header.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2007-2009 Strasbourg University
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: Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
19  * Mehdi Benamor <benamor.mehdi@ensi.rnu.tn>
20  * David Gross <gdavid.devel@gmail.com>
21  */
22 
23 #ifndef ICMPV6_HEADER_H
24 #define ICMPV6_HEADER_H
25 
26 #include "ns3/header.h"
27 #include "ns3/ipv6-address.h"
28 #include "ns3/packet.h"
29 
30 namespace ns3
31 {
32 
37 class Icmpv6Header : public Header
38 {
39 public:
44  enum Type_e
45  {
72  };
73 
79  {
85  };
86 
92  {
98  };
99 
105  {
108  };
109 
115  {
119  };
120 
125  static TypeId GetTypeId ();
126 
131  virtual TypeId GetInstanceTypeId () const;
132 
136  Icmpv6Header ();
137 
141  virtual ~Icmpv6Header ();
142 
147  uint8_t GetType () const;
148 
153  void SetType (uint8_t type);
154 
159  uint8_t GetCode () const;
160 
165  void SetCode (uint8_t code);
166 
171  uint16_t GetChecksum () const;
172 
177  void SetChecksum (uint16_t checksum);
178 
183  virtual void Print (std::ostream& os) const;
184 
189  virtual uint32_t GetSerializedSize () const;
190 
195  virtual void Serialize (Buffer::Iterator start) const;
196 
202  virtual uint32_t Deserialize (Buffer::Iterator start);
203 
212  void CalculatePseudoHeaderChecksum (Ipv6Address src, Ipv6Address dst, uint16_t length, uint8_t protocol);
213 
214 protected:
219 
223  uint16_t m_checksum;
224 
225 private:
229  uint8_t m_type;
230 
234  uint8_t m_code;
235 };
236 
242 {
243 public:
248  static TypeId GetTypeId ();
249 
254  virtual TypeId GetInstanceTypeId () const;
255 
260 
264  virtual ~Icmpv6OptionHeader ();
265 
270  uint8_t GetType () const;
271 
276  void SetType (uint8_t type);
277 
282  uint8_t GetLength () const;
283 
288  void SetLength (uint8_t len);
289 
294  virtual void Print (std::ostream& os) const;
295 
300  virtual uint32_t GetSerializedSize () const;
301 
306  virtual void Serialize (Buffer::Iterator start) const;
307 
313  virtual uint32_t Deserialize (Buffer::Iterator start);
314 
315 private:
319  uint8_t m_type;
320 
324  uint8_t m_len;
325 };
326 
331 class Icmpv6NS : public Icmpv6Header
332 {
333 public:
338  Icmpv6NS (Ipv6Address target);
339 
343  Icmpv6NS ();
344 
348  virtual ~Icmpv6NS ();
349 
354  static TypeId GetTypeId ();
355 
360  virtual TypeId GetInstanceTypeId () const;
361 
366  uint32_t GetReserved () const;
367 
372  void SetReserved (uint32_t reserved);
373 
378  Ipv6Address GetIpv6Target () const;
379 
384  void SetIpv6Target (Ipv6Address target);
385 
390  virtual void Print (std::ostream& os) const;
391 
396  virtual uint32_t GetSerializedSize () const;
397 
402  virtual void Serialize (Buffer::Iterator start) const;
403 
409  virtual uint32_t Deserialize (Buffer::Iterator start);
410 
411 private:
412 
416  uint32_t m_reserved;
417 
422 };
423 
428 class Icmpv6NA : public Icmpv6Header
429 {
430 public:
434  Icmpv6NA ();
435 
439  virtual ~Icmpv6NA ();
440 
445  static TypeId GetTypeId ();
446 
451  virtual TypeId GetInstanceTypeId () const;
452 
457  uint32_t GetReserved () const;
458 
463  void SetReserved (uint32_t reserved);
464 
469  Ipv6Address GetIpv6Target () const;
470 
475  void SetIpv6Target (Ipv6Address target);
476 
481  bool GetFlagR () const;
482 
487  void SetFlagR (bool r);
488 
493  bool GetFlagS () const;
494 
499  void SetFlagS (bool s);
500 
505  bool GetFlagO () const;
506 
511  void SetFlagO (bool o);
512 
517  virtual void Print (std::ostream& os) const;
518 
523  virtual uint32_t GetSerializedSize () const;
524 
529  virtual void Serialize (Buffer::Iterator start) const;
530 
536  virtual uint32_t Deserialize (Buffer::Iterator start);
537 
538 private:
542  bool m_flagR;
543 
547  bool m_flagS;
548 
552  bool m_flagO;
553 
557  uint32_t m_reserved;
558 
563 };
564 
569 class Icmpv6RA : public Icmpv6Header
570 {
571 public:
575  Icmpv6RA ();
576 
580  virtual ~Icmpv6RA ();
581 
586  static TypeId GetTypeId ();
587 
592  virtual TypeId GetInstanceTypeId () const;
593 
598  void SetCurHopLimit (uint8_t m);
599 
604  uint8_t GetCurHopLimit () const;
605 
610  void SetLifeTime (uint16_t l);
611 
616  uint16_t GetLifeTime () const;
617 
622  void SetReachableTime (uint32_t r);
623 
628  uint32_t GetReachableTime () const;
629 
634  void SetRetransmissionTime (uint32_t r);
635 
640  uint32_t GetRetransmissionTime () const;
641 
646  bool GetFlagM () const;
647 
652  void SetFlagM (bool m);
653 
658  bool GetFlagO () const;
659 
664  void SetFlagO (bool o);
665 
670  bool GetFlagH () const;
671 
676  void SetFlagH (bool h);
677 
682  virtual void Print (std::ostream& os) const;
683 
688  uint8_t GetFlags () const;
689 
694  void SetFlags (uint8_t f);
695 
700  virtual uint32_t GetSerializedSize () const;
701 
706  virtual void Serialize (Buffer::Iterator start) const;
707 
713  virtual uint32_t Deserialize (Buffer::Iterator start);
714 
715 private:
719  bool m_flagM;
720 
724  bool m_flagO;
725 
729  bool m_flagH;
730 
734  uint8_t m_flags;
735 
739  uint16_t m_LifeTime;
740 
744  uint32_t m_ReachableTime;
745 
750 
754  uint8_t m_curHopLimit;
755 };
756 
761 class Icmpv6RS : public Icmpv6Header
762 {
763 public:
767  Icmpv6RS ();
768 
772  virtual ~Icmpv6RS ();
773 
778  static TypeId GetTypeId ();
779 
784  virtual TypeId GetInstanceTypeId () const;
785 
790  uint32_t GetReserved () const;
791 
796  void SetReserved (uint32_t reserved);
797 
802  virtual void Print (std::ostream& os) const;
803 
808  virtual uint32_t GetSerializedSize () const;
809 
814  virtual void Serialize (Buffer::Iterator start) const;
815 
821  virtual uint32_t Deserialize (Buffer::Iterator start);
822 
823 private:
827  uint32_t m_reserved;
828 };
829 
835 {
836 public:
841 
845  virtual ~Icmpv6Redirection ();
846 
851  static TypeId GetTypeId ();
852 
857  virtual TypeId GetInstanceTypeId () const;
858 
863  Ipv6Address GetTarget () const;
864 
869  void SetTarget (Ipv6Address target);
870 
875  Ipv6Address GetDestination () const;
876 
881  void SetDestination (Ipv6Address destination);
882 
887  virtual void Print (std::ostream& os) const;
888 
893  virtual uint32_t GetSerializedSize () const;
894 
899  virtual void Serialize (Buffer::Iterator start) const;
900 
906  virtual uint32_t Deserialize (Buffer::Iterator start);
907 
912  uint32_t GetReserved () const;
913 
918  void SetReserved (uint32_t reserved);
919 
920 private:
925 
930 
934  uint32_t m_reserved;
935 };
936 
941 class Icmpv6Echo : public Icmpv6Header
942 {
943 public:
948  static TypeId GetTypeId ();
949 
954  virtual TypeId GetInstanceTypeId () const;
955 
959  Icmpv6Echo ();
960 
965  Icmpv6Echo (bool request);
966 
970  virtual ~Icmpv6Echo ();
971 
976  uint16_t GetId () const;
977 
982  void SetId (uint16_t id);
983 
988  uint16_t GetSeq () const;
989 
994  void SetSeq (uint16_t seq);
995 
1000  virtual void Print (std::ostream& os) const;
1001 
1006  virtual uint32_t GetSerializedSize () const;
1007 
1012  virtual void Serialize (Buffer::Iterator start) const;
1013 
1019  virtual uint32_t Deserialize (Buffer::Iterator start);
1020 
1021 private:
1025  uint16_t m_id;
1026 
1030  uint16_t m_seq;
1031 };
1032 
1038 {
1039 public:
1044 
1048  virtual ~Icmpv6DestinationUnreachable ();
1049 
1054  static TypeId GetTypeId ();
1055 
1060  virtual TypeId GetInstanceTypeId () const;
1061 
1066  Ptr<Packet> GetPacket () const;
1067 
1072  void SetPacket (Ptr<Packet> p);
1073 
1078  virtual void Print (std::ostream& os) const;
1079 
1084  virtual uint32_t GetSerializedSize () const;
1085 
1090  virtual void Serialize (Buffer::Iterator start) const;
1091 
1097  virtual uint32_t Deserialize (Buffer::Iterator start);
1098 
1099 private:
1104 };
1105 
1111 {
1112 public:
1116  Icmpv6TooBig ();
1117 
1121  virtual ~Icmpv6TooBig ();
1122 
1127  static TypeId GetTypeId ();
1128 
1133  virtual TypeId GetInstanceTypeId () const;
1134 
1139  Ptr<Packet> GetPacket () const;
1140 
1145  void SetPacket (Ptr<Packet> p);
1146 
1151  uint32_t GetMtu () const;
1152 
1157  void SetMtu (uint32_t mtu);
1158 
1163  virtual void Print (std::ostream& os) const;
1164 
1169  virtual uint32_t GetSerializedSize () const;
1170 
1175  virtual void Serialize (Buffer::Iterator start) const;
1176 
1182  virtual uint32_t Deserialize (Buffer::Iterator start);
1183 
1184 private:
1185 
1190 
1194  uint32_t m_mtu;
1195 };
1196 
1202 {
1203 public:
1207  Icmpv6TimeExceeded ();
1208 
1212  virtual ~Icmpv6TimeExceeded ();
1213 
1218  static TypeId GetTypeId ();
1219 
1224  virtual TypeId GetInstanceTypeId () const;
1225 
1230  Ptr<Packet> GetPacket () const;
1231 
1236  void SetPacket (Ptr<Packet> p);
1237 
1242  virtual void Print (std::ostream& os) const;
1243 
1248  virtual uint32_t GetSerializedSize () const;
1249 
1254  virtual void Serialize (Buffer::Iterator start) const;
1255 
1261  virtual uint32_t Deserialize (Buffer::Iterator start);
1262 
1263 private:
1264 
1269 };
1270 
1276 {
1277 public:
1282 
1286  virtual ~Icmpv6ParameterError ();
1287 
1292  static TypeId GetTypeId ();
1293 
1298  virtual TypeId GetInstanceTypeId () const;
1299 
1304  Ptr<Packet> GetPacket () const;
1305 
1310  void SetPacket (Ptr<Packet> p);
1311 
1316  uint32_t GetPtr () const;
1317 
1322  void SetPtr (uint32_t ptr);
1323 
1328  virtual void Print (std::ostream& os) const;
1329 
1334  virtual uint32_t GetSerializedSize () const;
1335 
1340  virtual void Serialize (Buffer::Iterator start) const;
1341 
1347  virtual uint32_t Deserialize (Buffer::Iterator start);
1348 
1349 private:
1350 
1355 
1359  uint32_t m_ptr;
1360 };
1361 
1367 {
1368 public:
1372  Icmpv6OptionMtu ();
1373 
1378  Icmpv6OptionMtu (uint32_t mtu);
1379 
1383  virtual ~Icmpv6OptionMtu ();
1384 
1389  static TypeId GetTypeId ();
1390 
1395  virtual TypeId GetInstanceTypeId () const;
1396 
1401  uint16_t GetReserved () const;
1402 
1407  void SetReserved (uint16_t reserved);
1408 
1413  uint32_t GetMtu () const;
1414 
1419  void SetMtu (uint32_t mtu);
1420 
1425  virtual void Print (std::ostream& os) const;
1426 
1431  virtual uint32_t GetSerializedSize () const;
1432 
1437  virtual void Serialize (Buffer::Iterator start) const;
1438 
1444  virtual uint32_t Deserialize (Buffer::Iterator start);
1445 
1446 private:
1450  uint16_t m_reserved;
1451 
1455  uint32_t m_mtu;
1456 };
1457 
1463 {
1464 public:
1469 
1475  Icmpv6OptionPrefixInformation (Ipv6Address network, uint8_t prefixlen);
1476 
1480  virtual ~Icmpv6OptionPrefixInformation ();
1481 
1486  static TypeId GetTypeId ();
1487 
1492  virtual TypeId GetInstanceTypeId () const;
1493 
1498  uint8_t GetPrefixLength () const;
1499 
1504  void SetPrefixLength (uint8_t prefixLength);
1505 
1510  uint8_t GetFlags () const;
1511 
1516  void SetFlags (uint8_t flags);
1517 
1522  uint32_t GetValidTime () const;
1523 
1528  void SetValidTime (uint32_t validTime);
1529 
1534  uint32_t GetPreferredTime () const;
1535 
1540  void SetPreferredTime (uint32_t preferredTime);
1541 
1546  uint32_t GetReserved () const;
1547 
1552  void SetReserved (uint32_t reserved);
1553 
1558  Ipv6Address GetPrefix () const;
1559 
1564  void SetPrefix (Ipv6Address prefix);
1565 
1570  virtual void Print (std::ostream& os) const;
1571 
1576  virtual uint32_t GetSerializedSize () const;
1577 
1582  virtual void Serialize (Buffer::Iterator start) const;
1583 
1589  virtual uint32_t Deserialize (Buffer::Iterator start);
1590 
1591 private:
1596 
1601 
1605  uint8_t m_flags;
1606 
1610  uint32_t m_validTime;
1611 
1616 
1620  uint32_t m_reserved;
1621 };
1622 
1628 {
1629 public:
1634  Icmpv6OptionLinkLayerAddress (bool source);
1635 
1640  static TypeId GetTypeId ();
1641 
1646  virtual TypeId GetInstanceTypeId (void) const;
1647 
1653  Icmpv6OptionLinkLayerAddress (bool source, Address addr);
1654 
1659 
1663  virtual ~Icmpv6OptionLinkLayerAddress ();
1664 
1669  Address GetAddress () const;
1670 
1675  void SetAddress (Address addr);
1676 
1681  virtual void Print (std::ostream& os) const;
1682 
1687  virtual uint32_t GetSerializedSize () const;
1688 
1693  virtual void Serialize (Buffer::Iterator start) const;
1694 
1700  virtual uint32_t Deserialize (Buffer::Iterator start);
1701 
1702 private:
1707 };
1708 
1714 {
1715 public:
1720  static TypeId GetTypeId ();
1721 
1726  virtual TypeId GetInstanceTypeId () const;
1727 
1732 
1736  virtual ~Icmpv6OptionRedirected ();
1737 
1742  Ptr<Packet> GetPacket () const;
1743 
1748  void SetPacket (Ptr<Packet> packet);
1749 
1754  virtual void Print (std::ostream& os) const;
1755 
1760  virtual uint32_t GetSerializedSize () const;
1761 
1766  virtual void Serialize (Buffer::Iterator start) const;
1767 
1773  virtual uint32_t Deserialize (Buffer::Iterator start);
1774 
1775 private:
1780 };
1781 
1782 } /* namespace ns3 */
1783 
1784 #endif /* ICMPV6_HEADER_H */
1785 
Protocol header serialization and deserialization.
Definition: header.h:42
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
virtual void Print(std::ostream &os) const
Print informations.
uint32_t GetReserved() const
Get the reserved field.
Icmpv6OptionHeader()
Constructor.
Ipv6Address m_destination
IPv6 destination address.
void SetLength(uint8_t len)
Set the length of the option.
uint8_t GetLength() const
Get the length of the option in 8 bytes unit.
uint32_t m_reserved
Reserved value.
void SetPacket(Ptr< Packet > packet)
Set the redirected packet.
void CalculatePseudoHeaderChecksum(Ipv6Address src, Ipv6Address dst, uint16_t length, uint8_t protocol)
Calculate pseudo header checksum for IPv6.
uint16_t GetReserved() const
Get the reserved field.
Doxygen introspection did not find any typical Config paths.
uint16_t GetId() const
Get the ID of the packet.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
uint32_t m_RetransmissionTimer
The retransmission timer.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
uint32_t GetPtr() const
Get the pointer field.
static TypeId GetTypeId()
Get the UID of this class.
virtual void Print(std::ostream &os) const
Print informations.
Doxygen introspection did not find any typical Config paths.
uint32_t GetReserved() const
Get the reserved field.
Doxygen introspection did not find any typical Config paths.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
Doxygen introspection did not find any typical Config paths.
static TypeId GetTypeId()
Get the UID of this class.
Ipv6Address GetPrefix() const
Get the IPv6 prefix.
uint8_t m_type
The type.
bool m_flagR
The R flag.
virtual uint32_t GetSerializedSize() const
Get the serialized size.
virtual void Print(std::ostream &os) const
Print informations.
virtual uint32_t GetSerializedSize() const
Get the serialized size.
Ptr< Packet > GetPacket() const
Get the incorrect packet.
Ptr< Packet > m_packet
The incorrect packet.
Ptr< Packet > m_packet
The incorrect Packet.
Icmpv6OptionMtu()
Constructor.
void SetReserved(uint32_t reserved)
Set the reserved field (normally it will be 0x00000000).
Ipv6Address GetTarget() const
Get the IPv6 target address.
uint32_t m_validTime
The valid time.
virtual uint32_t GetSerializedSize() const
Get the serialized size.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
void SetReserved(uint32_t reserved)
Set the reserved field.
Icmpv6NS()
Constructor.
virtual ~Icmpv6TimeExceeded()
Destructor.
Doxygen introspection did not find any typical Config paths.
Icmpv6TimeExceeded()
Constructor.
Doxygen introspection did not find any typical Config paths.
virtual void Print(std::ostream &os) const
Print informations.
Doxygen introspection did not find any typical Config paths.
uint8_t GetType() const
Get the type field.
void SetType(uint8_t type)
Set the type of the option.
uint32_t m_preferredTime
The preferred time.
uint16_t m_reserved
The reserved value.
uint8_t GetType() const
Get the type of the option.
static TypeId GetTypeId()
Get the UID of this class.
uint32_t m_reserved
The reserved value.
bool GetFlagH() const
Get the H flag.
void SetPtr(uint32_t ptr)
Set the pointer field.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
Ptr< Packet > m_packet
The redirected packet.
bool GetFlagS() const
Get the S flag.
ErrorParameterError_e
ICMPv6 error code : Parameter Error.
uint8_t m_len
The length.
void SetRetransmissionTime(uint32_t r)
Set the node Retransmission time (Neighbor Discovery).
static TypeId GetTypeId()
Get the UID of this class.
Ipv6Address m_target
IPv6 target address.
bool m_flagS
The O flag.
static TypeId GetTypeId()
Get the UID of this class.
Ipv6Address m_target
The IPv6 target address.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
virtual ~Icmpv6OptionHeader()
Destructor.
uint16_t m_id
ID of the packet (to distinguish response between many ping program).
uint8_t GetCurHopLimit() const
Get the IPv6 maximum number of jumps.
static TypeId GetTypeId()
Get the UID of this class.
void SetMtu(uint32_t mtu)
Set the MTU.
void SetPacket(Ptr< Packet > p)
Set the incorrect packet.
uint8_t m_code
The code.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
void SetTarget(Ipv6Address target)
Set the IPv6 target address.
static TypeId GetTypeId()
Get the UID of this class.
virtual uint32_t GetSerializedSize() const
Get the serialized size.
Icmpv6NA()
Constructor.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
virtual uint32_t GetSerializedSize() const
Get the serialized size.
Icmpv6Echo()
Default constructor.
uint16_t GetLifeTime() const
Get the node Life time (Neighbor Discovery).
Icmpv6ParameterError()
Constructor.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
static TypeId GetTypeId()
Get the UID of this class.
static TypeId GetTypeId()
Get the UID of this class.
iterator in a Buffer instance
Definition: buffer.h:98
a polymophic address class
Definition: address.h:86
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
void SetPacket(Ptr< Packet > p)
Set the incorrect packet.
virtual uint32_t GetSerializedSize() const
Get the serialized size.
virtual ~Icmpv6OptionPrefixInformation()
Destructor.
void SetLifeTime(uint16_t l)
Set the node Life time (Neighbor Discovery).
virtual void Print(std::ostream &os) const
Print informations.
void SetValidTime(uint32_t validTime)
Set the valid time of the information.
uint8_t m_type
The type.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
bool GetFlagR() const
Get the R flag.
void SetIpv6Target(Ipv6Address target)
Set the IPv6 target field.
Doxygen introspection did not find any typical Config paths.
virtual ~Icmpv6ParameterError()
Destructor.
void SetType(uint8_t type)
Set the type.
void SetCurHopLimit(uint8_t m)
Set the IPv6 maximum number of jumps.
virtual ~Icmpv6NA()
Destructor.
void SetPreferredTime(uint32_t preferredTime)
Set the preferred time of the information.
Ipv6Address GetIpv6Target() const
Get the IPv6 target field.
Doxygen introspection did not find any typical Config paths.
Definition: icmpv6-header.h:37
uint32_t m_reserved
The reserved value.
uint16_t m_checksum
The checksum.
Ptr< Packet > GetPacket() const
Get the incorrect packet.
uint32_t GetReserved() const
Get the reserved field.
void SetIpv6Target(Ipv6Address target)
Set the IPv6 target field.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
virtual uint32_t GetSerializedSize() const
Get the serialized size.
void SetPrefixLength(uint8_t prefixLength)
Set the prefix length.
Doxygen introspection did not find any typical Config paths.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
uint32_t GetMtu() const
Get the MTU.
Ptr< SampleEmitter > s
virtual uint32_t GetSerializedSize() const
Get the serialized size.
Ipv6Address m_target
The IPv6 target address.
Ptr< Packet > m_packet
the incorrect packet.
virtual void Print(std::ostream &os) const
Print informations.
uint32_t m_reserved
The reserved value.
bool m_flagH
The H flag.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
uint32_t m_reserved
The reserved field.
virtual void Print(std::ostream &os) const
Print informations.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
uint32_t GetPreferredTime() const
Get the preferred time of the information.
Icmpv6RS()
Constructor.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
virtual void Print(std::ostream &os) const
Print informations.
uint8_t m_curHopLimit
The max jumps.
virtual void Print(std::ostream &os) const
Print informations.
ErrorDestinationUnreachable_e
ICMPv6 error code : Destination Unreachable.
Definition: icmpv6-header.h:91
Doxygen introspection did not find any typical Config paths.
Ptr< Packet > GetPacket() const
Get the incorrect packet.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
bool GetFlagO() const
Get the O flag.
uint32_t GetReserved() const
Get the reserved field.
static TypeId GetTypeId()
Get the UID of this class.
uint32_t m_mtu
The MTU value.
void SetPacket(Ptr< Packet > p)
Set the incorrect packet.
bool m_calcChecksum
Checksum enable or not.
bool m_flagO
The O flag.
bool GetFlagO() const
Get the O flag.
virtual void Print(std::ostream &os) const
Print informations.
void SetReserved(uint16_t reserved)
Set the reserved field.
static TypeId GetTypeId()
Get the UID of this class.
void SetReserved(uint32_t reserved)
Set the reserved field.
uint16_t GetSeq() const
Get the sequence number.
void SetReserved(uint32_t reserved)
Set the reserved field.
virtual uint32_t GetSerializedSize() const
Get the serialized size.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
virtual void Print(std::ostream &os) const
Print informations.
uint8_t m_prefixLength
The length of the prefix.
uint8_t m_flags
The flags field value.
virtual ~Icmpv6OptionMtu()
Destructor.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
uint8_t GetFlags() const
Get the flags.
virtual ~Icmpv6RS()
Destructor.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
void SetChecksum(uint16_t checksum)
Set the checksum.
void SetCode(uint8_t code)
Set the code field.
Doxygen introspection did not find any typical Config paths.
uint8_t GetCode() const
Get the code field.
virtual ~Icmpv6OptionRedirected()
Destructor.
virtual void Print(std::ostream &os) const
Print informations.
uint32_t GetRetransmissionTime() const
Get the node Retransmission time (Neighbor Discovery).
virtual uint32_t GetSerializedSize() const
Get the serialized size.
virtual ~Icmpv6Redirection()
Destructor.
uint32_t GetReserved() const
Get the reserved field.
uint32_t m_ReachableTime
The reachable time value.
virtual void Print(std::ostream &os) const
Print informations.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
void SetFlagO(bool o)
Set the O flag.
uint16_t GetChecksum() const
Get the checksum.
uint32_t GetValidTime() const
Get the valid time of the information.
void SetFlagH(bool h)
Set the H flag.
Icmpv6RA()
Constructor.
virtual ~Icmpv6RA()
Destructor.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
void SetReserved(uint32_t reserved)
Set the reserved field.
void SetFlagR(bool r)
Set the R flag.
virtual uint32_t GetSerializedSize() const
Get the serialized size.
virtual void Print(std::ostream &os) const
Print informations.
Doxygen introspection did not find any typical Config paths.
bool m_flagO
The M flag.
void SetFlagS(bool s)
Set the S flag.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
void SetFlagM(bool m)
Set the M flag.
void SetFlags(uint8_t flags)
Set the flags.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
void SetReachableTime(uint32_t r)
Set the node Reachable time (Neighbor Discovery).
uint32_t m_ptr
The pointer field.
Describes an IPv6 address.
Definition: ipv6-address.h:46
virtual ~Icmpv6Header()
Destructor.
ErrorTimeExceeded_e
ICMPv6 error code : Time Exceeded.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
Icmpv6TooBig()
Constructor.
virtual void Print(std::ostream &os) const
Print informations.
virtual ~Icmpv6Echo()
Destructor.
void SetDestination(Ipv6Address destination)
Set the IPv6 destination address.
uint8_t GetFlags() const
Getflags.
Ptr< Packet > GetPacket() const
Get the redirected packet.
OptionType_e
ICMPv6 Option type code.
Definition: icmpv6-header.h:78
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
virtual ~Icmpv6TooBig()
Destructor.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
virtual uint32_t GetSerializedSize() const
Get the serialized size.
uint16_t m_LifeTime
The lifetime value.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
virtual ~Icmpv6NS()
Destructor.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
Ptr< Packet > m_packet
The incorrect packet.
Ipv6Address GetDestination() const
Get the IPv6 destination address.
Ipv6Address GetIpv6Target() const
Get the IPv6 target field.
Icmpv6OptionRedirected()
Constructor.
Icmpv6Header()
Constructor.
virtual ~Icmpv6DestinationUnreachable()
Destructor.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
static TypeId GetTypeId()
Get the UID of this class.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
void SetFlags(uint8_t f)
Setflags.
virtual uint32_t GetSerializedSize() const
Get the serialized size.
void SetSeq(uint16_t seq)
Set the sequence number.
uint32_t m_mtu
The MTU value.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
Icmpv6Redirection()
Constructor.
void SetPacket(Ptr< Packet > p)
Set the incorrect packet.
uint32_t GetMtu() const
Get the MTU field.
bool GetFlagM() const
Get the M flag.
uint16_t m_seq
Sequence number (to distinguish response).
virtual uint32_t GetSerializedSize() const
Get the serialized size.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
Doxygen introspection did not find any typical Config paths.
a unique identifier for an interface.
Definition: type-id.h:49
Type_e
ICMPv6 type code.
Definition: icmpv6-header.h:44
Ptr< Packet > GetPacket() const
Get the incorrect packet.
virtual uint32_t GetSerializedSize() const
Get the serialized size.
void SetFlagO(bool o)
Set the O flag.
static TypeId GetTypeId()
Get the UID of this class.
static TypeId GetTypeId()
Get the UID of this class.
void SetPrefix(Ipv6Address prefix)
Set the IPv6 prefix.
static TypeId GetTypeId()
Get the UID of this class.
uint32_t GetReachableTime() const
Get the node Reachable time (Neighbor Discovery).
Ipv6Address m_prefix
The prefix value.
Doxygen introspection did not find any typical Config paths.
void SetId(uint16_t id)
Set the ID of the packet.
bool m_flagM
The M flag.
uint8_t GetPrefixLength() const
Get the prefix length.
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
void SetMtu(uint32_t mtu)
Set the MTU.
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.