summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* [DHCP] Add support for ProxyDHCP requestsMichael Brown2008-03-273-351/+557
| | | | | | | | | | | | | | | | The PXE spec is (as usual) unclear on precisely when ProxyDHCPREQUESTs should be issued. We adapt the following, slightly paranoid approach: If an offer contains an IP address, then it is a normal DHCPOFFER. If an offer contains an option #60 "PXEClient", then it is a ProxyDHCPOFFER. Note that the same packet can be both a normal DHCPOFFER and a ProxyDHCPOFFER. After receiving the normal DHCPACK, if we have received a ProxyDHCPOFFER, we unicast a ProxyDHCPREQUEST back to the ProxyDHCP server on port 4011. If we time out waiting for a ProxyDHCPACK, we treat this as a non-fatal error.
* [Settings] find_child_settings() accepts a NULL parentMichael Brown2008-03-271-0/+4
|
* [DHCP] Treat empty fields in DHCP packets as non-existent.Michael Brown2008-03-271-10/+48
| | | | | This avoids confusing other code by insisting that we have e.g. a filename consisting of 128 zero bytes.
* [usr] Offer user a second chance to enter the shell on boot failureMichael Brown2008-03-272-21/+32
|
* [libc] Whitespace cleanup in errno.hMichael Brown2008-03-261-1/+1
|
* [PXEXT] Update documentationH. Peter Anvin2008-03-261-2/+88
| | | | | Add documentation for the FILE_EXEC and FILE_CHECK_API extension calls, and update the documentation for the FILE_READ call.
* [PXEXT] Change the PXE return code for EWOULDBLOCKH. Peter Anvin2008-03-261-2/+2
| | | | | | | | | | | Change the PXE return code for EWOULDBLOCK from PXENV_STATUS_FAILURE to PXENV_STATUS_TFTP_OPEN. This code is only used by the FILE_READ PXEXT call, and is necessary to distinguish "error" from "no data" in that call. (The only other nonblocking call is UDP_READ, where the caller doesn't care about the distinction, however, gPXE doesn't use EWOULDBLOCK internally to represent this condition in that code.)
* [PXEXT] Add FILE_API_CHECK API functionH. Peter Anvin2008-03-264-0/+67
| | | | | Add FILE_API_CHECK to the PXEXT API so the NBP can query the availability and status of the API.
* [DHCP] Save precious packet-aligned memory by copying DHCP responsesMichael Brown2008-03-261-33/+16Star
| | | | | Copy DHCP responses to a standard malloc()ed buffer, rather than retaining the I/O buffer that they arrived in.
* [PXEXT] Avoid queueing zero-length buffers in posix_io.cMichael Brown2008-03-251-6/+12
| | | | | read_user() assumes that zero-length buffers don't exist, and optimises around this.
* [Settings] Remove assumption that all settings have DHCP tag valuesMichael Brown2008-03-2524-709/+854
| | | | | | | | | | | | Allow for settings to be described by something other than a DHCP option tag if desirable. Currently used only for the MAC address setting. Separate out fake DHCP packet creation code from dhcp.c to fakedhcp.c. Remove notion of settings from dhcppkt.c. Rationalise dhcp.c to use settings API only for final registration of the DHCP options, rather than using {store,fetch}_setting throughout.
* [PXEXT] Avoid returning a false EOF when we have an empty buffer queuedMichael Brown2008-03-251-1/+3
|
* [DHCP] Fix DHCP state confusion.Michael Brown2008-03-251-2/+5
| | | | | DHCP code was using an incorrect check for whether to construct a DHCPDISCOVER or DHCPREQUEST packet.
* [Settings] Add named setting for next-serverMichael Brown2008-03-241-0/+6
| | | | | It's probably easier to have a named setting for next-server, rather than to explain to people why they need to pretend it is option 175.3.
* [Makefile] Use -MM instead of -M in dependency generationMichael Brown2008-03-241-1/+1
| | | | | | Using -MM strips out any system header files from the dependency list, which means that we could safely use an external stdarg.h if we wanted to.
* [libc] Use __builtin_va_list et al in stdarg.hMichael Brown2008-03-242-22/+10Star
| | | | | The home-grown versions don't work properly for static variadic functions, when gcc can choose to use a non-standard calling convention.
* [Settings] copy_settings() should not fail if some settings are missing!Michael Brown2008-03-243-59/+71
|
* [IPv4] Use default netmasks when no subnet mask is specified.Michael Brown2008-03-232-8/+27
|
* [IPv4] Tidy up some header files.Michael Brown2008-03-236-63/+25Star
|
* [DHCP] Fix up fake-packet creation as used by PXENV_GET_CACHED_INFOMichael Brown2008-03-235-79/+148
| | | | | | | | | | | Add dedicated functions create_dhcpdiscover(), create_dhcpack() and create_proxydhcpack() for use by external code such as the PXE preboot code. Register ProxyDHCP options under the global scope "proxydhcp". Unregister previously-acquired DHCP and ProxyDHCP settings when DHCP succeeds.
* [DHCP] FIXME: quick temporary settings fix, needs update for new APIMarty Connor2008-03-221-0/+4
|
* Merge branch 'master' of rom.etherboot.org:/pub/scm/gpxeMichael Brown2008-03-223-0/+56
|\
| * ]Drivers] Update licensing for cs89x0.[ch] and cs89x0.txtMarty Connor2008-03-193-0/+56
| | | | | | | | | | Russ Nelson sent an email requesting the license change to GPL Version 2.
* | [Settings] Bugfix: store_setting() now applies changes even on root blockMichael Brown2008-03-221-3/+2Star
| |
* | [Settings] Implement simple_settings backed with extensible DHCP optionsMichael Brown2008-03-224-26/+72
| |
* | [Settings] DHCP is now working using the new settings API.Michael Brown2008-03-214-18/+29
| |
* | [Settings] Migrate DHCP and NVO code to the new settings API (untested)Michael Brown2008-03-2116-936/+966
| |
* | [DHCP] Kill off some no-longer-used DHCP functionsMichael Brown2008-03-212-128/+0Star
| |
* | [Settings] Use a settings applicator in ibft.cMichael Brown2008-03-211-31/+46
| |
* | [Settings] Use a settings applicator to set the default TFTP URI.Michael Brown2008-03-213-38/+43
| |
* | [Misc] Kill off long-redundant tests/dhcptest.cMichael Brown2008-03-211-270/+0Star
| |
* | [IPv4] Add a config option for IPv4Michael Brown2008-03-212-11/+22
| | | | | | | | | | IPv4 may not always be dragged into the link, so add a specific configuration option for it.
* | [Settings] Use a settings applicator to configure IPv4 routes.Michael Brown2008-03-217-88/+53Star
| |
* | [Settings] Convert code in src/usr to use settings API.Michael Brown2008-03-215-10/+41
| |
* | [Settings] Introduce settings applicators.Michael Brown2008-03-216-138/+222
| | | | | | | | | | | | | | Convert DHCP option applicators in dns.c and iscsi.c to settings applicators. Kill off DHCP option applicators.
* | [Settings] Add per-netdevice settings blockMichael Brown2008-03-206-1/+126
| | | | | | | | | | | | | | | | | | Add a configuration settings block for each net device. This will provide the parent scope for settings applicable only to that network device (e.g. non-volatile options stored on the NIC, options obtained via DHCP, etc.). Expose the MAC address as a setting.
* | [Settings] Add settings hierarchyMichael Brown2008-03-205-210/+321
| | | | | | | | | | | | | | | | Add the notion of the settings hierarchy, complete with register/unregister routines. Rename set->store and get->fetch to avoid naming conflicts with get/put as used in reference counting.
* | [Settings] Start revamping the configuration settings API.Michael Brown2008-03-206-481/+787
|/ | | | | | | | | | | | | | | | Add the concept of an abstract configuration setting, comprising a (DHCP) tag value and an associated byte sequence. Add the concept of a settings namespace. Add functions for extracting string, IPv4 address, and signed and unsigned integer values from configuration settings (analogous to dhcp_snprintf(), dhcp_ipv4_option(), etc.). Update functions for parsing and formatting named/typed options to work with new settings API. Update NVO commands and config UI to use new settings API.
* [Settings] Allow named settings to have their type specified explicitlyMichael Brown2008-03-181-45/+48
| | | | Allow setting names such as "ip:hex".
* [Timers] Initialise timers on first useMichael Brown2008-03-182-27/+26Star
| | | | | | | Timers are sometimes required before the call to initialise(), so we cannot rely on initialise() to set up the timers before use. Also fix a potential integer overflow issue in generic_currticks_udelay()
* [Timers] Miscellaneous timer system fixesMichael Brown2008-03-184-44/+60
| | | | | | | | | Add missing comments to timer code. Lock system if no suitable timer source is found. Fix initialisation order so that timers are initialised before code that needs to use them.
* [Settings] Allow encapsulated options to be specified as named settingsMichael Brown2008-03-181-4/+10
| | | | | | Allow encapsulated options to be specified as e.g. "175.3". As a side-effect, change the separator character for the type field from "." to ":"; for example, the IP address pseudo-option is now "175.3:ipv4".
* [Settings] Add int16, int32 and hex-string configuration setting typesMichael Brown2008-03-181-5/+131
| | | | | | | | | | Add parse and display routines for 16-bit and 32-bit integer configuration settings. Add parse and display routines for hex-string configuration settings. Assume hex-string as a configuration setting type if no type is explicitly specified.
* [libc] Fix a validation bug in strtoul()Michael Brown2008-03-181-1/+1
| | | | | strtoul() was accepting the characters immediately above ASCII 0..9 as valid hex digits, due to a missing comparison.
* [Settings] show_setting() functions return snprintf()-style length.Michael Brown2008-03-184-14/+11Star
| | | | | | show_setting() and related functions now return an "actual length" in the style of snprintf(). This is to allow consumers to allocate buffers large enough to hold the formatted setting.
* Merge branch 'pxerom-pmm'Michael Brown2008-03-114-305/+482
|\
| * [PXE] PMM now tested and workingMichael Brown2008-03-111-1/+1
| | | | | | | | Minor bugfix: 4 x 2 = 8, not 16
| * [prefix] Cope with image source addresses outside base memoryMichael Brown2008-03-111-121/+114Star
| | | | | | | | | | | | When PMM is used, the gPXE image source will no longer be in base memory. Decompression of .text16 and .data16 can therefore no longer be done in real mode.
| * [PXE] Improve PnP/BBS detectionMichael Brown2008-03-111-19/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | Use BBS installation check to see if we need to hook INT19 even on a PnP BIOS. Verify that $PnP signature is paragraph-aligned; bochs/qemu BIOS provides a dummy $PnP signature with no valid entry point, and deliberately unaligns the signature to indicate that it is not properly valid. Print message if INT19 is hooked. Attempt to use PMM even if BBS check failed.
| * [prefix] Add printing functions to libprefix.SMichael Brown2008-03-113-128/+112Star
| | | | | | | | | | Move the printing functions from pxeprefix.S into libprefix.S, so they are available for debug from any prefix.