From 83705d736e7e957752226de8c2165aa9ff4deeaa Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 4 Nov 2007 22:59:30 +0000 Subject: Integrating with DM320 git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@368 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/include/net/uip/uip-arp.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'nuttx/include/net/uip/uip-arp.h') diff --git a/nuttx/include/net/uip/uip-arp.h b/nuttx/include/net/uip/uip-arp.h index e7c636357..9ee7f3254 100644 --- a/nuttx/include/net/uip/uip-arp.h +++ b/nuttx/include/net/uip/uip-arp.h @@ -35,17 +35,24 @@ #define __UIP_ARP_H__ #include +#include #include -/* The Ethernet header */ +/* The Ethernet header -- 14 bytes. The first two fields are type 'struct + * uip_eth_addr but are represented as a simple byte array here because + * some compilers refuse to pack 6 byte structures. + */ struct uip_eth_hdr { - struct uip_eth_addr dest; - struct uip_eth_addr src; - uint16 type; + + uint8 dest[6]; /* Ethernet destination address (6 bytes) */ + uint8 src[6]; /* Ethernet source address (6 bytes) */ + uint16 type; /* Type code (2 bytes) */ }; +/* Recognized values of the type bytes in the Ethernet header */ + #define UIP_ETHTYPE_ARP 0x0806 #define UIP_ETHTYPE_IP 0x0800 #define UIP_ETHTYPE_IP6 0x86dd -- cgit v1.2.3