-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gnrc/ipv6/nib: make ABR run-time configurable #21081
base: master
Are you sure you want to change the base?
Changes from all commits
1363894
d708e95
314968c
08cf592
a8407ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -304,6 +304,15 @@ | |
res = sizeof(netopt_enable_t); | ||
break; | ||
#endif /* MODULE_GNRC_SIXLOWPAN_IPHC */ | ||
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_6LBR) | ||
case NETOPT_6LO_ABR: | ||
assert(opt->data_len == sizeof(netopt_enable_t)); | ||
*((netopt_enable_t *)opt->data) = (netif->flags & GNRC_NETIF_FLAGS_6LO_ABR) | ||
? NETOPT_ENABLE | ||
: NETOPT_DISABLE; | ||
res = sizeof(netopt_enable_t); | ||
break; | ||
#endif | ||
default: | ||
break; | ||
} | ||
|
@@ -409,6 +418,30 @@ | |
res = sizeof(netopt_enable_t); | ||
break; | ||
#endif /* MODULE_GNRC_SIXLOWPAN_IPHC */ | ||
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_6LBR) | ||
case NETOPT_6LO_ABR: | ||
assert(opt->data_len == sizeof(netopt_enable_t)); | ||
|
||
extern void _start_search_rtr(gnrc_netif_t *netif); | ||
extern void _stop_search_rtr(gnrc_netif_t *netif); | ||
Comment on lines
+425
to
+426
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you want to make this a proper API? It could also be in one of the internal NIB headers. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Unfortunately the ones in |
||
|
||
if (*(((netopt_enable_t *)opt->data)) == NETOPT_ENABLE) { | ||
if (!(netif->flags & GNRC_NETIF_FLAGS_6LO_ABR)) { | ||
/* we were no ABR before */ | ||
_stop_search_rtr(netif); | ||
} | ||
netif->flags |= GNRC_NETIF_FLAGS_6LO_ABR; | ||
} | ||
else { | ||
if (netif->flags & GNRC_NETIF_FLAGS_6LO_ABR) { | ||
/* we were a ABR before */ | ||
_start_search_rtr(netif); | ||
} | ||
netif->flags &= ~GNRC_NETIF_FLAGS_6LO_ABR; | ||
} | ||
res = sizeof(netopt_enable_t); | ||
break; | ||
#endif | ||
case NETOPT_RAWMODE: | ||
if (*(((netopt_enable_t *)opt->data)) == NETOPT_ENABLE) { | ||
netif->flags |= GNRC_NETIF_FLAGS_RAWMODE; | ||
|
@@ -2156,4 +2189,4 @@ | |
} | ||
} | ||
} | ||
/** @} */ | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can add a line to the docs of the border router (or border router example?) about how to possibility to make a 6lbr non-authorative.