etharp.c: Make MAX_AGE of an ARP entry configurable

This commit is contained in:
Dirk Ziegelmeier 2016-02-11 09:38:17 +01:00
parent 5aa5563622
commit cddd3b552a
2 changed files with 8 additions and 6 deletions

View File

@ -451,6 +451,14 @@
#define ARP_TABLE_SIZE 10
#endif
/** the time an ARP entry stays valid after its last update,
* for ARP_TMR_INTERVAL = 1000, this is
* (60 * 5) seconds = 5 minutes.
*/
#ifndef ARP_MAXAGE
#define ARP_MAXAGE 300
#endif
/**
* ARP_QUEUEING==1: Multiple outgoing packets are queued during hardware address
* resolution. By default, only the most recent packet is queued per IP address.

View File

@ -73,12 +73,6 @@ const struct eth_addr ethzero = {{0,0,0,0,0,0}};
#if LWIP_IPV4 && LWIP_ARP /* don't build if not configured for use in lwipopts.h */
/** the time an ARP entry stays valid after its last update,
* for ARP_TMR_INTERVAL = 1000, this is
* (60 * 5) seconds = 5 minutes.
*/
#define ARP_MAXAGE 300
/** 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)