[border-router] initial implementation of prefix/route management (#5856)

This is the initial implementation of Thread Border Router
prefix/route management with:

- Create & publish off-mesh routable (OMR) prefix for Thread network
  - configure the BR as default route.
  - converge to the smallest OMR prefix if multiple prefixes are
    present at the same time.
- Create & advertise on-link prefix for infrastructure network
  - monitor RA messages on infra link and stops myself if there is
    someone else advertising an on-link prefix.

It currently supports single infrastructure link with possibly
multiple BRs. Support for multiple infrastructure links is left for
future.
This commit is contained in:
kangping
2020-12-23 15:19:12 -08:00
committed by GitHub
parent 8f9894f7c0
commit 995ad66846
46 changed files with 3104 additions and 13 deletions
+7
View File
@@ -78,6 +78,11 @@ ALL_NETWORK_BBRS_ADDRESS = 'ff32:40:fd00:db8:0:0:0:3'
ALL_DOMAIN_BBRS_ADDRESS = 'ff32:40:fd00:7d03:7d03:7d03:0:3'
ALL_DOMAIN_BBRS_ADDRESS_ALTER = 'ff32:40:fd00:7d04:7d04:7d04:0:3'
ONLINK_PREFIX = 'fd00:dead:face::/64'
# Any address starts with 'fd' are considered on-link address.
ONLINK_PREFIX_REGEX_PATTERN = '^fd'
DEFAULT_MASTER_KEY = bytearray([
0x00,
0x11,
@@ -106,6 +111,8 @@ class ADDRESS_TYPE(Enum):
ML_EID = 'ML_EID'
DUA = 'DUA'
BACKBONE_GUA = 'BACKBONE_GUA'
OMR = 'OMR'
ONLINK_ULA = 'ONLINK_ULA'
RSSI = {