Skip to content

Commit bce7c1a

Browse files
authored
[nat64] change BORDER_ROUTING_NAT64 to NAT64_BORDER_ROUTING (openthread#8047)
We decided to rename BORDER_ROUTING_NAT64 to NAT64_BORDER_ROUTING so the flag won't be confusing since we have NAT64_TRANSLATOR which does not depends on the border routing manager.
1 parent 3d60038 commit bce7c1a

24 files changed

+122
-77
lines changed

etc/cmake/options.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ ot_option(OT_BACKBONE_ROUTER_MULTICAST_ROUTING OPENTHREAD_CONFIG_BACKBONE_ROUTER
7777
ot_option(OT_BORDER_AGENT OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE "border agent")
7878
ot_option(OT_BORDER_ROUTER OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE "border router")
7979
ot_option(OT_BORDER_ROUTING OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE "border routing")
80-
ot_option(OT_BORDER_ROUTING_NAT64 OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE "border routing NAT64")
8180
ot_option(OT_CHANNEL_MANAGER OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE "channel manager")
8281
ot_option(OT_CHANNEL_MONITOR OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE "channel monitor")
8382
ot_option(OT_CHILD_SUPERVISION OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE "child supervision")
@@ -115,6 +114,7 @@ ot_option(OT_MLE_LONG_ROUTES OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE "MLE long
115114
ot_option(OT_MLR OPENTHREAD_CONFIG_MLR_ENABLE "Multicast Listener Registration (MLR)")
116115
ot_option(OT_MTD_NETDIAG OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE "TMF network diagnostics on MTDs")
117116
ot_option(OT_MULTIPLE_INSTANCE OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE "multiple instances")
117+
ot_option(OT_NAT64_BORDER_ROUTING OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE "border routing NAT64")
118118
ot_option(OT_NAT64_TRANSLATOR OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE "NAT64 translator support")
119119
ot_option(OT_NEIGHBOR_DISCOVERY_AGENT OPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE "neighbor discovery agent")
120120
ot_option(OT_NETDATA_PUBLISHER OPENTHREAD_CONFIG_NETDATA_PUBLISHER_ENABLE "Network Data publisher")

examples/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ This page lists the available common switches with description. Unless stated ot
1212
| BORDER_AGENT | OT_BORDER_AGENT | Enables support for border agent. In most cases, enable this switch if you are building On-mesh Commissioner or Border Router with External Commissioning support. |
1313
| BORDER_ROUTER | OT_BORDER_ROUTER | Enables support for Border Router. This switch is usually combined with the BORDER_AGENT and UDP_FORWARD (or PLATFORM_UDP in case of RCP design) switches to build Border Router device. |
1414
| BORDER_ROUTING | OT_BORDER_ROUTING | Enables bi-directional border routing between Thread and Infrastructure networks for Border Router. |
15-
| BORDER_ROUTING_NAT64 | OT_BORDER_ROUTING_NAT64 | Enables NAT64 border routing support for Border Router. |
16-
| NAT64_TRANSLATOR | OT_NAT64_TRANSLATOR | Enables NAT64 translator for Border Router. |
1715
| BUILTIN_MBEDTLS_MANAGEMENT | OT_BUILTIN_MBEDTLS_MANAGEMENT | Enables the built-in mbedTLS management. Enable this switch if the external mbedTLS is used, but mbedTLS memory allocation and debug config should be managed internally by OpenThread. |
1816
| CHANNEL_MANAGER | OT_CHANNEL_MANAGER | Enables support for channel manager. Enable this switch on devices that are supposed to request a Thread network channel change. This switch should be used only with an FTD build. |
1917
| CHANNEL_MONITOR | OT_CHANNEL_MONITOR | Enables support for channel monitor. Enable this switch on devices that are supposed to determine the cleaner channels. |
@@ -55,6 +53,8 @@ This page lists the available common switches with description. Unless stated ot
5553
| MLR | OT_MLR | Enables Multicast Listener Registration feature for Thread 1.2. |
5654
| MTD_NETDIAG | OT_MTD_NETDIAG | Enables the TMF network diagnostics on MTDs. |
5755
| MULTIPLE_INSTANCE | OT_MULTIPLE_INSTANCE | Enables multiple OpenThread instances. |
56+
| NAT64_BORDER_ROUTING | OT_NAT64_BORDER_ROUTING | Enables NAT64 border routing support for Border Router. |
57+
| NAT64_TRANSLATOR | OT_NAT64_TRANSLATOR | Enables NAT64 translator for Border Router. |
5858
| NETDATA_PUBLISHER | OT_NETDATA_PUBLISHER | Enables support for Thread Network Data publisher. |
5959
| PING_SENDER | OT_PING_SENDER | Enables support for ping sender. |
6060
| OTNS | OT_OTNS | Enables support for [OpenThread Network Simulator](https://github.com/openthread/ot-ns). Enable this switch if you are building OpenThread for OpenThread Network Simulator. |

examples/common-switches.mk

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ BIG_ENDIAN ?= 0
3434
BORDER_AGENT ?= 0
3535
BORDER_ROUTER ?= 0
3636
BORDER_ROUTING ?= 0
37-
BORDER_ROUTING_NAT64 ?= 0
3837
COAP ?= 0
3938
COAP_BLOCK ?= 0
4039
COAP_OBSERVE ?= 0
@@ -73,6 +72,7 @@ MLE_LONG_ROUTES ?= 0
7372
MLR ?= 0
7473
MTD_NETDIAG ?= 0
7574
MULTIPLE_INSTANCE ?= 0
75+
NAT64_BORDER_ROUTING ?= 0
7676
NAT64_TRANSLATOR ?= 0
7777
NEIGHBOR_DISCOVERY_AGENT ?= 0
7878
NETDATA_PUBLISHER ?= 0
@@ -118,8 +118,8 @@ ifeq ($(BORDER_ROUTING),1)
118118
COMMONCFLAGS += -DOPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE=1
119119
endif
120120

121-
ifeq ($(BORDER_ROUTING_NAT64),1)
122-
COMMONCFLAGS += -DOPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE=1
121+
ifeq ($(NAT64_BORDER_ROUTING),1)
122+
COMMONCFLAGS += -DOPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE=1
123123
endif
124124

125125
ifeq ($(NAT64_TRANSLATOR),1)

include/openthread/border_routing.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ otError otBorderRoutingGetOnLinkPrefix(otInstance *aInstance, otIp6Prefix *aPref
216216
*
217217
* NAT64 Prefix might not be advertised in the Thread network.
218218
*
219-
* `OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE` must be enabled.
219+
* `OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` must be enabled.
220220
*
221221
* @param[in] aInstance A pointer to an OpenThread instance.
222222
* @param[out] aPrefix A pointer to where the prefix will be output to.

include/openthread/instance.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ extern "C" {
5353
* @note This number versions both OpenThread platform and user APIs.
5454
*
5555
*/
56-
#define OPENTHREAD_API_VERSION (239)
56+
#define OPENTHREAD_API_VERSION (240)
5757

5858
/**
5959
* @addtogroup api-instance

include/openthread/nat64.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ extern "C" {
4646
* @addtogroup api-nat64
4747
*
4848
* @brief This module includes functions and structs for the NAT64 function on the border router. These functions are
49-
* only available when `OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE` is enabled.
49+
* only available when `OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` is enabled.
5050
*
5151
* @{
5252
*

script/check-scan-build

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ readonly OT_BUILD_OPTIONS=(
3737
"-DOT_BORDER_AGENT=ON"
3838
"-DOT_BORDER_ROUTER=ON"
3939
"-DOT_BORDER_ROUTING=ON"
40-
"-DOT_BORDER_ROUTING_NAT64=ON"
41-
"-DOT_NAT64_TRANSLATOR=ON"
4240
"-DOT_COAP=ON"
4341
"-DOT_COAP_BLOCK=ON"
4442
"-DOT_COAP_OBSERVE=ON"
@@ -64,6 +62,8 @@ readonly OT_BUILD_OPTIONS=(
6462
"-DOT_LOG_LEVEL_DYNAMIC=ON"
6563
"-DOT_MAC_FILTER=ON"
6664
"-DOT_MTD_NETDIAG=ON"
65+
"-DOT_NAT64_BORDER_ROUTING=ON"
66+
"-DOT_NAT64_TRANSLATOR=ON"
6767
"-DOT_NEIGHBOR_DISCOVERY_AGENT=ON"
6868
"-DOT_PING_SENDER=ON"
6969
"-DOT_PLATFORM=external"

script/check-simulation-build-autotools

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ build_all_features()
9595

9696
local options_1_3=(
9797
"-DOPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE=1"
98-
"-DOPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE=1"
98+
"-DOPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE=1"
9999
"-DOPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE=1"
100100
"-DOPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE=1"
101101
"-DOPENTHREAD_CONFIG_DUA_ENABLE=1"

script/check-simulation-build-cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ build_all_features()
5757
local options=(
5858
"-DOT_BACKBONE_ROUTER=ON"
5959
"-DOT_BORDER_ROUTING=ON"
60-
"-DOT_BORDER_ROUTING_NAT64=ON"
60+
"-DOT_NAT64_BORDER_ROUTING=ON"
6161
"-DOT_NAT64_TRANSLATOR=ON"
6262
"-DOT_CSL_RECEIVER=ON"
6363
"-DOT_MLR=ON"

script/make-pretty

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ readonly OT_CLANG_TIDY_BUILD_OPTS=(
8383
'-DOT_BORDER_AGENT=ON'
8484
'-DOT_BORDER_ROUTER=ON'
8585
'-DOT_BORDER_ROUTING=ON'
86-
'-DOT_BORDER_ROUTING_NAT64=ON'
87-
'-DOT_NAT64_TRANSLATOR=ON'
8886
'-DOT_CHANNEL_MANAGER=ON'
8987
'-DOT_CHANNEL_MONITOR=ON'
9088
'-DOT_CHILD_SUPERVISION=ON'
@@ -114,6 +112,8 @@ readonly OT_CLANG_TIDY_BUILD_OPTS=(
114112
'-DOT_LINK_METRICS_SUBJECT=ON'
115113
'-DOT_MAC_FILTER=ON'
116114
'-DOT_MTD_NETDIAG=ON'
115+
'-DOT_NAT64_BORDER_ROUTING=ON'
116+
'-DOT_NAT64_TRANSLATOR=ON'
117117
'-DOT_NETDATA_PUBLISHER=ON'
118118
'-DOT_PING_SENDER=ON'
119119
'-DOT_REFERENCE_DEVICE=ON'

script/test

+2-2
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,9 @@ do_build_otbr_docker()
297297
fi
298298

299299
if [[ ${NAT64} == 1 ]]; then
300-
otbr_options+=("-DOTBR_BORDER_ROUTING_NAT64=ON")
300+
otbr_options+=("-DOT_NAT64_BORDER_ROUTING=ON")
301301
else
302-
otbr_options+=("-DOTBR_BORDER_ROUTING_NAT64=OFF")
302+
otbr_options+=("-DOT_NAT64_BORDER_ROUTING=OFF")
303303
fi
304304

305305
local otbr_docker_image=${OTBR_DOCKER_IMAGE:-otbr-ot12-backbone-ci}

src/cli/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ Done
386386

387387
Get the local NAT64 prefix of the Border Router.
388388

389-
`OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE` is required.
389+
`OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` is required.
390390

391391
```bash
392392
> br nat64prefix

src/cli/cli.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ template <> otError Interpreter::Process<Cmd("br")>(Arg aArgs[])
585585
SuccessOrExit(error = otBorderRoutingGetOnLinkPrefix(GetInstancePtr(), &onLinkPrefix));
586586
OutputIp6PrefixLine(onLinkPrefix);
587587
}
588-
#if OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
588+
#if OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
589589
/**
590590
* @cli br nat64prefix
591591
* @code
@@ -622,7 +622,7 @@ template <> otError Interpreter::Process<Cmd("br")>(Arg aArgs[])
622622
OutputIp6Prefix(prefix);
623623
OutputLine(" prf:%s", PreferenceToString(preference));
624624
}
625-
#endif // OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
625+
#endif // OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
626626
/**
627627
* @cli br rioprf (high,med,low)
628628
* @code

src/core/BUILD.gn

+1
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,7 @@ source_set("libopenthread_core_config") {
785785
"config/mac.h",
786786
"config/misc.h",
787787
"config/mle.h",
788+
"config/nat64.h",
788789
"config/netdata_publisher.h",
789790
"config/openthread-core-config-check.h",
790791
"config/parent_search.h",

src/core/Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,7 @@ HEADERS_COMMON = \
508508
config/mac.h \
509509
config/misc.h \
510510
config/mle.h \
511+
config/nat64.h \
511512
config/netdata_publisher.h \
512513
config/openthread-core-config-check.h \
513514
config/parent_search.h \

src/core/api/border_routing_api.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ otError otBorderRoutingGetOnLinkPrefix(otInstance *aInstance, otIp6Prefix *aPref
8989
return AsCoreType(aInstance).Get<BorderRouter::RoutingManager>().GetOnLinkPrefix(AsCoreType(aPrefix));
9090
}
9191

92-
#if OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
92+
#if OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
9393
otError otBorderRoutingGetNat64Prefix(otInstance *aInstance, otIp6Prefix *aPrefix)
9494
{
9595
return AsCoreType(aInstance).Get<BorderRouter::RoutingManager>().GetNat64Prefix(AsCoreType(aPrefix));

src/core/border_router/infra_if.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ void InfraIf::DiscoverNat64PrefixDone(uint32_t aIfIndex, const Ip6::Prefix &aPre
127127
VerifyOrExit(mInitialized && mIsRunning, error = kErrorInvalidState);
128128
VerifyOrExit(aIfIndex == mIfIndex, error = kErrorInvalidArgs);
129129

130-
#if OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
130+
#if OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
131131
Get<RoutingManager>().UpdateInfraIfNat64Prefix(aPrefix);
132132
#endif
133133

src/core/border_router/routing_manager.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ RoutingManager::RoutingManager(Instance &aInstance)
7171
, mRouteInfoOptionPreference(NetworkData::kRoutePreferenceMedium)
7272
, mLocalOnLinkPrefix(aInstance)
7373
, mDiscoveredPrefixTable(aInstance)
74-
#if OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
74+
#if OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
7575
, mInfraIfNat64PrefixStaleTimer(aInstance, HandleInfraIfNat64PrefixStaleTimer)
7676
#endif
7777
, mDiscoveredPrefixStaleTimer(aInstance, HandleDiscoveredPrefixStaleTimer)
@@ -82,7 +82,7 @@ RoutingManager::RoutingManager(Instance &aInstance)
8282
mFavoredDiscoveredOnLinkPrefix.Clear();
8383

8484
mBrUlaPrefix.Clear();
85-
#if OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
85+
#if OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
8686
mInfraIfNat64Prefix.Clear();
8787
mLocalNat64Prefix.Clear();
8888
mAdvertisedNat64Prefix.Clear();
@@ -97,7 +97,7 @@ Error RoutingManager::Init(uint32_t aInfraIfIndex, bool aInfraIfIsRunning)
9797

9898
SuccessOrExit(error = LoadOrGenerateRandomBrUlaPrefix());
9999
mLocalOmrPrefix.GenerateFrom(mBrUlaPrefix);
100-
#if OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
100+
#if OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
101101
GenerateNat64Prefix();
102102
#endif
103103
mLocalOnLinkPrefix.Generate();
@@ -175,7 +175,7 @@ Error RoutingManager::GetOnLinkPrefix(Ip6::Prefix &aPrefix)
175175
return error;
176176
}
177177

178-
#if OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
178+
#if OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
179179
Error RoutingManager::GetNat64Prefix(Ip6::Prefix &aPrefix)
180180
{
181181
Error error = kErrorNone;
@@ -234,7 +234,7 @@ Error RoutingManager::LoadOrGenerateRandomBrUlaPrefix(void)
234234
return error;
235235
}
236236

237-
#if OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
237+
#if OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
238238
void RoutingManager::DiscoverInfraIfNat64Prefix(void)
239239
{
240240
Error error = kErrorNone;
@@ -297,7 +297,7 @@ void RoutingManager::Start(void)
297297
UpdateDiscoveredPrefixTableOnNetDataChange();
298298
mLocalOnLinkPrefix.Start();
299299
StartRouterSolicitationDelay();
300-
#if OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
300+
#if OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
301301
mInfraIfNat64PrefixStaleTimer.Start(0);
302302
#endif
303303
}
@@ -314,7 +314,7 @@ void RoutingManager::Stop(void)
314314

315315
mLocalOnLinkPrefix.Stop();
316316

317-
#if OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
317+
#if OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
318318
if (mAdvertisedNat64Prefix.IsValidNat64())
319319
{
320320
UnpublishExternalRoute(mAdvertisedNat64Prefix);
@@ -574,7 +574,7 @@ void RoutingManager::EvaluateOnLinkPrefix(void)
574574
return;
575575
}
576576

577-
#if OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
577+
#if OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
578578
void RoutingManager::EvaluateNat64Prefix(void)
579579
{
580580
Ip6::Prefix nat64Prefix;
@@ -629,7 +629,7 @@ void RoutingManager::EvaluateRoutingPolicy(void)
629629
// 0. Evaluate on-link, OMR and NAT64 prefixes.
630630
EvaluateOnLinkPrefix();
631631
EvaluateOmrPrefix();
632-
#if OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
632+
#if OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
633633
EvaluateNat64Prefix();
634634
#endif
635635

@@ -1042,7 +1042,7 @@ void RoutingManager::HandleRoutingPolicyTimer(Timer &aTimer)
10421042
aTimer.Get<RoutingManager>().EvaluateRoutingPolicy();
10431043
}
10441044

1045-
#if OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
1045+
#if OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
10461046
void RoutingManager::HandleInfraIfNat64PrefixStaleTimer(Timer &aTimer)
10471047
{
10481048
aTimer.Get<RoutingManager>().HandleInfraIfNat64PrefixStaleTimer();

src/core/border_router/routing_manager.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ class RoutingManager : public InstanceLocator
188188
*/
189189
Error GetOnLinkPrefix(Ip6::Prefix &aPrefix);
190190

191-
#if OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
191+
#if OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
192192
/**
193193
* This method returns the local NAT64 prefix.
194194
*
@@ -221,7 +221,7 @@ class RoutingManager : public InstanceLocator
221221
*
222222
*/
223223
void UpdateInfraIfNat64Prefix(const Ip6::Prefix &aPrefix);
224-
#endif // OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
224+
#endif // OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
225225

226226
/**
227227
* This method processes a received ICMPv6 message from the infrastructure interface.
@@ -640,7 +640,7 @@ class RoutingManager : public InstanceLocator
640640

641641
void EvaluateOnLinkPrefix(void);
642642

643-
#if OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
643+
#if OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
644644
void DiscoverInfraIfNat64Prefix(void);
645645
void GenerateNat64Prefix(void);
646646
void EvaluateNat64Prefix(void);
@@ -664,7 +664,7 @@ class RoutingManager : public InstanceLocator
664664
static void HandleDiscoveredPrefixStaleTimer(Timer &aTimer);
665665
void HandleDiscoveredPrefixStaleTimer(void);
666666
static void HandleRoutingPolicyTimer(Timer &aTimer);
667-
#if OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
667+
#if OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
668668
static void HandleInfraIfNat64PrefixStaleTimer(Timer &aTimer);
669669
void HandleInfraIfNat64PrefixStaleTimer(void);
670670
#endif
@@ -714,7 +714,7 @@ class RoutingManager : public InstanceLocator
714714

715715
DiscoveredPrefixTable mDiscoveredPrefixTable;
716716

717-
#if OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
717+
#if OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
718718
// The latest NAT64 prefix discovered on the infrastructure interface.
719719
Ip6::Prefix mInfraIfNat64Prefix;
720720
// The NAT64 prefix allocated from the /48 BR ULA prefix.

src/core/config/border_router.h

-30
Original file line numberDiff line numberDiff line change
@@ -71,34 +71,4 @@
7171
#define OPENTHREAD_CONFIG_BORDER_ROUTER_REQUEST_ROUTER_ROLE 1
7272
#endif
7373

74-
/**
75-
* @def OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE
76-
*
77-
* Define to 1 to enable the internal NAT64 translator.
78-
*
79-
*/
80-
#ifndef OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE
81-
#define OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE 0
82-
#endif
83-
84-
/**
85-
* @def OPENTHREAD_CONFIG_NAT64_MAX_MAPPINGS
86-
*
87-
* Specifies maximum number of active mappings for NAT64.
88-
*
89-
*/
90-
#ifndef OPENTHREAD_CONFIG_NAT64_MAX_MAPPINGS
91-
#define OPENTHREAD_CONFIG_NAT64_MAX_MAPPINGS 254
92-
#endif
93-
94-
/**
95-
* @def OPENTHREAD_CONFIG_NAT64_IDLE_TIMEOUT_SECONDS
96-
*
97-
* Specifies timeout in seconds before removing an inactive address mapping.
98-
*
99-
*/
100-
#ifndef OPENTHREAD_CONFIG_NAT64_IDLE_TIMEOUT_SECONDS
101-
#define OPENTHREAD_CONFIG_NAT64_IDLE_TIMEOUT_SECONDS 7200
102-
#endif
103-
10474
#endif // CONFIG_BORDER_ROUTER_H_

src/core/config/border_routing.h

-10
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,4 @@
7676
#define OPENTHREAD_CONFIG_BORDER_ROUTING_MAX_ON_MESH_PREFIXES 16
7777
#endif
7878

79-
/**
80-
* @def OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
81-
*
82-
* Define to 1 to enable Border Routing NAT64 support.
83-
*
84-
*/
85-
#ifndef OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE
86-
#define OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE 0
87-
#endif
88-
8979
#endif // CONFIG_BORDER_ROUTING_H_

0 commit comments

Comments
 (0)