Michael Brown
cf33b568dc
Forgot to set initial session state. Now works!
2007-06-28 01:55:01 +01:00
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).
2007-06-28 01:09:45 +01:00
Michael Brown
07dc294de8
Update DHCP to use data-xfer interface (not yet tested).
2007-06-27 23:20:36 +01:00
Michael Brown
f77815f2b1
Kill off hotplug.h and just make net devices normal reference-counted
...
structures.
DHCP still broken and #if 0'd out.
2007-06-27 14:48:31 +01:00
Michael Brown
2d4c72b762
Remove unused headers.
2007-06-11 23:40:34 +01:00
Michael Brown
f87bc837f4
Updated DNS to use not-yet-implemented UDP data-xfer API.
2007-06-11 23:30:44 +01:00
Michael Brown
01b4bde8a0
Updated TFTP and PXE UDP API code to use not-yet-implemented data-xfer
...
UDP API.
2007-06-11 18:11:29 +01:00
Michael Brown
63719deea9
Introduce name resolution interface and named socket opener.
2007-05-27 01:07:00 +00:00
Anselm Martin Hoffmeister
ed7dc02a95
hoffmeis: Preparations for syslog support (LOGSERVER in DHCP, linewise
...
output buffering defintions and the like)
2007-04-09 18:01:43 +00:00
Michael Brown
92a78c8e15
Added SIGKILL handler
2007-01-19 15:19:52 +00:00
Michael Brown
73b09ecba6
Use stdio.h instead of vsprintf.h
2007-01-19 01:13:12 +00:00
Michael Brown
4e3976711d
A working name resolution framework
2007-01-18 22:38:13 +00:00
Michael Brown
075f8144ff
Have DHCP set the nameserver, rather than DNS read the DHCP nameserver
...
value.
2007-01-18 21:22:03 +00:00
Michael Brown
99e58865c7
Use struct sockaddr rather than struct sockaddr_tcpip
...
Tidy up code
2007-01-18 03:35:00 +00:00
Michael Brown
835d35749f
Improved debugging
2007-01-16 03:10:37 +00:00
Michael Brown
9af12d5fba
A working DNS resolver (not yet tied in to anything)
2007-01-15 17:31:35 +00:00
Michael Brown
df0397f334
Update TFTP and FTP to take the same temporary URI scheme as HTTP
2007-01-15 09:58:26 +00:00
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.
2007-01-15 08:49:10 +00:00
Michael Brown
0010e10ef3
Update TFTP to use a struct buffer rather than a callback.
...
Add debug autocolourisation to TFTP.
2007-01-11 15:14:54 +00:00
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.
2007-01-10 02:37:23 +00:00
Michael Brown
7fafa89258
A DHCP session holds a persistent reference to a network device
2007-01-04 03:42:28 +00:00
Michael Brown
60a3f77711
Close UDP connection when DHCP completes.
2006-12-20 07:19:48 +00:00
Michael Brown
04c09823bd
Request all the options that we're prepared to do anything with.
2006-12-12 16:18:20 +00:00
Michael Brown
a1af111a87
Also request root-path.
2006-12-08 15:49:46 +00:00
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.
2006-09-27 10:58:14 +00:00
Marty Connor
6ac78f6aff
added stdio.h to includes for DBG compilation
2006-09-27 05:57:06 +00:00
Michael Brown
cab3f4502b
Correct option number for DHCP_DNS_SERVERS, and add it to the request
...
list.
2006-08-27 01:37:58 +00:00
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
2006-08-09 02:56:40 +00:00
Michael Brown
d1a123b1f4
Added TFTP test code (currently just dumps file to console).
2006-08-09 00:09:29 +00:00
Michael Brown
3611cb17b7
Initial (untested) implementation of TFTP over the new UDP API.
2006-08-08 23:45:52 +00:00
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.
2006-08-03 23:10:14 +00:00
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.
2006-08-02 00:02:21 +00:00
Michael Brown
ae277992c2
Request bootfile name; it doesn't seem to be automatically supplied by
...
all servers.
2006-08-01 14:12:27 +00:00
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.
2006-07-20 14:14:41 +00:00
Michael Brown
6a0b4c9772
Free up any allocated options if we fail
2006-07-20 02:25:39 +00:00
Michael Brown
764cb41456
Document memory ownership.
2006-07-20 02:23:42 +00:00
Michael Brown
7ca1bb0fbe
Now successfully negotiates the whole DHCPDISCOVER/OFFER/REQUEST/ACK
...
cycle. :)
2006-07-20 02:19:06 +00:00
Michael Brown
30d9bcdc6e
Rename unwieldy function
2006-07-20 00:24:25 +00:00
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.
2006-07-20 00:18:50 +00:00
Michael Brown
881b90e82c
Packets without a DHCP_MESSAGE_TYPE option are probably just BOOTP
...
packets.
2006-07-20 00:03:25 +00:00
Michael Brown
0768670fd8
udp_open() takes ports in network-endian order.
2006-07-19 21:56:27 +00:00
Michael Brown
224529d8dd
Now capable of sending what, to me, looks like a valid DHCPDISCOVER
...
(apart from the bad UDP checksum).
2006-07-19 20:50:50 +00:00
Michael Brown
e8daeb62b1
Eliminate confusion between functions that return pointers and
...
functions that return status codes.
Zero the DHCP packet buffer *before* creating the options structures
inside it.
2006-07-19 18:11:31 +00:00
Michael Brown
6d9d48537e
Added some debug messages and DHCP test code
2006-07-19 17:49:31 +00:00
Michael Brown
317b962b65
Proof of concept: transmit a single DHCPDISCOVER and dump out any
...
parsed DHCP responses.
2006-07-19 17:32:13 +00:00
Michael Brown
16fc9858db
Beginnings of DHCP protocol implementation
2006-07-19 17:01:06 +00:00
Michael Brown
254fe6e00e
Split DHCP packet creation into two parts: creating the basic packet
...
structure, and populating it with options. This should allow us to
use the same basic options list for both DHCPDISCOVER and DHCPREQUEST,
plus making it much easier to set the non-constant parameters
(e.g. requested IP address) in request packets.
2006-07-19 12:12:45 +00:00
Michael Brown
6c01d3bb95
Fix creation of the htype field; the ll_proto field from which it is
...
derived is a 16-bit big-endian field, but htype is only 8 bits wide.
2006-07-17 13:07:14 +00:00
Michael Brown
b24947f0c0
Add sketch code to reassemble a DHCP packet from our internal "everything
...
is a DHCP option" data structures.
We need this code in order to be able to return a DHCP packet to a PXE NBP
which reflects options from our multiple sources (e.g. NVS and DHCP
server). This is expensive, but necessary. Having paid this cost, we may
as well try to use the same code to generate our DHCP request packets,
since the process is similar.
2006-07-17 12:47:22 +00:00
Michael Brown
12da7ea475
Add (untested) code for parsing a received DHCP packet and constructing a
...
DHCP options block from the contents.
2006-07-15 19:24:55 +00:00