@@ -106,6 +106,18 @@ typedef struct otBorderRoutingPrefixTableEntry
106106 uint32_t mPreferredLifetime ; ///< Preferred lifetime of the on-link prefix when `mIsOnLink` is true.
107107} otBorderRoutingPrefixTableEntry ;
108108
109+ /**
110+ * This enumeration represents the state of Border Routing Manager.
111+ *
112+ */
113+ typedef enum
114+ {
115+ OT_BORDER_ROUTING_STATE_UNINITIALIZED , ///< Routing Manager is uninitialized.
116+ OT_BORDER_ROUTING_STATE_DISABLED , ///< Routing Manager is initialized but disabled.
117+ OT_BORDER_ROUTING_STATE_STOPPED , ///< Routing Manager in initialized and enabled but currently stopped.
118+ OT_BORDER_ROUTING_STATE_RUNNING , ///< Routing Manager is initialized, enabled, and running.
119+ } otBorderRoutingState ;
120+
109121/**
110122 * This method initializes the Border Routing Manager on given infrastructure interface.
111123 *
@@ -140,6 +152,16 @@ otError otBorderRoutingInit(otInstance *aInstance, uint32_t aInfraIfIndex, bool
140152 */
141153otError otBorderRoutingSetEnabled (otInstance * aInstance , bool aEnabled );
142154
155+ /**
156+ * Gets the current state of Border Routing Manager.
157+ *
158+ * @param[in] aInstance A pointer to an OpenThread instance.
159+ *
160+ * @returns The current state of Border Routing Manager.
161+ *
162+ */
163+ otBorderRoutingState otBorderRoutingGetState (otInstance * aInstance );
164+
143165/**
144166 * This function gets the current preference used when advertising Route Info Options (RIO) in Router Advertisement
145167 * messages sent over the infrastructure link.
@@ -212,20 +234,34 @@ otError otBorderRoutingGetOmrPrefix(otInstance *aInstance, otIp6Prefix *aPrefix)
212234otError otBorderRoutingGetFavoredOmrPrefix (otInstance * aInstance , otIp6Prefix * aPrefix , otRoutePreference * aPreference );
213235
214236/**
215- * Gets the On-Link Prefix for the adjacent infrastructure link, for example `fd41:2650:a6f5:0::/64` .
237+ * Gets the local On-Link Prefix for the adjacent infrastructure link.
216238 *
217- * An On-Link Prefix is a 64-bit prefix that's advertised on the infrastructure link if there isn't already a usable
218- * on-link prefix being advertised on the link.
239+ * The local On-Link Prefix is a 64-bit prefix that's advertised on the infrastructure link if there isn't already a
240+ * usable on-link prefix being advertised on the link.
219241 *
220242 * @param[in] aInstance A pointer to an OpenThread instance.
221243 * @param[out] aPrefix A pointer to where the prefix will be output to.
222244 *
223245 * @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not initialized yet.
224- * @retval OT_ERROR_NONE Successfully retrieved the on-link prefix.
246+ * @retval OT_ERROR_NONE Successfully retrieved the local on-link prefix.
225247 *
226248 */
227249otError otBorderRoutingGetOnLinkPrefix (otInstance * aInstance , otIp6Prefix * aPrefix );
228250
251+ /**
252+ * Gets the currently favored On-Link Prefix.
253+ *
254+ * The favored prefix is either a discovered on-link prefix on the infrastructure link or the local on-link prefix.
255+ *
256+ * @param[in] aInstance A pointer to an OpenThread instance.
257+ * @param[out] aPrefix A pointer to where the prefix will be output to.
258+ *
259+ * @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not initialized yet.
260+ * @retval OT_ERROR_NONE Successfully retrieved the favored on-link prefix.
261+ *
262+ */
263+ otError otBorderRoutingGetFavoredOnLinkPrefix (otInstance * aInstance , otIp6Prefix * aPrefix );
264+
229265/**
230266 * Gets the local NAT64 Prefix of the Border Router.
231267 *
0 commit comments