mirror of
https://github.com/espressif/openthread.git
synced 2026-07-28 22:57:47 +00:00
[backbone-router] fix build option compile issues (#5955)
This commit is contained in:
@@ -39,9 +39,11 @@
|
||||
#include "platform-posix.h"
|
||||
#include "common/code_utils.hpp"
|
||||
|
||||
char gBackboneNetifName[IFNAMSIZ] = "";
|
||||
unsigned int gBackboneNetifIndex = 0;
|
||||
char gBackboneNetifName[IFNAMSIZ] = "";
|
||||
unsigned int gBackboneNetifIndex = 0;
|
||||
#if OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE
|
||||
static ot::Posix::MulticastRoutingManager sMulticastRoutingManager;
|
||||
#endif
|
||||
|
||||
void platformBackboneInit(otInstance *aInstance, const char *aInterfaceName)
|
||||
{
|
||||
@@ -57,22 +59,38 @@ void platformBackboneInit(otInstance *aInstance, const char *aInterfaceName)
|
||||
|
||||
otLogInfoPlat("Backbone interface is configured to %s (%d)", gBackboneNetifName, gBackboneNetifIndex);
|
||||
|
||||
#if OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE
|
||||
sMulticastRoutingManager.Init(aInstance);
|
||||
#endif
|
||||
}
|
||||
|
||||
void platformBackboneUpdateFdSet(fd_set &aReadFdSet, int &aMaxFd)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aReadFdSet);
|
||||
OT_UNUSED_VARIABLE(aMaxFd);
|
||||
|
||||
#if OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE
|
||||
sMulticastRoutingManager.UpdateFdSet(aReadFdSet, aMaxFd);
|
||||
#endif
|
||||
}
|
||||
|
||||
void platformBackboneProcess(const fd_set &aReadSet)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aReadSet);
|
||||
|
||||
#if OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE
|
||||
sMulticastRoutingManager.Process(aReadSet);
|
||||
#endif
|
||||
}
|
||||
|
||||
void platformBackboneStateChange(otInstance *aInstance, otChangedFlags aFlags)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
OT_UNUSED_VARIABLE(aFlags);
|
||||
|
||||
#if OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE
|
||||
sMulticastRoutingManager.HandleStateChange(aInstance, aFlags);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "posix/platform/multicast_routing.hpp"
|
||||
|
||||
#if OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
|
||||
#if OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE
|
||||
|
||||
#include <assert.h>
|
||||
#include <net/if.h>
|
||||
@@ -566,4 +566,4 @@ void MulticastRoutingManager::RemoveMulticastForwardingCache(
|
||||
} // namespace Posix
|
||||
} // namespace ot
|
||||
|
||||
#endif // OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
|
||||
#endif // OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include "openthread-posix-config.h"
|
||||
|
||||
#if OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
|
||||
#if OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -175,6 +175,6 @@ private:
|
||||
} // namespace Posix
|
||||
} // namespace ot
|
||||
|
||||
#endif // OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
|
||||
#endif // OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE
|
||||
|
||||
#endif // OT_POSIX_PLATFORM_MULTICAST_ROUTING_HPP_
|
||||
|
||||
Reference in New Issue
Block a user