Rename DHCP_DOES_ACD_CHECK ->LWIP_DHCP_DOES_ACD_CHECK

This commit is contained in:
Dirk Ziegelmeier 2018-10-05 11:04:48 +02:00
parent a3cdf3c4cc
commit ff44049baf
5 changed files with 19 additions and 19 deletions

View File

@ -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)

View File

@ -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.
*/

View File

@ -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);

View File

@ -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 */
};

View File

@ -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 */