people/dverkamp/gpxe.git
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
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

14 years agoAdd net/udp
Michael Brown [Wed, 19 Jul 2006 17:00:40 +0000 (17:00 +0000)]
Add net/udp

14 years agoAdd some DHCP options that we are likely to use
Michael Brown [Wed, 19 Jul 2006 17:00:32 +0000 (17:00 +0000)]
Add some DHCP options that we are likely to use

14 years agoCorrect typo
Michael Brown [Wed, 19 Jul 2006 16:58:44 +0000 (16:58 +0000)]
Correct typo

14 years agoMinor edit in net/udp.c
Nikhil Chandru Rao [Wed, 19 Jul 2006 16:27:54 +0000 (16:27 +0000)]
Minor edit in net/udp.c

14 years agoThe following edits were made: \
Nikhil Chandru Rao [Wed, 19 Jul 2006 16:25:23 +0000 (16:25 +0000)]
The following edits were made: \
1. Updated UDP send data code\
2. Corrected internet checksum\
3. Moved udp_buffer() and udp_buflen() to udp.c from udp.h

14 years agoAdded macros for generating static DHCP options
Michael Brown [Wed, 19 Jul 2006 16:16:51 +0000 (16:16 +0000)]
Added macros for generating static DHCP options

14 years agoSplit DHCP packet creation into two parts: creating the basic packet
Michael Brown [Wed, 19 Jul 2006 12:12:45 +0000 (12:12 +0000)]
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.

14 years agoAllow for calling find_dhcp_option() with "options" set to NULL, in order
Michael Brown [Wed, 19 Jul 2006 11:05:38 +0000 (11:05 +0000)]
Allow for calling find_dhcp_option() with "options" set to NULL, in order
to search through all registered option blocks.

Move some static inlines that are likely to be used frequently into
dhcpopts.c as normal functions, to save space.

14 years agoThis file breaks "make blib"; please find a way to avoid doing this.
Michael Brown [Mon, 17 Jul 2006 19:19:17 +0000 (19:19 +0000)]
This file breaks "make blib"; please find a way to avoid doing this.

14 years agoThe first packet (ClientHello Handshake) can be constructed and is accepted
Derek Pryor [Mon, 17 Jul 2006 16:38:20 +0000 (16:38 +0000)]
The first packet (ClientHello Handshake) can be constructed and is accepted
by SSL servers. Framework.c allows me to test the library against a given
https server.

14 years agoFix creation of the htype field; the ll_proto field from which it is
Michael Brown [Mon, 17 Jul 2006 13:07:14 +0000 (13:07 +0000)]
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.

14 years agoTidy up hex_dump() output.
Michael Brown [Mon, 17 Jul 2006 13:04:29 +0000 (13:04 +0000)]
Tidy up hex_dump() output.

14 years agoAdd sketch code to reassemble a DHCP packet from our internal "everything
Michael Brown [Mon, 17 Jul 2006 12:47:22 +0000 (12:47 +0000)]
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.

14 years agoAdd (untested) code for parsing a received DHCP packet and constructing a
Michael Brown [Sat, 15 Jul 2006 19:24:55 +0000 (19:24 +0000)]
Add (untested) code for parsing a received DHCP packet and constructing a
DHCP options block from the contents.

14 years agoAdd code to modify DHCP option values within a block.
Michael Brown [Thu, 13 Jul 2006 20:49:04 +0000 (20:49 +0000)]
Add code to modify DHCP option values within a block.

14 years agoHow did this ever work properly before?
Michael Brown [Thu, 13 Jul 2006 18:27:23 +0000 (18:27 +0000)]
How did this ever work properly before?

14 years agoAdding SSL Constructs header file. (First version)
Derek Pryor [Mon, 10 Jul 2006 13:26:20 +0000 (13:26 +0000)]
Adding SSL Constructs header file. (First version)

14 years agoAdded fragment reassembly code
Nikhil Chandru Rao [Fri, 30 Jun 2006 08:52:03 +0000 (08:52 +0000)]
Added fragment reassembly code

14 years agofix printf format args
Marty Connor [Thu, 29 Jun 2006 19:04:25 +0000 (19:04 +0000)]
fix printf format args

14 years agoRemoved vestigal FILO code
Marty Connor [Thu, 29 Jun 2006 18:07:02 +0000 (18:07 +0000)]
Removed vestigal FILO code

14 years agoAdded bin/.blib.list to VERYCLEANUP so .bin directory is made empty
Marty Connor [Thu, 29 Jun 2006 17:58:48 +0000 (17:58 +0000)]
Added bin/.blib.list to VERYCLEANUP so .bin directory is made empty

14 years agoRemoving net/interface.c and include/gpxe/interface.h
Nikhil Chandru Rao [Thu, 29 Jun 2006 06:51:11 +0000 (06:51 +0000)]
Removing net/interface.c and include/gpxe/interface.h

14 years agoProvide a mechanism for returning the encapsulator as well as the
Michael Brown [Wed, 28 Jun 2006 18:59:54 +0000 (18:59 +0000)]
Provide a mechanism for returning the encapsulator as well as the
encapsulated option; this will be needed for modifications to the options
block.

14 years agoRenamed net/interface.c and include/gpxe/interface.h to net/tcpip_if.c and include...
Nikhil Chandru Rao [Wed, 28 Jun 2006 15:43:08 +0000 (15:43 +0000)]
Renamed net/interface.c and include/gpxe/interface.h to net/tcpip_if.c and include/gpxe/tcpip_if.h respectively. Made changes in the other files.

14 years agoAdd priority mechanism
Michael Brown [Wed, 28 Jun 2006 13:48:02 +0000 (13:48 +0000)]
Add priority mechanism

14 years agoChange dhcp_num_option() to return the numerical value directly.
Michael Brown [Wed, 28 Jun 2006 12:16:41 +0000 (12:16 +0000)]
Change dhcp_num_option() to return the numerical value directly.

14 years agotypo in macro fixed
Dan Lynch [Wed, 28 Jun 2006 11:53:41 +0000 (11:53 +0000)]
typo in macro fixed

14 years ago- modified length of password string to match visible field length
Dan Lynch [Wed, 28 Jun 2006 11:52:30 +0000 (11:52 +0000)]
- modified length of password string to match visible field length
- value of n passed to wgetnstr should now be equivalent to output from strlen (i.e. length excluding NUL-terminating character)

14 years agostarted on ANSI sequence processing
Dan Lynch [Wed, 28 Jun 2006 11:50:02 +0000 (11:50 +0000)]
started on ANSI sequence processing

14 years ago- implemented cursor retreat function (_wcursback) as a core function
Dan Lynch [Wed, 28 Jun 2006 11:48:40 +0000 (11:48 +0000)]
- implemented cursor retreat function (_wcursback) as a core function
- reimplemented cleaner wgetnstr
- fixed wdelch for use with _wcursback

14 years agoAdded ipv4_pseudo_header structure
Nikhil Chandru Rao [Wed, 28 Jun 2006 09:59:27 +0000 (09:59 +0000)]
Added ipv4_pseudo_header structure

14 years agoIP6 specifications
Nikhil Chandru Rao [Wed, 28 Jun 2006 09:44:41 +0000 (09:44 +0000)]
IP6 specifications

14 years agoFixed endianness of 16- and 32- bit values
Nikhil Chandru Rao [Wed, 28 Jun 2006 09:10:35 +0000 (09:10 +0000)]
Fixed endianness of 16- and 32- bit values

14 years agoFixed whitespaces; updated UDP code
Nikhil Chandru Rao [Wed, 28 Jun 2006 07:46:28 +0000 (07:46 +0000)]
Fixed whitespaces; updated UDP code

14 years ago- first check-in for mucurses_test.c
Dan Lynch [Tue, 27 Jun 2006 17:31:01 +0000 (17:31 +0000)]
- first check-in for mucurses_test.c
- added mucurses_test.c build targets

14 years agoFirst stab at DHCP option handling in a way that will allow us to have
Michael Brown [Tue, 27 Jun 2006 17:24:07 +0000 (17:24 +0000)]
First stab at DHCP option handling in a way that will allow us to have
multiple option sources (e.g. multiple DHCP replies, non-volatile
storage etc.)

14 years ago- put in the screen initialisation stuff and clear the screen...
Dan Lynch [Tue, 27 Jun 2006 17:18:11 +0000 (17:18 +0000)]
- put in the screen initialisation stuff and clear the screen...

14 years ago- works with test ansi tty, but will need a rethink when we start
Dan Lynch [Tue, 27 Jun 2006 17:15:34 +0000 (17:15 +0000)]
- works with test ansi tty, but will need a rethink when we start
getting key_ codes instead

14 years ago- working basic ansi termnal extension for mucurses
Dan Lynch [Tue, 27 Jun 2006 17:11:57 +0000 (17:11 +0000)]
- working basic ansi termnal extension for mucurses

14 years agocheck whether malloc returns a valid pointer
Dan Lynch [Tue, 27 Jun 2006 13:32:15 +0000 (13:32 +0000)]
check whether malloc returns a valid pointer

14 years agomoved console specific items out of mucurses (should be handled by external screen...
Dan Lynch [Tue, 27 Jun 2006 13:31:30 +0000 (13:31 +0000)]
moved console specific items out of mucurses (should be handled by external screen object)

14 years agomake path relative (so that I don't break eb top of tree !)
Dan Lynch [Tue, 27 Jun 2006 13:28:43 +0000 (13:28 +0000)]
make path relative (so that I don't break eb top of tree !)

14 years agoincluded contents of input.{c,h} in kb.c
Dan Lynch [Tue, 27 Jun 2006 13:27:28 +0000 (13:27 +0000)]
included contents of input.{c,h} in kb.c

14 years agoenabled build entry for mucurses libraries
Dan Lynch [Tue, 27 Jun 2006 11:40:04 +0000 (11:40 +0000)]
enabled build entry for mucurses libraries

14 years ago- deprecated in favour of a split library model
Dan Lynch [Tue, 27 Jun 2006 11:05:13 +0000 (11:05 +0000)]
- deprecated in favour of a split library model

14 years ago- testable console framework implementing mucurses SCREEN struct
Dan Lynch [Tue, 27 Jun 2006 11:00:14 +0000 (11:00 +0000)]
- testable console framework implementing mucurses SCREEN struct

14 years ago- multiple static inline definitions added
Dan Lynch [Tue, 27 Jun 2006 10:38:57 +0000 (10:38 +0000)]
- multiple static inline definitions added
- changes made to some constants and macros
- changes made to _curses_screen struct
- identified and removed prototypes for yet more unsupportable functions

14 years agoadded placeholder SRCDIRS entry for mucurses
Dan Lynch [Tue, 27 Jun 2006 10:31:42 +0000 (10:31 +0000)]
added placeholder SRCDIRS entry for mucurses

14 years ago- recoded wgetch and wgetnstr for greater more efficiency
Dan Lynch [Tue, 27 Jun 2006 10:24:40 +0000 (10:24 +0000)]
- recoded wgetch and wgetnstr for greater more efficiency
- wgetch now includes non, part and full blocking read support

14 years agoSimplify ipv4_tx() by not having a separate "source" variable now that
Michael Brown [Mon, 26 Jun 2006 16:10:34 +0000 (16:10 +0000)]
Simplify ipv4_tx() by not having a separate "source" variable now that
we are constructing the IP header ourselves.

Formatting fix-ups (80 column limit is mandatory!)

14 years agoFactorise out common code
Michael Brown [Mon, 26 Jun 2006 16:01:24 +0000 (16:01 +0000)]
Factorise out common code

14 years agoSplit ipv6 functions out from ipv4.c
Michael Brown [Mon, 26 Jun 2006 15:33:46 +0000 (15:33 +0000)]
Split ipv6 functions out from ipv4.c

14 years agoWhitespace fixes
Michael Brown [Mon, 26 Jun 2006 13:45:24 +0000 (13:45 +0000)]
Whitespace fixes

14 years agofirst working version - nasty, but mostly works
Dan Lynch [Mon, 26 Jun 2006 08:24:34 +0000 (08:24 +0000)]
first working version - nasty, but mostly works