diff options
| author | Michael Brown | 2006-04-24 17:42:49 +0200 |
|---|---|---|
| committer | Michael Brown | 2006-04-24 17:42:49 +0200 |
| commit | 824d6ffa7f3d52ce165419356bfe28eaaf36a81b (patch) | |
| tree | c00a6a1cf46de5248259afd51fe64147e4b311d0 /src/core/nic.c | |
| parent | Network API now allows for multiple network devices (although the (diff) | |
| download | ipxe-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/nic.c')
| -rw-r--r-- | src/core/nic.c | 9 |
1 files changed, 5 insertions, 4 deletions
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)) |
