mirror of
https://github.com/espressif/openthread.git
synced 2026-09-01 06:49:54 +00:00
[backbone-router] fix otBackboneRouterMulticastListenerGetNext missing (#5894)
otBackboneRouterMulticastListenerGetNext is also used by non reference device code.
This commit is contained in:
@@ -291,9 +291,6 @@ typedef struct otBackboneRouterMulticastListenerInfo
|
||||
/**
|
||||
* This function gets the next Multicast Listener info (using an iterator).
|
||||
*
|
||||
* Note: available only when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled.
|
||||
* Only used for test and certification.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[inout] aIterator A pointer to the iterator. On success the iterator will be updated to point to next
|
||||
* Multicast Listener. To get the first entry the iterator should be set to
|
||||
|
||||
@@ -53,7 +53,7 @@ extern "C" {
|
||||
* @note This number versions both OpenThread platform and user APIs.
|
||||
*
|
||||
*/
|
||||
#define OPENTHREAD_API_VERSION (51)
|
||||
#define OPENTHREAD_API_VERSION (52)
|
||||
|
||||
/**
|
||||
* @addtogroup api-instance
|
||||
|
||||
@@ -120,6 +120,18 @@ void otBackboneRouterSetMulticastListenerCallback(otInstance *
|
||||
instance.Get<BackboneRouter::MulticastListenersTable>().SetCallback(aCallback, aContext);
|
||||
}
|
||||
|
||||
otError otBackboneRouterMulticastListenerGetNext(otInstance * aInstance,
|
||||
otChildIp6AddressIterator * aIterator,
|
||||
otBackboneRouterMulticastListenerInfo *aListenerInfo)
|
||||
{
|
||||
Instance &instance = *static_cast<Instance *>(aInstance);
|
||||
|
||||
OT_ASSERT(aIterator != nullptr);
|
||||
OT_ASSERT(aListenerInfo != nullptr);
|
||||
|
||||
return instance.Get<BackboneRouter::MulticastListenersTable>().GetNext(*aIterator, *aListenerInfo);
|
||||
}
|
||||
|
||||
#if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
|
||||
void otBackboneRouterConfigNextDuaRegistrationResponse(otInstance * aInstance,
|
||||
const otIp6InterfaceIdentifier *aMlIid,
|
||||
@@ -168,18 +180,6 @@ otError otBackboneRouterMulticastListenerAdd(otInstance *aInstance, const otIp6A
|
||||
return instance.Get<BackboneRouter::MulticastListenersTable>().Add(static_cast<const Ip6::Address &>(*aAddress),
|
||||
TimerMilli::GetNow() + aTimeout);
|
||||
}
|
||||
|
||||
otError otBackboneRouterMulticastListenerGetNext(otInstance * aInstance,
|
||||
otChildIp6AddressIterator * aIterator,
|
||||
otBackboneRouterMulticastListenerInfo *aListenerInfo)
|
||||
{
|
||||
Instance &instance = *static_cast<Instance *>(aInstance);
|
||||
|
||||
OT_ASSERT(aIterator != nullptr);
|
||||
OT_ASSERT(aListenerInfo != nullptr);
|
||||
|
||||
return instance.Get<BackboneRouter::MulticastListenersTable>().GetNext(*aIterator, *aListenerInfo);
|
||||
}
|
||||
#endif // OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
|
||||
|
||||
void otBackboneRouterSetNdProxyCallback(otInstance * aInstance,
|
||||
|
||||
@@ -287,8 +287,6 @@ void MulticastListenersTable::SetCallback(otBackboneRouterMulticastListenerCallb
|
||||
}
|
||||
}
|
||||
|
||||
#if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
|
||||
|
||||
otError MulticastListenersTable::GetNext(otBackboneRouterMulticastListenerIterator &aIterator,
|
||||
otBackboneRouterMulticastListenerInfo & aListenerInfo)
|
||||
{
|
||||
@@ -309,8 +307,6 @@ exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
#endif // OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
|
||||
|
||||
} // namespace BackboneRouter
|
||||
|
||||
} // namespace ot
|
||||
|
||||
@@ -175,7 +175,6 @@ public:
|
||||
*/
|
||||
void SetCallback(otBackboneRouterMulticastListenerCallback aCallback, void *aContext);
|
||||
|
||||
#if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
|
||||
/**
|
||||
* This method gets the next Multicast Listener.
|
||||
*
|
||||
@@ -188,7 +187,6 @@ public:
|
||||
*/
|
||||
otError GetNext(otBackboneRouterMulticastListenerIterator &aIterator,
|
||||
otBackboneRouterMulticastListenerInfo & aListenerInfo);
|
||||
#endif
|
||||
|
||||
private:
|
||||
enum
|
||||
|
||||
Reference in New Issue
Block a user