ICMPv6

This module includes functions that control ICMPv6 communication.

Summary

Enumerations

otIcmp6Code{
  OT_ICMP6_CODE_DST_UNREACH_NO_ROUTE = 0
}
enum
ICMPv6 Message Codes.
otIcmp6EchoMode{
  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
}
enum
ICMPv6 Echo Reply Modes.
otIcmp6Type{
  OT_ICMP6_TYPE_DST_UNREACH = 1,
  OT_ICMP6_TYPE_ECHO_REQUEST = 128,
  OT_ICMP6_TYPE_ECHO_REPLY = 129
}
enum
ICMPv6 Message Types.

Typedefs

otIcmp6Code typedef
ICMPv6 Message Codes.
otIcmp6EchoMode typedef
ICMPv6 Echo Reply Modes.
otIcmp6Handler typedef
This structure implements ICMPv6 message handler.
otIcmp6Header typedef
struct otIcmp6Header
This type represents an ICMPv6 header.
otIcmp6ReceiveCallback)(void *aContext, otMessage *aMessage, const otMessageInfo *aMessageInfo, const otIcmp6Header *aIcmpHeader) typedef
void(*
This callback allows OpenThread to inform the application of a received ICMPv6 message.
otIcmp6Type typedef
ICMPv6 Message Types.

Variables

OT_TOOL_PACKED_END

Functions

otIcmp6GetEchoMode(otInstance *aInstance)
This function indicates whether or not ICMPv6 Echo processing is enabled.
otIcmp6RegisterHandler(otInstance *aInstance, otIcmp6Handler *aHandler)
This function registers a handler to provide received ICMPv6 messages.
otIcmp6SendEchoRequest(otInstance *aInstance, otMessage *aMessage, const otMessageInfo *aMessageInfo, uint16_t aIdentifier)
This function sends an ICMPv6 Echo Request via the Thread interface.
otIcmp6SetEchoMode(otInstance *aInstance, otIcmp6EchoMode aMode)
void
This function sets whether or not ICMPv6 Echo processing is enabled.

Structs

otIcmp6Handler

This structure implements ICMPv6 message handler.

otIcmp6Header

This structure represents an ICMPv6 header.

Unions

otIcmp6Header::OT_TOOL_PACKED_FIELD

Enumerations

otIcmp6Code

 otIcmp6Code

ICMPv6 Message Codes.

Properties
OT_ICMP6_CODE_DST_UNREACH_NO_ROUTE

Destination Unreachable No Route.

otIcmp6EchoMode

 otIcmp6EchoMode

ICMPv6 Echo Reply Modes.

Properties
OT_ICMP6_ECHO_HANDLER_ALL

ICMPv6 Echo processing enabled for unicast and multicast requests.

OT_ICMP6_ECHO_HANDLER_DISABLED

ICMPv6 Echo processing disabled.

OT_ICMP6_ECHO_HANDLER_MULTICAST_ONLY

ICMPv6 Echo processing enabled only for multicast requests only.

OT_ICMP6_ECHO_HANDLER_UNICAST_ONLY

ICMPv6 Echo processing enabled only for unicast requests only.

otIcmp6Type

 otIcmp6Type

ICMPv6 Message Types.

Properties
OT_ICMP6_TYPE_DST_UNREACH

Destination Unreachable.

OT_ICMP6_TYPE_ECHO_REPLY

Echo Reply.

OT_ICMP6_TYPE_ECHO_REQUEST

Echo Request.

Typedefs

otIcmp6Code

enum otIcmp6Code otIcmp6Code

ICMPv6 Message Codes.

otIcmp6EchoMode

enum otIcmp6EchoMode otIcmp6EchoMode

ICMPv6 Echo Reply Modes.

otIcmp6Handler

struct otIcmp6Handler otIcmp6Handler

This structure implements ICMPv6 message handler.

otIcmp6Header

struct otIcmp6Header otIcmp6Header

This type represents an ICMPv6 header.

otIcmp6ReceiveCallback

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.

Details
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.

otIcmp6Type

enum otIcmp6Type otIcmp6Type

ICMPv6 Message Types.

Variables

OT_TOOL_PACKED_END

OT_TOOL_PACKED_BEGIN struct otIcmp6Header OT_TOOL_PACKED_END

Functions

otIcmp6GetEchoMode

otIcmp6EchoMode otIcmp6GetEchoMode(
  otInstance *aInstance
)

This function indicates whether or not ICMPv6 Echo processing is enabled.

Details
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

otIcmp6RegisterHandler

otError otIcmp6RegisterHandler(
  otInstance *aInstance,
  otIcmp6Handler *aHandler
)

This function registers a handler to provide received ICMPv6 messages.

Details
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.

otIcmp6SendEchoRequest

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

This function sends an ICMPv6 Echo Request via the Thread interface.

Details
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.

otIcmp6SetEchoMode

void otIcmp6SetEchoMode(
  otInstance *aInstance,
  otIcmp6EchoMode aMode
)

This function sets whether or not ICMPv6 Echo processing is enabled.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aMode
The ICMPv6 Echo processing mode.

Macros

OT_ICMP6_HEADER_DATA_SIZE

 OT_ICMP6_HEADER_DATA_SIZE 4

Size of an message specific data of ICMPv6 Header.