Function openthread_sys::otIp6RegisterMulticastListeners
source · pub unsafe extern "C" fn otIp6RegisterMulticastListeners(
aInstance: *mut otInstance,
aAddresses: *const otIp6Address,
aAddressNum: u8,
aTimeout: *const u32,
aCallback: otIp6RegisterMulticastListenersCallback,
aContext: *mut c_void
) -> otError
Expand description
Registers Multicast Listeners to Primary Backbone Router.
OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE
and OPENTHREAD_CONFIG_COMMISSIONER_ENABLE
must be enabled.
@param[in] aInstance A pointer to an OpenThread instance. @param[in] aAddresses A Multicast Address Array to register. @param[in] aAddressNum The number of Multicast Address to register (0 if @p aAddresses is NULL). @param[in] aTimeout A pointer to the timeout value (in seconds) to be included in MLR.req. A timeout value of 0 removes the corresponding Multicast Listener. If NULL, MLR.req would have no Timeout Tlv by default. @param[in] aCallback A pointer to the callback function. @param[in] aContext A pointer to the user context.
@retval OT_ERROR_NONE Successfully sent MLR.req. The @p aCallback will be called iff this method returns OT_ERROR_NONE. @retval OT_ERROR_BUSY If a previous registration was ongoing. @retval OT_ERROR_INVALID_ARGS If one or more arguments are invalid. @retval OT_ERROR_INVALID_STATE If the device was not in a valid state to send MLR.req (e.g. Commissioner not started, Primary Backbone Router not found). @retval OT_ERROR_NO_BUFS If insufficient message buffers available.
@sa otIp6RegisterMulticastListenersCallback