summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorMichael Brown2006-04-24 17:42:49 +0200
committerMichael Brown2006-04-24 17:42:49 +0200
commit824d6ffa7f3d52ce165419356bfe28eaaf36a81b (patch)
treec00a6a1cf46de5248259afd51fe64147e4b311d0 /src/core
parentNetwork API now allows for multiple network devices (although the (diff)
downloadipxe-824d6ffa7f3d52ce165419356bfe28eaaf36a81b.tar.gz
ipxe-824d6ffa7f3d52ce165419356bfe28eaaf36a81b.tar.xz
ipxe-824d6ffa7f3d52ce165419356bfe28eaaf36a81b.zip
Header rearrangement.
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.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/btext.c2
-rw-r--r--src/core/nic.c9
2 files changed, 6 insertions, 5 deletions
diff --git a/src/core/btext.c b/src/core/btext.c
index fc1d4e1bc..da6c029b7 100644
--- a/src/core/btext.c
+++ b/src/core/btext.c
@@ -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>
diff --git a/src/core/nic.c b/src/core/nic.c
index 04d48a115..64e87f614 100644
--- a/src/core/nic.c
+++ b/src/core/nic.c
@@ -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))