From 7e636c196a1a8d9dc5a6968cef28d3a6b7058129 Mon Sep 17 00:00:00 2001 From: zhangyanjiao Date: Tue, 9 Oct 2018 15:18:41 +0800 Subject: [PATCH] fix the compile bug for autoip --- src/core/ipv4/autoip.c | 2 +- src/include/lwip/autoip.h | 20 -------------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/core/ipv4/autoip.c b/src/core/ipv4/autoip.c index b02ccb8e..a5a63df8 100644 --- a/src/core/ipv4/autoip.c +++ b/src/core/ipv4/autoip.c @@ -243,7 +243,7 @@ autoip_bind(struct netif *netif) /* interface is used by routing now that an address is set */ #if ESP_LWIP - struct dhcp *dhcp = netif->dhcp; + struct dhcp *dhcp = netif_dhcp_data(netif); if (dhcp->cb != NULL) { dhcp->cb(netif); } diff --git a/src/include/lwip/autoip.h b/src/include/lwip/autoip.h index 82a69b46..1d85bccf 100644 --- a/src/include/lwip/autoip.h +++ b/src/include/lwip/autoip.h @@ -57,26 +57,6 @@ extern "C" { #define AUTOIP_TMR_INTERVAL 100 #define AUTOIP_TICKS_PER_SECOND (1000 / AUTOIP_TMR_INTERVAL) -#if ESP_LWIP -/* RFC 3927 Constants */ -#define PROBE_WAIT 1 /* second (initial random delay) */ -#define PROBE_MIN 1 /* second (minimum delay till repeated probe) */ -#define PROBE_MAX 2 /* seconds (maximum delay till repeated probe) */ -#define PROBE_NUM 3 /* (number of probe packets) */ -#define ANNOUNCE_NUM 2 /* (number of announcement packets) */ -#define ANNOUNCE_INTERVAL 2 /* seconds (time between announcement packets) */ -#define ANNOUNCE_WAIT 2 /* seconds (delay before announcing) */ -#define MAX_CONFLICTS LWIP_AUTOIP_MAX_CONFLICTS /* (max conflicts before rate limiting) */ -#define RATE_LIMIT_INTERVAL LWIP_AUTOIP_RATE_LIMIT_INTERVAL /* seconds (delay between successive attempts) */ -#define DEFEND_INTERVAL 10 /* seconds (min. wait between defensive ARPs) */ - -/* AutoIP client states */ -#define AUTOIP_STATE_OFF 0 -#define AUTOIP_STATE_PROBING 1 -#define AUTOIP_STATE_ANNOUNCING 2 -#define AUTOIP_STATE_BOUND 3 -#endif - /** AutoIP state information per netif */ struct autoip {