mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
Integrating with DM320
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@368 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -35,17 +35,24 @@
|
||||
#define __UIP_ARP_H__
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/compiler.h>
|
||||
#include <net/uip/uip.h>
|
||||
|
||||
/* 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
|
||||
|
||||
+39
-38
@@ -280,7 +280,7 @@ struct uip_tcpip_hdr
|
||||
{
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
|
||||
/* IPv6 header. */
|
||||
/* IPv6 Ip header. */
|
||||
|
||||
uint8 vtc;
|
||||
uint8 tcflow;
|
||||
@@ -292,18 +292,18 @@ struct uip_tcpip_hdr
|
||||
|
||||
#else /* CONFIG_NET_IPv6 */
|
||||
|
||||
/* IPv4 header. */
|
||||
/* IPv4 IP header. */
|
||||
|
||||
uint8 vhl;
|
||||
uint8 tos;
|
||||
uint8 len[2];
|
||||
uint8 ipid[2];
|
||||
uint8 ipoffset[2];
|
||||
uint8 ttl;
|
||||
uint8 proto;
|
||||
uint16 ipchksum;
|
||||
uint16 srcipaddr[2];
|
||||
uint16 destipaddr[2];
|
||||
uint8 vhl; /* 8-bit Version (4) and header length (5 or 6) */
|
||||
uint8 tos; /* 8-bit Type of service (e.g., 6=TCP) */
|
||||
uint8 len[2]; /* 16-bit Total length */
|
||||
uint8 ipid[2]; /* 16-bit Identification */
|
||||
uint8 ipoffset[2]; /* 16-bit IP flags + fragment offset */
|
||||
uint8 ttl; /* 8-bit Time to Live */
|
||||
uint8 proto; /* 8-bit Protocol */
|
||||
uint16 ipchksum; /* 16-bit Header checksum */
|
||||
uint16 srcipaddr[2]; /* 32-bit Source IP address */
|
||||
uint16 destipaddr[2]; /* 32-bit Destination IP address */
|
||||
|
||||
#endif /* CONFIG_NET_IPv6 */
|
||||
|
||||
@@ -327,7 +327,7 @@ struct uip_icmpip_hdr
|
||||
{
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
|
||||
/* IPv6 header. */
|
||||
/* IPv6 IP header. */
|
||||
|
||||
uint8 vtc;
|
||||
uint8 tcf;
|
||||
@@ -340,18 +340,18 @@ struct uip_icmpip_hdr
|
||||
|
||||
#else /* CONFIG_NET_IPv6 */
|
||||
|
||||
/* IPv4 header. */
|
||||
/* IPv4 IP header. */
|
||||
|
||||
uint8 vhl;
|
||||
uint8 tos;
|
||||
uint8 len[2];
|
||||
uint8 ipid[2];
|
||||
uint8 ipoffset[2];
|
||||
uint8 ttl;
|
||||
uint8 proto;
|
||||
uint16 ipchksum;
|
||||
uint16 srcipaddr[2];
|
||||
uint16 destipaddr[2];
|
||||
uint8 vhl; /* 8-bit Version (4) and header length (5 or 6) */
|
||||
uint8 tos; /* 8-bit Type of service (e.g., 6=TCP) */
|
||||
uint8 len[2]; /* 16-bit Total length */
|
||||
uint8 ipid[2]; /* 16-bit Identification */
|
||||
uint8 ipoffset[2]; /* 16-bit IP flags + fragment offset */
|
||||
uint8 ttl; /* 8-bit Time to Live */
|
||||
uint8 proto; /* 8-bit Protocol */
|
||||
uint16 ipchksum; /* 16-bit Header checksum */
|
||||
uint16 srcipaddr[2]; /* 32-bit Source IP address */
|
||||
uint16 destipaddr[2]; /* 32-bit Destination IP address */
|
||||
|
||||
#endif /* CONFIG_NET_IPv6 */
|
||||
|
||||
@@ -384,13 +384,14 @@ struct uip_udpip_hdr
|
||||
{
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
|
||||
/* IPv6 header. */
|
||||
/* IPv6 IP header. */
|
||||
|
||||
uint8 vtc;
|
||||
uint8 vtc;
|
||||
uint8 tcf;
|
||||
uint16 flow;
|
||||
uint8 len[2];
|
||||
uint8 proto, ttl;
|
||||
uint8 len[2];
|
||||
uint8 proto;
|
||||
uint8 ttl;
|
||||
uip_ip6addr_t srcipaddr;
|
||||
uip_ip6addr_t destipaddr;
|
||||
|
||||
@@ -398,16 +399,16 @@ struct uip_udpip_hdr
|
||||
|
||||
/* IPv4 header. */
|
||||
|
||||
uint8 vhl;
|
||||
uint8 tos;
|
||||
uint8 len[2];
|
||||
uint8 ipid[2];
|
||||
uint8 ipoffset[2];
|
||||
uint8 ttl;
|
||||
uint8 proto;
|
||||
uint16 ipchksum;
|
||||
uint16 srcipaddr[2];
|
||||
uint16 destipaddr[2];
|
||||
uint8 vhl; /* 8-bit Version (4) and header length (5 or 6) */
|
||||
uint8 tos; /* 8-bit Type of service (e.g., 6=TCP) */
|
||||
uint8 len[2]; /* 16-bit Total length */
|
||||
uint8 ipid[2]; /* 16-bit Identification */
|
||||
uint8 ipoffset[2]; /* 16-bit IP flags + fragment offset */
|
||||
uint8 ttl; /* 8-bit Time to Live */
|
||||
uint8 proto; /* 8-bit Protocol */
|
||||
uint16 ipchksum; /* 16-bit Header checksum */
|
||||
uint16 srcipaddr[2]; /* 32-bit Source IP address */
|
||||
uint16 destipaddr[2]; /* 32-bit Destination IP address */
|
||||
|
||||
#endif /* CONFIG_NET_IPv6 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user