+++ /dev/null
-; -*- fundamental -*-
-; -----------------------------------------------------------------------
-;
-; Copyright 2004-2008 H. Peter Anvin - All Rights Reserved
-;
-; This program is free software; you can redistribute it and/or modify
-; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation, Inc., 53 Temple Place Ste 330,
-; Bostom MA 02111-1307, USA; either version 2 of the License, or
-; (at your option) any later version; incorporated herein by reference.
-;
-; -----------------------------------------------------------------------
-
-;
-; dnsresolv.inc
-;
-DNS_MAX_PACKET equ 512 ;Defined by protocol
-
- section .bss16
- global LocalDomain
- global DNSSendBuf, DNSRecvBuf
- alignb 2
-DNSSendBuf resb DNS_MAX_PACKET
-DNSRecvBuf resb DNS_MAX_PACKET
-LocalDomain resb 256 ; Max possible length
-
- section .text16
\ No newline at end of file
#include <sys/cpu.h>
#include "pxe.h"
+char LocalDomain[256];
+
int over_load;
uint8_t uuid_type;
char uuid[17];
+
void parse_dhcp_options(void *, int, int);
static void subnet_mask(void *data, int opt_len)
*/
uint32_t dns_resolv(const char *name)
{
+ static char __lowmem DNSSendBuf[PKTBUF_SIZE];
+ static char __lowmem DNSRecvBuf[PKTBUF_SIZE];
char *p;
int err;
int dots;
udp_write.src_port = DNS_LOCAL_PORT;
udp_write.dst_port = DNS_PORT;
udp_write.buffer_size = p - DNSSendBuf;
- udp_write.buffer.offs = OFFS_WRT(DNSSendBuf, 0);
- udp_write.buffer.seg = 0;
+ udp_write.buffer.offs = OFFS(DNSSendBuf);
+ udp_write.buffer.seg = SEG(DNSSendBuf);
err = pxe_call(PXENV_UDP_WRITE, &udp_write);
if (err || udp_write.status != 0)
continue;
udp_read.s_port = DNS_PORT;
udp_read.d_port = DNS_LOCAL_PORT;
udp_read.buffer_size = DNS_MAX_PACKET;
- udp_read.buffer.offs = OFFS_WRT(DNSRecvBuf, 0);
- udp_read.buffer.seg = 0;
+ udp_read.buffer.offs = OFFS(DNSRecvBuf);
+ udp_read.buffer.seg = SEG(DNSRecvBuf);
err = pxe_call(PXENV_UDP_READ, &udp_read);
if (err || udp_read.status)
continue;
#define PXE_H
#include <syslinux/pxe_api.h>
+#include "fs.h" /* For MAX_OPEN, should go away */
/*
* Some basic defines...
extern char dot_quad_buf[];
extern uint32_t dns_server[];
-extern char DNSSendBuf[];
-extern char DNSRecvBuf[];
extern uint16_t real_base_mem;
extern uint16_t APIVer;
writestr_early equ writestr
%include "writehex.inc" ; Hexadecimal output
%include "rawcon.inc" ; Console I/O w/o using the console functions
-%include "dnsresolv.inc" ; DNS resolver
; -----------------------------------------------------------------------------
; Begin data section