Michael Brown
df868476e7
Various warnings fixups for OpenBSD with gcc-3.3.5.
vor 17 Jahren
Michael Brown
b3abf25e3c
Allow DHCP server to instruct gPXE to ignore ProxyDHCP (which will
also avoid waiting for ProxyDHCP offers).
Also reduce the ProxyDHCP timeout, because it's already irritating me.
vor 17 Jahren
Michael Brown
0becbf5fba
Add ProxyDHCP support.
vor 17 Jahren
Michael Brown
fb809da2df
Remove some assumptions about DHCP obtaining only a single options block.
vor 17 Jahren
Michael Brown
8d18338ae7
Add PXE-required DHCP options to DHCPDISCOVER and DHCPREQUEST packets.
vor 17 Jahren
Michael Brown
26f3a09ccf
Add UUID to DHCP request as option 97 (if available).
vor 17 Jahren
Michael Brown
af303db75d
Use RFC4390 whenever hardware address exceeds 16 bytes; this allows us
to construct DHCP packets suitable for Infiniband.
vor 17 Jahren
Michael Brown
7e4e5af462
Use RFC4390 whenever hardware address exceeds 16 bytes; this allows us
to construct DHCP packets suitable for Infiniband.
vor 17 Jahren
Michael Brown
771455653b
Bugfix: DHCP message type should be a one-byte option... (d'oh)
vor 17 Jahren
Michael Brown
c0d99245a9
Bugfix: DHCP message type should be a one-byte option... (d'oh)
vor 17 Jahren
Michael Brown
2ff1b1245b
Use start_timer_nodelay() in protocols which rely on the retry timer
to generate the initial transmission; this cuts off around 0.3s per
instantiated connection.
vor 17 Jahren
Michael Brown
0acb016840
Add FEATURE() macro, plus code to display features at startup time,
and generate DHCP options to indicate features to DHCP server (and to
PXE NBPs).
vor 17 Jahren
Michael Brown
79691961ba
Add identifier for the network device into the DHCP request.
vor 17 Jahren
Michael Brown
5e26df0325
Centralise construction of the DHCP request and response packets.
vor 17 Jahren
Michael Brown
b34d4d0449
Separate the "is data ready" function of xfer_seek() into an
xfer_window() function, which can return a scalar rather than a
boolean.
vor 17 Jahren
Michael Brown
ca4c6f9eee
Kill off unused request() method in data-xfer interface.
vor 17 Jahren
Holger Lubitz
a4d3476e0e
convert to zalloc
vor 17 Jahren
Michael Brown
934b70d62c
Apply global DHCP options when register_dhcp_options() is called. Do
not apply DHCP options in dhcp_configure_netdev().
vor 17 Jahren
Michael Brown
1567b69895
Add concept of DHCP option applicators.
vor 17 Jahren
Michael Brown
3bf5eb49d0
Can't use strncpy() to copy strings that aren't NUL-terminated to
begin with.
vor 17 Jahren
Michael Brown
acd598b4f9
Don't build option-overloaded packets; they just confuse people (ISC
DHCPD and Windows RIS in particular).
vor 17 Jahren
Michael Brown
c73bff7ae5
Set current working URI based on TFTP server specified by DHCP.
vor 17 Jahren
Michael Brown
1ec7bb789d
Add dhcp_configure_netdev()
vor 17 Jahren
Michael Brown
cf33b568dc
Forgot to set initial session state. Now works!
vor 17 Jahren
Michael Brown
73fe1ba9dd
Kill off job::start() (it was only ever added as part of an aborted
attempt at triggering TCP-related protocols to start).
vor 17 Jahren
Michael Brown
07dc294de8
Update DHCP to use data-xfer interface (not yet tested).
vor 17 Jahren
Michael Brown
f77815f2b1
Kill off hotplug.h and just make net devices normal reference-counted
structures.
DHCP still broken and #if 0'd out.
vor 17 Jahren
Anselm Martin Hoffmeister
ed7dc02a95
hoffmeis: Preparations for syslog support (LOGSERVER in DHCP, linewise
output buffering defintions and the like)
vor 17 Jahren
Michael Brown
835d35749f
Improved debugging
vor 17 Jahren
Michael Brown
4e20d73bb5
Gave asynchronous operations approximate POSIX signal semantics. This
will enable us to cascade async operations, which is necessary in order to
properly support DNS. (For example, an HTTP request may have to redirect
to a new location and will have to perform a new DNS lookup, so we can't
just rely on doing the name lookup at the time of parsing the initial
URL).
Anything other than HTTP is probably broken right now; I'll fix the others
up asap.
vor 17 Jahren
Michael Brown
649b789e93
DHCP transmits via specified net device, so no need to create a dummy
routing table entry just to fool ipv4.c any more.
vor 17 Jahren
Michael Brown
7fafa89258
A DHCP session holds a persistent reference to a network device
vor 17 Jahren
Michael Brown
60a3f77711
Close UDP connection when DHCP completes.
vor 18 Jahren
Michael Brown
04c09823bd
Request all the options that we're prepared to do anything with.
vor 18 Jahren
Michael Brown
a1af111a87
Also request root-path.
vor 18 Jahren
Michael Brown
88e38fa148
We don't actually have a stdio.h header file. Our printf() functions are
defined in vsprintf.h. (This may change, since vsprintf.h is a
non-standard name, but for now it's the one to use.)
There should be no need to include vsprintf.h just for DBG() statements,
since include/compiler.h forces it in for a debug build anyway.
vor 18 Jahren
Marty Connor
6ac78f6aff
added stdio.h to includes for DBG compilation
vor 18 Jahren
Michael Brown
cab3f4502b
Correct option number for DHCP_DNS_SERVERS, and add it to the request
list.
vor 18 Jahren
Michael Brown
e9561aafc0
Derive xid dynamically from the netdev, so that we can call
create_dhcp_packet() from pxe_preboot.c, after the dhcp_session is long
gone.
Expose the functions required by pxe_preboot.c
vor 18 Jahren
Michael Brown
ffe0e24249
Make the UDP senddata() methods return a status code.
udp_connect() now follows the standard BSD sockets semantics and simply
sets the default address for outgoing packets; it doesn't filter incoming
packets.
vor 18 Jahren
Michael Brown
467e9627cc
Added features that will be required for PXE UDP support.
Introduced struct sockaddr_tcpip, to simplify code that deals with
both IPv4 and IPv6 addresses.
Reorganised parts of tcpip.c and udp.c.
vor 18 Jahren
Michael Brown
ae277992c2
Request bootfile name; it doesn't seem to be automatically supplied by
all servers.
vor 18 Jahren
Michael Brown
3085f03ad4
Request Etherboot encapsulated options.
Parameter request list is yet another option that ISC dhcpd ignores
unless it's in the main options block.
Fix logic error in parsing file and sname fields.
vor 18 Jahren
Michael Brown
6a0b4c9772
Free up any allocated options if we fail
vor 18 Jahren
Michael Brown
764cb41456
Document memory ownership.
vor 18 Jahren
Michael Brown
7ca1bb0fbe
Now successfully negotiates the whole DHCPDISCOVER/OFFER/REQUEST/ACK
cycle. :)
vor 18 Jahren
Michael Brown
30d9bcdc6e
Rename unwieldy function
vor 18 Jahren
Michael Brown
9ad5cede96
Set DHCP_MESSAGE_TYPE option within the main options block. This
doesn't seem to be required by the RFCs, but at least ISC dhcpd and
ethereal refuse to recognise it otherwise.
vor 18 Jahren
Michael Brown
881b90e82c
Packets without a DHCP_MESSAGE_TYPE option are probably just BOOTP
packets.
vor 18 Jahren
Michael Brown
0768670fd8
udp_open() takes ports in network-endian order.
vor 18 Jahren