mirror of
https://github.com/espressif/openthread.git
synced 2026-08-31 06:19:54 +00:00
[netif] add address callback (#3249)
This commit is contained in:
@@ -408,6 +408,31 @@ typedef void (*otIp6ReceiveCallback)(otMessage *aMessage, void *aContext);
|
||||
*/
|
||||
void otIp6SetReceiveCallback(otInstance *aInstance, otIp6ReceiveCallback aCallback, void *aCallbackContext);
|
||||
|
||||
/**
|
||||
* This function pointer is called when an internal IPv6 address is added or removed.
|
||||
*
|
||||
* @param[in] aAddress A pointer to the IPv6 address.
|
||||
* @param[in] aPrefixLength The prefix length if @p aAddress is unicast address, and 128 for multicast address.
|
||||
* @param[in] aIsAdded TRUE if the @p aAddress was added, FALSE if @p aAddress was removed.
|
||||
* @param[in] aContext A pointer to application-specific context.
|
||||
*
|
||||
*/
|
||||
typedef void (*otIp6AddressCallback)(const otIp6Address *aAddress,
|
||||
uint8_t aPrefixLength,
|
||||
bool aIsAdded,
|
||||
void * aContext);
|
||||
|
||||
/**
|
||||
* This function registers a callback to notify internal IPv6 address changes.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aCallback A pointer to a function that is called when an internal IPv6 address is added or
|
||||
* removed. NULL to disable the callback.
|
||||
* @param[in] aCallbackContext A pointer to application-specific context.
|
||||
*
|
||||
*/
|
||||
void otIp6SetAddressCallback(otInstance *aInstance, otIp6AddressCallback aCallback, void *aCallbackContext);
|
||||
|
||||
/**
|
||||
* This function indicates whether or not Thread control traffic is filtered out when delivering IPv6 datagrams
|
||||
* via the callback specified in otIp6SetReceiveCallback().
|
||||
|
||||
Reference in New Issue
Block a user