summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe
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-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>
* [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>
* [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>
* [parseopt] Add parse_netdev_configurator()Michael Brown2013-11-051-0/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Add generic concept of a network device configuratorMichael Brown2013-11-051-0/+79
| | | | | | | | | | | | | | 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] Rewrite "sync" command to use monojob_wait()Michael Brown2013-11-011-4/+12
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [monojob] Add timeout parameter to monojob_wait()Michael Brown2013-11-011-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [job] Allow job_progress() to return an ongoing job status code, if knownMichael Brown2013-11-011-3/+3
| | | | | | | | Some background jobs have a meaningful ongoing status code (e.g. the current link status for a job waiting for a network link to come up). Allow this to be exposed via the job_progress() method. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [parseopt] Add parse_timeout()Michael Brown2013-11-012-1/+2
| | | | | | | | 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>
* [ipv6] Add ndp_tx_router_solicitation() to send router solicitationsMichael Brown2013-10-253-4/+29
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pxe] Always retrieve cached DHCPACK and apply to relevant network deviceMichael Brown2013-10-251-16/+1Star
| | | | | | | | | | | | 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>
* [ipv6] Support stateless address autoconfiguration (SLAAC)Michael Brown2013-10-232-18/+76
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv6] Extract link layer addresses from router advertisementsMichael Brown2013-10-232-7/+44
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ping] Add generic ping mechanismMichael Brown2013-10-212-0/+24
| | | | | | | | Add generic pinger mechanism (analogous to the generic downloader mechanism) which opens a ping socket, transmits ping requests, and passes information about ping replies to a callback function. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ping] Add concept of a ping socketMichael Brown2013-10-212-0/+9
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [icmp] Add support for sending ICMP echo requestsMichael Brown2013-10-215-25/+71
| | | | | | | | Merge common functionality between IPv4 and IPv6 ICMP echo handling, and add support for transmitting ICMP echo requests and delivering ICMP echo replies to a (not yet implemented) ping_rx() function. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv6] Add IPv6 socket address converterMichael Brown2013-10-211-1/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [socket] Add concept of a generalised socket address converterMichael Brown2013-10-212-0/+37
| | | | | | | Add sock_aton() and sock_ntoa() to allow for parsing and transcription of arbitrary socket addresses. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Add find_netdev_by_index()Michael Brown2013-10-211-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [neighbour] Add nstat() function to print out neighbour tableMichael Brown2013-09-251-0/+44
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv6] Add inet6_aton()Michael Brown2013-09-111-1/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tcp] Reduce path MTU to 1280 bytesMichael Brown2013-09-041-3/+12
| | | | | | | | | | | | | | | | | | The path MTU is currently hardcoded to 1460 bytes, which fails to allow space for TCP options. Sending a maximum-sized datagram (which is viable when using HTTP POST) will therefore fail since the Ethernet MTU will be exceeded. Reduce the hardcoded path MTU to produce a maximum datagram of 1280 bytes, which is the size required of data link layers by IPv6. It is a reasonable assumption that all intermediary data link layers will be able to convey this packet without fragmentation, even for IPv4. Note that this reduction has a minimal impact upon download throughput, since it affects only the transmit data path. Originally-fixed-by: Suresh Sundriyal <ssundriy@vmware.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv6] Replace IPv6 stackMichael Brown2013-09-036-172/+391
| | | | | | | | | | | | | | | | 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>
* [neighbour] Generalise concept of neighbour discoveryMichael Brown2013-09-033-3/+66
| | | | | | | | Split the protocol-independent portions of arp.c into a separate file neighbour.c, to allow for sharing of functionality between IPv4+ARP and IPv6+NDP. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tcpip] Pass through network device to transport layer protocolsMichael Brown2013-09-031-3/+5
| | | | | | | NDP requires knowledge of the network device on which a packet was received. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Add method for generating EUI-64 address from link-layer addressMichael Brown2013-09-032-0/+10
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Add concept of a network device indexMichael Brown2013-09-031-0/+2
| | | | | | | | | | | | | IPv6 link-local socket addresses require some way to specify a local network device. We cannot simply use a pointer to the network device, since a struct sockaddr_in6 may be long-lived and has no way to hold a reference to the network device. Using a network device index allows a socket address to cleanly refer to a network device without worrying about whether or not that device continues to exist. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Increase maximum network-layer address lengthMichael Brown2013-09-031-1/+1
| | | | | | IPv6 uses 16-byte network-layer addresses. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv4] Generalise fragment reassembly mechanismMichael Brown2013-08-272-12/+68
| | | | | | | Generalise the concept of fragment reassembly to allow for code sharing between IPv4 and IPv6 protocols. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [linux] Give tap devices a name and bus typeMichael Brown2013-08-271-0/+3
| | | | | | | | Give tap devices a meaningful name, and avoid segmentation faults when attempting to retrieve ${net0/bustype} by assigning a new bus type for tap devices. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Make built-in settings a linker tableMichael Brown2013-08-271-0/+22
| | | | | | | Allow for configurable provision of built-in settings by placing them in a linker table rather than an array. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [uri] Allow URIs to incorporate a parameter listMichael Brown2013-08-191-0/+4
| | | | | | | | | | | | | | | | | HTTP POST requires the ability to associate a parameter list with a URI. There is no standardised syntax for this. Use a non-standard URI syntax to incorporate the specification of a parameter list within a URI: URI = [ absoluteURI | relativeURI ] [ "#" fragment ] [ "##params" [ "=" paramsName ] ] e.g. http://boot.ipxe.org/demo/boot.php##params http://boot.ipxe.org/demo/boot.php##params=mylist Signed-off-by: Michael Brown <mcb30@ipxe.org>