Added support for static ARP table entries (added option ETHARP_SUPPORT_STATIC_ENTRIES) (+ added test); refactored the etharp code a bit

This commit is contained in:
goldsimon
2010-03-20 11:45:25 +00:00
parent 385d044f7d
commit 5fd410db4b
7 changed files with 589 additions and 229 deletions

View File

@@ -444,6 +444,14 @@
#define ETH_PAD_SIZE 0
#endif
/** ETHARP_SUPPORT_STATIC_ENTRIES==1: enable code to support static ARP table
* entries (using etharp_add_static_entry/etharp_remove_static_entry).
*/
#ifndef ETHARP_SUPPORT_STATIC_ENTRIES
#define ETHARP_SUPPORT_STATIC_ENTRIES 0
#endif
/*
--------------------------------
---------- IP options ----------

View File

@@ -168,6 +168,11 @@ err_t etharp_request(struct netif *netif, ip_addr_t *ipaddr);
* From RFC 3220 "IP Mobility Support for IPv4" section 4.6. */
#define etharp_gratuitous(netif) etharp_request((netif), &(netif)->ip_addr)
#if ETHARP_SUPPORT_STATIC_ENTRIES
err_t etharp_add_static_entry(ip_addr_t *ipaddr, struct eth_addr *ethaddr);
err_t etharp_remove_static_entry(ip_addr_t *ipaddr);
#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */
#if LWIP_AUTOIP
err_t etharp_raw(struct netif *netif, const struct eth_addr *ethsrc_addr,
const struct eth_addr *ethdst_addr,