ICMPv6 header. More...
#include <icmpv6-header.h>
Public Types | |
enum | Type_e |
ICMPv6 type code. | |
enum | OptionType_e |
ICMPv6 Option type code. | |
enum | ErrorDestinationUnreachable_e |
ICMPv6 error code : Destination Unreachable. | |
enum | ErrorTimeExceeded_e |
ICMPv6 error code : Time Exceeded. | |
enum | ErrorParameterError_e |
ICMPv6 error code : Parameter Error. | |
Public Member Functions | |
virtual TypeId | GetInstanceTypeId () const |
Get the instance type ID. | |
Icmpv6Header () | |
Constructor. | |
virtual | ~Icmpv6Header () |
Destructor. | |
uint8_t | GetType () const |
Get the type field. | |
void | SetType (uint8_t type) |
Set the type. | |
uint8_t | GetCode () const |
Get the code field. | |
void | SetCode (uint8_t code) |
Set the code field. | |
uint16_t | GetChecksum () const |
Get the checksum. | |
void | SetChecksum (uint16_t checksum) |
Set the checksum. | |
virtual void | Print (std::ostream &os) const |
Print informations. | |
virtual uint32_t | GetSerializedSize () const |
Get the serialized size. | |
virtual void | Serialize (Buffer::Iterator start) const |
Serialize the packet. | |
virtual uint32_t | Deserialize (Buffer::Iterator start) |
Deserialize the packet. | |
void | CalculatePseudoHeaderChecksum (Ipv6Address src, Ipv6Address dst, uint16_t length, uint8_t protocol) |
Calculate pseudo header checksum for IPv6. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the UID of this class. | |
Protected Attributes | |
bool | m_calcChecksum |
Checksum enable or not. | |
uint16_t | m_checksum |
The checksum. | |
Private Attributes | |
uint8_t | m_type |
The type. | |
uint8_t | m_code |
The code. |
ICMPv6 header.
void ns3::Icmpv6Header::CalculatePseudoHeaderChecksum | ( | Ipv6Address | src, | |
Ipv6Address | dst, | |||
uint16_t | length, | |||
uint8_t | protocol | |||
) |
Calculate pseudo header checksum for IPv6.
src | source address | |
dst | destination address | |
length | length | |
protocol | the protocol number to use in the underlying IPv6 packet. |
virtual uint32_t ns3::Icmpv6Header::Deserialize | ( | Buffer::Iterator | start | ) | [virtual] |
Deserialize the packet.
start | start offset |
Implements ns3::Header.
Reimplemented in ns3::Icmpv6NS, ns3::Icmpv6NA, ns3::Icmpv6RA, ns3::Icmpv6RS, ns3::Icmpv6Redirection, ns3::Icmpv6Echo, ns3::Icmpv6DestinationUnreachable, ns3::Icmpv6TooBig, ns3::Icmpv6TimeExceeded, and ns3::Icmpv6ParameterError.
uint16_t ns3::Icmpv6Header::GetChecksum | ( | ) | const |
Get the checksum.
uint8_t ns3::Icmpv6Header::GetCode | ( | ) | const |
Get the code field.
virtual TypeId ns3::Icmpv6Header::GetInstanceTypeId | ( | ) | const [virtual] |
Get the instance type ID.
Implements ns3::ObjectBase.
Reimplemented in ns3::Icmpv6NS, ns3::Icmpv6NA, ns3::Icmpv6RA, ns3::Icmpv6RS, ns3::Icmpv6Redirection, ns3::Icmpv6Echo, ns3::Icmpv6DestinationUnreachable, ns3::Icmpv6TooBig, ns3::Icmpv6TimeExceeded, and ns3::Icmpv6ParameterError.
virtual uint32_t ns3::Icmpv6Header::GetSerializedSize | ( | ) | const [virtual] |
Get the serialized size.
Implements ns3::Header.
Reimplemented in ns3::Icmpv6NS, ns3::Icmpv6NA, ns3::Icmpv6RA, ns3::Icmpv6RS, ns3::Icmpv6Redirection, ns3::Icmpv6Echo, ns3::Icmpv6DestinationUnreachable, ns3::Icmpv6TooBig, ns3::Icmpv6TimeExceeded, and ns3::Icmpv6ParameterError.
uint8_t ns3::Icmpv6Header::GetType | ( | ) | const |
Get the type field.
static TypeId ns3::Icmpv6Header::GetTypeId | ( | void | ) | [static] |
Get the UID of this class.
This method returns the TypeId associated to ns3::Icmpv6Header.
No Attributes defined for this type.
No TraceSources defined for this type.
Reimplemented from ns3::Header.
Reimplemented in ns3::Icmpv6NS, ns3::Icmpv6NA, ns3::Icmpv6RA, ns3::Icmpv6RS, ns3::Icmpv6Redirection, ns3::Icmpv6Echo, ns3::Icmpv6DestinationUnreachable, ns3::Icmpv6TooBig, ns3::Icmpv6TimeExceeded, and ns3::Icmpv6ParameterError.
virtual void ns3::Icmpv6Header::Print | ( | std::ostream & | os | ) | const [virtual] |
Print informations.
os | output stream |
Implements ns3::Header.
Reimplemented in ns3::Icmpv6NS, ns3::Icmpv6NA, ns3::Icmpv6RA, ns3::Icmpv6RS, ns3::Icmpv6Redirection, ns3::Icmpv6Echo, ns3::Icmpv6DestinationUnreachable, ns3::Icmpv6TooBig, ns3::Icmpv6TimeExceeded, and ns3::Icmpv6ParameterError.
virtual void ns3::Icmpv6Header::Serialize | ( | Buffer::Iterator | start | ) | const [virtual] |
Serialize the packet.
start | start offset |
Implements ns3::Header.
Reimplemented in ns3::Icmpv6NS, ns3::Icmpv6NA, ns3::Icmpv6RA, ns3::Icmpv6RS, ns3::Icmpv6Redirection, ns3::Icmpv6Echo, ns3::Icmpv6DestinationUnreachable, ns3::Icmpv6TooBig, ns3::Icmpv6TimeExceeded, and ns3::Icmpv6ParameterError.
void ns3::Icmpv6Header::SetChecksum | ( | uint16_t | checksum | ) |
Set the checksum.
checksum | to set |
void ns3::Icmpv6Header::SetCode | ( | uint8_t | code | ) |
Set the code field.
code | code to set |
void ns3::Icmpv6Header::SetType | ( | uint8_t | type | ) |
Set the type.
type | type to set |