mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
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:
parent
135d506065
commit
d02bc6481f
@ -218,6 +218,22 @@ netif_input(struct pbuf *p, struct netif *inp)
|
|||||||
return ip_input(p, 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
|
* @ingroup netif
|
||||||
* Add a network interface to the list of lwIP netifs.
|
* Add a network interface to the list of lwIP netifs.
|
||||||
|
@ -379,14 +379,16 @@ extern struct netif *netif_default;
|
|||||||
|
|
||||||
void netif_init(void);
|
void netif_init(void);
|
||||||
|
|
||||||
|
struct netif *netif_add_noaddr(struct netif *netif, void *state, netif_init_fn init, netif_input_fn input);
|
||||||
|
|
||||||
|
#if LWIP_IPV4
|
||||||
struct netif *netif_add(struct netif *netif,
|
struct netif *netif_add(struct netif *netif,
|
||||||
#if LWIP_IPV4
|
const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw,
|
||||||
const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw,
|
void *state, netif_init_fn init, netif_input_fn input);
|
||||||
#endif /* LWIP_IPV4 */
|
|
||||||
void *state, netif_init_fn init, netif_input_fn input);
|
|
||||||
#if LWIP_IPV4
|
|
||||||
void netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask,
|
void netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask,
|
||||||
const ip4_addr_t *gw);
|
const ip4_addr_t *gw);
|
||||||
|
#else /* LWIP_IPV4 */
|
||||||
|
struct netif *netif_add(struct netif *netif, void *state, netif_init_fn init, netif_input_fn input);
|
||||||
#endif /* LWIP_IPV4 */
|
#endif /* LWIP_IPV4 */
|
||||||
void netif_remove(struct netif * netif);
|
void netif_remove(struct netif * netif);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user