Skip to content

Commit 318b4b0

Browse files
authored
[bbr] remove domain prefix support from stack and harness (openthread#13203)
This commit removes all Domain Prefix configuration and management logic from the OpenThread stack, CLI commands, unit tests, and GRL harness THCI wrapper. - Removed public Backbone Router Domain Prefix APIs. - Removed Domain Prefix flag ('mDp') and 'D' flag parser/formatter from core network data types, Spinel, and CLI. - Cleaned up local Backbone Router and Leader logic to exclude Domain Prefix configuration, tracking, and events. - Updated RoutingManager prefix advertisement (RIO) to exclude special handling for Domain Prefix. - Updated CLI documentation to remove Domain Prefix references. - Removed domain prefix helper methods from python test certification scripts. - Removed auto-addition of default domain prefix and D flag support from GRL harness OpenThread.py.
1 parent c4a8557 commit 318b4b0

40 files changed

Lines changed: 32 additions & 680 deletions

include/openthread/backbone_router_ftd.h

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
#include <openthread/error.h>
4444
#include <openthread/instance.h>
4545
#include <openthread/ip6.h>
46-
#include <openthread/netdata.h>
4746

4847
#ifdef __cplusplus
4948
extern "C" {
@@ -175,17 +174,6 @@ uint8_t otBackboneRouterGetRegistrationJitter(otInstance *aInstance);
175174
*/
176175
void otBackboneRouterSetRegistrationJitter(otInstance *aInstance, uint8_t aJitter);
177176

178-
/**
179-
* Gets the local Domain Prefix configuration.
180-
*
181-
* @param[in] aInstance A pointer to an OpenThread instance.
182-
* @param[out] aConfig A pointer to the Domain Prefix configuration.
183-
*
184-
* @retval OT_ERROR_NONE Successfully got the Domain Prefix configuration.
185-
* @retval OT_ERROR_NOT_FOUND No Domain Prefix was configured.
186-
*/
187-
otError otBackboneRouterGetDomainPrefix(otInstance *aInstance, otBorderRouterConfig *aConfig);
188-
189177
/**
190178
* Configures the response status for the next Multicast Listener Registration.
191179
*
@@ -300,37 +288,6 @@ otError otBackboneRouterMulticastListenerGetNext(otInstance
300288
otBackboneRouterMulticastListenerIterator *aIterator,
301289
otBackboneRouterMulticastListenerInfo *aListenerInfo);
302290

303-
/**
304-
* Represents the Domain Prefix events.
305-
*/
306-
typedef enum
307-
{
308-
OT_BACKBONE_ROUTER_DOMAIN_PREFIX_ADDED = 0, ///< Domain Prefix was added.
309-
OT_BACKBONE_ROUTER_DOMAIN_PREFIX_REMOVED = 1, ///< Domain Prefix was removed.
310-
OT_BACKBONE_ROUTER_DOMAIN_PREFIX_CHANGED = 2, ///< Domain Prefix was changed.
311-
} otBackboneRouterDomainPrefixEvent;
312-
313-
/**
314-
* Pointer is called whenever the Domain Prefix changed.
315-
*
316-
* @param[in] aContext The user context pointer.
317-
* @param[in] aEvent The Domain Prefix event.
318-
* @param[in] aDomainPrefix The new Domain Prefix if added or changed, NULL otherwise.
319-
*/
320-
typedef void (*otBackboneRouterDomainPrefixCallback)(void *aContext,
321-
otBackboneRouterDomainPrefixEvent aEvent,
322-
const otIp6Prefix *aDomainPrefix);
323-
/**
324-
* Sets the Backbone Router Domain Prefix callback.
325-
*
326-
* @param[in] aInstance A pointer to an OpenThread instance.
327-
* @param[in] aCallback A pointer to the Domain Prefix callback.
328-
* @param[in] aContext A user context pointer.
329-
*/
330-
void otBackboneRouterSetDomainPrefixCallback(otInstance *aInstance,
331-
otBackboneRouterDomainPrefixCallback aCallback,
332-
void *aContext);
333-
334291
/**
335292
* @}
336293
*/

include/openthread/border_routing.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,6 @@ otError otBorderRoutingGetNextRouterEntry(otInstance *aI
603603
*
604604
* - It has added at least one external route entry.
605605
* - It has added at least one prefix entry with both the default-route and on-mesh flags set.
606-
* - It has added at least one domain prefix (with both the domain and on-mesh flags set).
607606
*
608607
* The list of peer BRs specifically excludes the current device, even if it is itself acting as a BR.
609608
*
@@ -629,7 +628,6 @@ otError otBorderRoutingGetNextPeerBrEntry(otInstance *
629628
*
630629
* - It has added at least one external route entry.
631630
* - It has added at least one prefix entry with both the default-route and on-mesh flags set.
632-
* - It has added at least one domain prefix (with both the domain and on-mesh flags set).
633631
*
634632
* The list of peer BRs specifically excludes the current device, even if it is itself acting as a BR.
635633
*

include/openthread/instance.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ extern "C" {
5252
*
5353
* @note This number versions both OpenThread platform and user APIs.
5454
*/
55-
#define OPENTHREAD_API_VERSION (602)
55+
#define OPENTHREAD_API_VERSION (603)
5656

5757
/**
5858
* @addtogroup api-instance

include/openthread/netdata.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ typedef struct otBorderRouterConfig
7373
bool mOnMesh : 1; ///< Whether this prefix is considered on-mesh.
7474
bool mStable : 1; ///< Whether this configuration is considered Stable Network Data.
7575
bool mNdDns : 1; ///< Whether this border router can supply DNS information via ND.
76-
bool mDp : 1; ///< Whether prefix is a Thread Domain Prefix (added since Thread 1.2).
76+
bool mDp : 1; ///< Reserved (previously Thread Domain Prefix flag).
7777
uint16_t mRloc16; ///< The border router's RLOC16 (value ignored on config add).
7878
} otBorderRouterConfig;
7979

src/cli/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3543,7 +3543,7 @@ Done
35433543
35443544
### prefix
35453545
3546-
Get the prefix list in the local Network Data. Note: For the Thread 1.2 border router with backbone capability, the local Domain Prefix would be listed as well (with flag `D`), with preceding `-` if backbone functionality is disabled.
3546+
Get the prefix list in the local Network Data.
35473547
35483548
```bash
35493549
> prefix
@@ -3556,8 +3556,6 @@ Done
35563556
35573557
Add a valid prefix to the Network Data.
35583558
3559-
Note: The Domain Prefix flag (`D`) is only available for Thread 1.2.
3560-
35613559
- p: Preferred flag
35623560
- a: Stateless IPv6 Address Autoconfiguration flag
35633561
- d: DHCPv6 IPv6 Address Configuration flag
@@ -3566,7 +3564,6 @@ Note: The Domain Prefix flag (`D`) is only available for Thread 1.2.
35663564
- o: On Mesh flag
35673565
- s: Stable flag
35683566
- n: Nd Dns flag
3569-
- D: Domain Prefix flag
35703567
- prf: Default router preference, which may be 'high', 'med', or 'low'.
35713568
35723569
```bash

src/cli/README_BR.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,6 @@ Peer BRs are other devices within the Thread mesh that provide external IP conne
430430

431431
- It has added at least one external route entry.
432432
- It has added at least one prefix entry with both the default-route and on-mesh flags set.
433-
- It has added at least one domain prefix (with both the domain and on-mesh flags set).
434433

435434
The list of peer BRs specifically excludes the current device, even if it is itself acting as a BR.
436435

src/cli/README_HISTORY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,6 @@ The flags are as follows:
466466
- `o`: On Mesh flag
467467
- `s`: Stable flag
468468
- `n`: Nd Dns flag
469-
- `D`: Domain Prefix flag
470469

471470
Print the history as a table.
472471

src/cli/README_NETDATA.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ Publish an on-mesh prefix entry.
283283
- o: On Mesh flag
284284
- s: Stable flag
285285
- n: Nd Dns flag
286-
- D: Domain Prefix flag (only available for Thread 1.2).
287286
- prf: Preference, which may be 'high', 'med', or 'low'.
288287

289288
```bash
@@ -352,7 +351,6 @@ On-mesh prefixes are listed under `Prefixes` header:
352351
- o: On Mesh flag
353352
- s: Stable flag
354353
- n: Nd Dns flag
355-
- D: Domain Prefix flag (only available for Thread 1.2).
356354
- Preference `high`, `med`, or `low`
357355
- RLOC16 of device which added the on-mesh prefix
358356

src/cli/cli.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5450,9 +5450,6 @@ template <> otError Interpreter::Process<Cmd("prefix")>(Arg aArgs[])
54505450
* @endcode
54515451
* @par
54525452
* Get the prefix list in the local Network Data.
5453-
* @note For the Thread 1.2 border router with backbone capability, the local Domain Prefix
5454-
* is listed as well and includes the `D` flag. If backbone functionality is disabled, a dash
5455-
* `-` is printed before the local Domain Prefix.
54565453
* @par
54575454
* For more information about #otBorderRouterConfig flags, refer to @overview.
54585455
* @sa otBorderRouterGetNextOnMeshPrefix
@@ -5466,15 +5463,6 @@ template <> otError Interpreter::Process<Cmd("prefix")>(Arg aArgs[])
54665463
{
54675464
mNetworkData.OutputPrefix(config);
54685465
}
5469-
5470-
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
5471-
if (otBackboneRouterGetState(GetInstancePtr()) == OT_BACKBONE_ROUTER_STATE_DISABLED)
5472-
{
5473-
SuccessOrExit(otBackboneRouterGetDomainPrefix(GetInstancePtr(), &config));
5474-
OutputFormat("- ");
5475-
mNetworkData.OutputPrefix(config);
5476-
}
5477-
#endif
54785466
}
54795467
/**
54805468
* @cli prefix add

src/cli/cli_br.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,6 @@ template <> otError Br::Process<Cmd("peers")>(Arg aArgs[])
670670
* Data entries:
671671
* - It has added at least one external route entry.
672672
* - It has added at least one prefix entry with both the default-route and on-mesh flags set.
673-
* - It has added at least one domain prefix (with both the domain and on-mesh flags set).
674673
* The list of peer BRs specifically excludes the current device, even if its is itself acting as a BR.
675674
* Info per BR entry:
676675
* - RLOC16 of the BR

0 commit comments

Comments
 (0)