This module includes functions that control ICMPv6 communication.
More...
This module includes functions that control ICMPv6 communication.
This structure implements ICMPv6 message handler.
This type represents an ICMPv6 header.
This callback allows OpenThread to inform the application of a received ICMPv6 message.
- Parameters
-
[in] | aContext | A pointer to arbitrary context information. |
[in] | aMessage | A pointer to the received message. |
[in] | aMessageInfo | A pointer to message information associated with aMessage . |
[in] | aIcmpHeader | A pointer to the received ICMPv6 header. |
ICMPv6 Message Codes
Enumerator |
---|
OT_ICMP6_CODE_DST_UNREACH_NO_ROUTE |
Destination Unreachable No Route.
|
OT_ICMP6_CODE_FRAGM_REAS_TIME_EX |
Fragment Reassembly Time Exceeded.
|
ICMPv6 Echo Reply Modes
Enumerator |
---|
OT_ICMP6_ECHO_HANDLER_DISABLED |
ICMPv6 Echo processing disabled.
|
OT_ICMP6_ECHO_HANDLER_UNICAST_ONLY |
ICMPv6 Echo processing enabled only for unicast requests only.
|
OT_ICMP6_ECHO_HANDLER_MULTICAST_ONLY |
ICMPv6 Echo processing enabled only for multicast requests only.
|
OT_ICMP6_ECHO_HANDLER_ALL |
ICMPv6 Echo processing enabled for unicast and multicast requests.
|
ICMPv6 Message Types
Enumerator |
---|
OT_ICMP6_TYPE_DST_UNREACH |
Destination Unreachable.
|
OT_ICMP6_TYPE_PACKET_TO_BIG |
Packet To Big.
|
OT_ICMP6_TYPE_TIME_EXCEEDED |
Time Exceeded.
|
OT_ICMP6_TYPE_ECHO_REQUEST |
Echo Request.
|
OT_ICMP6_TYPE_ECHO_REPLY |
Echo Reply.
|
This function indicates whether or not ICMPv6 Echo processing is enabled.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
- Return values
-
OT_ICMP6_ECHO_HANDLER_DISABLED | ICMPv6 Echo processing is disabled. |
OT_ICMP6_ECHO_HANDLER_UNICAST_ONLY | ICMPv6 Echo processing enabled for unicast requests only |
OT_ICMP6_ECHO_HANDLER_MULTICAST_ONLY | ICMPv6 Echo processing enabled for multicast requests only |
OT_ICMP6_ECHO_HANDLER_ALL | ICMPv6 Echo processing enabled for unicast and multicast requests |
This function registers a handler to provide received ICMPv6 messages.
- Note
- A handler structure
aHandler
has to be stored in persistent (static) memory. OpenThread does not make a copy of handler structure.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aHandler | A pointer to a handler containing callback that is called when an ICMPv6 message is received. |
This function sends an ICMPv6 Echo Request via the Thread interface.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aMessage | A pointer to the message buffer containing the ICMPv6 payload. |
[in] | aMessageInfo | A reference to message information associated with aMessage . |
[in] | aIdentifier | An identifier to aid in matching Echo Replies to this Echo Request. May be zero. |
This function sets whether or not ICMPv6 Echo processing is enabled.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aMode | The ICMPv6 Echo processing mode. |