Revision:
2:1f10f8ab527b
Parent:
0:0f5a52711275
Child:
3:e02ec42cf9c8
--- a/LPC2368/lwip/include/netif/etharp.h	Mon Jul 19 16:27:52 2010 +0000
+++ b/LPC2368/lwip/include/netif/etharp.h	Thu Jul 22 11:31:59 2010 +0000
@@ -115,7 +115,8 @@
 struct etharp_hdr {
   PACK_STRUCT_FIELD(u16_t hwtype);
   PACK_STRUCT_FIELD(u16_t proto);
-  PACK_STRUCT_FIELD(u16_t _hwlen_protolen);
+  PACK_STRUCT_FIELD(u8_t  hwlen);
+  PACK_STRUCT_FIELD(u8_t  protolen);
   PACK_STRUCT_FIELD(u16_t opcode);
   PACK_STRUCT_FIELD(struct eth_addr shwaddr);
   PACK_STRUCT_FIELD(struct ip_addr2 sipaddr);
@@ -139,12 +140,34 @@
 #define ETHTYPE_PPPOEDISC 0x8863  /* PPP Over Ethernet Discovery Stage */
 #define ETHTYPE_PPPOE     0x8864  /* PPP Over Ethernet Session Stage */
 
+/** MEMCPY-like macro to copy to/from struct eth_addr's that are local variables
+ * or known to be 32-bit aligned within the protocol header. */
+#ifndef ETHADDR32_COPY
+#define ETHADDR32_COPY(src, dst)  SMEMCPY(src, dst, ETHARP_HWADDR_LEN)
+#endif
+
+/** MEMCPY-like macro to copy to/from struct eth_addr's that are no local
+ * variables and known to be 16-bit aligned within the protocol header. */
+#ifndef ETHADDR16_COPY
+#define ETHADDR16_COPY(src, dst)  SMEMCPY(src, dst, ETHARP_HWADDR_LEN)
+#endif
+
 #if LWIP_ARP /* don't build if not configured for use in lwipopts.h */
 
 /** ARP message types (opcodes) */
 #define ARP_REQUEST 1
 #define ARP_REPLY   2
 
+/** Define this to 1 and define LWIP_ARP_FILTER_NETIF_FN(pbuf, netif, type)
+ * to a filter function that returns the correct netif when using multiple
+ * netifs on one hardware interface where the netif's low-level receive
+ * routine cannot decide for the correct netif (e.g. when mapping multiple
+ * IP addresses to one hardware interface).
+ */
+#ifndef LWIP_ARP_FILTER_NETIF
+#define LWIP_ARP_FILTER_NETIF 0
+#endif
+
 #if ARP_QUEUEING
 /** struct for queueing outgoing packets for unknown address
   * defined here to be accessed by memp.h
@@ -168,6 +191,11 @@
  *  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,
@@ -176,7 +204,6 @@
                  const u16_t opcode);
 #endif /* LWIP_AUTOIP */
 
-
 #endif /* LWIP_ARP */
 
 err_t ethernet_input(struct pbuf *p, struct netif *netif);
@@ -185,10 +212,10 @@
 
 extern const struct eth_addr ethbroadcast, ethzero;
 
+#endif /* LWIP_ARP || LWIP_ETHERNET */
+
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* LWIP_ARP || LWIP_ETHERNET */
-
 #endif /* __NETIF_ARP_H__ */