Doxygen introspection did not find any typical Config paths. More...
#include <icmpv6-header.h>
Public Member Functions | |
Icmpv6Header () | |
Constructor. More... | |
virtual | ~Icmpv6Header () |
Destructor. More... | |
void | CalculatePseudoHeaderChecksum (Ipv6Address src, Ipv6Address dst, uint16_t length, uint8_t protocol) |
Calculate pseudo header checksum for IPv6. More... | |
virtual uint32_t | Deserialize (Buffer::Iterator start) |
Deserialize the packet. More... | |
uint16_t | GetChecksum () const |
Get the checksum. More... | |
uint8_t | GetCode () const |
Get the code field. More... | |
virtual TypeId | GetInstanceTypeId () const |
Get the instance type ID. More... | |
virtual uint32_t | GetSerializedSize () const |
Get the serialized size. More... | |
uint8_t | GetType () const |
Get the type field. More... | |
virtual void | Print (std::ostream &os) const |
Print informations. More... | |
virtual void | Serialize (Buffer::Iterator start) const |
Serialize the packet. More... | |
void | SetChecksum (uint16_t checksum) |
Set the checksum. More... | |
void | SetCode (uint8_t code) |
Set the code field. More... | |
void | SetType (uint8_t type) |
Set the type. More... | |
Public Member Functions inherited from ns3::Header | |
virtual | ~Header () |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the UID of this class. More... | |
Static Public Member Functions inherited from ns3::Header | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::Chunk | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Protected Attributes | |
bool | m_calcChecksum |
Checksum enable or not. More... | |
uint16_t | m_checksum |
The checksum. More... | |
Private Attributes | |
uint8_t | m_code |
The code. More... | |
uint8_t | m_type |
The type. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
virtual void | NotifyConstructionCompleted (void) |
This method is invoked once all member attributes have been initialized. More... | |
Doxygen introspection did not find any typical Config paths.
ICMPv6 header.
No Attributes are defined for this type.
No TraceSources are defined for this type.
Definition at line 37 of file icmpv6-header.h.
ICMPv6 error code : Destination Unreachable.
Enumerator | |
---|---|
ICMPV6_NO_ROUTE | |
ICMPV6_ADM_PROHIBITED | |
ICMPV6_NOT_NEIGHBOUR | |
ICMPV6_ADDR_UNREACHABLE | |
ICMPV6_PORT_UNREACHABLE |
Definition at line 91 of file icmpv6-header.h.
ICMPv6 error code : Parameter Error.
Enumerator | |
---|---|
ICMPV6_MALFORMED_HEADER | |
ICMPV6_UNKNOWN_NEXT_HEADER | |
ICMPV6_UNKNOWN_OPTION |
Definition at line 114 of file icmpv6-header.h.
ICMPv6 error code : Time Exceeded.
Enumerator | |
---|---|
ICMPV6_HOPLIMIT | |
ICMPV6_FRAGTIME |
Definition at line 104 of file icmpv6-header.h.
ICMPv6 Option type code.
Enumerator | |
---|---|
ICMPV6_OPT_LINK_LAYER_SOURCE | |
ICMPV6_OPT_LINK_LAYER_TARGET | |
ICMPV6_OPT_PREFIX | |
ICMPV6_OPT_REDIRECTED | |
ICMPV6_OPT_MTU |
Definition at line 78 of file icmpv6-header.h.
ICMPv6 type code.
Definition at line 44 of file icmpv6-header.h.
ns3::Icmpv6Header::Icmpv6Header | ( | ) |
|
virtual |
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. |
Definition at line 150 of file icmpv6-header.cc.
References ns3::Buffer::AddAtStart(), ns3::Buffer::Begin(), ns3::Buffer::Iterator::CalculateIpChecksum(), m_checksum, NS_LOG_FUNCTION, ns3::Ipv6Address::Serialize(), ns3::Buffer::Iterator::Write(), ns3::Buffer::Iterator::WriteU16(), and ns3::Buffer::Iterator::WriteU8().
Referenced by ns3::Icmpv6L4Protocol::ForgeNA(), ns3::Icmpv6L4Protocol::ForgeNS(), ns3::Icmpv6L4Protocol::ForgeRS(), ns3::Icmpv6L4Protocol::SendEchoReply(), ns3::Icmpv6L4Protocol::SendMessage(), ns3::Icmpv6L4Protocol::SendRedirection(), and ns3::Ipv6RawSocketImpl::SendTo().
|
virtual |
Deserialize the packet.
start | start offset |
Implements ns3::Header.
Reimplemented in ns3::Icmpv6ParameterError, ns3::Icmpv6TimeExceeded, ns3::Icmpv6TooBig, ns3::Icmpv6DestinationUnreachable, ns3::Icmpv6Echo, ns3::Icmpv6Redirection, ns3::Icmpv6RS, ns3::Icmpv6RA, ns3::Icmpv6NA, and ns3::Icmpv6NS.
Definition at line 114 of file icmpv6-header.cc.
References GetSerializedSize(), m_checksum, m_code, m_type, NS_LOG_FUNCTION, ns3::Buffer::Iterator::ReadNtohU16(), ns3::Buffer::Iterator::ReadU32(), ns3::Buffer::Iterator::ReadU8(), and visualizer.core::start().
uint16_t ns3::Icmpv6Header::GetChecksum | ( | ) | const |
Get the checksum.
Definition at line 90 of file icmpv6-header.cc.
References m_checksum, and NS_LOG_FUNCTION.
Referenced by ns3::Icmpv6NS::Print(), ns3::Icmpv6NA::Print(), ns3::Icmpv6RA::Print(), ns3::Icmpv6RS::Print(), ns3::Icmpv6Redirection::Print(), ns3::Icmpv6Echo::Print(), ns3::Icmpv6DestinationUnreachable::Print(), ns3::Icmpv6TooBig::Print(), ns3::Icmpv6TimeExceeded::Print(), ns3::Icmpv6ParameterError::Print(), ns3::Icmpv6NA::Serialize(), ns3::Icmpv6RA::Serialize(), ns3::Icmpv6RS::Serialize(), ns3::Icmpv6Redirection::Serialize(), ns3::Icmpv6Echo::Serialize(), ns3::Icmpv6DestinationUnreachable::Serialize(), ns3::Icmpv6TooBig::Serialize(), ns3::Icmpv6TimeExceeded::Serialize(), and ns3::Icmpv6ParameterError::Serialize().
uint8_t ns3::Icmpv6Header::GetCode | ( | void | ) | const |
Get the code field.
Definition at line 78 of file icmpv6-header.cc.
References m_code, and NS_LOG_FUNCTION.
Referenced by ns3::Icmpv6L4Protocol::Forward(), ns3::Icmpv6L4Protocol::HandleDestinationUnreachable(), ns3::Icmpv6L4Protocol::HandleParameterError(), ns3::Radvd::HandleRead(), ns3::Icmpv6L4Protocol::HandleTimeExceeded(), ns3::Icmpv6NS::Print(), ns3::Icmpv6NA::Print(), ns3::Icmpv6RA::Print(), ns3::Icmpv6RS::Print(), ns3::Icmpv6Redirection::Print(), ns3::Icmpv6Echo::Print(), ns3::Icmpv6DestinationUnreachable::Print(), ns3::Icmpv6TooBig::Print(), ns3::Icmpv6TimeExceeded::Print(), ns3::Icmpv6ParameterError::Print(), ns3::Icmpv6NS::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::Icmpv6RA::Serialize(), ns3::Icmpv6RS::Serialize(), ns3::Icmpv6Redirection::Serialize(), ns3::Icmpv6Echo::Serialize(), ns3::Icmpv6DestinationUnreachable::Serialize(), ns3::Icmpv6TooBig::Serialize(), ns3::Icmpv6TimeExceeded::Serialize(), and ns3::Icmpv6ParameterError::Serialize().
|
virtual |
Get the instance type ID.
Implements ns3::ObjectBase.
Reimplemented in ns3::Icmpv6ParameterError, ns3::Icmpv6TimeExceeded, ns3::Icmpv6TooBig, ns3::Icmpv6DestinationUnreachable, ns3::Icmpv6Echo, ns3::Icmpv6Redirection, ns3::Icmpv6RS, ns3::Icmpv6RA, ns3::Icmpv6NA, and ns3::Icmpv6NS.
Definition at line 46 of file icmpv6-header.cc.
References GetTypeId(), and NS_LOG_FUNCTION.
|
virtual |
Get the serialized size.
Implements ns3::Header.
Reimplemented in ns3::Icmpv6ParameterError, ns3::Icmpv6TimeExceeded, ns3::Icmpv6TooBig, ns3::Icmpv6DestinationUnreachable, ns3::Icmpv6Echo, ns3::Icmpv6Redirection, ns3::Icmpv6RS, ns3::Icmpv6RA, ns3::Icmpv6NA, and ns3::Icmpv6NS.
Definition at line 108 of file icmpv6-header.cc.
References NS_LOG_FUNCTION.
Referenced by Deserialize(), and ns3::Icmpv6L4Protocol::SendMessage().
uint8_t ns3::Icmpv6Header::GetType | ( | void | ) | const |
Get the type field.
Definition at line 66 of file icmpv6-header.cc.
References m_type, and NS_LOG_FUNCTION.
Referenced by ns3::Icmpv6L4Protocol::Forward(), ns3::Ipv6RawSocketImpl::ForwardUp(), ns3::Icmpv6NS::Print(), ns3::Icmpv6NA::Print(), ns3::Icmpv6RA::Print(), ns3::Icmpv6RS::Print(), ns3::Icmpv6Redirection::Print(), ns3::Icmpv6Echo::Print(), ns3::Icmpv6DestinationUnreachable::Print(), ns3::Icmpv6TooBig::Print(), ns3::Icmpv6TimeExceeded::Print(), ns3::Icmpv6ParameterError::Print(), ns3::Icmpv6NS::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::Icmpv6RA::Serialize(), ns3::Icmpv6RS::Serialize(), ns3::Icmpv6Redirection::Serialize(), ns3::Icmpv6Echo::Serialize(), ns3::Icmpv6DestinationUnreachable::Serialize(), ns3::Icmpv6TooBig::Serialize(), ns3::Icmpv6TimeExceeded::Serialize(), and ns3::Icmpv6ParameterError::Serialize().
|
static |
Get the UID of this class.
Definition at line 37 of file icmpv6-header.cc.
References ns3::TypeId::SetParent().
Referenced by GetInstanceTypeId().
|
virtual |
Print informations.
os | output stream |
Implements ns3::Header.
Reimplemented in ns3::Icmpv6ParameterError, ns3::Icmpv6TimeExceeded, ns3::Icmpv6TooBig, ns3::Icmpv6DestinationUnreachable, ns3::Icmpv6Echo, ns3::Icmpv6Redirection, ns3::Icmpv6RS, ns3::Icmpv6RA, ns3::Icmpv6NA, and ns3::Icmpv6NS.
Definition at line 102 of file icmpv6-header.cc.
References m_checksum, m_code, m_type, and NS_LOG_FUNCTION.
|
virtual |
Serialize the packet.
start | start offset |
Implements ns3::Header.
Reimplemented in ns3::Icmpv6ParameterError, ns3::Icmpv6TimeExceeded, ns3::Icmpv6TooBig, ns3::Icmpv6DestinationUnreachable, ns3::Icmpv6Echo, ns3::Icmpv6Redirection, ns3::Icmpv6RS, ns3::Icmpv6RA, ns3::Icmpv6NA, and ns3::Icmpv6NS.
Definition at line 128 of file icmpv6-header.cc.
References ns3::Buffer::Iterator::CalculateIpChecksum(), ns3::Buffer::Iterator::GetSize(), m_calcChecksum, m_checksum, m_code, m_type, ns3::Buffer::Iterator::Next(), NS_LOG_FUNCTION, visualizer.core::start(), ns3::Buffer::Iterator::WriteU16(), ns3::Buffer::Iterator::WriteU32(), and ns3::Buffer::Iterator::WriteU8().
void ns3::Icmpv6Header::SetChecksum | ( | uint16_t | checksum | ) |
Set the checksum.
checksum | to set |
Definition at line 96 of file icmpv6-header.cc.
References m_checksum, and NS_LOG_FUNCTION.
void ns3::Icmpv6Header::SetCode | ( | uint8_t | code | ) |
Set the code field.
code | code to set |
Definition at line 84 of file icmpv6-header.cc.
References m_code, and NS_LOG_FUNCTION.
Referenced by ns3::Icmpv6NS::Deserialize(), ns3::Icmpv6NA::Deserialize(), ns3::Icmpv6RA::Deserialize(), ns3::Icmpv6RS::Deserialize(), ns3::Icmpv6Redirection::Deserialize(), ns3::Icmpv6Echo::Deserialize(), ns3::Icmpv6DestinationUnreachable::Deserialize(), ns3::Icmpv6TooBig::Deserialize(), ns3::Icmpv6TimeExceeded::Deserialize(), ns3::Icmpv6ParameterError::Deserialize(), ns3::Icmpv6Echo::Icmpv6Echo(), ns3::Icmpv6NA::Icmpv6NA(), ns3::Icmpv6NS::Icmpv6NS(), ns3::Icmpv6RA::Icmpv6RA(), ns3::Icmpv6Redirection::Icmpv6Redirection(), ns3::Icmpv6RS::Icmpv6RS(), ns3::Icmpv6L4Protocol::SendErrorDestinationUnreachable(), ns3::Icmpv6L4Protocol::SendErrorParameterError(), ns3::Icmpv6L4Protocol::SendErrorTimeExceeded(), and ns3::Icmpv6L4Protocol::SendErrorTooBig().
void ns3::Icmpv6Header::SetType | ( | uint8_t | type | ) |
Set the type.
type | type to set |
Definition at line 72 of file icmpv6-header.cc.
References m_type, and NS_LOG_FUNCTION.
Referenced by ns3::Icmpv6NS::Deserialize(), ns3::Icmpv6NA::Deserialize(), ns3::Icmpv6RA::Deserialize(), ns3::Icmpv6RS::Deserialize(), ns3::Icmpv6Redirection::Deserialize(), ns3::Icmpv6Echo::Deserialize(), ns3::Icmpv6DestinationUnreachable::Deserialize(), ns3::Icmpv6TooBig::Deserialize(), ns3::Icmpv6TimeExceeded::Deserialize(), ns3::Icmpv6ParameterError::Deserialize(), ns3::Icmpv6DestinationUnreachable::Icmpv6DestinationUnreachable(), ns3::Icmpv6Echo::Icmpv6Echo(), ns3::Icmpv6NA::Icmpv6NA(), ns3::Icmpv6NS::Icmpv6NS(), ns3::Icmpv6ParameterError::Icmpv6ParameterError(), ns3::Icmpv6RA::Icmpv6RA(), ns3::Icmpv6Redirection::Icmpv6Redirection(), ns3::Icmpv6RS::Icmpv6RS(), ns3::Icmpv6TimeExceeded::Icmpv6TimeExceeded(), and ns3::Icmpv6TooBig::Icmpv6TooBig().
|
protected |
Checksum enable or not.
Definition at line 218 of file icmpv6-header.h.
Referenced by Serialize(), ns3::Icmpv6NS::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::Icmpv6RS::Serialize(), ns3::Icmpv6Redirection::Serialize(), and ns3::Icmpv6Echo::Serialize().
|
protected |
The checksum.
Definition at line 223 of file icmpv6-header.h.
Referenced by CalculatePseudoHeaderChecksum(), Deserialize(), ns3::Icmpv6NS::Deserialize(), ns3::Icmpv6NA::Deserialize(), ns3::Icmpv6RA::Deserialize(), ns3::Icmpv6RS::Deserialize(), ns3::Icmpv6Redirection::Deserialize(), ns3::Icmpv6Echo::Deserialize(), ns3::Icmpv6DestinationUnreachable::Deserialize(), ns3::Icmpv6TooBig::Deserialize(), ns3::Icmpv6TimeExceeded::Deserialize(), ns3::Icmpv6ParameterError::Deserialize(), GetChecksum(), ns3::Icmpv6Echo::Icmpv6Echo(), ns3::Icmpv6NA::Icmpv6NA(), ns3::Icmpv6NS::Icmpv6NS(), ns3::Icmpv6Redirection::Icmpv6Redirection(), Print(), Serialize(), ns3::Icmpv6NS::Serialize(), and SetChecksum().
|
private |
The code.
Definition at line 234 of file icmpv6-header.h.
Referenced by Deserialize(), GetCode(), Print(), Serialize(), and SetCode().
|
private |
The type.
Definition at line 229 of file icmpv6-header.h.
Referenced by Deserialize(), GetType(), Print(), Serialize(), and SetType().