ICMPv6#
This module includes functions that control ICMPv6 communication.
Modules#
Enumerations#
ICMPv6 Message Types.
ICMPv6 Message Codes.
ICMPv6 Echo Reply Modes.
Typedefs#
ICMPv6 Message Types.
ICMPv6 Message Codes.
Represents an ICMPv6 header.
This callback allows OpenThread to inform the application of a received ICMPv6 message.
Implements ICMPv6 message handler.
ICMPv6 Echo Reply Modes.
Variables#
Functions#
Indicates whether or not ICMPv6 Echo processing is enabled.
Sets whether or not ICMPv6 Echo processing is enabled.
Registers a handler to provide received ICMPv6 messages.
Sends an ICMPv6 Echo Request via the Thread interface.
Macros#
Size of ICMPv6 Header.
Size of a Router Advertisement message without any options.
Enumeration Documentation#
otIcmp6Type#
otIcmp6Type
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_PARAMETER_PROBLEM | Parameter Problem. | 
| OT_ICMP6_TYPE_ECHO_REQUEST | Echo Request. | 
| OT_ICMP6_TYPE_ECHO_REPLY | Echo Reply. | 
| OT_ICMP6_TYPE_ROUTER_SOLICIT | Router Solicitation. | 
| OT_ICMP6_TYPE_ROUTER_ADVERT | Router Advertisement. | 
| OT_ICMP6_TYPE_NEIGHBOR_SOLICIT | Neighbor Solicitation. | 
| OT_ICMP6_TYPE_NEIGHBOR_ADVERT | Neighbor Advertisement. | 
otIcmp6Code#
otIcmp6Code
ICMPv6 Message Codes.
| Enumerator | |
|---|---|
| OT_ICMP6_CODE_DST_UNREACH_NO_ROUTE | Destination Unreachable (Type 1) - No Route. | 
| OT_ICMP6_CODE_DST_UNREACH_PROHIBITED | Destination Unreachable (Type 1) - Administratively Prohibited. | 
| OT_ICMP6_CODE_FRAGM_REAS_TIME_EX | Time Exceeded (Type 3) - Fragment Reassembly. | 
otIcmp6EchoMode#
otIcmp6EchoMode
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. | 
| OT_ICMP6_ECHO_HANDLER_RLOC_ALOC_ONLY | ICMPv6 Echo processing enabled for RLOC/ALOC destinations only. | 
Typedef Documentation#
otIcmp6ReceiveCallback#
typedef void(* otIcmp6ReceiveCallback) (void *aContext, otMessage *aMessage, const otMessageInfo *aMessageInfo, const otIcmp6Header *aIcmpHeader) )(void *aContext, otMessage *aMessage, const otMessageInfo *aMessageInfo, const otIcmp6Header *aIcmpHeader)
This callback allows OpenThread to inform the application of a received ICMPv6 message.
| Type | Direction | Argument Name | Description | 
|---|---|---|---|
| [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  | |
| [in] | aIcmpHeader | A pointer to the received ICMPv6 header. | 
Variable Documentation#
Function Documentation#
otIcmp6GetEchoMode#
otIcmp6EchoMode otIcmp6GetEchoMode (otInstance * aInstance)
Indicates whether or not ICMPv6 Echo processing is enabled.
| Type | Direction | Argument Name | Description | 
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to an OpenThread instance. | 
otIcmp6SetEchoMode#
void otIcmp6SetEchoMode (otInstance * aInstance, otIcmp6EchoMode aMode)
Sets whether or not ICMPv6 Echo processing is enabled.
| Type | Direction | Argument Name | Description | 
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to an OpenThread instance. | 
| otIcmp6EchoMode | [in] | aMode | The ICMPv6 Echo processing mode. | 
otIcmp6RegisterHandler#
otError otIcmp6RegisterHandler (otInstance * aInstance, otIcmp6Handler * aHandler)
Registers a handler to provide received ICMPv6 messages.
| Type | Direction | Argument Name | Description | 
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to an OpenThread instance. | 
| otIcmp6Handler * | [in] | aHandler | A pointer to a handler containing callback that is called when an ICMPv6 message is received. | 
Note
- A handler structure - aHandlerhas to be stored in persistent (static) memory. OpenThread does not make a copy of handler structure.
otIcmp6SendEchoRequest#
otError otIcmp6SendEchoRequest (otInstance * aInstance, otMessage * aMessage, const otMessageInfo * aMessageInfo, uint16_t aIdentifier)
Sends an ICMPv6 Echo Request via the Thread interface.
| Type | Direction | Argument Name | Description | 
|---|---|---|---|
| otInstance * | [in] | aInstance | A pointer to an OpenThread instance. | 
| otMessage * | [in] | aMessage | A pointer to the message buffer containing the ICMPv6 payload. | 
| const otMessageInfo * | [in] | aMessageInfo | A reference to message information associated with  | 
| uint16_t | [in] | aIdentifier | An identifier to aid in matching Echo Replies to this Echo Request. May be zero. |