mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-06-02 10:41:29 +00:00
Allocate struct dhcp and struct autoip statically
This commit is contained in:
parent
eda6db6ebc
commit
ed52d1f790
|
@ -106,6 +106,14 @@
|
||||||
#if USE_ETHERNET
|
#if USE_ETHERNET
|
||||||
/* THE ethernet interface */
|
/* THE ethernet interface */
|
||||||
struct netif netif;
|
struct netif netif;
|
||||||
|
#if LWIP_DHCP
|
||||||
|
/* dhcp struct for the ethernet netif */
|
||||||
|
struct dhcp netif_dhcp;
|
||||||
|
#endif /* LWIP_DHCP */
|
||||||
|
#if LWIP_AUTOIP
|
||||||
|
/* autoip struct for the ethernet netif */
|
||||||
|
struct autoip netif_autoip;
|
||||||
|
#endif /* LWIP_AUTOIP */
|
||||||
#endif /* USE_ETHERNET */
|
#endif /* USE_ETHERNET */
|
||||||
#if PPP_SUPPORT
|
#if PPP_SUPPORT
|
||||||
/* THE PPP descriptor */
|
/* THE PPP descriptor */
|
||||||
|
@ -264,7 +272,11 @@ msvc_netif_init()
|
||||||
#endif /* LWIP_NETIF_LINK_CALLBACK */
|
#endif /* LWIP_NETIF_LINK_CALLBACK */
|
||||||
|
|
||||||
#if USE_ETHERNET_TCPIP
|
#if USE_ETHERNET_TCPIP
|
||||||
|
#if LWIP_AUTOIP
|
||||||
|
autoip_set_struct(&netif, &netif_autoip);
|
||||||
|
#endif /* LWIP_AUTOIP */
|
||||||
#if LWIP_DHCP
|
#if LWIP_DHCP
|
||||||
|
dhcp_set_struct(&netif, &netif_dhcp);
|
||||||
dhcp_start(&netif);
|
dhcp_start(&netif);
|
||||||
#elif LWIP_AUTOIP
|
#elif LWIP_AUTOIP
|
||||||
autoip_start(&netif);
|
autoip_start(&netif);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user