]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[IPv4] Tidy up some header files.
authorMichael Brown <mcb30@etherboot.org>
Sun, 23 Mar 2008 22:05:29 +0000 (22:05 +0000)
committerMichael Brown <mcb30@etherboot.org>
Sun, 23 Mar 2008 22:05:47 +0000 (22:05 +0000)
src/include/gpxe/icmp6.h
src/include/gpxe/ip.h
src/include/gpxe/ip6.h
src/include/ip.h [deleted file]
src/include/udp.h [deleted file]
src/proto/igmp.c

index 76aaddfe8a0546b9be0f623654f11b0f803f61ce..340936165eb2755faa03fc7c4b430f6555c15ca4 100644 (file)
@@ -7,7 +7,6 @@
  *
  */
 
-#include <ip.h>
 #include <gpxe/ip6.h>
 #include <gpxe/ndp.h>
 
index 0a23565b298e31648e9e978879047c00d9383daf..b1b0c48c3773775b3b332a4f2c87ecfe72a10541 100644 (file)
@@ -7,9 +7,15 @@
  *
  */
 
-#include <ip.h>
+#include <stdint.h>
+#include <gpxe/in.h>
+#include <gpxe/list.h>
 #include <gpxe/retry.h>
 
+struct io_buffer;
+struct net_device;
+struct net_protocol;
+
 /* IP constants */
 
 #define IP_VER                 0x40U
 #define IP_FRAG_IOB_SIZE       1500
 #define IP_FRAG_TIMEOUT                50
 
-/* IP4 pseudo header */
+/** An IPv4 packet header */
+struct iphdr {
+       uint8_t  verhdrlen;
+       uint8_t  service;
+       uint16_t len;
+       uint16_t ident;
+       uint16_t frags;
+       uint8_t  ttl;
+       uint8_t  protocol;
+       uint16_t chksum;
+       struct in_addr src;
+       struct in_addr dest;
+} __attribute__ (( packed ));
+
+/** An IPv4 pseudo header */
 struct ipv4_pseudo_header {
        struct in_addr src;
        struct in_addr dest;
@@ -68,11 +88,6 @@ struct frag_buffer {
        struct list_head list;
 };
 
-struct io_buffer;
-struct net_device;
-struct net_protocol;
-struct tcpip_protocol;
-
 extern struct list_head ipv4_miniroutes;
 
 extern struct net_protocol ipv4_protocol;
index 22989ec96ec7058a004beeade8bb08d6f355c78b..dc0ae31f8ead5a4536797613bbd1706162d96a6d 100644 (file)
@@ -7,7 +7,7 @@
  *
  */
 
-#include <ip.h>
+#include <stdint.h>
 #include <gpxe/in.h>
 
 /* IP6 constants */
diff --git a/src/include/ip.h b/src/include/ip.h
deleted file mode 100644 (file)
index 9da7f56..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef        _IP_H
-#define        _IP_H
-
-#include "stddef.h"
-#include "stdint.h"
-#include <gpxe/in.h>
-
-struct iphdr {
-       uint8_t  verhdrlen;
-       uint8_t  service;
-       uint16_t len;
-       uint16_t ident;
-       uint16_t frags;
-       uint8_t  ttl;
-       uint8_t  protocol;
-       uint16_t chksum;
-       struct in_addr src;
-       struct in_addr dest;
-} PACKED;
-
-extern uint16_t tcpudpchksum(struct iphdr *ip);
-
-#endif /* _IP_H */
diff --git a/src/include/udp.h b/src/include/udp.h
deleted file mode 100644 (file)
index 7814c5f..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef        _UDP_H
-#define        _UDP_H
-
-#include "stddef.h"
-#include "stdint.h"
-#include <gpxe/in.h>
-#include "ip.h"
-
-struct udp_pseudo_hdr {
-       struct in_addr  src;
-       struct in_addr  dest;
-       uint8_t  unused;
-       uint8_t  protocol;
-       uint16_t len;
-} PACKED;
-struct udphdr {
-       uint16_t src;
-       uint16_t dest;
-       uint16_t len;
-       uint16_t chksum;
-       struct {} payload;
-} PACKED;
-struct udppacket {
-       struct iphdr    ip;
-       struct udphdr   udp;
-       struct {} payload;
-} PACKED;
-
-#endif /* _UDP_H */
index ef1ff714d188f5675f6f8f83718bb161ba539a91..d711421a1d3d2e36dc1e76e9f45fb929bc7d7bd5 100644 (file)
@@ -3,11 +3,11 @@
  *
  */
 
+#if 0
+
 #include <ip.h>
 #include <igmp.h>
 
-#if 0
-
 static unsigned long last_igmpv1 = 0;
 static struct igmptable_t igmptable[MAX_IGMP];