From a1fde2bff831232150fc7308bb1b085408a5d47a Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Fri, 24 Jun 2016 17:34:31 +0200 Subject: [PATCH] net: Fix dedicated IPv4 function for net_if IPv4/6 functions follows this scheme: net_if_ipv<4/6>_. Applying that to net_if_set_gw/net_if_set_netmask which are IPv4 functions. Change-Id: I2dcbb16ce81cfdffbfbb5cae24ad76ddf2b9919a Signed-off-by: Tomasz Bursztyka --- include/net/yaip/net_if.h | 8 ++++---- tests/net/arp/src/main.c | 4 ++-- tests/net/ip-addr/src/main.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/net/yaip/net_if.h b/include/net/yaip/net_if.h index 1ffb9ffef79..bbe0230b0ad 100644 --- a/include/net/yaip/net_if.h +++ b/include/net/yaip/net_if.h @@ -806,8 +806,8 @@ bool net_if_ipv4_addr_mask_cmp(struct net_if *iface, * @param iface Interface to use. * @param netmask IPv4 netmask */ -static inline void net_if_set_netmask(struct net_if *iface, - struct in_addr *netmask) +static inline void net_if_ipv4_set_netmask(struct net_if *iface, + struct in_addr *netmask) { net_ipaddr_copy(&iface->ipv4.netmask, netmask); } @@ -818,8 +818,8 @@ static inline void net_if_set_netmask(struct net_if *iface, * @param iface Interface to use. * @param gw IPv4 address of an gateway */ -static inline void net_if_set_gw(struct net_if *iface, - struct in_addr *gw) +static inline void net_if_ipv4_set_gw(struct net_if *iface, + struct in_addr *gw) { net_ipaddr_copy(&iface->ipv4.gw, gw); } diff --git a/tests/net/arp/src/main.c b/tests/net/arp/src/main.c index bac50a6491a..b14f80254c7 100644 --- a/tests/net/arp/src/main.c +++ b/tests/net/arp/src/main.c @@ -346,8 +346,8 @@ void main_fiber(void) iface = net_if_get_default(); - net_if_set_gw(iface, &gw); - net_if_set_netmask(iface, &netmask); + net_if_ipv4_set_gw(iface, &gw); + net_if_ipv4_set_netmask(iface, &netmask); /* Broadcast and multicast tests */ buf = net_nbuf_get_reserve_tx(0); diff --git a/tests/net/ip-addr/src/main.c b/tests/net/ip-addr/src/main.c index f015244ab94..df232207183 100644 --- a/tests/net/ip-addr/src/main.c +++ b/tests/net/ip-addr/src/main.c @@ -425,8 +425,8 @@ void main(void) iface = net_if_get_default(); - net_if_set_gw(iface, &gw); - net_if_set_netmask(iface, &netmask); + net_if_ipv4_set_gw(iface, &gw); + net_if_ipv4_set_netmask(iface, &netmask); if (net_ipv4_addr_mask_cmp(iface, &fail_addr)) { printk("IPv4 wrong match failed\n");