ICMPv6#

This module includes functions that control ICMPv6 communication.

Modules#

otIcmp6Header

otIcmp6Handler

Enumerations#

enum
OT_ICMP6_TYPE_DST_UNREACH = 1
OT_ICMP6_TYPE_PACKET_TO_BIG = 2
OT_ICMP6_TYPE_TIME_EXCEEDED = 3
OT_ICMP6_TYPE_PARAMETER_PROBLEM = 4
OT_ICMP6_TYPE_ECHO_REQUEST = 128
OT_ICMP6_TYPE_ECHO_REPLY = 129
OT_ICMP6_TYPE_ROUTER_SOLICIT = 133
OT_ICMP6_TYPE_ROUTER_ADVERT = 134
OT_ICMP6_TYPE_NEIGHBOR_SOLICIT = 135
OT_ICMP6_TYPE_NEIGHBOR_ADVERT = 136
}

ICMPv6 Message Types.

enum
OT_ICMP6_CODE_DST_UNREACH_NO_ROUTE = 0
OT_ICMP6_CODE_FRAGM_REAS_TIME_EX = 1
}

ICMPv6 Message Codes.

enum
OT_ICMP6_ECHO_HANDLER_DISABLED = 0
OT_ICMP6_ECHO_HANDLER_UNICAST_ONLY = 1
OT_ICMP6_ECHO_HANDLER_MULTICAST_ONLY = 2
OT_ICMP6_ECHO_HANDLER_ALL = 3
}

ICMPv6 Echo Reply Modes.

Typedefs#

typedef enum otIcmp6Type

ICMPv6 Message Types.

typedef enum otIcmp6Code

ICMPv6 Message Codes.

typedef struct otIcmp6Header

Represents an ICMPv6 header.

typedef void(*
otIcmp6ReceiveCallback)(void *aContext, otMessage *aMessage, const otMessageInfo *aMessageInfo, const otIcmp6Header *aIcmpHeader)

This callback allows OpenThread to inform the application of a received ICMPv6 message.

typedef struct otIcmp6Handler

Implements ICMPv6 message handler.

typedef enum otIcmp6EchoMode

ICMPv6 Echo Reply Modes.

Functions#

otIcmp6GetEchoMode(otInstance *aInstance)

Indicates whether or not ICMPv6 Echo processing is enabled.

void
otIcmp6SetEchoMode(otInstance *aInstance, otIcmp6EchoMode aMode)

Sets whether or not ICMPv6 Echo processing is enabled.

otIcmp6RegisterHandler(otInstance *aInstance, otIcmp6Handler *aHandler)

Registers a handler to provide received ICMPv6 messages.

otIcmp6SendEchoRequest(otInstance *aInstance, otMessage *aMessage, const otMessageInfo *aMessageInfo, uint16_t aIdentifier)

Sends an ICMPv6 Echo Request via the Thread interface.

Macros#

#define

Size of ICMPv6 Header.

#define

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.


Definition at line 59 of file include/openthread/icmp6.h

otIcmp6Code#

otIcmp6Code

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.


Definition at line 77 of file include/openthread/icmp6.h

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.


Definition at line 141 of file include/openthread/icmp6.h

Typedef Documentation#

otIcmp6Type#

typedef enum otIcmp6Type otIcmp6Type

ICMPv6 Message Types.


Definition at line 71 of file include/openthread/icmp6.h

otIcmp6Code#

typedef enum otIcmp6Code otIcmp6Code

ICMPv6 Message Codes.


Definition at line 81 of file include/openthread/icmp6.h

otIcmp6Header#

typedef struct otIcmp6Header otIcmp6Header

Represents an ICMPv6 header.


Definition at line 110 of file include/openthread/icmp6.h

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.

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.


Definition at line 121 of file include/openthread/icmp6.h

otIcmp6Handler#

typedef struct otIcmp6Handler otIcmp6Handler

Implements ICMPv6 message handler.


Definition at line 135 of file include/openthread/icmp6.h

otIcmp6EchoMode#

typedef enum otIcmp6EchoMode otIcmp6EchoMode

ICMPv6 Echo Reply Modes.


Definition at line 147 of file include/openthread/icmp6.h

Variable Documentation#

OT_TOOL_PACKED_END#

OT_TOOL_PACKED_BEGIN struct otIcmp6Header OT_TOOL_PACKED_END

Definition at line 104 of file include/openthread/icmp6.h

Function Documentation#

otIcmp6GetEchoMode#

otIcmp6EchoMode otIcmp6GetEchoMode (otInstance * aInstance)

Indicates whether or not ICMPv6 Echo processing is enabled.

Parameters
[in]aInstance

A pointer to an OpenThread instance.


Definition at line 160 of file include/openthread/icmp6.h

otIcmp6SetEchoMode#

void otIcmp6SetEchoMode (otInstance * aInstance, otIcmp6EchoMode aMode)

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.


Definition at line 169 of file include/openthread/icmp6.h

otIcmp6RegisterHandler#

otError otIcmp6RegisterHandler (otInstance * aInstance, otIcmp6Handler * aHandler)

Registers a handler to provide received ICMPv6 messages.

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.

Note

  • A handler structure aHandler has to be stored in persistent (static) memory. OpenThread does not make a copy of handler structure.


Definition at line 182 of file include/openthread/icmp6.h

otIcmp6SendEchoRequest#

otError otIcmp6SendEchoRequest (otInstance * aInstance, otMessage * aMessage, const otMessageInfo * aMessageInfo, uint16_t aIdentifier)

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.


Definition at line 194 of file include/openthread/icmp6.h

Macro Definition Documentation#

OT_ICMP6_HEADER_DATA_SIZE#

#define OT_ICMP6_HEADER_DATA_SIZE
Value:
4

Size of ICMPv6 Header.


Definition at line 83 of file include/openthread/icmp6.h

OT_ICMP6_ROUTER_ADVERT_MIN_SIZE#

#define OT_ICMP6_ROUTER_ADVERT_MIN_SIZE
Value:
16

Size of a Router Advertisement message without any options.


Definition at line 84 of file include/openthread/icmp6.h