1 /*
2  * Copyright 2025 NXP
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include <openthread/backbone_router_ftd.h>
8 #include <openthread/ip6.h>
9 
10 /**
11  * @brief The callback type for notifying a subscription to an IPv6 multicast address
12  * This callback is called when backbone router notifies a subscription/de-registration.
13  *
14  * @param context The context to pass to the callback.
15  * @param event The multicast listener event.
16  * @param address The IPv6 address of the multicast listener.
17  */
18 typedef void (*openthread_bbr_multicast_listener_cb)(void *context,
19 						     otBackboneRouterMulticastListenerEvent event,
20 						     const otIp6Address *address);
21 
22 /**
23  * @brief Set the additional callback for OpenThread multicast listener subscription.
24  *
25  * @details This callback is called once a subscription to an IPv6 multicast address is performed.
26  * Setting this callback is optional.
27  *
28  * @param cb Callback to set.
29  * @param context Context to pass to the callback.
30  */
31 void openthread_set_bbr_multicast_listener_cb(openthread_bbr_multicast_listener_cb cb,
32 					      void *context);
33 
34 /**
35  * @brief Initializes the Border Router application.
36  *
37  * @details This function registers required AIL and OpenThread callbacks.
38  *
39  * @param ot_ctx Pointer to OpenThread context.
40  */
41 void openthread_border_router_init(struct openthread_context *ot_ctx);
42 
43 /**
44  * @brief Returns OpenThread's IPv6 slaac address.
45  *
46  * @param ot_ctx Pointer to OpenThread instance.
47  */
48 const otIp6Address *get_ot_slaac_address(otInstance *instance);
49