gpxe.git
13 years agoVerify checksums on the RX datapath.
Michael Brown [Wed, 3 Jan 2007 20:48:52 +0000 (20:48 +0000)]
Verify checksums on the RX datapath.

Simplify checksum generation on the TX datapath.

13 years agoTidy up debug messages
Michael Brown [Wed, 3 Jan 2007 16:39:11 +0000 (16:39 +0000)]
Tidy up debug messages

Move routing into a separate function

13 years agoFix compiler warning
Michael Brown [Wed, 3 Jan 2007 15:56:15 +0000 (15:56 +0000)]
Fix compiler warning

13 years agoUse whole bytes for the ACKED and RCVD portions of tcp_state; it
Michael Brown [Sat, 30 Dec 2006 01:32:22 +0000 (01:32 +0000)]
Use whole bytes for the ACKED and RCVD portions of tcp_state; it
produces slightly smaller code.

13 years agoUse autocolourisation
Michael Brown [Fri, 29 Dec 2006 14:09:23 +0000 (14:09 +0000)]
Use autocolourisation

13 years agoUse auto-colourisation for debug messages.
Michael Brown [Fri, 29 Dec 2006 14:03:03 +0000 (14:03 +0000)]
Use auto-colourisation for debug messages.

Truncate TX length to TCP window at time of transmission rather than at
time of adding to TX packet; this is conceptually cleaner and also allows
the application to call tcp_send() multiple times to build up a single
packet.

13 years agoAdded auto-colourising DBGC() macro
Michael Brown [Fri, 29 Dec 2006 03:05:21 +0000 (03:05 +0000)]
Added auto-colourising DBGC() macro

13 years agoRedefine TCP state to include "flags that have been sent" rather than
Michael Brown [Fri, 29 Dec 2006 00:44:31 +0000 (00:44 +0000)]
Redefine TCP state to include "flags that have been sent" rather than
"flags that are currently being sent".  This allows at least one special
case (checking that we haven't already sent a FIN in tcp_rx_fin()) to be
collapsed.

13 years agoDon't send a second FIN if we receive a FIN while in FIN_WAIT_2
Michael Brown [Wed, 27 Dec 2006 23:44:05 +0000 (23:44 +0000)]
Don't send a second FIN if we receive a FIN while in FIN_WAIT_2

13 years agoMerge changes from mcb-tcp-fixes branch.
Michael Brown [Wed, 27 Dec 2006 23:09:46 +0000 (23:09 +0000)]
Merge changes from mcb-tcp-fixes branch.

13 years agoKeep running the main processing loop while waiting for input.
Michael Brown [Wed, 27 Dec 2006 22:59:40 +0000 (22:59 +0000)]
Keep running the main processing loop while waiting for input.

13 years agoAdded times to start/stop log messages
Michael Brown [Wed, 27 Dec 2006 22:56:39 +0000 (22:56 +0000)]
Added times to start/stop log messages

13 years agoEnsure that old TCP connection state is destroyed before attempting to
Michael Brown [Fri, 22 Dec 2006 13:04:50 +0000 (13:04 +0000)]
Ensure that old TCP connection state is destroyed before attempting to
reopen connection.  (The TCP API will soon change to render this step
unnecessary.)

13 years agoCannot immediately overwrite the peer address when we parse
Michael Brown [Fri, 22 Dec 2006 12:24:12 +0000 (12:24 +0000)]
Cannot immediately overwrite the peer address when we parse
TargetAddress from the login response, because we still need the old
address while we close the connection!

13 years agoFix prototype of random() and move to stdlib.h
Michael Brown [Fri, 22 Dec 2006 01:44:51 +0000 (01:44 +0000)]
Fix prototype of random() and move to stdlib.h

13 years agoMake start_timer() and stop_timer() robust against incorrect usage.
Michael Brown [Fri, 22 Dec 2006 01:35:21 +0000 (01:35 +0000)]
Make start_timer() and stop_timer() robust against incorrect usage.

13 years agoibft_fill_data() prototype change.
Michael Brown [Thu, 21 Dec 2006 18:42:51 +0000 (18:42 +0000)]
ibft_fill_data() prototype change.

13 years agoAvoid null pointer dereferences when no username/password specified.
Michael Brown [Thu, 21 Dec 2006 18:38:24 +0000 (18:38 +0000)]
Avoid null pointer dereferences when no username/password specified.

13 years agoWhen login fails, leave the session open but not in full feature
Michael Brown [Thu, 21 Dec 2006 17:43:43 +0000 (17:43 +0000)]
When login fails, leave the session open but not in full feature
phase.  In iscsi_issue(), detect this state and immediately refuse the
operation.  This avoids trying multiple logins when scsi.c tries
several times to read the drive capacity.

13 years agoUse a bigger buffer for the initiator IQN
Michael Brown [Thu, 21 Dec 2006 17:42:02 +0000 (17:42 +0000)]
Use a bigger buffer for the initiator IQN

13 years agoAdd ability to shut down iSCSI connection
Michael Brown [Thu, 21 Dec 2006 17:17:47 +0000 (17:17 +0000)]
Add ability to shut down iSCSI connection

13 years agoDefault to port 0 (sic).
Michael Brown [Thu, 21 Dec 2006 17:16:06 +0000 (17:16 +0000)]
Default to port 0 (sic).

13 years agoPrint explicit error message on iSCSI boot failure, and add
Michael Brown [Thu, 21 Dec 2006 16:16:24 +0000 (16:16 +0000)]
Print explicit error message on iSCSI boot failure, and add
"Permission denied" as an error text to strerror().

13 years agoAdd iSCSI initiator IQN as a setting
Michael Brown [Thu, 21 Dec 2006 16:08:37 +0000 (16:08 +0000)]
Add iSCSI initiator IQN as a setting

13 years agoEngage brain: since when was zero >= 0x80 ?
Michael Brown [Thu, 21 Dec 2006 05:15:26 +0000 (05:15 +0000)]
Engage brain: since when was zero >= 0x80 ?

13 years agoSome BIOSes return 0xe0 for extended characters. Just assume that
Michael Brown [Thu, 21 Dec 2006 00:07:48 +0000 (00:07 +0000)]
Some BIOSes return 0xe0 for extended characters.  Just assume that
anything over 0x80 is an extended character.

13 years agoAdded missing header
Michael Brown [Wed, 20 Dec 2006 23:43:44 +0000 (23:43 +0000)]
Added missing header

13 years agoReturn ANSI sequences for special keys
Michael Brown [Wed, 20 Dec 2006 23:42:28 +0000 (23:42 +0000)]
Return ANSI sequences for special keys

13 years agoUse getkey() and symbolic key names.
Michael Brown [Wed, 20 Dec 2006 22:25:54 +0000 (22:25 +0000)]
Use getkey() and symbolic key names.

13 years agoKEY_XXX constants are now defined in gpxe/keys.h. Kept separate from
Michael Brown [Wed, 20 Dec 2006 22:24:45 +0000 (22:24 +0000)]
KEY_XXX constants are now defined in gpxe/keys.h.  Kept separate from
curses.h so that you don't have to suffer the curses namespace pollution
just to get the symbolic key names.

13 years agoUse symbolic key names, and avoid moving beyond end of string
Michael Brown [Wed, 20 Dec 2006 22:21:09 +0000 (22:21 +0000)]
Use symbolic key names, and avoid moving beyond end of string

13 years agoFix definition of KEY_END
Michael Brown [Wed, 20 Dec 2006 22:17:44 +0000 (22:17 +0000)]
Fix definition of KEY_END

13 years agoUse getkey() and symbolic key names.
Michael Brown [Wed, 20 Dec 2006 22:12:53 +0000 (22:12 +0000)]
Use getkey() and symbolic key names.

13 years agoSome key sequences seem to end with a tilde
Michael Brown [Wed, 20 Dec 2006 22:12:25 +0000 (22:12 +0000)]
Some key sequences seem to end with a tilde

13 years agoAdd insert/delete and document keys, and documentation.
Michael Brown [Wed, 20 Dec 2006 22:11:28 +0000 (22:11 +0000)]
Add insert/delete and document keys, and documentation.

13 years agoAdded code to interpret ANSI keypress sequences into KEY_XXX constants.
Michael Brown [Wed, 20 Dec 2006 21:56:50 +0000 (21:56 +0000)]
Added code to interpret ANSI keypress sequences into KEY_XXX constants.

13 years agoKey definitions
Michael Brown [Wed, 20 Dec 2006 21:53:07 +0000 (21:53 +0000)]
Key definitions

13 years agoDefine KEY_MIN and use it in kb.c.
Michael Brown [Wed, 20 Dec 2006 21:10:32 +0000 (21:10 +0000)]
Define KEY_MIN and use it in kb.c.

13 years agoPrevent NULL from ever pointing to some real code or data. (This was
Michael Brown [Wed, 20 Dec 2006 20:28:20 +0000 (20:28 +0000)]
Prevent NULL from ever pointing to some real code or data.  (This was
causing the serial console to ignore input, because it happened to end up
linked with serial_ischar() at address 0, which core/console.c decided was
invalid).

13 years agoReturn -EIO when verification fails, instead of -EINVAL.
Michael Brown [Wed, 20 Dec 2006 14:11:50 +0000 (14:11 +0000)]
Return -EIO when verification fails, instead of -EINVAL.

13 years agosettings_ui() now returns a status code.
Michael Brown [Wed, 20 Dec 2006 11:42:48 +0000 (11:42 +0000)]
settings_ui() now returns a status code.

13 years agoAdd EIO.
Michael Brown [Wed, 20 Dec 2006 07:57:40 +0000 (07:57 +0000)]
Add EIO.

Kill errortab array; it can screw up alignment.

13 years agoClose UDP connection when DHCP completes.
Michael Brown [Wed, 20 Dec 2006 07:19:48 +0000 (07:19 +0000)]
Close UDP connection when DHCP completes.

13 years agoNo longer needed
Michael Brown [Wed, 20 Dec 2006 07:13:46 +0000 (07:13 +0000)]
No longer needed

13 years agoObsolete for some time now.
Michael Brown [Wed, 20 Dec 2006 07:05:32 +0000 (07:05 +0000)]
Obsolete for some time now.

13 years agoSplit the (quick hack) boot logic out from main.c to autoboot.c, add a
Michael Brown [Wed, 20 Dec 2006 07:04:08 +0000 (07:04 +0000)]
Split the (quick hack) boot logic out from main.c to autoboot.c, add a
"boot" command to attempt booting from within the command shell, fall back
to shell if boot fails for any reason.

13 years agoExplicitly call erase(), to cope with platforms where the ANSI clear
Michael Brown [Wed, 20 Dec 2006 06:12:04 +0000 (06:12 +0000)]
Explicitly call erase(), to cope with platforms where the ANSI clear
screen sequence doesn't work (like bios_console.c on some platforms).

13 years agoAdd attr_{get,set,on,off} as static inlines.
Michael Brown [Wed, 20 Dec 2006 06:06:38 +0000 (06:06 +0000)]
Add attr_{get,set,on,off} as static inlines.

13 years agoAdd "config" command to access config UI
Michael Brown [Wed, 20 Dec 2006 05:37:33 +0000 (05:37 +0000)]
Add "config" command to access config UI

13 years agoAdd instruction row, and save option
Michael Brown [Wed, 20 Dec 2006 05:37:15 +0000 (05:37 +0000)]
Add instruction row, and save option

13 years agoOnly need printf(), so use vsprintf.h instead of console.h
Michael Brown [Wed, 20 Dec 2006 05:33:12 +0000 (05:33 +0000)]
Only need printf(), so use vsprintf.h instead of console.h

13 years ago8-bit integers are 1 byte long, not 8...
Michael Brown [Wed, 20 Dec 2006 05:04:17 +0000 (05:04 +0000)]
8-bit integers are 1 byte long, not 8...

13 years agoClear message on alert row before printing new one
Michael Brown [Wed, 20 Dec 2006 05:03:55 +0000 (05:03 +0000)]
Clear message on alert row before printing new one

13 years agoAdded descriptive text for settings and setting types, and display it in
Michael Brown [Wed, 20 Dec 2006 04:58:26 +0000 (04:58 +0000)]
Added descriptive text for settings and setting types, and display it in
the option config UI.

13 years agoMove {show,set,clear}_setting() to {show,set,clear}_named_setting().
Michael Brown [Wed, 20 Dec 2006 04:20:13 +0000 (04:20 +0000)]
Move {show,set,clear}_setting() to {show,set,clear}_named_setting().

Introduce new {show,set,clear}_setting() that take a struct setting *
rather than a const char *.

set_setting() handles calling clear_setting() when appropriate, so that
individual setting types don't have to check for empty strings.

13 years agoAdded messages for some of the most common errors
Michael Brown [Wed, 20 Dec 2006 03:54:20 +0000 (03:54 +0000)]
Added messages for some of the most common errors

13 years agoSplit strerror() out from errno.c
Michael Brown [Wed, 20 Dec 2006 03:49:36 +0000 (03:49 +0000)]
Split strerror() out from errno.c

13 years agoAlert when saving settings fails
Michael Brown [Wed, 20 Dec 2006 03:43:24 +0000 (03:43 +0000)]
Alert when saving settings fails

13 years agoIncrease colour pair limit
Michael Brown [Wed, 20 Dec 2006 03:42:35 +0000 (03:42 +0000)]
Increase colour pair limit

13 years agoFix (hopefully) the scrolling logic
Michael Brown [Wed, 20 Dec 2006 03:41:55 +0000 (03:41 +0000)]
Fix (hopefully) the scrolling logic

13 years agoSplit error-message table portions of errno.h out to gpxe/errortab.h
Michael Brown [Wed, 20 Dec 2006 03:40:48 +0000 (03:40 +0000)]
Split error-message table portions of errno.h out to gpxe/errortab.h

13 years agoMove strerror() prototype to string.h, where it belongs
Michael Brown [Wed, 20 Dec 2006 03:35:49 +0000 (03:35 +0000)]
Move strerror() prototype to string.h, where it belongs

13 years agoDifferentiate between ENOSPC and ENOMEM
Michael Brown [Wed, 20 Dec 2006 03:34:27 +0000 (03:34 +0000)]
Differentiate between ENOSPC and ENOMEM

13 years agoUse -ENOSPC rather than -ENOMEM, to distinguish the cases "generic out of
Michael Brown [Wed, 20 Dec 2006 03:33:37 +0000 (03:33 +0000)]
Use -ENOSPC rather than -ENOMEM, to distinguish the cases "generic out of
memory" and "no space left for DHCP options"

13 years agoFix prototype of sleep() and move it to unistd.h
Michael Brown [Wed, 20 Dec 2006 03:14:59 +0000 (03:14 +0000)]
Fix prototype of sleep() and move it to unistd.h

13 years agoAdd (partly-functional) user interface for editing configuration settings
Michael Brown [Wed, 20 Dec 2006 03:04:07 +0000 (03:04 +0000)]
Add (partly-functional) user interface for editing configuration settings

13 years agoDon't automatically redraw the edit box; this allows better inheritance.
Michael Brown [Wed, 20 Dec 2006 02:09:41 +0000 (02:09 +0000)]
Don't automatically redraw the edit box; this allows better inheritance.

13 years agoEditable text box widget based on mucurses and edit_string.
Michael Brown [Wed, 20 Dec 2006 01:40:57 +0000 (01:40 +0000)]
Editable text box widget based on mucurses and edit_string.

13 years agoReset screen on exit as well as entry
Michael Brown [Wed, 20 Dec 2006 01:30:40 +0000 (01:30 +0000)]
Reset screen on exit as well as entry

13 years agoAdd "exit --help" to preempt the pedants.
Michael Brown [Wed, 20 Dec 2006 00:44:16 +0000 (00:44 +0000)]
Add "exit --help" to preempt the pedants.

13 years agoRemove obsolete mechanism for including nvo_cmd.o
Michael Brown [Wed, 20 Dec 2006 00:39:52 +0000 (00:39 +0000)]
Remove obsolete mechanism for including nvo_cmd.o

13 years agoSelect required commands via config.h
Michael Brown [Wed, 20 Dec 2006 00:39:06 +0000 (00:39 +0000)]
Select required commands via config.h

13 years agoRemove warning (at least on platforms with uint32_t == unsigned long).
Michael Brown [Wed, 20 Dec 2006 00:34:53 +0000 (00:34 +0000)]
Remove warning (at least on platforms with uint32_t == unsigned long).

13 years agoMove nvo_cmd.c to hci/commands.
Michael Brown [Wed, 20 Dec 2006 00:31:34 +0000 (00:31 +0000)]
Move nvo_cmd.c to hci/commands.

13 years agoFunctionality now replaced by a combination of readline() and system().
Michael Brown [Wed, 20 Dec 2006 00:27:11 +0000 (00:27 +0000)]
Functionality now replaced by a combination of readline() and system().

13 years agoUse new minimal shell
Michael Brown [Wed, 20 Dec 2006 00:26:01 +0000 (00:26 +0000)]
Use new minimal shell

13 years agoSeparated out (and tidied up) shell banner code
Michael Brown [Wed, 20 Dec 2006 00:24:13 +0000 (00:24 +0000)]
Separated out (and tidied up) shell banner code

13 years agoMinimal shell implementation using readline() and system().
Michael Brown [Tue, 19 Dec 2006 23:55:05 +0000 (23:55 +0000)]
Minimal shell implementation using readline() and system().

13 years agoUse stdlib.h for malloc() instead of malloc.h.
Michael Brown [Tue, 19 Dec 2006 23:42:46 +0000 (23:42 +0000)]
Use stdlib.h for malloc() instead of malloc.h.

13 years agoExplicitly print out-of-memory message to avoid tricking the user into
Michael Brown [Tue, 19 Dec 2006 23:37:51 +0000 (23:37 +0000)]
Explicitly print out-of-memory message to avoid tricking the user into
thinking that a command executed successfully.

13 years agoFunctioning readline()
Michael Brown [Tue, 19 Dec 2006 23:25:44 +0000 (23:25 +0000)]
Functioning readline()

13 years agoProvide an edit history to allow caller to efficiently update display.
Michael Brown [Tue, 19 Dec 2006 23:24:16 +0000 (23:24 +0000)]
Provide an edit history to allow caller to efficiently update display.

13 years agoExplicitly move cursor to top-left of screen, in case the clear screen
Michael Brown [Tue, 19 Dec 2006 22:37:12 +0000 (22:37 +0000)]
Explicitly move cursor to top-left of screen, in case the clear screen
call doesn't do it.

13 years agoSkeletal (non-echoing) version of readline()
Michael Brown [Tue, 19 Dec 2006 22:35:10 +0000 (22:35 +0000)]
Skeletal (non-echoing) version of readline()

13 years agoCatch attempts to print NULL strings
Michael Brown [Tue, 19 Dec 2006 22:33:42 +0000 (22:33 +0000)]
Catch attempts to print NULL strings

13 years agoStart of generic editable string support
Michael Brown [Tue, 19 Dec 2006 19:28:12 +0000 (19:28 +0000)]
Start of generic editable string support

13 years agoUse common symbols to avoid dragging in getopt.o unless a getopt-using
Michael Brown [Tue, 19 Dec 2006 16:27:15 +0000 (16:27 +0000)]
Use common symbols to avoid dragging in getopt.o unless a getopt-using
command is linked in.

13 years agoUse current attributes when erasing.
Michael Brown [Tue, 19 Dec 2006 01:17:10 +0000 (01:17 +0000)]
Use current attributes when erasing.

13 years agoAssume a 24-line screen, since we can't (easily) avoid scrolling after
Michael Brown [Tue, 19 Dec 2006 01:16:43 +0000 (01:16 +0000)]
Assume a 24-line screen, since we can't (easily) avoid scrolling after
printing in the bottom-right position.

13 years agoOptimise bios_putchar for speed(!) by avoiding two separate real-mode
Michael Brown [Tue, 19 Dec 2006 01:15:05 +0000 (01:15 +0000)]
Optimise bios_putchar for speed(!) by avoiding two separate real-mode
calls.  This does make a visible difference when clearing the screen with
werase() inside bochs or qemu.

13 years agoAvoid cursor move on every single character
Michael Brown [Tue, 19 Dec 2006 00:51:32 +0000 (00:51 +0000)]
Avoid cursor move on every single character

13 years agoObsolete, and no longer functions
Michael Brown [Tue, 19 Dec 2006 00:34:54 +0000 (00:34 +0000)]
Obsolete, and no longer functions

13 years agoUse ANSI escape sequence to reset and clear terminal, rather than using
Michael Brown [Tue, 19 Dec 2006 00:33:36 +0000 (00:33 +0000)]
Use ANSI escape sequence to reset and clear terminal, rather than using
the (slow) werase().

13 years agoNow basically functioning on ANSI-supporting consoles.
Michael Brown [Tue, 19 Dec 2006 00:27:25 +0000 (00:27 +0000)]
Now basically functioning on ANSI-supporting consoles.

13 years agoAdjusted to use the normal internal mucurses API rather than accessing
Michael Brown [Mon, 18 Dec 2006 21:44:44 +0000 (21:44 +0000)]
Adjusted to use the normal internal mucurses API rather than accessing
stdscr directly.

13 years agoRemove more dynamic allocation
Michael Brown [Mon, 18 Dec 2006 21:28:35 +0000 (21:28 +0000)]
Remove more dynamic allocation

13 years agoThere seems to be no reason why pos_x is static...
Michael Brown [Mon, 18 Dec 2006 21:12:58 +0000 (21:12 +0000)]
There seems to be no reason why pos_x is static...

13 years agoRemove some unnecessary use of calloc() for tiny memory areas.
Michael Brown [Mon, 18 Dec 2006 21:11:30 +0000 (21:11 +0000)]
Remove some unnecessary use of calloc() for tiny memory areas.

13 years agoConvert _{store,restore}_cursor_pos to static inlines.
Michael Brown [Mon, 18 Dec 2006 20:46:41 +0000 (20:46 +0000)]
Convert _{store,restore}_cursor_pos to static inlines.

13 years agowmove() is part of the public curses API, and already defined in curses.h
Michael Brown [Mon, 18 Dec 2006 20:38:07 +0000 (20:38 +0000)]
wmove() is part of the public curses API, and already defined in curses.h