Skip to content

Commit

Permalink
refactor: Rename
Browse files Browse the repository at this point in the history
_auto_configure_addr -> auto_configure_addr
_auto_configure_addr_default -> _auto_configure_addr
  • Loading branch information
xnumad committed Feb 22, 2024
1 parent 8da5196 commit 1806101
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions sys/net/gnrc/network_layer/ipv6/nib/_nib-slaac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
{
Expand Down
10 changes: 5 additions & 5 deletions sys/net/gnrc/network_layer/ipv6/nib/_nib-slaac.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
/**
Expand All @@ -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 */

Expand Down
4 changes: 2 additions & 2 deletions sys/net/gnrc/network_layer/ipv6/nib/nib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1806101

Please sign in to comment.