aboutsummaryrefslogtreecommitdiff
path: root/src/usr
AgeCommit message (Collapse)AuthorFilesLines
2014-04-27[cmdline] Add "profstat" command to display profiling statisticsMichael Brown1-0/+44
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-03-28[crypto] Generalise X.509 cache to a full certificate storeMichael Brown1-1/+1
Expand the concept of the X.509 cache to provide the functionality of a certificate store. Certificates in the store will be automatically used to complete certificate chains where applicable. The certificate store may be prepopulated at build time using the CERT=... build command line option. For example: make bin/ipxe.usb CERT=mycert1.crt,mycert2.crt Certificates within the certificate store are not implicitly trusted; the trust list is specified using TRUST=... as before. For example: make bin/ipxe.usb CERT=root.crt TRUST=root.crt This can be used to embed the full trusted root certificate within the iPXE binary, which is potentially useful in an HTTPS-only environment in which there is no HTTP server from which to automatically download cross-signed certificates or other certificate chain fragments. This usage of CERT= extends the existing use of CERT= to specify the client certificate. The client certificate is now identified automatically by checking for a match against the private key. For example: make bin/ipxe.usb CERT=root.crt,client.crt TRUST=root.crt KEY=client.key Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-03-13[lotest] Allow loopback testing on shared networksMichael Brown1-36/+53
Allow for extraneous packets to be received during loopback testing, and so permit loopback tests to be performed when ports are connected to a switch (rather than requiring ports to be directly connected with a loopback cable). Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-03-10[image] Add "--timeout" parameter to image downloading commandsMichael Brown2-7/+13
iPXE will detect timeout failures in several situations: network link-up, DHCP, TCP connection attempts, unacknowledged TCP data, etc. This does not cover all possible circumstances. For example, if a connection to a web server is successfully established and the web server acknowledges the HTTP request but never sends any data in response, then no timeout will be triggered. There is no timeout defined within the HTTP specifications, and the underlying TCP connection will not generate a timeout since it has no way to know that the HTTP layer is expecting to receive data from the server. Add a "--timeout" parameter to "imgfetch", "chain", etc. If no progress is made (i.e. no data is downloaded) within the timeout period, then the download will be aborted. Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-03-03[autoboot] Enable infrastructure to specify an autoboot device locationAlex Williamson1-17/+26
iPXE will currently attempt to boot from every network device for which it has a driver. Where a system has more than one network device supported by iPXE, this renders BIOS IPL lists ineffective. Allow an autoboot device location to be specified. If such a location is specified, then only devices matching that location will be used as part of the automatic boot sequence. If no such location is specified, then all devices will be used. Note that this does not affect the "autoboot" command, which will continue to use all devices. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-03-02[cmdline] Add the "ipstat" commandMichael Brown1-0/+62
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-02-27[image] Ensure every image has a fully resolved URIMichael Brown1-12/+20
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-02-27[uri] Refactor URI parsing and formattingMichael Brown2-23/+11
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>
2013-12-09[mucurses] Use centralised concept of colour pairsMichael Brown1-8/+3
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-12-05[settings] Force settings into alphabetical order within sectionsMichael Brown1-3/+5
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-12-05[ipv6] Add support for resolving IPv6 addresses via the "nslookup" commandMichael Brown1-0/+7
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-12-05[settings] Explicitly separate the concept of a completed fetched settingMichael Brown3-29/+33
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>
2013-11-15[ipv6] Separate the concepts of prefix and address creationMichael Brown1-1/+3
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>
2013-11-05[dhcp] Remove obsolete dhcp() functionMichael Brown1-24/+0
All functionality provided by dhcp() has now been obviated by the more generic ifconf(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-05[autoboot] Use ifconf() to configure network deviceMichael Brown1-3/+2
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-05[ifmgmt] Add ifconf() to carry out network device configurationMichael Brown1-2/+87
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-05[ifmgmt] Rewrite iflinkwait() to use monojob_wait()Michael Brown3-43/+98
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-05[autoboot] Fix shell banner timeoutMichael Brown1-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>
2013-11-01[cmdline] Rewrite "sync" command to use monojob_wait()Michael Brown1-0/+74
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-01[monojob] Add timeout parameter to monojob_wait()Michael Brown6-7/+7
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-01[parseopt] Add parse_timeout()Michael Brown2-8/+6
Parsing a timeout value (specified in milliseconds) into an internal timeout value measured in timer ticks is a common operation. Provide a parse_timeout() value to carry out this conversion automatically. Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-10-25[pxe] Always retrieve cached DHCPACK and apply to relevant network deviceMichael Brown1-5/+1
When chainloading, always retrieve the cached DHCPACK packet from the underlying PXE stack, and apply it as the original contents of the "net<X>.dhcp" settings block. This allows cached DHCP settings to be used for any chainloaded iPXE binary (not just undionly.kkpxe). This change eliminates the undocumented "use-cached" setting. Issuing the "dhcp" command will now always result in a fresh DHCP request. Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-10-21[ping] Add top-level ping() function to ping a hostMichael Brown1-0/+81
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-09-25[neighbour] Add nstat() function to print out neighbour tableMichael Brown1-0/+56
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-09-03[ipv6] Replace IPv6 stackMichael Brown1-0/+58
Replace the existing partially-implemented IPv6 stack with a fresh implementation. This implementation is not yet complete. The IPv6 transmit and receive datapaths are functional (including fragment reassembly and parsing of arbitrary extension headers). NDP neighbour solicitations and advertisements are supported. ICMPv6 echo is supported. At present, only link-local addresses may be used, and there is no way to specify an IPv6 address as part of a URI (either directly or via a DNS lookup). Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-09-03[ipv4] Abstract out protocol-specific portions of "route" commandMichael Brown2-13/+69
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-07-19[settings] Eliminate call to store_named_setting() in nslookup.cMichael Brown1-6/+17
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-07-14[lotest] Include sequence number within loopback test packetsMichael Brown1-8/+18
Include a sequence number as the first four bytes of the loopback test packet payload. When a content mismatch occurs, this gives some information about the source of the mismatched packet. Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-06-24[autoboot] Use next-server from filename's settings blockMichael Brown1-14/+25
Locate the settings block containing the filename, and search only that settings block for the next-server address. This avoids problems caused by misconfigured DHCP servers which provide a next-server address (often defaulting to the DHCP server's own IP address) even when not providing a filename. Originally-implemented-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-03-13[autoboot] Split main control flow out of main() into a new function ipxe()Michael Brown1-0/+95
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-09-10[cmdline] Add standalone "nslookup" commandPatrick Plenefisch1-0/+185
Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-08-31[ipoib] Expose Ethernet-compatible eIPoIB link-layer addresses and headersMichael Brown1-10/+2
Almost all clients of the raw-packet interfaces (UNDI and SNP) can handle only Ethernet link layers. Expose an Ethernet-compatible link layer to local clients, while remaining compatible with IPoIB on the wire. This requires manipulation of ARP (but not DHCP) packets within the IPoIB driver. This is ugly, but it's the only viable way to allow IPoIB devices to be driven via the raw-packet interfaces. Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-20[legal] Update FSF mailing address in GPL licence textsMichael Brown11-11/+22
Suggested-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-20[image] Automatically free autobooted imagesMichael Brown1-0/+1
Simplify the process of booting by ensuring that old images are not left registered after an unsuccessful autoboot attempt. Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-20[image] Add "--autofree" optionMichael Brown1-0/+2
Allow images to be automatically freed after execution completes (successfully or otherwise). Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-05-22[image] Allow "imgtrust" to automatically download cross-signed certificatesMichael Brown1-0/+13
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-05-04[crypto] Allow certificate chains to be long-lived data structuresMichael Brown1-6/+12
At present, certificate chain validation is treated as an instantaneous process that can be carried out using only data that is already in memory. This model does not allow for validation to include non-instantaneous steps, such as downloading a cross-signing certificate, or determining certificate revocation status via OCSP. Redesign the internal representation of certificate chains to allow chains to outlive the scope of the original source of certificates (such as a TLS Certificate record). Allow for certificates to be cached, so that each certificate needs to be validated only once. Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-21[netdevice] Allow network device to update link state before checkingMichael Brown1-0/+3
If the network interface has only just been opened (e.g. by the "dhcp" command) then we should allow at least one opportunity for the card to update the link state before testing it, to avoid false positives. Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-03-26[image] Log results of image signature checksMichael Brown1-0/+9
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-03-26[console] Move putchar() and getchar() declarations to stdio.hMichael Brown1-1/+0
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-03-25[image] Add the "imgtrust" and "imgverify" commandsMichael Brown1-0/+81
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-03-24[image] Simplify image management commands and internal APIMichael Brown2-46/+42
Remove the name, cmdline, and action parameters from imgdownload() and imgdownload_string(). These functions now simply download and return an image. Add the function imgacquire(), which will interpret a "name or URI string" parameter and return either an existing image or a newly downloaded image. Use imgacquire() to merge similar image-management commands that currently differ only by whether they take the name of an existing image or the URI of a new image to download. For example, "chain" and "imgexec" can now be merged. Extend imgstat and imgfree commands to take an optional list of images. Remove the arbitrary restriction on the length of image names. Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-03-22[image] Add concept of trusted imagesMichael Brown1-0/+2
Trusted images may always be executed. Untrusted images may be executed only if the current image trust requirement allows untrusted images. Images can be marked as trusted using image_trust(), and marked as untrusted using image_untrust(). The current image trust requirement can be changed using image_set_trust(). It is possible to make the change permanent, in which case any future attempts to change the image trust requirement will fail. Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-12-08[lotest] Accept non-loopback packets during testMichael Brown1-58/+86
It can sometimes be awkward to prevent additional packets from being received during a loopback test. Allow such additional packets to be present without terminating the test. Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-10-25[image] Eliminate the register_and_xxx_image() functionsMichael Brown2-111/+25
All users of imgdownload() require registration of the image, so make registration an integral part of imgdownload() itself and simplify the "action" parameter to be one of image_select(), image_exec() et al. Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-07-15[netdevice] Allow link layer to report broadcast/multicast packets via pull()Michael Brown1-2/+6
Allow the link layer to directly report whether or not a packet is multicast or broadcast at the time of calling pull(), rather than relying on heuristics to determine this at a later stage. Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-06-28[fc] Maintain a list of Fibre Channel upper-layer protocol usersMichael Brown1-2/+1
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-04-24[sanboot] Add "sanhook" and "sanunhook" commandsMichael Brown2-44/+57
Expose the multiple-SAN-drive capability of the iPXE core via the iPXE command line by adding commands to hook and unhook additional drives. Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-04-07[device] Make driver name a generic device propertyMichael Brown1-2/+3
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-27[image] Use image_set_name() only if name != NULLPiotr Jaroszyński1-1/+2
Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>