net: Fix dedicated IPv4 function for net_if
IPv4/6 functions follows this scheme: net_if_ipv<4/6>_<name>. Applying that to net_if_set_gw/net_if_set_netmask which are IPv4 functions. Change-Id: I2dcbb16ce81cfdffbfbb5cae24ad76ddf2b9919a Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
92e592c80d
commit
a1fde2bff8
3 changed files with 8 additions and 8 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue