mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
Rename DHCP_DOES_ACD_CHECK ->LWIP_DHCP_DOES_ACD_CHECK
This commit is contained in:
parent
a3cdf3c4cc
commit
ff44049baf
@ -184,7 +184,7 @@ PACK_STRUCT_END
|
|||||||
#if (((!LWIP_DHCP) || (!LWIP_AUTOIP)) && LWIP_DHCP_AUTOIP_COOP)
|
#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"
|
#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
|
#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"
|
#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
|
#endif
|
||||||
#if (!LWIP_ARP && LWIP_AUTOIP)
|
#if (!LWIP_ARP && LWIP_AUTOIP)
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
* - will be called from the autoip module. No extra's needed.
|
* - will be called from the autoip module. No extra's needed.
|
||||||
*
|
*
|
||||||
* With DHCP:
|
* 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.
|
* No extra's needed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -192,9 +192,9 @@ static u8_t dhcp_pcb_refcount;
|
|||||||
static err_t dhcp_discover(struct netif *netif);
|
static err_t dhcp_discover(struct netif *netif);
|
||||||
static err_t dhcp_select(struct netif *netif);
|
static err_t dhcp_select(struct netif *netif);
|
||||||
static void dhcp_bind(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);
|
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_rebind(struct netif *netif);
|
||||||
static err_t dhcp_reboot(struct netif *netif);
|
static err_t dhcp_reboot(struct netif *netif);
|
||||||
static void dhcp_set_state(struct dhcp *dhcp, u8_t new_state);
|
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);
|
dhcp_discover(netif);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DHCP_DOES_ACD_CHECK
|
#if LWIP_DHCP_DOES_ACD_CHECK
|
||||||
/**
|
/**
|
||||||
* Handle conflict information from ACD module
|
* Handle conflict information from ACD module
|
||||||
*
|
*
|
||||||
@ -352,7 +352,7 @@ dhcp_check(struct netif *netif)
|
|||||||
/* start ACD module */
|
/* start ACD module */
|
||||||
acd_start(netif, &dhcp->acd, dhcp->offered_ip_addr);
|
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.
|
* Remember the configuration offered by a DHCP server.
|
||||||
@ -796,10 +796,10 @@ dhcp_start(struct netif *netif)
|
|||||||
/* dhcp_set_state(&dhcp, DHCP_STATE_OFF); */
|
/* dhcp_set_state(&dhcp, DHCP_STATE_OFF); */
|
||||||
|
|
||||||
|
|
||||||
#if DHCP_DOES_ACD_CHECK
|
#if LWIP_DHCP_DOES_ACD_CHECK
|
||||||
/* add acd struct to list*/
|
/* add acd struct to list*/
|
||||||
acd_add(netif, &dhcp->acd, dhcp_conflict_callback);
|
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"));
|
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.
|
* Decline an offered lease.
|
||||||
*
|
*
|
||||||
@ -952,7 +952,7 @@ dhcp_decline(struct netif *netif)
|
|||||||
}
|
}
|
||||||
return result;
|
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) ||
|
if ((dhcp->state == DHCP_STATE_REQUESTING) ||
|
||||||
(dhcp->state == DHCP_STATE_REBOOTING)) {
|
(dhcp->state == DHCP_STATE_REBOOTING)) {
|
||||||
dhcp_handle_ack(netif, msg_in);
|
dhcp_handle_ack(netif, msg_in);
|
||||||
#if DHCP_DOES_ACD_CHECK
|
#if LWIP_DHCP_DOES_ACD_CHECK
|
||||||
if ((netif->flags & NETIF_FLAG_ETHARP) != 0) {
|
if ((netif->flags & NETIF_FLAG_ETHARP) != 0) {
|
||||||
/* check if the acknowledged lease address is already in use */
|
/* check if the acknowledged lease address is already in use */
|
||||||
dhcp_check(netif);
|
dhcp_check(netif);
|
||||||
|
@ -45,9 +45,9 @@
|
|||||||
#include "lwip/netif.h"
|
#include "lwip/netif.h"
|
||||||
#include "lwip/udp.h"
|
#include "lwip/udp.h"
|
||||||
|
|
||||||
#if DHCP_DOES_ACD_CHECK
|
#if LWIP_DHCP_DOES_ACD_CHECK
|
||||||
#include "lwip/acd.h"
|
#include "lwip/acd.h"
|
||||||
#endif /* DHCP_DOES_ACD_CHECK */
|
#endif /* LWIP_DHCP_DOES_ACD_CHECK */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -100,10 +100,10 @@ struct dhcp
|
|||||||
ip4_addr_t offered_si_addr;
|
ip4_addr_t offered_si_addr;
|
||||||
char boot_file_name[DHCP_BOOT_FILE_LEN];
|
char boot_file_name[DHCP_BOOT_FILE_LEN];
|
||||||
#endif /* LWIP_DHCP_BOOTPFILE */
|
#endif /* LWIP_DHCP_BOOTPFILE */
|
||||||
#if DHCP_DOES_ACD_CHECK
|
#if LWIP_DHCP_DOES_ACD_CHECK
|
||||||
/** acd struct */
|
/** acd struct */
|
||||||
struct acd acd;
|
struct acd acd;
|
||||||
#endif /* DHCP_DOES_ACD_CHECK */
|
#endif /* LWIP_DHCP_DOES_ACD_CHECK */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -924,10 +924,10 @@
|
|||||||
#endif /* !LWIP_IPV4 */
|
#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__
|
#if !defined LWIP_DHCP_DOES_ACD_CHECK || defined __DOXYGEN__
|
||||||
#define DHCP_DOES_ACD_CHECK 1
|
#define LWIP_DHCP_DOES_ACD_CHECK 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1023,7 +1023,7 @@
|
|||||||
* LWIP_ACD==1: Enable ACD module. ACD module is needed when using AUTOIP.
|
* LWIP_ACD==1: Enable ACD module. ACD module is needed when using AUTOIP.
|
||||||
*/
|
*/
|
||||||
#if !defined LWIP_ACD || defined __DOXYGEN__
|
#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
|
#endif
|
||||||
#if !LWIP_IPV4
|
#if !LWIP_IPV4
|
||||||
/* disable ACD when IPv4 is disabled */
|
/* disable ACD when IPv4 is disabled */
|
||||||
|
Loading…
Reference in New Issue
Block a user