From 180610109ccab9092088dd20b0f09f70483fc58b Mon Sep 17 00:00:00 2001 From: xnumad <34810600+xnumad@users.noreply.github.com> Date: Thu, 22 Feb 2024 14:07:45 +0100 Subject: [PATCH] refactor: Rename _auto_configure_addr -> auto_configure_addr _auto_configure_addr_default -> _auto_configure_addr --- sys/net/gnrc/network_layer/ipv6/nib/_nib-slaac.c | 8 ++++---- sys/net/gnrc/network_layer/ipv6/nib/_nib-slaac.h | 10 +++++----- sys/net/gnrc/network_layer/ipv6/nib/nib.c | 4 ++-- sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/net/gnrc/network_layer/ipv6/nib/_nib-slaac.c b/sys/net/gnrc/network_layer/ipv6/nib/_nib-slaac.c index f586fee8e6522..07afd164ac645 100644 --- a/sys/net/gnrc/network_layer/ipv6/nib/_nib-slaac.c +++ b/sys/net/gnrc/network_layer/ipv6/nib/_nib-slaac.c @@ -36,11 +36,11 @@ #if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_6LN) || IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_SLAAC) static char addr_str[IPV6_ADDR_MAX_STR_LEN]; -inline void _auto_configure_addr(gnrc_netif_t *netif, const ipv6_addr_t *pfx, - uint8_t pfx_len) +inline void auto_configure_addr(gnrc_netif_t *netif, const ipv6_addr_t *pfx, + uint8_t pfx_len) { #if !IS_ACTIVE(CONFIG_GNRC_IPV6_STABLE_PRIVACY) - _auto_configure_addr_default(netif, pfx, pfx_len); + _auto_configure_addr(netif, pfx, pfx_len); #else _auto_configure_addr_with_dad_ctr(netif, pfx, pfx_len, 0); #endif @@ -51,7 +51,7 @@ void _auto_configure_addr_with_dad_ctr(gnrc_netif_t *netif, const ipv6_addr_t *pfx, uint8_t pfx_len, uint8_t dad_ctr) #else -void _auto_configure_addr_default(gnrc_netif_t *netif, +void _auto_configure_addr(gnrc_netif_t *netif, const ipv6_addr_t *pfx, uint8_t pfx_len) #endif { diff --git a/sys/net/gnrc/network_layer/ipv6/nib/_nib-slaac.h b/sys/net/gnrc/network_layer/ipv6/nib/_nib-slaac.h index 979fcb7a089cb..e7507a1e19bf9 100644 --- a/sys/net/gnrc/network_layer/ipv6/nib/_nib-slaac.h +++ b/sys/net/gnrc/network_layer/ipv6/nib/_nib-slaac.h @@ -89,8 +89,8 @@ extern "C" { * @param[in] pfx The prefix for the address. * @param[in] pfx_len Length of @p pfx in bits. */ -void _auto_configure_addr(gnrc_netif_t *netif, const ipv6_addr_t *pfx, - uint8_t pfx_len); +void auto_configure_addr(gnrc_netif_t *netif, const ipv6_addr_t *pfx, + uint8_t pfx_len); #if IS_ACTIVE(CONFIG_GNRC_IPV6_STABLE_PRIVACY) /** @@ -100,12 +100,12 @@ void _auto_configure_addr(gnrc_netif_t *netif, const ipv6_addr_t *pfx, void _auto_configure_addr_with_dad_ctr(gnrc_netif_t *netif, const ipv6_addr_t *pfx, uint8_t pfx_len, uint8_t dad_ctr); #else -void _auto_configure_addr_default(gnrc_netif_t *netif, const ipv6_addr_t *pfx, - uint8_t pfx_len); +void _auto_configure_addr(gnrc_netif_t *netif, const ipv6_addr_t *pfx, + uint8_t pfx_len); #endif #else /* CONFIG_GNRC_IPV6_NIB_6LN || CONFIG_GNRC_IPV6_NIB_SLAAC */ -#define _auto_configure_addr(netif, pfx, pfx_len) \ +#define auto_configure_addr(netif, pfx, pfx_len) \ (void)netif; (void)pfx; (void)pfx_len; #endif /* CONFIG_GNRC_IPV6_NIB_6LN || CONFIG_GNRC_IPV6_NIB_SLAAC */ diff --git a/sys/net/gnrc/network_layer/ipv6/nib/nib.c b/sys/net/gnrc/network_layer/ipv6/nib/nib.c index 9685cb453ac2f..7855def967875 100644 --- a/sys/net/gnrc/network_layer/ipv6/nib/nib.c +++ b/sys/net/gnrc/network_layer/ipv6/nib/nib.c @@ -154,7 +154,7 @@ void gnrc_ipv6_nib_iface_up(gnrc_netif_t *netif) DEBUG("nib: Can't join link-local all-nodes on interface %u\n", netif->pid); } _add_static_lladdr(netif); - _auto_configure_addr(netif, &ipv6_addr_link_local_prefix, 64U); + auto_configure_addr(netif, &ipv6_addr_link_local_prefix, 64U); if (_should_search_rtr(netif)) { uint32_t next_rs_time = random_uint32_range(0, NDP_MAX_RS_MS_DELAY); @@ -1648,7 +1648,7 @@ static uint32_t _handle_pio(gnrc_netif_t *netif, const icmpv6_hdr_t *icmpv6, * */ #endif ) { - _auto_configure_addr(netif, &pio->prefix, pio->prefix_len); + auto_configure_addr(netif, &pio->prefix, pio->prefix_len); } if ((pio->flags & NDP_OPT_PI_FLAGS_L) || _multihop_p6c(netif, abr)) { _nib_offl_entry_t *pfx; diff --git a/sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c b/sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c index de3ee7437a8c2..4af3129b5fad0 100644 --- a/sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c +++ b/sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c @@ -586,7 +586,7 @@ static bool _parse_options(int msg_type, gnrc_rpl_instance_t *inst, gnrc_rpl_opt && !(pi->LAR_flags & GNRC_RPL_PREFIX_AUTO_ADDRESS_BIT)) { break; } - _auto_configure_addr(netif, &pi->prefix, pi->prefix_len); + auto_configure_addr(netif, &pi->prefix, pi->prefix_len); /* set lifetimes */ gnrc_ipv6_nib_pl_set(netif->pid, &pi->prefix, pi->prefix_len,