]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
Header rearrangement.
authorMichael Brown <mcb30@etherboot.org>
Mon, 24 Apr 2006 15:42:49 +0000 (15:42 +0000)
committerMichael Brown <mcb30@etherboot.org>
Mon, 24 Apr 2006 15:42:49 +0000 (15:42 +0000)
I want to get to the point where any header in include/ reflects a
standard user-level header (e.g. a POSIX header), while everything that's
specific to gPXE lives in include/gpxe/.  Headers that reflect a Linux
header (e.g. if_ether.h) should also be in include/gpxe/, with the same
name as the Linux header and, preferably, the same names used for the
definitions.

60 files changed:
src/arch/i386/core/pci_io.c
src/arch/i386/drivers/net/undi.c
src/arch/i386/include/relocate.h
src/arch/i386/prefix/select_pci.c
src/core/btext.c
src/core/nic.c
src/drivers/bus/pci.c
src/drivers/net/3c595.c
src/drivers/net/3c90x.c
src/drivers/net/amd8111e.c
src/drivers/net/davicom.c
src/drivers/net/dmfe.c
src/drivers/net/e1000.c
src/drivers/net/eepro100.c
src/drivers/net/epic100.c
src/drivers/net/etherfabric.c
src/drivers/net/forcedeth.c
src/drivers/net/mlx_ipoib/ib_mt23108.c
src/drivers/net/mlx_ipoib/ib_mt25218.c
src/drivers/net/mlx_ipoib/mt23108.c
src/drivers/net/mlx_ipoib/mt25218.c
src/drivers/net/mtd80x.c
src/drivers/net/natsemi.c
src/drivers/net/ns83820.c
src/drivers/net/ns8390.c
src/drivers/net/pcnet32.c
src/drivers/net/prism2.c
src/drivers/net/prism2_pci.c
src/drivers/net/prism2_plx.c
src/drivers/net/r8169.c
src/drivers/net/rtl8139.c
src/drivers/net/sis900.c
src/drivers/net/skel.c
src/drivers/net/sundance.c
src/drivers/net/tg3.c
src/drivers/net/tlan.c
src/drivers/net/tulip.c
src/drivers/net/via-rhine.c
src/drivers/net/via-velocity.c
src/drivers/net/w89c840.c
src/include/background.h
src/include/console.h
src/include/dev.h
src/include/errno.h
src/include/gpxe/hello.h
src/include/gpxe/if_arp.h
src/include/gpxe/if_ether.h
src/include/gpxe/in.h
src/include/gpxe/ip.h
src/include/gpxe/iscsi.h
src/include/gpxe/pci.h [moved from src/include/pci.h with 97% similarity]
src/include/gpxe/pci_ids.h [moved from src/include/pci_ids.h with 99% similarity]
src/include/gpxe/scsi.h
src/include/gpxe/tables.h [moved from src/include/tables.h with 98% similarity]
src/include/gpxe/tcp.h
src/include/image.h
src/include/init.h
src/include/proto.h
src/include/resolv.h
src/proto/nmb.c

index 28d9cbdd2e8cf7d8694141851673935d4dd94d39..cfb31ad90a8fea0b2018df236567dd908efb958b 100644 (file)
@@ -12,7 +12,7 @@
 */
 #include "etherboot.h"
 #include "init.h"
-#include "pci.h"
+#include <gpxe/pci.h>
 #include "pci_io.h"
 #ifdef KEEP_IT_REAL
 #include "realmode.h"
index 38edf303befc6c5cff81c620f75d22c224d2a4e3..f0956e92dddc054592a89c194c36163bc7ecaa62 100644 (file)
@@ -33,7 +33,7 @@ $Id$
 /* to get the interface to the body of the program */
 #include "nic.h"
 /* to get the PCI support functions, if this is a PCI NIC */
-#include "pci.h"
+#include <gpxe/pci.h>
 /* UNDI and PXE defines.  Includes pxe.h. */
 #include "undi.h"
 /* 8259 PIC defines */
index 5e482bd612f8bdebf97800deb65df4e5851d1820..5e87c6932a1f49f79ca39901c36749480bd09f25 100644 (file)
@@ -4,7 +4,7 @@
 /* relocate() is conceptually impossible with KEEP_IT_REAL */
 #ifndef KEEP_IT_REAL
 
-#include "tables.h"
+#include <gpxe/tables.h>
 
 /* An entry in the post-relocation function table */
 struct post_reloc_fn {
index e143b992a73e7c1734f757ce2a6185613c3efb3d..691b461c31258f5a5c40285d7b926d6469f1405d 100644 (file)
@@ -1,5 +1,5 @@
 #include "dev.h"
-#include "pci.h"
+#include <gpxe/pci.h>
 #include "registers.h"
 
 /*
index fc1d4e1bcaaa02861bc2ab64bc02ab675d0b06e8..da6c029b7a60c17281444ebd172c6ff1bcdb6277 100644 (file)
@@ -10,7 +10,7 @@
 #include "etherboot.h"
 #include "console.h"
 #include "init.h"
-#include "pci.h"
+#include <gpxe/pci.h>
 
 #ifdef CONFIG_FILO
 #include <lib.h>
index 04d48a115f60b44b32c5047813d2341ab25b713e..64e87f614845519ca1addc8d7b5beb4c3767ced4 100644 (file)
@@ -457,7 +457,7 @@ int ip_transmit(int len, const void *buf)
 
        ip = (struct iphdr *)buf;
        destip = ip->dest.s_addr;
-       if (destip == IP_BROADCAST) {
+       if (destip == INADDR_BROADCAST) {
                eth_transmit(broadcast, ETH_P_IP, len, buf);
        } else if ((destip & htonl(MULTICAST_MASK)) == htonl(MULTICAST_NETWORK)) {
                unsigned char multicast[6];
@@ -765,7 +765,7 @@ static int bootp(void)
                memset ( arptable, 0, sizeof(arptable) );
                memcpy ( arptable[ARP_CLIENT].node, my_hwaddr, ETH_ALEN );
 
-               udp_transmit(IP_BROADCAST, BOOTP_CLIENT, BOOTP_SERVER,
+               udp_transmit(INADDR_BROADCAST, BOOTP_CLIENT, BOOTP_SERVER,
                        sizeof(struct bootpip_t), &ip);
                remaining_time = rfc2131_sleep_interval(BOOTP_TIMEOUT, retry++);
                stop_time = currticks() + remaining_time;
@@ -804,8 +804,9 @@ static int bootp(void)
                for (reqretry = 0; reqretry < MAX_BOOTP_RETRIES; ) {
                        unsigned long timeout;
 
-                       udp_transmit(IP_BROADCAST, BOOTP_CLIENT, BOOTP_SERVER,
-                                    sizeof(struct bootpip_t), &ip);
+                       udp_transmit(INADDR_BROADCAST, BOOTP_CLIENT,
+                                    BOOTP_SERVER, sizeof(struct bootpip_t),
+                                    &ip);
                        dhcp_reply=0;
                        timeout = rfc2131_sleep_interval(TIMEOUT, reqretry++);
                        if (!await_reply(await_bootp, 0, NULL, timeout))
index 02286b7cf70978f397dd009a467487b2581936ae..6352e56b5b05791749a0137aae74a827a4d9f3a7 100644 (file)
@@ -2,7 +2,7 @@
 #include "string.h"
 #include "console.h"
 #include "nic.h"
-#include "pci.h"
+#include <gpxe/pci.h>
 
 /*
  * pci_io.c may know how many buses we have, in which case it can
index ab10bc9d65ddd34024b2e0432e8ee42ac8e6b0b2..b6f531d15915678cbfeac81b12e224fb5b3341f0 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "etherboot.h"
 #include "nic.h"
-#include "pci.h"
+#include <gpxe/pci.h>
 #include "3c595.h"
 #include "timer.h"
 
index c544381c74c7767a91265a29f4b06da9216b47d6..54dcc40d9f0373dd38ab238fa4fc056bc444676e 100644 (file)
@@ -39,7 +39,7 @@
 
 #include "etherboot.h"
 #include "nic.h"
-#include "pci.h"
+#include <gpxe/pci.h>
 #include "timer.h"
 
 static struct nic_operations a3c90x_operations;
index 611cbc854bfe20cf2d889e9a885a9b2d4b96e0cb..e3b93dc5bc2ae71506e3639e4dc66d8d4e2ee525 100644 (file)
@@ -31,7 +31,7 @@
 #include "etherboot.h"
 #include "nic.h"
 #include "mii.h"
-#include "pci.h"
+#include <gpxe/pci.h>
 #include "timer.h"
 #include "string.h"
 #include "stdint.h"
index d087e29e745490c85cdd38417987426801552ba6..0f1a78cc00b8d171c5e3d0c9f233a2be524335d2 100644 (file)
@@ -43,7 +43,7 @@
 
 #include "etherboot.h"
 #include "nic.h"
-#include "pci.h"
+#include <gpxe/pci.h>
 
 #undef DAVICOM_DEBUG
 #undef DAVICOM_DEBUG_WHERE
index e1ff44ec5d0cfec9979c7138db87d79b92d236f8..4cfb69bd65cbd36c5ffc068cbc63a59fa493b246 100644 (file)
@@ -41,7 +41,7 @@
 /* to get the interface to the body of the program */
 #include "nic.h"
 /* to get the PCI support functions, if this is a PCI NIC */
-#include "pci.h"
+#include <gpxe/pci.h>
 #include "timer.h"
 
 /* #define EDEBUG 1 */
index 2eb6b333a67704e42ed3cd792b4648e7b72251e1..a13a7271d39e17361515305ca9274bf41a2a40a3 100644 (file)
@@ -52,7 +52,7 @@ Drivers are port from Intel's Linux driver e1000-4.3.15
 /* to get the interface to the body of the program */
 #include "nic.h"
 /* to get the PCI support functions, if this is a PCI NIC */
-#include "pci.h"
+#include <gpxe/pci.h>
 #include "timer.h"
 
 typedef unsigned char *dma_addr_t;
index d97b1b18737a3d3d02b3c921cf3076b1c754f0d9..27576a615ee06c89e2540e252d6b361ac2ae982f 100644 (file)
 
 #include "etherboot.h"
 #include "nic.h"
-#include "pci.h"
+#include <gpxe/pci.h>
 #include "timer.h"
 
 static int ioaddr;
index 574f094be53482ab52e3ae8b783558188a1f1678..babcf6b3251cec9eab4d0eb8d42b31a4b63e927c 100644 (file)
@@ -5,7 +5,7 @@
 #define LINUX_OUT_MACROS
 
 #include "etherboot.h"
-#include "pci.h"
+#include <gpxe/pci.h>
 #include "nic.h"
 #include "timer.h"
 #include "console.h"
index bd64cf5e27ee8cbd82c93ee372b8cab389407b44..05239d68823a0b0e0095042db5020125c49c40b6 100644 (file)
@@ -18,7 +18,7 @@
 
 #include "etherboot.h"
 #include "nic.h"
-#include "pci.h"
+#include <gpxe/pci.h>
 #include "timer.h"
 #define dma_addr_t unsigned long
 #include "etherfabric.h"
index 6377383621acd5f9e0838f2f08763415b5ce589c..08ddbcd9b731f0595ca43274eb9269d674771434 100644 (file)
@@ -48,7 +48,7 @@
 /* to get the interface to the body of the program */
 #include "nic.h"
 /* to get the PCI support functions, if this is a PCI NIC */
-#include "pci.h"
+#include <gpxe/pci.h>
 /* Include timer support functions */
 #include "timer.h"
 #include "mii.h"
index 0291f46c06dfba429a725742f7db1dd90b186980..ca3abb10d0c3c145f5cfc85c80e7bc96f9b73968 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "mt23108.h"
 #include "ib_driver.h"
-#include "pci.h"
+#include <gpxe/pci.h>
 
 struct device_buffers_st {
        union recv_wqe_u mads_qp_rcv_queue[NUM_MADS_RCV_WQES]
index 11b25d4912cf8dd97b33e483f5abfa1da03f3970..f16577f1e0be94ad15dd65b8d599d6f0d3c66e09 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "mt25218.h"
 #include "ib_driver.h"
-#include "pci.h"
+#include <gpxe/pci.h>
 
 #define MOD_INC(counter, max_count) (counter) = ((counter)+1) & ((max_count) - 1)
 
index 157995d75528e9a84204ad86f45794450e8fa133..06d63f39cb26a4ba065dfdd5f8fe8a807fb23ab2 100644 (file)
@@ -15,7 +15,7 @@ Skeleton NIC driver for Etherboot
 /* to get the interface to the body of the program */
 #include "nic.h"
 /* to get the PCI support functions, if this is a PCI NIC */
-#include "pci.h"
+#include <gpxe/pci.h>
 /* to get the ISA support functions, if this is an ISA NIC */
 #include "isa.h"
 
index 7866bf607d6cf1df9c177ade30a29c693a438e1d..38b32dc5b569bfc4fc78c720295d7b8b3401d090 100644 (file)
@@ -15,7 +15,7 @@ Skeleton NIC driver for Etherboot
 /* to get the interface to the body of the program */
 #include "nic.h"
 /* to get the PCI support functions, if this is a PCI NIC */
-#include "pci.h"
+#include <gpxe/pci.h>
 /* to get the ISA support functions, if this is an ISA NIC */
 #include "isa.h"
 
index c7754a94f088bd8b6b377fd9af94f4f322fb5f73..21db5640ede9b1112817cb704e6f9599369c8637 100644 (file)
@@ -28,7 +28,7 @@
 /* to get the interface to the body of the program */
 #include "nic.h"
 /* to get the PCI support functions, if this is a PCI NIC */
-#include "pci.h"
+#include <gpxe/pci.h>
 
 /* Condensed operations for readability. */
 #define virt_to_le32desc(addr)  cpu_to_le32(virt_to_bus(addr))
index e8f6d81c131a2b0ee2008336553f37d2f39d267c..951195f1b50cb56dbba463834f272f253ca0ddb5 100644 (file)
@@ -55,7 +55,7 @@
 
 #include "etherboot.h"
 #include "nic.h"
-#include "pci.h"
+#include <gpxe/pci.h>
 
 /* defines */
 
index df9eec5a2e90015eed9ad760df4eea21833ddc3a..30bf0c1c6547c576ebdabf7078ed3d547e2e30bc 100755 (executable)
@@ -40,7 +40,7 @@
 /* to get the interface to the body of the program */
 #include "nic.h"
 /* to get the PCI support functions, if this is a PCI NIC */
-#include "pci.h"
+#include <gpxe/pci.h>
 
 #if ARCH == ia64               /* Support 64-bit addressing */
 #define USE_64BIT_ADDR
index 6a9501142ddcb3e2c5f5c7798435647290ae4540..134e52ab63f963353e9807398070fff63e53e43e 100644 (file)
@@ -33,7 +33,7 @@ SMC8416 PIO support added by Andrew Bettison (andrewb@zip.com.au) on 4/3/02
 #include "nic.h"
 #include "ns8390.h"
 #ifdef INCLUDE_NS8390
-#include "pci.h"
+#include <gpxe/pci.h>
 #else
 #include "isa.h"
 #endif
index 569912eed4cd45085147d8f40d4734780e5c3f59..74fea5a9852f90690429927713314924a4ec66e1 100644 (file)
@@ -44,7 +44,7 @@
 /* to get the interface to the body of the program */
 #include "nic.h"
 /* to get the PCI support functions, if this is a PCI NIC */
-#include "pci.h"
+#include <gpxe/pci.h>
 /* Include the time functions */
 #include "timer.h"
 #include "mii.h"
index 64cce88e138965b93b936eda570c531293415130..7ad390fff8d134a1437b1c0ce6c989efa8a4e83e 100644 (file)
@@ -18,7 +18,7 @@ $Id$
 /* to get the interface to the body of the program */
 #include "nic.h"
 /* to get the PCI support functions, if this is a PCI NIC */
-#include "pci.h"
+#include <gpxe/pci.h>
 
 /*
  * Hard-coded SSID
index 19ab74a060bb9332e137720b568cca97decd3f01..f0dd9f1244488ae08737f2f030e0798372e7e45a 100644 (file)
@@ -14,7 +14,7 @@ $Id$
  * your option) any later version.
  */
 
-#include "pci.h"
+#include <gpxe/pci.h>
 #include "nic.h"
 
 #define WLAN_HOSTIF WLAN_PCI
index bf6fb6266f2aa4572f22f7d4d5cbc22e566700c5..64432c87621f052049879ae347e909c56c48b412 100644 (file)
@@ -14,7 +14,7 @@ $Id$
  * your option) any later version.
  */
 
-#include "pci.h"
+#include <gpxe/pci.h>
 #include "nic.h"
 
 #define WLAN_HOSTIF WLAN_PLX
index af2ea06b6025a13ea56dfc6b59ae6e10dd4f96a3..c11b8271cdd3604dc1e1e874f4c2b47aef6e5656 100644 (file)
@@ -49,7 +49,7 @@
 /* to get the interface to the body of the program */
 #include "nic.h"
 /* to get the PCI support functions, if this is a PCI NIC */
-#include "pci.h"
+#include <gpxe/pci.h>
 #include "timer.h"
 
 #define drv_version "v1.6"
index 10ca13654c63182b32a382def8c215cec42920a3..9a155048c16b9e189e2417cc90273b7b49a457eb 100644 (file)
@@ -64,7 +64,7 @@
 
 #include "etherboot.h"
 #include "nic.h"
-#include "pci.h"
+#include <gpxe/pci.h>
 #include "timer.h"
 
 #define RTL_TIMEOUT (1*TICKS_PER_SEC)
index c2cb94e8745d3194d68b8bbf9c8cfc0bf7091b76..1a79b1d4f1c3055d2324f71f4655ade24e5672f6 100644 (file)
@@ -45,7 +45,7 @@
 
 #include "etherboot.h"
 #include "nic.h"
-#include "pci.h"
+#include <gpxe/pci.h>
 #include "timer.h"
 
 #include "sis900.h"
index 5f5fd0ba896a1b9bd6bd7cb0b4896187930b9a2d..e05239b63acc6ae17f86ee43326586b84cb62a1a 100644 (file)
@@ -15,7 +15,7 @@ Skeleton NIC driver for Etherboot
 /* to get the interface to the body of the program */
 #include "nic.h"
 /* Drag in support for whichever bus(es) we want for this NIC */
-#include "pci.h"
+#include <gpxe/pci.h>
 #include "isa.h"
 #include "eisa.h"
 #include "isapnp.h"
index 701f922a48494aad1c0a3e16649c83e4efb6f577..9c660b9bf7cc485745ce432b34c5d43aa5d8e156 100644 (file)
@@ -45,7 +45,7 @@
 /* to get the interface to the body of the program */
 #include "nic.h"
 /* to get the PCI support functions, if this is a PCI NIC */
-#include "pci.h"
+#include <gpxe/pci.h>
 #include "timer.h"
 #include "mii.h"
 
index ace2dfec6cbbd0531c50f17bfef84f9deb97c638..cad3bdffcdda3bde40c252fd69520c080b6bf2f3 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "etherboot.h"
 #include "nic.h"
-#include "pci.h"
+#include <gpxe/pci.h>
 #include "timer.h"
 #include "string.h"
 #include "tg3.h"
index 3c773b6a8580cd73f7dae42643b1e44b1a43609f..25d66d826b5e03e13fc0212319788ac60a967b50 100644 (file)
@@ -43,7 +43,7 @@
 /* to get the interface to the body of the program */
 #include "nic.h"
 /* to get the PCI support functions, if this is a PCI NIC */
-#include "pci.h"
+#include <gpxe/pci.h>
 #include "timer.h"
 #include "tlan.h"
 
index 864e32af665c8b74467ce93e030899de1a48c204..7ac02d7b2192d372995672ab98792175cd8bb7ed 100644 (file)
 
 #include "etherboot.h"
 #include "nic.h"
-#include "pci.h"
+#include <gpxe/pci.h>
 
 /* User settable parameters */
 
index 15e5ca9bce27c957dc86a32eeef4f573f638dd6e..e95d9323ee895496bc2cc74ef1875b10f853d401 100644 (file)
@@ -48,7 +48,7 @@ static const char *version = "rhine.c v1.0.2 2004-10-29\n";
 
 #include "etherboot.h"
 #include "nic.h"
-#include "pci.h"
+#include <gpxe/pci.h>
 #include "timer.h"
 
 /* define all ioaddr */
index 82751905c95087611dcb2640d54f7d969c63d42d..c6a15e264fcedb01b7be16c93d1a4cb503a34c74 100644 (file)
@@ -43,7 +43,7 @@
 /* to get the interface to the body of the program */
 #include "nic.h"
 /* to get the PCI support functions, if this is a PCI NIC */
-#include "pci.h"
+#include <gpxe/pci.h>
 
 
 #include "via-velocity.h"
index c3f03f9f6eaa60b876ddcb850baab4283dc4bb19..8d8a6ded7a861f597eb236eec4ea812c85c096e5 100644 (file)
@@ -79,7 +79,7 @@
 
 #include "etherboot.h"
 #include "nic.h"
-#include "pci.h"
+#include <gpxe/pci.h>
 #include "timer.h"
 
 static const char *w89c840_version = "driver Version 0.94 - December 12, 2003";
index 24cb3201f6cecb5515ceab896b7eb456a2c53164..40706cd7eb6282673d72f96ba490bb6100e89ef9 100644 (file)
@@ -17,7 +17,7 @@
  *
  */
 
-#include "tables.h"
+#include <gpxe/tables.h>
 #include "ip.h"
 
 /** A background protocol */
index 9e13293aeeb771f28b55142da0ff2c0e90571851..32d28219c06fb4f78cc6e1ee6d3431bbe9e195ff 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "stdint.h"
 #include "vsprintf.h"
-#include "tables.h"
+#include <gpxe/tables.h>
 
 /** @file
  *
index fa549deb2f7165ff3d117c3fc90a053b53c54965..535181aa00975e9a6708dd76aeb7006e51110ae6 100644 (file)
@@ -5,7 +5,7 @@
 #include "string.h"
 #include "buffer.h"
 #include "dhcp.h" /* for dhcp_dev_id */
-#include "tables.h"
+#include <gpxe/tables.h>
 #include <assert.h>
 
 /*
@@ -202,7 +202,7 @@ struct device_driver {
 
 #define DRIVER(_name,_type_driver,_bus_driver,_bus_info,                     \
               _probe,_disable)                                               \
-       static struct device_driver device_ ## _bus_info __device_driver = {  \
+       struct device_driver device_ ## _bus_info __device_driver = {  \
                .name = _name,                                                \
                .type_driver = &_type_driver,                                 \
                .bus_driver = &_bus_driver,                                   \
index f96231be06dbace0d58eb80ad5cf6368d94f7240..d6ddcc56cf451d2abe380550195797d5518f6224 100644 (file)
 #define ENOENT         0xd4
 #define EAFNOSUPPORT   0xd5
 #define EAGAIN         0xd6
+#define EIO            0xd7
 
 /* Data structures and declarations */
 
-#include "tables.h"
+#include <gpxe/tables.h>
 
 extern int errno;
 
index 23ee336f1fb0fda7f3f95b7318395adc9a2ee459..de8127bf4980e5300c005ccc7132a1719e917e17 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _HELLO_H
-#define _HELLO_H
+#ifndef _GPXE_HELLO_H
+#define _GPXE_HELLO_H
 
 /** @file
  *
index 31e993dee8bbe62c39a7fa58386b6ed39b7e5791..5b2503379dd9ec29181890535183ed659c279fd4 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef        _IF_ARP_H
-#define        _IF_ARP_H
+#ifndef        _GPXE_IF_ARP_H
+#define        _GPXE_IF_ARP_H
 
 /** @file
  *
@@ -97,4 +97,4 @@ static inline void * arp_target_pa ( struct arphdr *arphdr ) {
        return ( arp_target_ha ( arphdr ) + arphdr->ar_hln );
 }
 
-#endif /* _IF_ARP_H */
+#endif /* _GPXE_IF_ARP_H */
index f199220fd8653a55102826fc82662c4604ce61d1..4d35bdf43732e50351c3cb0ae7ce4628754aaeea 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef        _IF_ETHER_H
-#define        _IF_ETHER_H
+#ifndef        _GPXE_IF_ETHER_H
+#define        _GPXE_IF_ETHER_H
 
 #include <stdint.h>
 
@@ -29,4 +29,4 @@ struct ethhdr {
         uint16_t h_protocol;
 } __attribute__ ((packed));
 
-#endif /* _IF_ETHER_H */
+#endif /* _GPXE_IF_ETHER_H */
index e1bdde931eee921f1579206637afd169ea908309..08fd76e2d3637310ec22daead6975a3085069ecd 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef        _IN_H
-#define        _IN_H
+#ifndef        _GPXE_IN_H
+#define        _GPXE_IN_H
 
 #include <stdint.h>
 
@@ -8,8 +8,11 @@
 #define IP_TCP         6
 #define IP_UDP         17
 
-/* Same after going through htonl */
-#define IP_BROADCAST   0xFFFFFFFF
+#define INADDR_NONE 0xffffffff
+
+#define INADDR_BROADCAST 0xffffffff
+
+#define IN_MULTICAST(addr) ( ( (addr) & 0xf0000000 ) == 0xe0000000 )
 
 struct in_addr {
        uint32_t        s_addr;
@@ -27,4 +30,4 @@ struct sockaddr_in {
 extern int inet_aton ( const char *cp, struct in_addr *inp );
 extern char * inet_ntoa ( struct in_addr in );
 
-#endif /* _IN_H */
+#endif /* _GPXE_IN_H */
index 29aae5176f0d26985298404c731f807bd3c0d6d9..94f906b58f7e0282644ce7cdae36ed622b57f67d 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _IP_H
-#define _IP_H
+#ifndef _GPXE_IP_H
+#define _GPXE_IP_H
 
 /** @file
  *
@@ -17,4 +17,4 @@ extern void set_gateway ( struct in_addr address );
 extern void init_tcpip ( void );
 extern void run_tcpip ( void );
 
-#endif /* _IP_H */
+#endif /* _GPXE_IP_H */
index 639da5e5786d1ab9900cf7d462d3cf4bafe3569e..ab7b0a073f5610655a0f4b2a042f4ace26225452 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _ISCSI_H
-#define _ISCSI_H
+#ifndef _GPXE_ISCSI_H
+#define _GPXE_ISCSI_H
 
 /** @file
  *
@@ -457,4 +457,4 @@ static inline int iscsi_error ( struct iscsi_session *iscsi ) {
        return ( iscsi->state == ISCSI_STATE_FAILED );
 }
 
-#endif /* _ISCSI_H */
+#endif /* _GPXE_ISCSI_H */
similarity index 97%
rename from src/include/pci.h
rename to src/include/gpxe/pci.h
index c50b79a8f328b54f94758cccc9765259c57e2aa8..4322202cc12a741daf2a462abb671d960283fa4c 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef        PCI_H
-#define PCI_H
+#ifndef        _GPXEPCI_H
+#define _GPXEPCI_H
 
 /*
 ** Support for NE2000 PCI clones added David Monro June 1997
@@ -21,8 +21,7 @@
  * your option) any later version.
  */
 
-#include "stdint.h"
-#include "nic.h"
+#include <stdint.h>
 #include "pci_ids.h"
 
 #define        PCI_BUS_TYPE    1
@@ -256,7 +255,8 @@ struct pci_device {
        uint16_t        busdevfn;
        uint8_t         revision;
        uint8_t         irq;
-} __attribute__ (( packed ));
+       void *priv;
+};
 
 /*
  * Useful busdevfn calculations
@@ -348,7 +348,6 @@ extern unsigned long pci_bar_start ( struct pci_device *pci,
                                     unsigned int bar );
 extern unsigned long pci_bar_size ( struct pci_device *pci, unsigned int bar );
 extern int pci_find_capability ( struct pci_device *pci, int capability );
-extern void pci_fill_nic ( struct nic *nic, struct pci_device *pci );
 
 /*
  * PCI bus global definition
@@ -356,4 +355,12 @@ extern void pci_fill_nic ( struct nic *nic, struct pci_device *pci );
  */
 extern struct bus_driver pci_driver;
 
-#endif /* PCI_H */
+static inline void pci_set_drvdata ( struct pci_device *pci, void *priv ) {
+       pci->priv = priv;
+}
+
+static inline void * pci_get_drvdata ( struct pci_device *pci ) {
+       return pci->priv;
+}
+
+#endif /* _GPXE_PCI_H */
similarity index 99%
rename from src/include/pci_ids.h
rename to src/include/gpxe/pci_ids.h
index a853d4dcbffe912d948cb513edf98dd5701219bf..075ff96bcdfcc223844ad918585b1a97e1141be7 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef _GPXE_PCI_IDS_H
+#define _GPXE_PCI_IDS_H
+
 /*
  *     PCI Class, Vendor and Device IDs
  *
 #define PCI_SUBVENDOR_ID_EXSYS         0xd84d
 #define PCI_VENDOR_ID_TIGERJET         0xe159
 #define PCI_VENDOR_ID_ARK              0xedd8
+
+#endif /* _GPXE_PCI_IDS_H */
index 05f9010ce1fc9a6d9998b88128a2308d7755a1e5..be71bab3d84e878474c660e2512e71546a0f31c5 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _SCSI_H
-#define _SCSI_H
+#ifndef _GPXE_SCSI_H
+#define _GPXE_SCSI_H
 
 #include <stdint.h>
 
@@ -31,4 +31,4 @@ union scsi_cdb {
        char bytes[16];
 };
 
-#endif /* _SCSI_H */
+#endif /* _GPXE_SCSI_H */
similarity index 98%
rename from src/include/tables.h
rename to src/include/gpxe/tables.h
index c3e05e55e23a98df17f403882b04cae2e55e32cf..a565eba7d2e408605bff716eb1c36175abd62765 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef TABLES_H
-#define TABLES_H
+#ifndef _GPXE_TABLES_H
+#define _GPXE_TABLES_H
 
 /** @page ifdef_harmful #ifdef considered harmful
  *
  *
  */
 
-#include "compiler.h" /* for doxygen */
+#ifdef DOXYGEN
+#define __attribute__(x)
+#endif
 
 #define __table_str(x) #x
 #define __table_section(table,idx) \
 #define __table_end(table) \
        __attribute__ (( unused, __table_section_end(table) ))
 
-#endif /* TABLES_H */
+#endif /* _GPXE_TABLES_H */
index bcb15365170a0032c5b241d8a1861e1b6f88d9b0..0aa209b7c19543003ee28697d6f888fd0a2685d1 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _TCP_H
-#define _TCP_H
+#ifndef _GPXE_TCP_H
+#define _GPXE_TCP_H
 
 /** @file
  *
@@ -99,4 +99,4 @@ extern void tcp_send ( struct tcp_connection *conn, const void *data,
                       size_t len );
 extern void tcp_close ( struct tcp_connection *conn );
 
-#endif /* _TCP_H */
+#endif /* _GPXE_TCP_H */
index 0aff17c076a9b6854264e78844860654e6f26b57..3483fe095c8abe1ff76d0e43e8cf3966376184c7 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "stdint.h"
 #include "io.h"
-#include "tables.h"
+#include <gpxe/tables.h>
 #include "dev.h"
 
 struct image {
index 0b341b8dc1c7bd1ac1c295dc549e00b9ccbf94a8..71311bfb3ebbd2b01ad2bd52a521e0790d585c71 100644 (file)
@@ -2,7 +2,7 @@
 #define INIT_H
 
 #include "stddef.h" /* for NULL */
-#include "tables.h"
+#include <gpxe/tables.h>
 
 /*
  * In order to avoid having objects dragged in just because main()
index 886d76e37c71650dc53304b3a9e53995f8fe156c..89b7c1736d7d9fc5f922f9182b2e40a3c01fe107 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef PROTO_H
 #define PROTO_H
 
-#include "tables.h"
+#include <gpxe/tables.h>
 #include "buffer.h"
 #include <gpxe/in.h>
 
index 1c74081e492b5c25a0056a66568bb4c841e1f95c..e97fd1e51472f3dabbe9e64bdd28dde926d97f5a 100644 (file)
@@ -2,7 +2,7 @@
 #define RESOLV_H
 
 #include <gpxe/in.h>
-#include "tables.h"
+#include <gpxe/tables.h>
 
 struct resolver {
        const char *name;
index d44c06850dd62932f7740565609d5f91dd2ee567..ee805b175664411e9730fcd4870c4c6dcec8518c 100644 (file)
@@ -54,7 +54,7 @@ static int nmb_resolv ( struct in_addr *addr, const char *name ) {
        DBG ( "NMB resolving %s\n", name );
 
        /* Set up the query data */
-       nameserver.sin_addr.s_addr = IP_BROADCAST;
+       nameserver.sin_addr.s_addr = INADDR_BROADCAST;
        nameserver.sin_port = NBNS_UDP_PORT;
        memset ( &query, 0, sizeof ( query ) );
        query.dns.id = htons ( 1 );