people/mcb30/gpxe.git
14 years agoAdded "hostname" and "ip" as sample settings
Michael Brown [Fri, 11 Aug 2006 18:29:20 +0000 (18:29 +0000)]
Added "hostname" and "ip" as sample settings

14 years agoAdded ipv4 configuration type
Michael Brown [Fri, 11 Aug 2006 18:22:41 +0000 (18:22 +0000)]
Added ipv4 configuration type

14 years agoAdd string configuration type
Michael Brown [Fri, 11 Aug 2006 18:16:57 +0000 (18:16 +0000)]
Add string configuration type

14 years agoFail gracefully when set_dhcp_option() is called with options==NULL.
Michael Brown [Fri, 11 Aug 2006 18:16:34 +0000 (18:16 +0000)]
Fail gracefully when set_dhcp_option() is called with options==NULL.

14 years agoAdded basic infrastructure for manipulating settings.
Michael Brown [Fri, 11 Aug 2006 18:00:22 +0000 (18:00 +0000)]
Added basic infrastructure for manipulating settings.

14 years agoRemoving because of conflict with new HTTP protocol
Derek Pryor [Fri, 11 Aug 2006 14:13:58 +0000 (14:13 +0000)]
Removing because of conflict with new HTTP protocol

14 years agoNew HTTP protocol and test code
Derek Pryor [Fri, 11 Aug 2006 14:13:02 +0000 (14:13 +0000)]
New HTTP protocol and test code

14 years agocommand->data_{in,out} are now userptr_t, so it is invalid to compare
Michael Brown [Thu, 10 Aug 2006 17:35:14 +0000 (17:35 +0000)]
command->data_{in,out} are now userptr_t, so it is invalid to compare
against NULL.

14 years agoFixed variable name in assertion
Michael Brown [Thu, 10 Aug 2006 17:09:48 +0000 (17:09 +0000)]
Fixed variable name in assertion

14 years agoAdded missing packed attribute
Michael Brown [Thu, 10 Aug 2006 00:10:09 +0000 (00:10 +0000)]
Added missing packed attribute

14 years agoAdded description for a basic ACPI table, taken from
Michael Brown [Thu, 10 Aug 2006 00:09:31 +0000 (00:09 +0000)]
Added description for a basic ACPI table, taken from
include/linux/acpi.h.

14 years agoBoth the !PXE and PXENV+ structures must be paragraph-aligned
Michael Brown [Wed, 9 Aug 2006 18:22:25 +0000 (18:22 +0000)]
Both the !PXE and PXENV+ structures must be paragraph-aligned

14 years agoTowards an RFC2988-compliant timer. mcb-iscsi-working-with-new-tcp-stack
Michael Brown [Wed, 9 Aug 2006 15:54:17 +0000 (15:54 +0000)]
Towards an RFC2988-compliant timer.

14 years agoDon't call stop_timer() from within the timer expiry callback; it's
Michael Brown [Wed, 9 Aug 2006 15:50:20 +0000 (15:50 +0000)]
Don't call stop_timer() from within the timer expiry callback; it's
already stopped.

Don't call start_timer() when sending a dataless ACK.  This may or may
not be the right thing to do; I can't tell.

Back out broken "send ACK only if required to" logic temporarily.

14 years agoChanged the TCP state machines behaviour in the ESTABLISHED state
Nikhil Chandru Rao [Wed, 9 Aug 2006 15:04:26 +0000 (15:04 +0000)]
Changed the TCP state machines behaviour in the ESTABLISHED state

14 years agoTemporarily work around the bug when port numbers are reused between
Michael Brown [Wed, 9 Aug 2006 14:44:58 +0000 (14:44 +0000)]
Temporarily work around the bug when port numbers are reused between
subsequent runs.

14 years agoCorrect some packet ownership and freeing bugs.
Michael Brown [Wed, 9 Aug 2006 14:27:07 +0000 (14:27 +0000)]
Correct some packet ownership and freeing bugs.

14 years agoout_flags was being set but never used.
Michael Brown [Wed, 9 Aug 2006 13:35:03 +0000 (13:35 +0000)]
out_flags was being set but never used.

Use just random() to allocate initial sequence numbers; the previous
algorithm ended up with a high probability of zeroing the high word.

14 years agoPort the UDP port allocation code to TCP
Michael Brown [Wed, 9 Aug 2006 12:08:20 +0000 (12:08 +0000)]
Port the UDP port allocation code to TCP

14 years agoRemove some of the confusion surrounding the amount to strip off from
Michael Brown [Wed, 9 Aug 2006 12:01:09 +0000 (12:01 +0000)]
Remove some of the confusion surrounding the amount to strip off from
a TCP packet before passing to newdata().

14 years agoiphdr->hlen includes the IP header, so truncate packet *before*
Michael Brown [Wed, 9 Aug 2006 11:52:53 +0000 (11:52 +0000)]
iphdr->hlen includes the IP header, so truncate packet *before*
stripping the header.  Also fix an htons/ntohs confusion.

14 years agoRemove _PROTOCOL macros for gcc 3.2 compatibility
Marty Connor [Wed, 9 Aug 2006 04:42:14 +0000 (04:42 +0000)]
Remove _PROTOCOL macros for gcc 3.2 compatibility

14 years agoMake VERSION_MAJOR for gPXE be 0
Marty Connor [Wed, 9 Aug 2006 03:43:41 +0000 (03:43 +0000)]
Make VERSION_MAJOR for gPXE be 0

14 years agoCorrected documentation
Michael Brown [Wed, 9 Aug 2006 03:25:11 +0000 (03:25 +0000)]
Corrected documentation

14 years agoRemoved obsolete line merged in with the cmdline stuff
Michael Brown [Wed, 9 Aug 2006 03:22:29 +0000 (03:22 +0000)]
Removed obsolete line merged in with the cmdline stuff

14 years agoDo no evil. :)
Michael Brown [Wed, 9 Aug 2006 03:21:02 +0000 (03:21 +0000)]
Do no evil.  :)

14 years agoAttempt a PXE NBP boot as the TFTP test.
Michael Brown [Wed, 9 Aug 2006 03:00:11 +0000 (03:00 +0000)]
Attempt a PXE NBP boot as the TFTP test.

14 years agoImplement enough of PXENV_GET_CACHED_INFO to support pxelinux.
Michael Brown [Wed, 9 Aug 2006 02:59:19 +0000 (02:59 +0000)]
Implement enough of PXENV_GET_CACHED_INFO to support pxelinux.

14 years agoAdded pxe_netdev; a slight hack for now, but will need to be done
Michael Brown [Wed, 9 Aug 2006 02:58:27 +0000 (02:58 +0000)]
Added pxe_netdev; a slight hack for now, but will need to be done
properly for the PXE UNDI API anyway.

14 years agoDerive xid dynamically from the netdev, so that we can call
Michael Brown [Wed, 9 Aug 2006 02:56:40 +0000 (02:56 +0000)]
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

14 years agoAborted
Michael Brown [Wed, 9 Aug 2006 02:37:05 +0000 (02:37 +0000)]
Aborted

14 years agoMerge of Fredrik Hultin command_line
Marty Connor [Wed, 9 Aug 2006 02:30:35 +0000 (02:30 +0000)]
Merge of Fredrik Hultin command_line

14 years agoAdd a couple of small but vital parts to PXENV_UDP_WRITE.
Michael Brown [Wed, 9 Aug 2006 01:57:02 +0000 (01:57 +0000)]
Add a couple of small but vital parts to PXENV_UDP_WRITE.

14 years agoClarified packet ownership transfer between a few functions.
Michael Brown [Wed, 9 Aug 2006 01:24:32 +0000 (01:24 +0000)]
Clarified packet ownership transfer between a few functions.

Added a large number of missing calls to free_pkb().  In the case of UDP,
no received packets were ever freed, which lead to memory exhaustion
remarkably quickly once pxelinux started up.

In general, any function with _rx() in its name which accepts a pk_buff
*must* either call free_pkb() or pass the pkb to another _rx() function
(e.g. the next layer up the stack).  Since the UDP (and TCP) layers don't
pass packet buffers up to the higher-layer protocols (the
"applications"), they must free the packet buffer after calling the
application's newdata() method.

14 years agoNote to self: learn to count.
Michael Brown [Wed, 9 Aug 2006 00:56:07 +0000 (00:56 +0000)]
Note to self: learn to count.

14 years agoAdded missing __from_text16()s when passing pointers to PXE NBP.
Michael Brown [Wed, 9 Aug 2006 00:39:21 +0000 (00:39 +0000)]
Added missing __from_text16()s when passing pointers to PXE NBP.

14 years agoAllow linking by converting functions to stubs
Michael Brown [Wed, 9 Aug 2006 00:25:29 +0000 (00:25 +0000)]
Allow linking by converting functions to stubs

14 years agoAllow linking by converting all functions to stubs
Michael Brown [Wed, 9 Aug 2006 00:22:28 +0000 (00:22 +0000)]
Allow linking by converting all functions to stubs

14 years agopxe_int_1a is needed by pxe_call.c
Michael Brown [Wed, 9 Aug 2006 00:16:57 +0000 (00:16 +0000)]
pxe_int_1a is needed by pxe_call.c

14 years agoAdded TFTP test code (currently just dumps file to console).
Michael Brown [Wed, 9 Aug 2006 00:09:29 +0000 (00:09 +0000)]
Added TFTP test code (currently just dumps file to console).

14 years agoInitial (untested) implementation of TFTP over the new UDP API.
Michael Brown [Tue, 8 Aug 2006 23:45:52 +0000 (23:45 +0000)]
Initial (untested) implementation of TFTP over the new UDP API.

14 years agoThe prototype for strcasecmp() is apparently in strings.h.
Michael Brown [Tue, 8 Aug 2006 22:52:16 +0000 (22:52 +0000)]
The prototype for strcasecmp() is apparently in strings.h.

14 years agoChanged ipv4_dump() to consume only one line.
Nikhil Chandru Rao [Tue, 8 Aug 2006 22:26:35 +0000 (22:26 +0000)]
Changed ipv4_dump() to consume only one line.

14 years agoCorrected bugs in the TCP logic. There might be a few more which need to be taken...
Nikhil Chandru Rao [Tue, 8 Aug 2006 22:25:20 +0000 (22:25 +0000)]
Corrected bugs in the TCP logic. There might be a few more which need to be taken care of.

14 years agoAdded some TFTP definitions for use with the new UDP API.
Michael Brown [Tue, 8 Aug 2006 22:01:16 +0000 (22:01 +0000)]
Added some TFTP definitions for use with the new UDP API.

14 years agoAdded (not yet tested) PXE API entry point and support functions.
Michael Brown [Tue, 8 Aug 2006 20:43:33 +0000 (20:43 +0000)]
Added (not yet tested) PXE API entry point and support functions.

14 years agoUpdate to match the daft capitalisation in the actual PXE spec
Michael Brown [Tue, 8 Aug 2006 20:43:05 +0000 (20:43 +0000)]
Update to match the daft capitalisation in the actual PXE spec

14 years agogcc3 compatibility: removed ARP_NET_PROTOCOL().
Michael Brown [Tue, 8 Aug 2006 17:44:25 +0000 (17:44 +0000)]
gcc3 compatibility: removed ARP_NET_PROTOCOL().

14 years agoRemoved some bugs in TCP
Nikhil Chandru Rao [Tue, 8 Aug 2006 03:42:30 +0000 (03:42 +0000)]
Removed some bugs in TCP

14 years agoAdded retransmissions to TCP
Nikhil Chandru Rao [Mon, 7 Aug 2006 18:52:26 +0000 (18:52 +0000)]
Added retransmissions to TCP

14 years agoAdd very, very quick and dirty hello world test
Michael Brown [Mon, 7 Aug 2006 18:49:10 +0000 (18:49 +0000)]
Add very, very quick and dirty hello world test

14 years agoFix routing when a gateway exists. This should probably be split into
Michael Brown [Mon, 7 Aug 2006 17:51:19 +0000 (17:51 +0000)]
Fix routing when a gateway exists.  This should probably be split into
a separate function.

14 years agoSet a NUL terminator before calling inet_aton.
Michael Brown [Mon, 7 Aug 2006 17:50:41 +0000 (17:50 +0000)]
Set a NUL terminator before calling inet_aton.

14 years agoRemove unused attribute from __table macros; the tables are no longer
Michael Brown [Mon, 7 Aug 2006 17:06:31 +0000 (17:06 +0000)]
Remove unused attribute from __table macros; the tables are no longer
static since otherwise gcc4 optimises them away completely.  Also, it
really *is* an error if the table start and end are unused, so they
certainly shouldn't be marked with attribute unused.

14 years agoAdd iSCSI to the DHCP tests.
Michael Brown [Mon, 7 Aug 2006 16:48:24 +0000 (16:48 +0000)]
Add iSCSI to the DHCP tests.

Start updating iscsi.c to use Nikhil's TCP API.

14 years agoMinor corrections
Nikhil Chandru Rao [Mon, 7 Aug 2006 07:37:23 +0000 (07:37 +0000)]
Minor corrections

14 years agoConvert some trivial functions to static inlines.
Michael Brown [Thu, 3 Aug 2006 23:42:03 +0000 (23:42 +0000)]
Convert some trivial functions to static inlines.

14 years agoMake the UDP senddata() methods return a status code.
Michael Brown [Thu, 3 Aug 2006 23:10:14 +0000 (23:10 +0000)]
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.

14 years agoUpdated PXE UDP implementation to use the new Etherboot UDP API.
Michael Brown [Wed, 2 Aug 2006 23:08:10 +0000 (23:08 +0000)]
Updated PXE UDP implementation to use the new Etherboot UDP API.

Updated PXE API dispatcher to use copy_{to,from}_user, and moved to
arch/i386 since the implementation is quite architecture-dependent.
(The individual PXE API calls can be largely
architecture-independent.)

14 years agoMoved the basic struct sockaddr out of in.h.
Michael Brown [Wed, 2 Aug 2006 00:06:30 +0000 (00:06 +0000)]
Moved the basic struct sockaddr out of in.h.

14 years agoAdded features that will be required for PXE UDP support.
Michael Brown [Wed, 2 Aug 2006 00:02:21 +0000 (00:02 +0000)]
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.

14 years agoTCP support
Nikhil Chandru Rao [Tue, 1 Aug 2006 20:46:50 +0000 (20:46 +0000)]
TCP support

14 years agoMinor changes to the network layer rx() functions
Nikhil Chandru Rao [Tue, 1 Aug 2006 20:27:26 +0000 (20:27 +0000)]
Minor changes to the network layer rx() functions

14 years agoRemove unused functions.
Michael Brown [Tue, 1 Aug 2006 14:26:02 +0000 (14:26 +0000)]
Remove unused functions.

14 years agoRenamed trans_{rx,tx}() to tcpip_{rx,tx}(), since they are specific to
Michael Brown [Tue, 1 Aug 2006 14:22:04 +0000 (14:22 +0000)]
Renamed trans_{rx,tx}() to tcpip_{rx,tx}(), since they are specific to
the TCP/IP protocol suite (rather than being general transport-layer
functions).

14 years agoRenamed tcpip_if.[ch] to tcpip.[ch]
Michael Brown [Tue, 1 Aug 2006 14:18:09 +0000 (14:18 +0000)]
Renamed tcpip_if.[ch] to tcpip.[ch]

14 years agoWe shouldn't need to allocate a TX packet buffer when calling newdata();
Michael Brown [Tue, 1 Aug 2006 14:13:58 +0000 (14:13 +0000)]
We shouldn't need to allocate a TX packet buffer when calling newdata();
if the application wants to send data then it will have to use the normal
senddata() mechanism.

14 years agoRequest bootfile name; it doesn't seem to be automatically supplied by
Michael Brown [Tue, 1 Aug 2006 14:12:27 +0000 (14:12 +0000)]
Request bootfile name; it doesn't seem to be automatically supplied by
all servers.

14 years agoAccept '%i' as a synonym for '%d'.
Michael Brown [Tue, 25 Jul 2006 14:33:20 +0000 (14:33 +0000)]
Accept '%i' as a synonym for '%d'.

14 years agoPrint out "DHCP..." message just in case people think the demo is sitting mcb-aoe-dhcp-demo
Michael Brown [Thu, 20 Jul 2006 14:20:11 +0000 (14:20 +0000)]
Print out "DHCP..." message just in case people think the demo is sitting
there doing nothing when it's actually waiting for a DHCP reply.

14 years agoAllow an AoE boot to be directed via DHCP, so that we have a proof of
Michael Brown [Thu, 20 Jul 2006 14:15:23 +0000 (14:15 +0000)]
Allow an AoE boot to be directed via DHCP, so that we have a proof of
concept demo that actually does something useful.

14 years agoRequest Etherboot encapsulated options.
Michael Brown [Thu, 20 Jul 2006 14:14:41 +0000 (14:14 +0000)]
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.

14 years agoAdd dhcp_snprintf() for extracting DHCP string options.
Michael Brown [Thu, 20 Jul 2006 14:13:11 +0000 (14:13 +0000)]
Add dhcp_snprintf() for extracting DHCP string options.

14 years agoPrint out the lease time, just to show how easy it is.
Michael Brown [Thu, 20 Jul 2006 03:02:34 +0000 (03:02 +0000)]
Print out the lease time, just to show how easy it is.

14 years agoSwitch default stack to Nikhil's TCP/IP stack
Michael Brown [Thu, 20 Jul 2006 02:53:15 +0000 (02:53 +0000)]
Switch default stack to Nikhil's TCP/IP stack

14 years agoRemove the static IP address hack from netdevice.c, and change the
Michael Brown [Thu, 20 Jul 2006 02:51:52 +0000 (02:51 +0000)]
Remove the static IP address hack from netdevice.c, and change the
default test to the DHCP test.

14 years agoAdded dhcp_ipv4_option() and friends.
Michael Brown [Thu, 20 Jul 2006 02:49:59 +0000 (02:49 +0000)]
Added dhcp_ipv4_option() and friends.

Added test code to configure the interface for IPv4 after DHCP.

14 years agoFree up any allocated options if we fail
Michael Brown [Thu, 20 Jul 2006 02:25:39 +0000 (02:25 +0000)]
Free up any allocated options if we fail

14 years agoDocument memory ownership.
Michael Brown [Thu, 20 Jul 2006 02:23:42 +0000 (02:23 +0000)]
Document memory ownership.

14 years agoNow successfully negotiates the whole DHCPDISCOVER/OFFER/REQUEST/ACK
Michael Brown [Thu, 20 Jul 2006 02:19:06 +0000 (02:19 +0000)]
Now successfully negotiates the whole DHCPDISCOVER/OFFER/REQUEST/ACK
cycle.  :)

14 years agoRename unwieldy function
Michael Brown [Thu, 20 Jul 2006 00:24:25 +0000 (00:24 +0000)]
Rename unwieldy function

14 years agoSet DHCP_MESSAGE_TYPE option within the main options block. This
Michael Brown [Thu, 20 Jul 2006 00:18:50 +0000 (00:18 +0000)]
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.

14 years agoPackets without a DHCP_MESSAGE_TYPE option are probably just BOOTP
Michael Brown [Thu, 20 Jul 2006 00:03:25 +0000 (00:03 +0000)]
Packets without a DHCP_MESSAGE_TYPE option are probably just BOOTP
packets.

14 years agoconn->local_port is now network-endian; do not swap when comparing
Michael Brown [Thu, 20 Jul 2006 00:03:01 +0000 (00:03 +0000)]
conn->local_port is now network-endian; do not swap when comparing
against value in header.

Temporarily disable RX checksumming; it's broken and is holding up
work on higher-layer protocols
.

14 years agoClarify hexiness of header length
Michael Brown [Thu, 20 Jul 2006 00:01:50 +0000 (00:01 +0000)]
Clarify hexiness of header length

14 years agoCorrect TCP/IP checksum generation.
Michael Brown [Wed, 19 Jul 2006 23:38:05 +0000 (23:38 +0000)]
Correct TCP/IP checksum generation.

14 years agoudp_open() takes ports in network-endian order.
Michael Brown [Wed, 19 Jul 2006 21:56:27 +0000 (21:56 +0000)]
udp_open() takes ports in network-endian order.

14 years agoMinor edits
Nikhil Chandru Rao [Wed, 19 Jul 2006 21:05:58 +0000 (21:05 +0000)]
Minor edits

14 years agoNow capable of sending what, to me, looks like a valid DHCPDISCOVER
Michael Brown [Wed, 19 Jul 2006 20:50:50 +0000 (20:50 +0000)]
Now capable of sending what, to me, looks like a valid DHCPDISCOVER
(apart from the bad UDP checksum).

14 years agoMake udp_send() call udp_sendto(), rather than vice-versa.
Michael Brown [Wed, 19 Jul 2006 20:38:49 +0000 (20:38 +0000)]
Make udp_send() call udp_sendto(), rather than vice-versa.

14 years agoA small but very critical bug.
Michael Brown [Wed, 19 Jul 2006 20:16:46 +0000 (20:16 +0000)]
A small but very critical bug.

14 years agoUse more standardised format specifiers in debug messages (e.g. %p for
Michael Brown [Wed, 19 Jul 2006 18:45:18 +0000 (18:45 +0000)]
Use more standardised format specifiers in debug messages (e.g. %p for
a pointer).

14 years agoReserve space for lower-layer headers when allocating packet buffer.
Michael Brown [Wed, 19 Jul 2006 18:21:30 +0000 (18:21 +0000)]
Reserve space for lower-layer headers when allocating packet buffer.

Use pkb_available() rather than pkb_len() (which will always return 0
on a freshly allocated buffer).

udp_send() should assume that the buffer has already been allocated.

14 years agoAdd pkb_available()
Michael Brown [Wed, 19 Jul 2006 18:16:48 +0000 (18:16 +0000)]
Add pkb_available()

14 years agoEliminate confusion between functions that return pointers and
Michael Brown [Wed, 19 Jul 2006 18:11:31 +0000 (18:11 +0000)]
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.

14 years agoAdd block identification to debug messages
Michael Brown [Wed, 19 Jul 2006 17:58:27 +0000 (17:58 +0000)]
Add block identification to debug messages

14 years agoAdded some debug messages and DHCP test code
Michael Brown [Wed, 19 Jul 2006 17:49:31 +0000 (17:49 +0000)]
Added some debug messages and DHCP test code

14 years agoProof of concept: transmit a single DHCPDISCOVER and dump out any
Michael Brown [Wed, 19 Jul 2006 17:32:13 +0000 (17:32 +0000)]
Proof of concept: transmit a single DHCPDISCOVER and dump out any
parsed DHCP responses.

14 years agoAdded missing prototype
Michael Brown [Wed, 19 Jul 2006 17:29:18 +0000 (17:29 +0000)]
Added missing prototype

14 years agoBeginnings of DHCP protocol implementation
Michael Brown [Wed, 19 Jul 2006 17:01:06 +0000 (17:01 +0000)]
Beginnings of DHCP protocol implementation