Infrastructure Interface#

This module includes the platform abstraction for the adjacent infrastructure network interface.

Functions#

bool
otPlatInfraIfHasAddress(uint32_t aInfraIfIndex, const otIp6Address *aAddress)

Tells whether an infra interface has the given IPv6 address assigned.

otPlatInfraIfSendIcmp6Nd(uint32_t aInfraIfIndex, const otIp6Address *aDestAddress, const uint8_t *aBuffer, uint16_t aBufferLength)

Sends an ICMPv6 Neighbor Discovery message on given infrastructure interface.

void
otPlatInfraIfRecvIcmp6Nd(otInstance *aInstance, uint32_t aInfraIfIndex, const otIp6Address *aSrcAddress, const uint8_t *aBuffer, uint16_t aBufferLength)

The infra interface driver calls this method to notify OpenThread that an ICMPv6 Neighbor Discovery message is received.

otPlatInfraIfStateChanged(otInstance *aInstance, uint32_t aInfraIfIndex, bool aIsRunning)

The infra interface driver calls this method to notify OpenThread of the interface state changes.

otPlatInfraIfDiscoverNat64Prefix(uint32_t aInfraIfIndex)

Send a request to discover the NAT64 prefix on the infrastructure interface with aInfraIfIndex.

void
otPlatInfraIfDiscoverNat64PrefixDone(otInstance *aInstance, uint32_t aInfraIfIndex, const otIp6Prefix *aIp6Prefix)

The infra interface driver calls this method to notify OpenThread that the discovery of NAT64 prefix is done.

Function Documentation#

otPlatInfraIfHasAddress#

bool otPlatInfraIfHasAddress (uint32_t aInfraIfIndex, const otIp6Address * aAddress)

Tells whether an infra interface has the given IPv6 address assigned.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]aInfraIfIndex

The index of the infra interface.

const otIp6Address *[in]aAddress

The IPv6 address.

Returns

  • TRUE if the infra interface has given IPv6 address assigned, FALSE otherwise.


Definition at line 68 of file include/openthread/platform/infra_if.h

otPlatInfraIfSendIcmp6Nd#

otError otPlatInfraIfSendIcmp6Nd (uint32_t aInfraIfIndex, const otIp6Address * aDestAddress, const uint8_t * aBuffer, uint16_t aBufferLength)

Sends an ICMPv6 Neighbor Discovery message on given infrastructure interface.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]aInfraIfIndex

The index of the infrastructure interface this message is sent to.

const otIp6Address *[in]aDestAddress

The destination address this message is sent to.

const uint8_t *[in]aBuffer

The ICMPv6 message buffer. The ICMPv6 checksum is left zero and the platform should do the checksum calculate.

uint16_t[in]aBufferLength

The length of the message buffer.

See RFC 4861: https://tools.ietf.org/html/rfc4861.

Note

  • Per RFC 4861, the implementation should send the message with IPv6 link-local source address of interface aInfraIfIndex and IP Hop Limit 255.


Definition at line 88 of file include/openthread/platform/infra_if.h

otPlatInfraIfRecvIcmp6Nd#

void otPlatInfraIfRecvIcmp6Nd (otInstance * aInstance, uint32_t aInfraIfIndex, const otIp6Address * aSrcAddress, const uint8_t * aBuffer, uint16_t aBufferLength)

The infra interface driver calls this method to notify OpenThread that an ICMPv6 Neighbor Discovery message is received.

Parameters
TypeDirectionArgument NameDescription
otInstance *[in]aInstance

The OpenThread instance structure.

uint32_t[in]aInfraIfIndex

The index of the infrastructure interface on which the ICMPv6 message is received.

const otIp6Address *[in]aSrcAddress

The source address this message is received from.

const uint8_t *[in]aBuffer

The ICMPv6 message buffer.

uint16_t[in]aBufferLength

The length of the ICMPv6 message buffer.

See RFC 4861: https://tools.ietf.org/html/rfc4861.

Note

  • Per RFC 4861, the caller should enforce that the source address MUST be a IPv6 link-local address and the IP Hop Limit MUST be 255.


Definition at line 109 of file include/openthread/platform/infra_if.h

otPlatInfraIfStateChanged#

otError otPlatInfraIfStateChanged (otInstance * aInstance, uint32_t aInfraIfIndex, bool aIsRunning)

The infra interface driver calls this method to notify OpenThread of the interface state changes.

Parameters
TypeDirectionArgument NameDescription
otInstance *[in]aInstance

The OpenThread instance structure.

uint32_t[in]aInfraIfIndex

The index of the infrastructure interface.

bool[in]aIsRunning

A boolean that indicates whether the infrastructure interface is running.

It is fine for the platform to call to method even when the running state of the interface hasn't changed. In this case, the Routing Manager state is not affected.


Definition at line 134 of file include/openthread/platform/infra_if.h

otPlatInfraIfDiscoverNat64Prefix#

otError otPlatInfraIfDiscoverNat64Prefix (uint32_t aInfraIfIndex)

Send a request to discover the NAT64 prefix on the infrastructure interface with aInfraIfIndex.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]aInfraIfIndex

The index of the infrastructure interface to discover the NAT64 prefix.

OpenThread will call this method periodically to monitor the presence or change of NAT64 prefix.


Definition at line 147 of file include/openthread/platform/infra_if.h

otPlatInfraIfDiscoverNat64PrefixDone#

void otPlatInfraIfDiscoverNat64PrefixDone (otInstance * aInstance, uint32_t aInfraIfIndex, const otIp6Prefix * aIp6Prefix)

The infra interface driver calls this method to notify OpenThread that the discovery of NAT64 prefix is done.

Parameters
TypeDirectionArgument NameDescription
otInstance *[in]aInstance

The OpenThread instance structure.

uint32_t[in]aInfraIfIndex

The index of the infrastructure interface on which the NAT64 prefix is discovered.

const otIp6Prefix *[in]aIp6Prefix

A pointer to NAT64 prefix.

Is expected to be invoked after calling otPlatInfraIfDiscoverNat64Prefix. If no NAT64 prefix is discovered, aIp6Prefix shall point to an empty prefix with zero length.


Definition at line 161 of file include/openthread/platform/infra_if.h