diff --git a/src/core/init.c b/src/core/init.c index 7a312a97..5e19a98a 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -184,7 +184,7 @@ PACK_STRUCT_END #if (((!LWIP_DHCP) || (!LWIP_AUTOIP)) && LWIP_DHCP_AUTOIP_COOP) #error "If you want to use DHCP/AUTOIP cooperation mode, you have to define LWIP_DHCP=1 and LWIP_AUTOIP=1 in your lwipopts.h" #endif -#if (((!LWIP_DHCP) || (!LWIP_ARP) || (!LWIP_ACD)) && DHCP_DOES_ACD_CHECK) +#if (((!LWIP_DHCP) || (!LWIP_ARP) || (!LWIP_ACD)) && LWIP_DHCP_DOES_ACD_CHECK) #error "If you want to use DHCP ACD checking, you have to define LWIP_DHCP=1, LWIP_ARP=1 and LWIP_ACD=1 in your lwipopts.h" #endif #if (!LWIP_ARP && LWIP_AUTOIP) diff --git a/src/core/ipv4/acd.c b/src/core/ipv4/acd.c index ab33c0d3..e2226a10 100644 --- a/src/core/ipv4/acd.c +++ b/src/core/ipv4/acd.c @@ -25,7 +25,7 @@ * - will be called from the autoip module. No extra's needed. * * With DHCP: - * - enable DHCP_DOES_ACD_CHECK. Then it will be called from the dhcp module. + * - enable LWIP_DHCP_DOES_ACD_CHECK. Then it will be called from the dhcp module. * No extra's needed. */ diff --git a/src/core/ipv4/dhcp.c b/src/core/ipv4/dhcp.c index 0f2da8f8..fd2ccf65 100644 --- a/src/core/ipv4/dhcp.c +++ b/src/core/ipv4/dhcp.c @@ -192,9 +192,9 @@ static u8_t dhcp_pcb_refcount; static err_t dhcp_discover(struct netif *netif); static err_t dhcp_select(struct netif *netif); static void dhcp_bind(struct netif *netif); -#if DHCP_DOES_ACD_CHECK +#if LWIP_DHCP_DOES_ACD_CHECK static err_t dhcp_decline(struct netif *netif); -#endif /* DHCP_DOES_ACD_CHECK */ +#endif /* LWIP_DHCP_DOES_ACD_CHECK */ static err_t dhcp_rebind(struct netif *netif); static err_t dhcp_reboot(struct netif *netif); static void dhcp_set_state(struct dhcp *dhcp, u8_t new_state); @@ -290,7 +290,7 @@ dhcp_handle_nak(struct netif *netif) dhcp_discover(netif); } -#if DHCP_DOES_ACD_CHECK +#if LWIP_DHCP_DOES_ACD_CHECK /** * Handle conflict information from ACD module * @@ -352,7 +352,7 @@ dhcp_check(struct netif *netif) /* start ACD module */ acd_start(netif, &dhcp->acd, dhcp->offered_ip_addr); } -#endif /* DHCP_DOES_ACD_CHECK */ +#endif /* LWIP_DHCP_DOES_ACD_CHECK */ /** * Remember the configuration offered by a DHCP server. @@ -796,10 +796,10 @@ dhcp_start(struct netif *netif) /* dhcp_set_state(&dhcp, DHCP_STATE_OFF); */ -#if DHCP_DOES_ACD_CHECK +#if LWIP_DHCP_DOES_ACD_CHECK /* add acd struct to list*/ acd_add(netif, &dhcp->acd, dhcp_conflict_callback); -#endif /* DHCP_DOES_ACD_CHECK */ +#endif /* LWIP_DHCP_DOES_ACD_CHECK */ LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): starting DHCP configuration\n")); @@ -910,7 +910,7 @@ dhcp_network_changed_link_up(struct netif *netif) } } -#if DHCP_DOES_ACD_CHECK +#if LWIP_DHCP_DOES_ACD_CHECK /** * Decline an offered lease. * @@ -952,7 +952,7 @@ dhcp_decline(struct netif *netif) } return result; } -#endif /* DHCP_DOES_ACD_CHECK */ +#endif /* LWIP_DHCP_DOES_ACD_CHECK */ /** @@ -1796,7 +1796,7 @@ dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_REBOOTING)) { dhcp_handle_ack(netif, msg_in); -#if DHCP_DOES_ACD_CHECK +#if LWIP_DHCP_DOES_ACD_CHECK if ((netif->flags & NETIF_FLAG_ETHARP) != 0) { /* check if the acknowledged lease address is already in use */ dhcp_check(netif); diff --git a/src/include/lwip/dhcp.h b/src/include/lwip/dhcp.h index df33bb2d..95c62bff 100644 --- a/src/include/lwip/dhcp.h +++ b/src/include/lwip/dhcp.h @@ -45,9 +45,9 @@ #include "lwip/netif.h" #include "lwip/udp.h" -#if DHCP_DOES_ACD_CHECK +#if LWIP_DHCP_DOES_ACD_CHECK #include "lwip/acd.h" -#endif /* DHCP_DOES_ACD_CHECK */ +#endif /* LWIP_DHCP_DOES_ACD_CHECK */ #ifdef __cplusplus extern "C" { @@ -100,10 +100,10 @@ struct dhcp ip4_addr_t offered_si_addr; char boot_file_name[DHCP_BOOT_FILE_LEN]; #endif /* LWIP_DHCP_BOOTPFILE */ -#if DHCP_DOES_ACD_CHECK +#if LWIP_DHCP_DOES_ACD_CHECK /** acd struct */ struct acd acd; -#endif /* DHCP_DOES_ACD_CHECK */ +#endif /* LWIP_DHCP_DOES_ACD_CHECK */ }; diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 9b7c6433..abecdb45 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -924,10 +924,10 @@ #endif /* !LWIP_IPV4 */ /** - * DHCP_DOES_ACD_CHECK==1: Perform address conflict detection on the dhcp address. + * LWIP_DHCP_DOES_ACD_CHECK==1: Perform address conflict detection on the dhcp address. */ -#if !defined DHCP_DOES_ACD_CHECK || defined __DOXYGEN__ -#define DHCP_DOES_ACD_CHECK 1 +#if !defined LWIP_DHCP_DOES_ACD_CHECK || defined __DOXYGEN__ +#define LWIP_DHCP_DOES_ACD_CHECK 1 #endif /** @@ -1023,7 +1023,7 @@ * LWIP_ACD==1: Enable ACD module. ACD module is needed when using AUTOIP. */ #if !defined LWIP_ACD || defined __DOXYGEN__ -#define LWIP_ACD (LWIP_AUTOIP || DHCP_DOES_ACD_CHECK) +#define LWIP_ACD (LWIP_AUTOIP || LWIP_DHCP_DOES_ACD_CHECK) #endif #if !LWIP_IPV4 /* disable ACD when IPv4 is disabled */