summaryrefslogtreecommitdiffstats
path: root/src/include
Commit message (Collapse)AuthorAgeFilesLines
* [cmdline] Add the "ipstat" commandMichael Brown2014-03-031-0/+14
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tcpip] Add IP statistics collection as per RFC 4293Michael Brown2014-03-023-1/+194
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Ensure every image has a fully resolved URIMichael Brown2014-02-271-2/+1Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [uri] Refactor URI parsing and formattingMichael Brown2014-02-271-37/+41
| | | | | | | | | | | | | | | | | | | | | | | | Add support for parsing of URIs containing literal IPv6 addresses (e.g. "http://[fe80::69ff:fe50:5845%25net0]/boot.ipxe"). Duplicate URIs by directly copying the relevant fields, rather than by formatting and reparsing a URI string. This relaxes the requirements on the URI formatting code and allows it to focus on generating human-readable URIs (e.g. by not escaping ':' characters within literal IPv6 addresses). As a side-effect, this allows relative URIs containing parameter lists (e.g. "../boot.php##params") to function as expected. Add validity check for FTP paths to ensure that only printable characters are accepted (since FTP is a human-readable line-based protocol with no support for character escaping). Construct TFTP next-server+filename URIs directly, rather than parsing a constructed "tftp://..." string, Add self-tests for URI functions. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [params] Use reference counters for form parameter listsMichael Brown2014-02-271-2/+39
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dns] Support DNS search listsMichael Brown2014-02-053-61/+121
| | | | | | | | | | | Update the DNS resolver to support DNS search lists (as provided by DHCP option 119, DHCPv6 option 24, or NDP option 31). Add validation code to ensure that parsing of DNS packets does not overrun the input, get stuck in infinite loops, or (worse) write beyond the end of allocated buffers. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Rename "console" command's --bpp option to --depthMichael Brown2014-01-221-1/+1
| | | | | | | | | | Rename the "--bpp" option to "--depth", to free up the single-letter option "-b" for "--bottom" in preparation for adding margin support. This does not break backwards compatibility with documented features, since the "console" command has not yet been documented. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fbcon] Allow for an arbitrary margin around the text areaMichael Brown2014-01-222-0/+9
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fbcon] Centre background picture on consoleMichael Brown2014-01-221-8/+0Star
| | | | | | | | | | | | | | | | | | | | | | | Centre the background picture on the console, to give a more consistent result when the aspect ratio does not match the requested width and height. Once drawn for the first time, nothing should ever overwrite the margins of the display. We can therefore eliminate the logic used to redraw only the margin areas, and use much simpler code to draw the complete initial background image. Simplify the redrawing logic further by making the background picture buffer equal in size to the frame buffer. In the common case of a background picture which is designed to fill the screen, this wastes no extra memory, and the combined code simplifications reduce the size of fbcon.o by approximately 15%. Redefine the concept of "margin" to match the intuitive definition (i.e. the size of the gap, rather than the position of the boundary line). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [png] Add support for PNG imagesMichael Brown2014-01-122-0/+180
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [uaccess] Add memcmp_user()Michael Brown2014-01-123-0/+43
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Add abs()Michael Brown2014-01-121-0/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [deflate] Add support for DEFLATE decompressionMichael Brown2014-01-062-0/+284
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [test] Add okx() macro taking an explicit file name and line numberMichael Brown2014-01-061-3/+6
| | | | | | | | | Allow test reports to specify an explicit file name and line number using the extended okx() macro. This allows large blocks of test report code such as tcpip_random_ok() to be implemented as functions rather than macros. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Add isprint()Michael Brown2014-01-061-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv6] Fix compilation under FreeBSDMichael Brown2013-12-211-1/+1
| | | | | Reported-by: Dewey Hylton <dewey@hyltown.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Add concept of a "magic" colourMichael Brown2013-12-091-0/+11
| | | | | | | | The magic basic colour can be remapped at runtime from COLOR_NORMAL_BG (usually blue) to COLOR_DEFAULT (which will be transparent as a background colour on the framebuffer console). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Add centralised concept of colours and colour pairsMichael Brown2013-12-092-0/+75
| | | | | | | | | | | | | Add a centralised concept of colours and colour pairs (using the default colour pairs as configured via config/colour.h). A colour pair consists of a pair of colour indices. Add the ability to redefine both a colour pair and an individual colour index, with minimal overhead if this feature is not required (e.g. because the relevant shell commands are not present in the build). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Allow consoles to update the recorded console sizeMichael Brown2013-12-062-4/+23
| | | | | | | | | | | | | | | | | | | | Provide a mechanism for consoles to update the recorded console width and height, and use this width and height to provide the curses COLS and LINES variables. We choose not to use ANSI escape sequences to obtain the width and height, for two reasons: - iPXE's model is that all output is sent to all consoles; we could therefore end up with multiple consoles reporting conflicting widths and heights - when a serial console is in use, we probably don't want to resize the output shown on the BIOS console to match the size of the serial console, since it's likely that the serial console is in use only for debugging. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv6] Expose NDP-provided settings (including the DNS server)Michael Brown2013-12-051-0/+37
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcpv6] Add DHCPv6 "filename" settingMichael Brown2013-12-051-0/+6
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Merge SETTING_IPv4 and SETTING_IPv6Michael Brown2013-12-051-19/+17Star
| | | | | | | Allow for equivalent IPv4 and IPv6 settings (which requires equivalent settings to be adjacent within the settings list). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Force settings into alphabetical order within sectionsMichael Brown2013-12-052-18/+36
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcpv6] Use DUID-UUID form of client DUIDMichael Brown2013-12-051-8/+7Star
| | | | | | Use the system UUID to generate the client DUID-UUID as per RFC 6355. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [linux] Provide access to SMBIOS via /dev/memMichael Brown2013-12-051-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [syslog] Add support for IPv6 syslog serverMichael Brown2013-12-051-0/+7
| | | | | | | | | | | Note that IANA has not yet assigned a DHCPv6 option code for the syslog server. When a code is assigned, the definition of DHCPV6_LOG_SERVERS should be updated. Until then, an IPv6 address of a syslog server can be configured manually using e.g. set syslog6 3ffe:302:11:2::8309 Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [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-052-2/+9
| | | | | | | | 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-051-0/+7
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Allow for IPv6 setting types in non-IPv6 buildsMichael Brown2013-12-053-10/+25
| | | | | | | | | 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-053-83/+102
| | | | | | | | | | 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-021-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [mucurses] Implement curs_set() to control cursor visibilityMichael Brown2013-12-021-0/+7
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Allow '?' as an intermediate byte in ANSI escape sequencesMichael Brown2013-12-021-0/+6
| | | | | | | | | 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>
* [fbcon] Add generic concept of a frame buffer consoleMichael Brown2013-11-283-1/+162
| | | | | | | 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>
* [console] Add concept of generic console configurationMichael Brown2013-11-281-0/+17
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Allow console input and output to be disabled independentlyMichael Brown2013-11-281-33/+44
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [mucurses] Use "<ESC>[2J" ANSI escape sequence to clear screenMichael Brown2013-11-281-5/+8
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pnm] Add support for PNM imagesMichael Brown2013-11-272-0/+87
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Add image_pixbuf() to create pixel buffer from imageMichael Brown2013-11-271-3/+14
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pixbuf] Add generic concept of a pixel bufferMichael Brown2013-11-271-0/+55
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Pass escape sequence context to ANSI escape sequence handlersMichael Brown2013-11-271-1/+5
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [test] Include failing code within failed test result outputMichael Brown2013-11-271-3/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv6] Separate the concepts of prefix and address creationMichael Brown2013-11-151-5/+15
| | | | | | | | 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>
* [dhcpv6] Add basic support for stateful and stateless DHCPv6Michael Brown2013-11-142-0/+216
| | | | | | | | | | | | 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-141-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv6] Use given source address only if it is not the unspecified addressMichael Brown2013-11-141-0/+6
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Move user-class setting from dhcp.c to settings.cMichael Brown2013-11-141-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv6] Add IPv6 network device configuratorMichael Brown2013-11-071-2/+0Star
| | | | | | | | | | 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-051-1/+0Star
| | | | | | | All functionality provided by dhcp() has now been obviated by the more generic ifconf(). Signed-off-by: Michael Brown <mcb30@ipxe.org>