Skip to content

Commit

Permalink
Header rearrangement.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Michael Brown committed Apr 24, 2006
1 parent 53f7834 commit 824d6ff
Show file tree
Hide file tree
Showing 60 changed files with 108 additions and 89 deletions.
2 changes: 1 addition & 1 deletion src/arch/i386/core/pci_io.c
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/arch/i386/drivers/net/undi.c
Expand Up @@ -33,7 +33,7 @@ reserved.
/* 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 */
Expand Down
2 changes: 1 addition & 1 deletion src/arch/i386/include/relocate.h
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/arch/i386/prefix/select_pci.c
@@ -1,5 +1,5 @@
#include "dev.h"
#include "pci.h"
#include <gpxe/pci.h>
#include "registers.h"

/*
Expand Down
2 changes: 1 addition & 1 deletion src/core/btext.c
Expand Up @@ -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>
Expand Down
9 changes: 5 additions & 4 deletions src/core/nic.c
Expand Up @@ -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];
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/bus/pci.c
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/3c595.c
Expand Up @@ -27,7 +27,7 @@

#include "etherboot.h"
#include "nic.h"
#include "pci.h"
#include <gpxe/pci.h>
#include "3c595.h"
#include "timer.h"

Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/3c90x.c
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/amd8111e.c
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/davicom.c
Expand Up @@ -43,7 +43,7 @@

#include "etherboot.h"
#include "nic.h"
#include "pci.h"
#include <gpxe/pci.h>

#undef DAVICOM_DEBUG
#undef DAVICOM_DEBUG_WHERE
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/dmfe.c
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/e1000.c
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/eepro100.c
Expand Up @@ -105,7 +105,7 @@

#include "etherboot.h"
#include "nic.h"
#include "pci.h"
#include <gpxe/pci.h>
#include "timer.h"

static int ioaddr;
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/epic100.c
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/etherfabric.c
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/forcedeth.c
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/mlx_ipoib/ib_mt23108.c
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/mlx_ipoib/ib_mt25218.c
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/mlx_ipoib/mt23108.c
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/mlx_ipoib/mt25218.c
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/mtd80x.c
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/natsemi.c
Expand Up @@ -55,7 +55,7 @@

#include "etherboot.h"
#include "nic.h"
#include "pci.h"
#include <gpxe/pci.h>

/* defines */

Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/ns83820.c
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/ns8390.c
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/pcnet32.c
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/prism2.c
Expand Up @@ -18,7 +18,7 @@ Written by Michael Brown of Fen Systems Ltd
/* 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
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/prism2_pci.c
Expand Up @@ -14,7 +14,7 @@ Written by Michael Brown of Fen Systems Ltd
* your option) any later version.
*/

#include "pci.h"
#include <gpxe/pci.h>
#include "nic.h"

#define WLAN_HOSTIF WLAN_PCI
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/prism2_plx.c
Expand Up @@ -14,7 +14,7 @@ Written by Michael Brown of Fen Systems Ltd
* your option) any later version.
*/

#include "pci.h"
#include <gpxe/pci.h>
#include "nic.h"

#define WLAN_HOSTIF WLAN_PLX
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/r8169.c
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/rtl8139.c
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/sis900.c
Expand Up @@ -45,7 +45,7 @@

#include "etherboot.h"
#include "nic.h"
#include "pci.h"
#include <gpxe/pci.h>
#include "timer.h"

#include "sis900.h"
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/skel.c
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/sundance.c
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/tg3.c
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/tlan.c
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/tulip.c
Expand Up @@ -108,7 +108,7 @@

#include "etherboot.h"
#include "nic.h"
#include "pci.h"
#include <gpxe/pci.h>

/* User settable parameters */

Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/via-rhine.c
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/via-velocity.c
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/net/w89c840.c
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion src/include/background.h
Expand Up @@ -17,7 +17,7 @@
*
*/

#include "tables.h"
#include <gpxe/tables.h>
#include "ip.h"

/** A background protocol */
Expand Down
2 changes: 1 addition & 1 deletion src/include/console.h
Expand Up @@ -3,7 +3,7 @@

#include "stdint.h"
#include "vsprintf.h"
#include "tables.h"
#include <gpxe/tables.h>

/** @file
*
Expand Down

0 comments on commit 824d6ff

Please sign in to comment.