Fixed bug #50816 (netif_add() prototype depends on configuration) by adding a new function netif_add_noaddrthat doesn't change

This commit is contained in:
goldsimon
2017-04-25 12:05:05 +02:00
parent 135d506065
commit d02bc6481f
2 changed files with 23 additions and 5 deletions

View File

@@ -218,6 +218,22 @@ netif_input(struct pbuf *p, struct netif *inp)
return ip_input(p, inp);
}
/**
* @ingroup netif
* Add a network interface to the list of lwIP netifs.
*
* Same as @ref netif_add but without IPv4 addresses
*/
struct netif *
netif_add_noaddr(struct netif *netif, void *state, netif_init_fn init, netif_input_fn input)
{
return netif_add(netif,
#if LWIP_IPV4
NULL, NULL, NULL,
#endif /* LWIP_IPV4*/
state, init, input);
}
/**
* @ingroup netif
* Add a network interface to the list of lwIP netifs.