Modules#
IPv6#
This module includes functions that control IPv6 communication.
Enumerations#
IPv6 Address origins.
ECN statuses, represented as in the IP header.
Internet Protocol Numbers.
Typedefs#
This structure represents the Interface Identifier of an IPv6 address.
This structure represents the Network Prefix of an IPv6 address (most significant 64 bits of the address).
This structure represents the components of an IPv6 address.
This structure represents an IPv6 address.
This structure represents an IPv6 prefix.
This structure represents an IPv6 network interface unicast address.
This structure represents an IPv6 network interface multicast address.
This structure represents an IPv6 socket address.
This structure represents the local and peer IPv6 socket addresses.
This function pointer is called when an IPv6 datagram is received.
This function pointer is called when an internal IPv6 address is added or removed.
This function pointer allows user to filter prefixes and not allow an SLAAC address based on a prefix to be added.
This function pointer is called with results of otIp6RegisterMulticastListeners
.
This structure represents the counters for packets and bytes.
This structure represents the counters of packets forwarded via Border Routing.
Variables#
Functions#
Brings the IPv6 interface up or down.
Indicates whether or not the IPv6 interface is up.
Adds a Network Interface Address to the Thread interface.
Removes a Network Interface Address from the Thread interface.
Gets the list of IPv6 addresses assigned to the Thread interface.
Subscribes the Thread interface to a Network Interface Multicast Address.
Unsubscribes the Thread interface to a Network Interface Multicast Address.
Gets the list of IPv6 multicast addresses subscribed to the Thread interface.
Checks if multicast promiscuous mode is enabled on the Thread interface.
Enables or disables multicast promiscuous mode on the Thread interface.
Allocate a new message buffer for sending an IPv6 message.
Allocate a new message buffer and write the IPv6 datagram to the message buffer for sending an IPv6 message.
This function registers a callback to provide received IPv6 datagrams.
This function registers a callback to notify internal IPv6 address changes.
This function indicates whether or not Thread control traffic is filtered out when delivering IPv6 datagrams via the callback specified in otIp6SetReceiveCallback().
This function sets whether or not Thread control traffic is filtered out when delivering IPv6 datagrams via the callback specified in otIp6SetReceiveCallback().
This function adds a port to the allowed unsecured port list.
This function removes a port from the allowed unsecure port list.
This function removes all ports from the allowed unsecure port list.
This function returns a pointer to the unsecure port list.
Test if two IPv6 addresses are the same.
Test if two IPv6 prefixes are the same.
This function converts a human-readable IPv6 address string into a binary representation.
This function converts a human-readable IPv6 prefix string into a binary representation.
This function converts a given IPv6 address to a human-readable string.
This function converts a given IPv6 socket address to a human-readable string.
This function converts a given IPv6 prefix to a human-readable string.
This function returns the prefix match length (bits) for two IPv6 addresses.
This method gets a prefix with aLength
from aAddress
.
This function indicates whether or not a given IPv6 address is the Unspecified Address.
This function perform OpenThread source address selection.
This function indicates whether the SLAAC module is enabled or not.
This function enables/disables the SLAAC module.
This function sets the SLAAC module filter handler.
This function registers Multicast Listeners to Primary Backbone Router.
This function sets the Mesh Local IID (for test purpose).
This function converts a given IP protocol number to a human-readable string.
Gets the Border Routing counters.
Resets the Border Routing counters.
Macros#
Size of an IPv6 prefix (bytes)
Size of an IPv6 prefix (bits)
Size of an IPv6 Interface Identifier (bytes)
Size of an IPv6 address (bytes)
Recommended size for string representation of an IPv6 address.
Recommended size for string representation of an IPv6 socket address.
Recommended size for string representation of an IPv6 prefix.
Max number of IPv6 addresses supported by Multicast Listener Registration.
Enumeration Documentation#
@3#
@3
IPv6 Address origins.
Enumerator | |
---|---|
OT_ADDRESS_ORIGIN_THREAD | Thread assigned address (ALOC, RLOC, MLEID, etc) |
OT_ADDRESS_ORIGIN_SLAAC | SLAAC assigned address. |
OT_ADDRESS_ORIGIN_DHCPV6 | DHCPv6 assigned address. |
OT_ADDRESS_ORIGIN_MANUAL | Manually assigned address. |
165
of file include/openthread/ip6.h
@4#
@4
ECN statuses, represented as in the IP header.
Enumerator | |
---|---|
OT_ECN_NOT_CAPABLE | Non-ECT. |
OT_ECN_CAPABLE_0 | ECT(0) |
OT_ECN_CAPABLE_1 | ECT(1) |
OT_ECN_MARKED | Congestion encountered (CE) |
214
of file include/openthread/ip6.h
@5#
@5
Internet Protocol Numbers.
Enumerator | |
---|---|
OT_IP6_PROTO_HOP_OPTS | IPv6 Hop-by-Hop Option. |
OT_IP6_PROTO_TCP | Transmission Control Protocol. |
OT_IP6_PROTO_UDP | User Datagram. |
OT_IP6_PROTO_IP6 | IPv6 encapsulation. |
OT_IP6_PROTO_ROUTING | Routing Header for IPv6. |
OT_IP6_PROTO_FRAGMENT | Fragment Header for IPv6. |
OT_IP6_PROTO_ICMP6 | ICMP for IPv6. |
OT_IP6_PROTO_NONE | No Next Header for IPv6. |
OT_IP6_PROTO_DST_OPTS | Destination Options for IPv6. |
246
of file include/openthread/ip6.h
Typedef Documentation#
otIp6InterfaceIdentifier#
typedef struct otIp6InterfaceIdentifier otIp6InterfaceIdentifier
This structure represents the Interface Identifier of an IPv6 address.
81
of file include/openthread/ip6.h
otIp6NetworkPrefix#
typedef struct otIp6NetworkPrefix otIp6NetworkPrefix
This structure represents the Network Prefix of an IPv6 address (most significant 64 bits of the address).
99
of file include/openthread/ip6.h
otIp6AddressComponents#
typedef struct otIp6AddressComponents otIp6AddressComponents
This structure represents the components of an IPv6 address.
118
of file include/openthread/ip6.h
otIp6Address#
typedef struct otIp6Address otIp6Address
This structure represents an IPv6 address.
142
of file include/openthread/ip6.h
otIp6Prefix#
typedef struct otIp6Prefix otIp6Prefix
This structure represents an IPv6 prefix.
159
of file include/openthread/ip6.h
otNetifAddress#
typedef struct otNetifAddress otNetifAddress
This structure represents an IPv6 network interface unicast address.
188
of file include/openthread/ip6.h
otNetifMulticastAddress#
typedef struct otNetifMulticastAddress otNetifMulticastAddress
This structure represents an IPv6 network interface multicast address.
198
of file include/openthread/ip6.h
otSockAddr#
typedef struct otSockAddr otSockAddr
This structure represents an IPv6 socket address.
208
of file include/openthread/ip6.h
otMessageInfo#
typedef struct otMessageInfo otMessageInfo
This structure represents the local and peer IPv6 socket addresses.
240
of file include/openthread/ip6.h
otIp6ReceiveCallback#
typedef void(* otIp6ReceiveCallback) (otMessage *aMessage, void *aContext) )(otMessage *aMessage, void *aContext)
This function pointer is called when an IPv6 datagram is received.
[in] | aMessage | A pointer to the message buffer containing the received IPv6 datagram. This function transfers the ownership of the |
[in] | aContext | A pointer to application-specific context. |
431
of file include/openthread/ip6.h
otIp6AddressInfo#
typedef struct otIp6AddressInfo otIp6AddressInfo
462
of file include/openthread/ip6.h
otIp6AddressCallback#
typedef void(* otIp6AddressCallback) (const otIp6AddressInfo *aAddressInfo, bool aIsAdded, void *aContext) )(const otIp6AddressInfo *aAddressInfo, bool aIsAdded, void *aContext)
This function pointer is called when an internal IPv6 address is added or removed.
[in] | aAddressInfo | A pointer to the IPv6 address information. |
[in] | aIsAdded | TRUE if the |
[in] | aContext | A pointer to application-specific context. |
472
of file include/openthread/ip6.h
otIp6SlaacPrefixFilter#
typedef bool(* otIp6SlaacPrefixFilter) (otInstance *aInstance, const otIp6Prefix *aPrefix) )(otInstance *aInstance, const otIp6Prefix *aPrefix)
This function pointer allows user to filter prefixes and not allow an SLAAC address based on a prefix to be added.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aPrefix | A pointer to prefix for which SLAAC address is about to be added. |
otIp6SetSlaacPrefixFilter()
can be used to set the filter handler. The filter handler is invoked by SLAAC module when it is about to add a SLAAC address based on a prefix. Its boolean return value determines whether the address is filtered (not added) or not.
770
of file include/openthread/ip6.h
otIp6RegisterMulticastListenersCallback#
typedef void(* otIp6RegisterMulticastListenersCallback) (void *aContext, otError aError, uint8_t aMlrStatus, const otIp6Address *aFailedAddresses, uint8_t aFailedAddressNum) )(void *aContext, otError aError, uint8_t aMlrStatus, const otIp6Address *aFailedAddresses, uint8_t aFailedAddressNum)
This function pointer is called with results of otIp6RegisterMulticastListeners
.
[in] | aContext | A pointer to the user context. |
[in] | aError | OT_ERROR_NONE when successfully sent MLR.req and received MLR.rsp, OT_ERROR_RESPONSE_TIMEOUT when failed to receive MLR.rsp, OT_ERROR_PARSE when failed to parse MLR.rsp. |
[in] | aMlrStatus | The Multicast Listener Registration status when |
[in] | aFailedAddresses | A pointer to the failed IPv6 addresses when |
[in] | aFailedAddressNum | The number of failed IPv6 addresses when |
See Also
804
of file include/openthread/ip6.h
otPacketsAndBytes#
typedef struct otPacketsAndBytes otPacketsAndBytes
This structure represents the counters for packets and bytes.
877
of file include/openthread/ip6.h
otBorderRoutingCounters#
typedef struct otBorderRoutingCounters otBorderRoutingCounters
This structure represents the counters of packets forwarded via Border Routing.
895
of file include/openthread/ip6.h
Variable Documentation#
OT_TOOL_PACKED_END#
OT_TOOL_PACKED_BEGIN struct otIp6Prefix OT_TOOL_PACKED_END
75
of file include/openthread/ip6.h
Function Documentation#
otIp6SetEnabled#
otError otIp6SetEnabled (otInstance * aInstance, bool aEnabled)
Brings the IPv6 interface up or down.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aEnabled | TRUE to enable IPv6, FALSE otherwise. |
Call this to enable or disable IPv6 communication.
272
of file include/openthread/ip6.h
otIp6IsEnabled#
bool otIp6IsEnabled (otInstance * aInstance)
Indicates whether or not the IPv6 interface is up.
[in] | aInstance | A pointer to an OpenThread instance. |
283
of file include/openthread/ip6.h
otIp6AddUnicastAddress#
otError otIp6AddUnicastAddress (otInstance * aInstance, const otNetifAddress * aAddress)
Adds a Network Interface Address to the Thread interface.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aAddress | A pointer to a Network Interface Address. |
The passed-in instance aAddress
is copied by the Thread interface. The Thread interface only supports a fixed number of externally added unicast addresses. See OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS
.
298
of file include/openthread/ip6.h
otIp6RemoveUnicastAddress#
otError otIp6RemoveUnicastAddress (otInstance * aInstance, const otIp6Address * aAddress)
Removes a Network Interface Address from the Thread interface.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aAddress | A pointer to an IP Address. |
310
of file include/openthread/ip6.h