summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* [socket] Ensure socket address structure sizes are fixedMichael Brown2013-12-054-5/+5
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dns] Add support for resolving IPv6 addresses via AAAA recordsMichael Brown2013-12-054-36/+112
| | | | | | | | Our policy is to prefer IPv6 addreses to IPv4 addresses, but to request IPv6 addresses only if we have an IPv6 address for the name server itself. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Add fetch_ipv6_setting()Michael Brown2013-12-052-0/+45
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Allow for IPv6 setting types in non-IPv6 buildsMichael Brown2013-12-057-51/+132
| | | | | | | | | Allow for the existence of references to IPv6 setting types without dragging in the whole IPv6 stack, by placing the definition of setting_type_ipv6 in core/settings.c and providing weak stub methods for parse_ipv6_setting() and format_ipv6_setting(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Explicitly separate the concept of a completed fetched settingMichael Brown2013-12-0537-563/+610
| | | | | | | | | | The fetch_setting() family of functions may currently modify the definition of the specified setting (e.g. to add missing type information). Clean up this interface by requiring callers to provide an explicit buffer to contain the completed definition of the fetched setting, if required. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fbcon] Add support for displaying a cursorMichael Brown2013-12-022-25/+97
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [menu] Hide cursor when displaying menuMichael Brown2013-12-021-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Hide cursor when not actively editing a settingMichael Brown2013-12-021-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [mucurses] Implement curs_set() to control cursor visibilityMichael Brown2013-12-024-0/+24
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Allow '?' as an intermediate byte in ANSI escape sequencesMichael Brown2013-12-022-1/+8
| | | | | | | | | The ANSI escape sequences to show and hide the cursor take the form "<ESC>[?25h" and "<ESC>[?25l" respectively. iPXE currently treats the '?' character as the final byte. Fix by explicitly treating '?' as an intermediate byte. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Fix building on OpenBSD 5.4Michael Brown2013-12-021-0/+5
| | | | | | | | | | OpenBSD 5.4 seems to generate dynamically linked binaries by default, which breaks our build process. Fix by forcing the linker to always create static binaries. Reported-by: Jiri B <jirib@devio.us> Tested-by: Jiri B <jirib@devio.us> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vesafb] Select an optimal mode, rather than the first acceptable modeMichael Brown2013-11-281-49/+91
| | | | | | | | | | | | | | | | | | There is no requirement for VBE modes to be listed in increasing order of resolution. With the present logic, this can cause e.g. a 1024x768 mode to be selected if the user asks for 640x480, if the 1024x768 mode is earlier in the mode list. Define a scoring system for modes as score = ( width * height - bpp ) and choose the mode with the lowest score among all acceptable modes. This should prefer to choose the mode closest to the requested resolution, with a slight preference for higher colour depths. Reported-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vesafb] Return meaningful error when no suitable mode is foundMichael Brown2013-11-281-44/+75
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vesafb] Skip modes for which we cannot get mode informationMichael Brown2013-11-281-2/+1Star
| | | | | | | | | The VirtualBox BIOS fails to retrieve mode information (with status 0x0100) for some modes within the mode list. Skip any such modes, rather than treating this as a fatal error. Reported-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vesafb] Include raw status value within VBE error messagesMichael Brown2013-11-281-5/+5
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vesafb] Add VESA frame buffer consoleMichael Brown2013-11-285-0/+635
| | | | | | | | | | | The VESA frame buffer console uses the VESA BIOS extensions (VBE) to enumerate video modes, selects an appropriate mode, and then hands off to the generic frame buffer code. The font is extracted from the VGA BIOS, avoiding the need to provide an external font file. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fbcon] Add generic concept of a frame buffer consoleMichael Brown2013-11-284-1/+894
| | | | | | | Add support for a simple frame buffer console, using single buffering and a fixed-width bitmap font. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Add "console" command to configure consoleMichael Brown2013-11-283-0/+129
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Add concept of generic console configurationMichael Brown2013-11-285-0/+61
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Allow console input and output to be disabled independentlyMichael Brown2013-11-288-65/+64Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [mucurses] Use "<ESC>[2J" ANSI escape sequence to clear screenMichael Brown2013-11-283-16/+40
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pnm] Add support for PNM imagesMichael Brown2013-11-277-0/+803
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Add image_pixbuf() to create pixel buffer from imageMichael Brown2013-11-272-3/+40
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Allow for non-executable image formatsMichael Brown2013-11-271-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pixbuf] Add generic concept of a pixel bufferMichael Brown2013-11-272-0/+130
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Pass escape sequence context to ANSI escape sequence handlersMichael Brown2013-11-276-14/+36
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [main] Defer "initialising devices" message until initialising devicesMichael Brown2013-11-271-1/+3
| | | | | | | | Allow the "initialising devices" message to show up on consoles which require initialisation, by deferring it until after initialise() has completed. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [test] Include failing code within failed test result outputMichael Brown2013-11-272-6/+9
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcpv6] Allow stateful DHCPv6 to apply obtained IPv6 addressesMichael Brown2013-11-151-6/+24
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv6] Separate the concepts of prefix and address creationMichael Brown2013-11-154-124/+201
| | | | | | | | Allow for IPv6 routing table entries to be created for an on-link prefix where a local address has not yet been assigned to the network device. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Update build system for Syslinux 6.xChristian Hesse2013-11-152-1/+12
| | | | | | | | | Syslinux 6.x places its files into a bios subdirectory, and requires that a ldlinux.c32 module be included within the ISO image. Add the relevant search paths for isolinux.bin, and include the file ldlinux.c32 within the ISO image if it exists. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcpv6] Add basic support for stateful and stateless DHCPv6Michael Brown2013-11-144-5/+1207
| | | | | | | | | | | | Add support for the stateful and stateless variants of the DHCPv6 protocol. The resulting settings block is registered as "net<x>.dhcpv6", and DHCPv6 options can be obtained using e.g. "${net0.dhcpv6/23:ipv6}" to obtain the IPv6 DNS server address. IPv6 addresses obtained via stateful DHCPv6 are not yet applied to the network device. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv6] Add "ipv6" setting typeMichael Brown2013-11-143-0/+70
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv6] Use given source address only if it is not the unspecified addressMichael Brown2013-11-142-1/+7
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Move user-class setting from dhcp.c to settings.cMichael Brown2013-11-143-8/+9
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [base16] Fix comparison of signed and unsigned integersMichael Brown2013-11-141-1/+1
| | | | | | | gcc 4.7.1 fails to report this erroneous comparison unless assertions are enabled. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pxe] Ensure cached DHCPACK is retrieved prior to network device creationMichael Brown2013-11-081-7/+12
| | | | | | | | | | | | | | | | | The retrieval of the cached DHCPACK and the creation of network devices are both currently scheduled as STARTUP_NORMAL. It is therefore possible that the cached DHCPACK will not be retrieved in time for cachedhcp_probe() to apply it to the relevant network device. Fix by retrieving the cached DHCPACK at initialisation time rather than at startup time. As an optimisation, an unclaimed cached DHCPACK can be freed immediately after the last network device has been created, rather than waiting until shutdown. Reported-by: Espen Braastad <espen.braastad@redpill-linpro.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Generate command option help text automaticallyMichael Brown2013-11-0722-75/+93
| | | | | | | Generate the command option help text automatically from the list of defined options. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv6] Add IPv6 network device configuratorMichael Brown2013-11-072-28/+217
| | | | | | | | | | Include IPv6 within the generic network device configurator mechanism. The IPv6 configurator will send a router solicitation and wait for a router advertisement to be received. (As per RFC4861 section 6.3.7, we do this even if advertisements have been received prior to sending the router solicitation.) Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Remove obsolete dhcp() functionMichael Brown2013-11-052-25/+0Star
| | | | | | | All functionality provided by dhcp() has now been obviated by the more generic ifconf(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Make "dhcp" command a synonym for "ifconf"Michael Brown2013-11-053-49/+3Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Add "ifconf" commandMichael Brown2013-11-051-0/+59
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [autoboot] Use ifconf() to configure network deviceMichael Brown2013-11-051-3/+2Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ifmgmt] Add ifconf() to carry out network device configurationMichael Brown2013-11-052-2/+90
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [parseopt] Add parse_netdev_configurator()Michael Brown2013-11-052-0/+27
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Add DHCP network device configuratorMichael Brown2013-11-051-0/+6
| | | | | | | Provide an interface to DHCP via the generic network device configurator mechanism. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Add generic concept of a network device configuratorMichael Brown2013-11-052-5/+282
| | | | | | | | | | | | | | iPXE supports multiple mechanisms for network device configuration: DHCPv4 for IPv4, FIP for FCoE, and SLAAC for IPv6. At present, DHCPv4 requires an explicit action (e.g. a "dhcp" command), FIP is initiated implicitly upon opening a network device, and SLAAC takes place whenever a RA happens to be received. Add a generic concept of a network device configurator, which provides a common interface to triggering configuration and to reporting the result of the configuration process. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Allow "if<xxx>" commands to take optionsMichael Brown2013-11-056-63/+174
| | | | | | | Allow commands implemented using ifcommon_exec() to accept command-specific options. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ifmgmt] Rewrite iflinkwait() to use monojob_wait()Michael Brown2013-11-054-44/+99
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [autoboot] Fix shell banner timeoutMichael Brown2013-11-051-1/+3
| | | | | | | | | | | Commit 5e1fa5c ("[parseopt] Add parse_timeout()") introduced a regression causing the shell banner timeout value (calculated in milliseconds) to be treated as a timer tick count, resulting in a timeout of approximately two minutes rather than the intended two seconds. Reported-by: Christian Hesse <list@eworm.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>