This module includes functions that control ICMPv6 communication.
More...
This module includes functions that control ICMPv6 communication.
This structure implements ICMPv6 message handler.
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 |
---|
kIcmp6CodeDstUnreachNoRoute |
Destination Unreachable No Route.
|
ICMPv6 Message Types
Enumerator |
---|
kIcmp6TypeDstUnreach |
Destination Unreachable.
|
kIcmp6TypeEchoRequest |
Echo Request.
|
kIcmp6TypeEchoReply |
Echo Reply.
|
bool otIcmp6IsEchoEnabled |
( |
otInstance * |
aInstance | ) |
|
This function indicates whether or not ICMPv6 Echo processing is enabled.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
- Return values
-
TRUE | ICMPv6 Echo processing is enabled. |
FALSE | ICMPv6 Echo processing is disabled. |
ThreadError otIcmp6RegisterHandler |
( |
otInstance * |
aInstance, |
|
|
otIcmp6Handler * |
aHandler |
|
) |
| |
This function registers a handler to provide received ICMPv6 messages.
- Note
- A handler structure
aHandler
has to be stored in persistant (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 conitaining callback that is called when an ICMPv6 message is received. |
ThreadError otIcmp6SendEchoRequest |
( |
otInstance * |
aInstance, |
|
|
otMessage * |
aMessage, |
|
|
const otMessageInfo * |
aMessageInfo, |
|
|
uint16_t |
aIdentifier |
|
) |
| |
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. |
void otIcmp6SetEchoEnabled |
( |
otInstance * |
aInstance, |
|
|
bool |
aEnabled |
|
) |
| |
This function sets whether or not ICMPv6 Echo processing is enabled.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aEnabled | TRUE to enable ICMPv6 Echo processing, FALSE otherwise. |