diff --git a/src/core/dhcp.c b/src/core/dhcp.c index e944bd32..7b45a5a6 100644 --- a/src/core/dhcp.c +++ b/src/core/dhcp.c @@ -81,8 +81,9 @@ #include "lwip/sys.h" #include "lwip/opt.h" #include "lwip/dhcp.h" +#include "lwip/autoip.h" -#if LWIP_DHCP /* don't build if not configured for use in lwipopt.h */ +#if LWIP_DHCP /* don't build if not configured for use in lwipopts.h */ /** global transaction identifier, must be * unique for each DHCP request. We simply increment, starting diff --git a/src/core/ipv4/autoip.c b/src/core/ipv4/autoip.c index 201da3e4..1e796a94 100644 --- a/src/core/ipv4/autoip.c +++ b/src/core/ipv4/autoip.c @@ -50,25 +50,13 @@ * I recommend a value of 100. The value must divide 1000 with a remainder almost 0. * Possible values are 1000, 500, 333, 250, 200, 166, 142, 125, 111, 100 .... * - * * Without DHCP: * call autoip_init() and autoip_start() after netif_add(). * - * * With DHCP: * Configure your DHCP Client * define LWIP_DHCP_AUTOIP_COOP 1 in lwipopts.h - * - ******************************************************************************* - * - * TODO: - * - * Solve compiler warnings: - * - * warning: 'struct etharp_hdr' declared inside parameter list lwip/include/ipv4/lwip autoip.h line 92 - * warning: its scope is only this definition or declaration, which is probably not what you want lwip/include/ipv4/lwip autoip.h line 92 - * warning: passing argument 2 of 'apipa_arp_reply' from incompatible pointer type lwip/netif etharp.c line 543 - * + * */ #include @@ -80,7 +68,7 @@ #include "lwip/autoip.h" #include "netif/etharp.h" -#if LWIP_AUTOIP /* don't build if not configured for use in lwipopt.h */ +#if LWIP_AUTOIP /* don't build if not configured for use in lwipopts.h */ /* static functions */ static void autoip_handle_arp_conflict(struct netif *netif); @@ -96,7 +84,7 @@ static err_t autoip_bind(struct netif *netif); /** * Initialize this module - * seed random with MAC-Address for creating pseudo-ramdom linc-local address + * seed random with MAC-Address for creating pseudo-ramdom link-local address */ void autoip_init(void) diff --git a/src/include/lwip/netif.h b/src/include/lwip/netif.h index b3a13868..f3717ae6 100644 --- a/src/include/lwip/netif.h +++ b/src/include/lwip/netif.h @@ -41,10 +41,10 @@ #include "lwip/inet.h" #include "lwip/pbuf.h" #if LWIP_DHCP -# include "lwip/dhcp.h" +struct dhcp; #endif #if LWIP_AUTOIP -# include "lwip/autoip.h" +struct autoip; #endif #ifdef __cplusplus