etharp: fix bogus ifdef regions

(after separating etharp and ethernet)
This commit is contained in:
goldsimon 2018-04-25 21:17:47 +02:00
parent b2ef9d9046
commit e05a96550f
2 changed files with 9 additions and 13 deletions

View File

@ -45,7 +45,7 @@
#include "lwip/opt.h"
#if LWIP_ARP || LWIP_ETHERNET
#if LWIP_IPV4 && LWIP_ARP /* don't build if not configured for use in lwipopts.h */
#include "lwip/etharp.h"
#include "lwip/stats.h"
@ -61,8 +61,6 @@
#include LWIP_HOOK_FILENAME
#endif
#if LWIP_IPV4 && LWIP_ARP /* don't build if not configured for use in lwipopts.h */
/** Re-request a used ARP entry 1 minute before it would expire to prevent
* breaking a steadily used connection because the ARP entry timed out. */
#define ARP_AGE_REREQUEST_USED_UNICAST (ARP_MAXAGE - 30)
@ -126,8 +124,8 @@ static u8_t etharp_cached_entry;
#endif /* LWIP_NETIF_HWADDRHINT */
/* Some checks, instead of etharp_init(): */
#if (LWIP_ARP && (ARP_TABLE_SIZE > 0x7f))
/* Check for maximum ARP_TABLE_SIZE */
#if (ARP_TABLE_SIZE > 0x7f)
#error "ARP_TABLE_SIZE must fit in an s8_t, you have to reduce it in your lwipopts.h"
#endif
@ -1201,6 +1199,5 @@ etharp_request(struct netif *netif, const ip4_addr_t *ipaddr)
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_request: sending ARP request.\n"));
return etharp_request_dst(netif, ipaddr, &ethbroadcast);
}
#endif /* LWIP_IPV4 && LWIP_ARP */
#endif /* LWIP_ARP || LWIP_ETHERNET */
#endif /* LWIP_IPV4 && LWIP_ARP */

View File

@ -52,14 +52,14 @@
#include "lwip/ip4.h"
#include "lwip/prot/ethernet.h"
#ifdef __cplusplus
extern "C" {
#endif
#if LWIP_IPV4 && LWIP_ARP /* don't build if not configured for use in lwipopts.h */
#include "lwip/prot/etharp.h"
#ifdef __cplusplus
extern "C" {
#endif
/** 1 seconds period */
#define ARP_TMR_INTERVAL 1000
@ -93,14 +93,13 @@ err_t etharp_add_static_entry(const ip4_addr_t *ipaddr, struct eth_addr *ethaddr
err_t etharp_remove_static_entry(const ip4_addr_t *ipaddr);
#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */
#endif /* LWIP_IPV4 && LWIP_ARP */
void etharp_input(struct pbuf *p, struct netif *netif);
#ifdef __cplusplus
}
#endif
#endif /* LWIP_IPV4 && LWIP_ARP */
#endif /* LWIP_ARP || LWIP_ETHERNET */
#endif /* LWIP_HDR_NETIF_ETHARP_H */