summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/settings.h
Commit message (Collapse)AuthorAgeFilesLines
* [build] Rename gPXE to iPXEMichael Brown2010-04-201-335/+0Star
| | | | | | | | | | | Access to the gpxe.org and etherboot.org domains and associated resources has been revoked by the registrant of the domain. Work around this problem by renaming project from gPXE to iPXE, and updating URLs to match. Also update README, LOG and COPYRIGHTS to remove obsolete information. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Add Bus ID settingShao Miller2009-12-141-0/+1
| | | | | | | | Users can find the bus type and PCI IDs for a network interface with: netX/busid Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
* [settings] Allow for arbitrarily-named settingsMichael Brown2009-05-261-17/+24
| | | | | This provides a mechanism for using arbitrarily-named variables within gPXE, using the existing syntax for settings.
* [legal] Add a selection of FILE_LICENCE declarationsMichael Brown2009-05-181-0/+2
| | | | | Add FILE_LICENCE declarations to almost all files that make up the various standard builds of gPXE.
* [tables] Incorporate table data type information into table definitionMichael Brown2009-03-131-8/+7Star
| | | | | | | Eliminate the potential for mismatches between table names and the table entry data type by incorporating the data type into the definition of the table, rather than specifying it explicitly in each table accessor method.
* [tables] Redefine methods for accessing linker tablesMichael Brown2009-03-131-3/+12
| | | | | | | | | | | | | | | Intel's C compiler (icc) chokes on the zero-length arrays that we currently use as part of the mechanism for accessing linker table entries. Abstract away the zero-length arrays, to make a port to icc easier. Introduce macros such as for_each_table_entry() to simplify the common case of iterating over all entries in a linker table. Represent table names as #defined string constants rather than unquoted literals; this avoids visual confusion between table names and C variable or type names, and also allows us to force a compilation error in the event of incorrect table names.
* [settings] Allow for autovivification of settings blocksMichael Brown2009-03-061-2/+0Star
| | | | | | | | | | | | | | | | | | Allow for settings blocks to be created on demand. This allows for constructions such as set defaults/filename http://bootserver/bootfile set defaults/priority 0xff dhcp net0 chain ${filename} which will boot from the DHCP-provided filename, or from "http://bootserver/bootfile" if the DHCP server does not provide a filename. (Note that "priority" gets interpreted as a signed integer, so setting "defaults/priority" to 0xff will cause the "defaults" settings block to have an effective priority of -1.)
* [dhcp] Send user class in DHCP requestsMichael Brown2009-02-011-1/+1
|
* [dhcp] Split PXE menuing code out of dhcp.cMichael Brown2009-02-011-0/+12
| | | | | | | | | The DHCP client code now implements only the mechanism of the DHCP and PXE Boot Server protocols. Boot Server Discovery can be initiated manually using the "pxebs" command. The menuing code is separated out into a user-level function on a par with boot_root_path(), and is entered in preference to a normal filename boot if the DHCP vendor class is "PXEClient" and the PXE boot menu option exists.
* [dns] Append local domain to relative namesStefan Hajnoczi2009-01-271-0/+1
| | | | | | | | | | | | | | | Try to qualify relative names in the DNS resolver using the DHCP Domain Name. For example: DHCP Domain Name: etherboot.org (Relative) Name: www yields: www.etherboot.org Only names with no dots ('.') will be modified. A name with one or more dots is unchanged.
* [settings] Add fetch_string_setting_copy()Michael Brown2009-01-271-0/+3
|
* [settings] Add the notion of a "tag magic" to numbered settingsMichael Brown2008-10-301-2/+13
| | | | | | | | | | | | | | | | | | | Settings can be constructed using a dotted-decimal notation, to allow for access to unnamed settings. The default interpretation is as a DHCP option number (with encapsulated options represented as "<encapsulating option>.<encapsulated option>". In several contexts (e.g. SMBIOS, Phantom CLP), it is useful to interpret the dotted-decimal notation as referring to non-DHCP options. In this case, it becomes necessary for these contexts to ignore standard DHCP options, otherwise we end up trying to, for example, retrieve the boot filename from SMBIOS. Allow settings blocks to specify a "tag magic". When dotted-decimal notation is used to construct a setting, the tag magic value of the originating settings block will be ORed in to the tag number. Store/fetch methods can then check for the magic number before interpreting arbitrarily-numbered settings.
* [settings] Expose MAC address setting for general useMichael Brown2008-09-261-0/+1
|
* [autoboot] Retain initial-slash (if present) when constructing TFTP URIsMichael Brown2008-07-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we boot from a DHCP-supplied filename, we previously relied on the fact that the current working URI is set to tftp://[next-server]/ in order to resolve the filename into a full tftp:// URI. However, this process will eliminate the distinction between filenames with and without initial slashes: cwuri="tftp://10.0.0.1/" filename="vmlinuz" => URI="tftp://10.0.0.1/vmlinuz" cwuri="tftp://10.0.0.1/" filename="/vmlinuz" => URI="tftp://10.0.0.1/vmlinuz" This distinction is important for some TFTP servers. We now explicitly construct a string of the form "tftp://[next-server]/filename" so that a filename with an initial slash will result in a URI containing a double-slash, e.g. "tftp://10.0.0.1//vmlinuz" The TFTP code always strips a single initial slash, and so ends up presenting the correct path to the server. URIs entered explicitly by users at the command line must include a double slash if they want an initial slash presented to the TFTP server: "kernel tftp://10.0.0.1/vmlinuz" => filename="vmlinuz" "kernel tftp://10.0.0.1//vmlinuz" => filename="/vmlinuz"
* [Settings] Expose SMBIOS via settings APIMichael Brown2008-03-281-0/+5
| | | | In particular, expose the system UUID as a setting ("smbios/uuid").
* [Settings] Remove assumption that all settings have DHCP tag valuesMichael Brown2008-03-251-67/+81
| | | | | | | | | | | | 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.
* [Settings] copy_settings() should not fail if some settings are missing!Michael Brown2008-03-241-2/+0Star
|
* [Settings] Implement simple_settings backed with extensible DHCP optionsMichael Brown2008-03-221-2/+28
|
* [Settings] Migrate DHCP and NVO code to the new settings API (untested)Michael Brown2008-03-211-0/+5
|
* [Settings] Convert code in src/usr to use settings API.Michael Brown2008-03-211-0/+3
|
* [Settings] Introduce settings applicators.Michael Brown2008-03-211-14/+18
| | | | | | | 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-201-1/+1
| | | | | | | | | 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-201-46/+85
| | | | | | | | 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-201-80/+122
| | | | | | | | | | | | | | | | 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] show_setting() functions return snprintf()-style length.Michael Brown2008-03-181-2/+2
| | | | | | 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.
* Add "name" field to struct device to allow human-readable hardware deviceMichael Brown2007-01-101-2/+3
| | | | | | | | | | | names. Add "dev" pointer in struct net_device to tie network interfaces back to a hardware device. Force natural alignment of data types in __table() macros. This seems to prevent gcc from taking the unilateral decision to occasionally increase their alignment (which screws up the table packing).
* Added descriptive text for settings and setting types, and display it inMichael Brown2006-12-201-0/+4
| | | | the option config UI.
* Move {show,set,clear}_setting() to {show,set,clear}_named_setting().Michael Brown2006-12-201-5/+47
| | | | | | | | 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.
* Added clear_setting()Michael Brown2006-12-121-0/+1
|
* Tied NVO commands into the human-interactable settings code that IMichael Brown2006-12-051-4/+4
| | | | completely forgot I'd written ages ago.
* Add string configuration typeMichael Brown2006-08-111-5/+8
|
* Added basic infrastructure for manipulating settings.Michael Brown2006-08-111-0/+103