mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-26 03:16:18 +00:00
etharp: fix bogus ifdef regions
(after separating etharp and ethernet)
This commit is contained in:
parent
b2ef9d9046
commit
e05a96550f
@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
#include "lwip/opt.h"
|
#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/etharp.h"
|
||||||
#include "lwip/stats.h"
|
#include "lwip/stats.h"
|
||||||
@ -61,8 +61,6 @@
|
|||||||
#include LWIP_HOOK_FILENAME
|
#include LWIP_HOOK_FILENAME
|
||||||
#endif
|
#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
|
/** 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. */
|
* breaking a steadily used connection because the ARP entry timed out. */
|
||||||
#define ARP_AGE_REREQUEST_USED_UNICAST (ARP_MAXAGE - 30)
|
#define ARP_AGE_REREQUEST_USED_UNICAST (ARP_MAXAGE - 30)
|
||||||
@ -126,8 +124,8 @@ static u8_t etharp_cached_entry;
|
|||||||
#endif /* LWIP_NETIF_HWADDRHINT */
|
#endif /* LWIP_NETIF_HWADDRHINT */
|
||||||
|
|
||||||
|
|
||||||
/* Some checks, instead of etharp_init(): */
|
/* Check for maximum ARP_TABLE_SIZE */
|
||||||
#if (LWIP_ARP && (ARP_TABLE_SIZE > 0x7f))
|
#if (ARP_TABLE_SIZE > 0x7f)
|
||||||
#error "ARP_TABLE_SIZE must fit in an s8_t, you have to reduce it in your lwipopts.h"
|
#error "ARP_TABLE_SIZE must fit in an s8_t, you have to reduce it in your lwipopts.h"
|
||||||
#endif
|
#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"));
|
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_request: sending ARP request.\n"));
|
||||||
return etharp_request_dst(netif, ipaddr, ðbroadcast);
|
return etharp_request_dst(netif, ipaddr, ðbroadcast);
|
||||||
}
|
}
|
||||||
#endif /* LWIP_IPV4 && LWIP_ARP */
|
|
||||||
|
|
||||||
#endif /* LWIP_ARP || LWIP_ETHERNET */
|
#endif /* LWIP_IPV4 && LWIP_ARP */
|
||||||
|
@ -52,14 +52,14 @@
|
|||||||
#include "lwip/ip4.h"
|
#include "lwip/ip4.h"
|
||||||
#include "lwip/prot/ethernet.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 */
|
#if LWIP_IPV4 && LWIP_ARP /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#include "lwip/prot/etharp.h"
|
#include "lwip/prot/etharp.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/** 1 seconds period */
|
/** 1 seconds period */
|
||||||
#define ARP_TMR_INTERVAL 1000
|
#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);
|
err_t etharp_remove_static_entry(const ip4_addr_t *ipaddr);
|
||||||
#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */
|
#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */
|
||||||
|
|
||||||
#endif /* LWIP_IPV4 && LWIP_ARP */
|
|
||||||
|
|
||||||
void etharp_input(struct pbuf *p, struct netif *netif);
|
void etharp_input(struct pbuf *p, struct netif *netif);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* LWIP_IPV4 && LWIP_ARP */
|
||||||
#endif /* LWIP_ARP || LWIP_ETHERNET */
|
#endif /* LWIP_ARP || LWIP_ETHERNET */
|
||||||
|
|
||||||
#endif /* LWIP_HDR_NETIF_ETHARP_H */
|
#endif /* LWIP_HDR_NETIF_ETHARP_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user