diff options
author | Joe Hershberger <joe.hershberger@ni.com> | 2012-05-23 07:58:04 +0000 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2012-05-23 17:46:00 -0500 |
commit | 594c26f8a7dbb83243a5168378a2164fa08d6dd8 (patch) | |
tree | da2d24d45ee1bb1f9320e023b3a1a24fa25c1d02 /include/net.h | |
parent | 8b9c53221f6ce30ad132e3202e6d445bc21ed8aa (diff) | |
download | u-boot-imx-594c26f8a7dbb83243a5168378a2164fa08d6dd8.zip u-boot-imx-594c26f8a7dbb83243a5168378a2164fa08d6dd8.tar.gz u-boot-imx-594c26f8a7dbb83243a5168378a2164fa08d6dd8.tar.bz2 |
net: cosmetic: Un-typedef IP_t
Rename IP header related things to IP_UDP. The existing definition
of IP_t includes UDP header, so name it to accurately describe the
structure.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'include/net.h')
-rw-r--r-- | include/net.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/net.h b/include/net.h index 64700d9..3e4f304 100644 --- a/include/net.h +++ b/include/net.h @@ -194,9 +194,9 @@ typedef struct { #define IPPROTO_UDP 17 /* User Datagram Protocol */ /* - * Internet Protocol (IP) header. + * Internet Protocol (IP) + UDP header. */ -typedef struct { +struct ip_udp_hdr { uchar ip_hl_v; /* header length and version */ uchar ip_tos; /* type of service */ ushort ip_len; /* total length */ @@ -211,7 +211,7 @@ typedef struct { ushort udp_dst; /* UDP destination port */ ushort udp_len; /* Length of UDP packet */ ushort udp_xsum; /* Checksum */ -} IP_t; +}; #define IP_OFFS 0x1fff /* ip offset *= 8 */ #define IP_FLAGS 0xe000 /* first 3 bits */ @@ -219,9 +219,10 @@ typedef struct { #define IP_FLAGS_DFRAG 0x4000 /* don't fragments */ #define IP_FLAGS_MFRAG 0x2000 /* more fragments */ -#define IP_HDR_SIZE_NO_UDP (sizeof(IP_t) - 8) -#define IP_HDR_SIZE (sizeof(IP_t)) +#define IP_HDR_SIZE_NO_UDP (sizeof(struct ip_udp_hdr) - 8) +#define IP_UDP_HDR_SIZE (sizeof(struct ip_udp_hdr)) +#define UDP_HDR_SIZE (IP_UDP_HDR_SIZE - IP_HDR_SIZE_NO_UDP) /* * Address Resolution Protocol (ARP) header. |