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.
This commit is contained in:
Michael Brown
2006-04-24 15:42:49 +00:00
parent 53f78346bf
commit 824d6ffa7f
60 changed files with 108 additions and 89 deletions

View 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>

View 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))