0.01.00
ip6.h File Reference

This file defines the OpenThread IPv6 API. More...

Go to the source code of this file.

Typedefs

typedef otError(* otIp6SlaacIidCreate) (otInstance *aInstance, otNetifAddress *aAddress, void *aContext)
 This function pointer is called to create IPv6 IID during SLAAC procedure. More...
 
typedef void(* otIp6ReceiveCallback) (otMessage *aMessage, void *aContext)
 This function pointer is called when an IPv6 datagram is received. More...
 

Functions

OTAPI otError OTCALL otIp6SetEnabled (otInstance *aInstance, bool aEnabled)
 This function brings up the IPv6 interface. More...
 
OTAPI bool OTCALL otIp6IsEnabled (otInstance *aInstance)
 This function indicates whether or not the IPv6 interface is up. More...
 
OTAPI otError OTCALL otIp6AddUnicastAddress (otInstance *aInstance, const otNetifAddress *aAddress)
 Add a Network Interface Address to the Thread interface. More...
 
OTAPI otError OTCALL otIp6RemoveUnicastAddress (otInstance *aInstance, const otIp6Address *aAddress)
 Remove a Network Interface Address from the Thread interface. More...
 
OTAPI const otNetifAddress *OTCALL otIp6GetUnicastAddresses (otInstance *aInstance)
 Get the list of IPv6 addresses assigned to the Thread interface. More...
 
otError otIp6SubscribeMulticastAddress (otInstance *aInstance, const otIp6Address *aAddress)
 Subscribe the Thread interface to a Network Interface Multicast Address. More...
 
otError otIp6UnsubscribeMulticastAddress (otInstance *aInstance, const otIp6Address *aAddress)
 Unsubscribe the Thread interface to a Network Interface Multicast Address. More...
 
const otNetifMulticastAddressotIp6GetMulticastAddresses (otInstance *aInstance)
 Get the list of IPv6 multicast addresses subscribed to the Thread interface. More...
 
bool otIp6IsMulticastPromiscuousEnabled (otInstance *aInstance)
 Check if multicast promiscuous mode is enabled on the Thread interface. More...
 
void otIp6SetMulticastPromiscuousEnabled (otInstance *aInstance, bool aEnabled)
 Enable multicast promiscuous mode on the Thread interface. More...
 
void otIp6SlaacUpdate (otInstance *aInstance, otNetifAddress *aAddresses, uint32_t aNumAddresses, otIp6SlaacIidCreate aIidCreate, void *aContext)
 Update all automatically created IPv6 addresses for prefixes from current Network Data with SLAAC procedure. More...
 
otError otIp6CreateRandomIid (otInstance *aInstance, otNetifAddress *aAddresses, void *aContext)
 Create random IID for given IPv6 address. More...
 
otError otIp6CreateMacIid (otInstance *aInstance, otNetifAddress *aAddresses, void *aContext)
 Create IID for given IPv6 address using extended MAC address. More...
 
otError otIp6CreateSemanticallyOpaqueIid (otInstance *aInstance, otNetifAddress *aAddresses, void *aContext)
 Create semantically opaque IID for given IPv6 address. More...
 
otMessageotIp6NewMessage (otInstance *aInstance, bool aLinkSecurityEnabled)
 Allocate a new message buffer for sending an IPv6 message. More...
 
void otIp6SetReceiveCallback (otInstance *aInstance, otIp6ReceiveCallback aCallback, void *aCallbackContext)
 This function registers a callback to provide received IPv6 datagrams. More...
 
bool otIp6IsReceiveFilterEnabled (otInstance *aInstance)
 This function indicates whether or not Thread control traffic is filtered out when delivering IPv6 datagrams via the callback specified in otIp6SetReceiveCallback(). More...
 
void otIp6SetReceiveFilterEnabled (otInstance *aInstance, bool aEnabled)
 This function sets whether or not Thread control traffic is filtered out when delivering IPv6 datagrams via the callback specified in otIp6SetReceiveCallback(). More...
 
otError otIp6Send (otInstance *aInstance, otMessage *aMessage)
 This function sends an IPv6 datagram via the Thread interface. More...
 
otError otIp6AddUnsecurePort (otInstance *aInstance, uint16_t aPort)
 This function adds a port to the allowed unsecured port list. More...
 
otError otIp6RemoveUnsecurePort (otInstance *aInstance, uint16_t aPort)
 This function removes a port from the allowed unsecure port list. More...
 
const uint16_t * otIp6GetUnsecurePorts (otInstance *aInstance, uint8_t *aNumEntries)
 This function returns a pointer to the unsecure port list. More...
 
OTAPI bool OTCALL otIp6IsAddressEqual (const otIp6Address *a, const otIp6Address *b)
 Test if two IPv6 addresses are the same. More...
 
OTAPI otError OTCALL otIp6AddressFromString (const char *aString, otIp6Address *aAddress)
 Convert a human-readable IPv6 address string into a binary representation. More...
 
OTAPI uint8_t OTCALL otIp6PrefixMatch (const otIp6Address *aFirst, const otIp6Address *aSecond)
 This function returns the prefix match length (bits) for two IPv6 addresses. More...
 

Detailed Description

This file defines the OpenThread IPv6 API.