summaryrefslogtreecommitdiffstats
path: root/src/include
Commit message (Collapse)AuthorAgeFilesLines
* [netdevice] Add vlan_tag() to get the VLAN tag of a network deviceStefan Hajnoczi2013-03-011-0/+1
| | | | | | | | | | | | The iBFT has a VLAN field that should be filled in. Add the vlan_tag() function to extract the VLAN tag of a network device. Since VLAN support is optional, define a weak function that returns 0 when iPXE is built without VLAN support. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tls] Concatenate received non-data records before processingMichael Brown2013-01-311-0/+1
| | | | | | | | | Allow non-data records to be split across multiple received I/O buffers, to accommodate large certificate chains. Reported-by: Nicola Volpini <Nicola.Volpini@kambi.com> Tested-by: Nicola Volpini <Nicola.Volpini@kambi.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [src] Fix spelling in comments, debug messages and local variable namesStefan Weil2013-01-032-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes in comments and debug messages: existance -> existence unecessary -> unnecessary occured -> occurred decriptor -> descriptor neccessary -> necessary addres, adress -> address initilize -> initialize sucessfully -> successfully paramter -> parameter acess -> access upto -> up to likelyhood ->likelihood thru -> through substracting -> subtracting lenght -> length isnt -> isn't interupt -> interrupt publically -> publicly (this one was not wrong, but unusual) recieve -> receive accessable -> accessible seperately -> separately pacet -> packet controled -> controlled dectect -> detect indicies -> indices extremly -> extremely boundry -> boundary usefull -> useful unuseable -> unusable auxilliary -> auxiliary embeded -> embedded enviroment -> environment sturcture -> structure complier -> compiler constructes -> constructs supress -> suppress intruduced -> introduced compatability -> compatibility verfication -> verification ths -> the reponse -> response Fixes in local variable names: retreive -> retrieve Most of these fixes were made using codespell. Signed-off-by: Stefan Weil <sw@weilnetz.de> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Convert memcpy() from a macro to an inline functionMichael Brown2012-11-121-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [umalloc] Split largest_memblock() function out from init_eheap()Michael Brown2012-11-061-0/+17
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [uaccess] Add userptr_sub() to find the difference between two user pointersMichael Brown2012-11-053-0/+33
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [list] Reduce overall code size by externalising many list functionsMichael Brown2012-11-021-122/+131
| | | | | | Typical saving is 10-20 bytes in each file using list functions. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Include version number within only a single object fileMichael Brown2012-11-021-0/+16
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [readline] Allow readline_history() to return a meaningful statusMichael Brown2012-10-252-3/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [readline] Allow a prefilled input string to be providedMichael Brown2012-10-251-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Add fetchf_named_setting_copy()Michael Brown2012-10-251-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Add EFI_COMPONENT_NAME2_PROTOCOL instance for each SNP deviceMichael Brown2012-10-231-0/+7
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Expose net device non-volatile settings via HIIMichael Brown2012-10-161-123/+74Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Split SNP HII functionality into a separate fileMichael Brown2012-10-162-0/+69
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [nvo] Expose nvo_applies()Michael Brown2012-10-151-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [nvo] Expose non-volatile options block nameMichael Brown2012-10-151-0/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Expose find_child_settings()Michael Brown2012-10-151-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Add wcslen() functionMichael Brown2012-10-151-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [serial] Don't enable serial console without serial supportShao Miller2012-10-051-0/+1
| | | | | | | | | | | serial_console_init() would enable serial console support without knowing if the serial driver succeeded or not. As a result, the serial console would interfere with a normal keyboard on a system lacking serial support. Reported-by: Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> Signed-off-by: Shao Miller <sha0.miller@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Mark SNP formset compliant with IBM's Unified Configuration ManagerMichael Brown2012-10-051-0/+5
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tls] Split received records over multiple I/O buffersMichael Brown2012-09-271-4/+26
| | | | | | | | | | | | | | | TLS servers are not obliged to implement the RFC3546 maximum fragment length extension, and many common servers (including OpenSSL, as used in Apache's mod_ssl) do not do so. iPXE may therefore have to cope with TLS records of up to 16kB. Allocations for 16kB have a non-negligible chance of failing, causing the TLS connection to abort. Fix by maintaining the received record as a linked list of I/O buffers, rather than a single contiguous buffer. To reduce memory pressure, we also decrypt in situ, and deliver the decrypted data via xfer_deliver_iob() rather than xfer_deliver_raw(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Add standalone "nslookup" commandPatrick Plenefisch2012-09-102-0/+15
| | | | | Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Use a generic setting's own type as its default typeMichael Brown2012-09-101-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When fetching a named setting using a name that does not explicitly specify a type, default to using the type stored when the setting was created, rather than always defaulting to "string". This allows the behaviour of user-defined settings to match the behaviour of predefined settings (which have a sensible default type). For example: set server:ipv4 192.168.0.1 echo ${server} will now print "192.168.0.1", rather than trying to print out the raw IPv4 address bytes as a string. The downside of this change is that existing tricks for printing special characters within scripts may require (backwards-compatible) modification. For example, the "clear screen" sequence: set esc:hex 1b set cls ${esc}[2J echo ${cls} will now have to become set esc:hex 1b set cls ${esc:string}[2J # Must now explicitly specify ":string" echo ${cls} Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [sdi] Add support for SDI imagesMichael Brown2012-09-051-0/+1
| | | | | | | Add support (disabled by default) for booting .sdi images as used by Windows XP Embedded. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipoib] Expose Ethernet-compatible eIPoIB link-layer addresses and headersMichael Brown2012-08-313-19/+34
| | | | | | | | | | | | | 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>
* [infiniband] Include destination address vector in ib_complete_recv()Michael Brown2012-08-312-0/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Use explicit "source" and "dest" address vector parameter namesMichael Brown2012-08-312-8/+8
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [infiniband] Allow queue pairs to have a custom allocator for receive iobufsMichael Brown2012-08-311-2/+14
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [iobuf] Allow allocation of I/O buffers with a specified alignment offsetMichael Brown2012-08-311-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [malloc] Allow allocation of memory with a specified alignment offsetMichael Brown2012-08-311-3/+22
| | | | | | | | Allow for allocation of memory blocks having a specified offset from a specified physical alignment, such as being 12 bytes before a 2kB boundary. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [retry] Expose retry_poll() to explicitly poll all running timersMichael Brown2012-08-311-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ethernet] Expose eth_broadcast as a global constantMichael Brown2012-08-311-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [bitbash] Add optional open() and close() methods for bit-bashing interfacesMichael Brown2012-08-241-0/+32
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [mii] Add separate mii_restart() functionMichael Brown2012-08-231-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Update FSF mailing address in GPL licence textsMichael Brown2012-07-208-8/+16
| | | | | Suggested-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Add "--autofree" optionMichael Brown2012-07-201-0/+3
| | | | | | | Allow images to be automatically freed after execution completes (successfully or otherwise). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Add missing wchar.h headerMichael Brown2012-07-191-0/+27
| | | | | | | Commit 58ed3b1 ("[libc] Add support for "%lc" and "%ls" format specifiers") was missing a file. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Add support for "%lc" and "%ls" format specifiersMichael Brown2012-07-191-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Add EFI_LOAD_FILE_PROTOCOL headerMichael Brown2012-07-191-0/+90
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Update to current EDK2 headersMichael Brown2012-07-1924-156/+8026
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Standardise #include guard in ipxe_download.hMichael Brown2012-07-191-4/+4
| | | | | | | | The script include/ipxe/efi/import.pl relies on a particular format for the #include guard in order to detect EFI headers that are not imported. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tcp] Increase maximum window size to 256kBMichael Brown2012-07-091-22/+24
| | | | | | | | A window size of 256kB should be sufficient to allow for full-bandwidth transfers over a Gigabit LAN, and for acceptable transfer speeds over other typical links. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [arp] Try to avoid discarding ARP cache entriesMichael Brown2012-07-091-1/+12
| | | | | | | | | Discarding the active ARP cache entry in the middle of a download will substantially disrupt the TCP stream. Try to minimise any such disruption by treating ARP cache entries as expensive, and discarding them only when nothing else is available to discard. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [iobuf] Relax alignment requirement for small I/O buffersMichael Brown2012-06-291-11/+0Star
| | | | | | | | | | | | | iPXE currently aligns all I/O buffers on a 2kB boundary. This is overkill for transmitted packets, which are typically much smaller than 2kB. Align I/O buffers on their own size. This reduces the alignment requirement for small buffers, while preserving the guarantee that I/O buffers will never cross boundaries that might cause problems for some DMA engines. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tls] Request a maximum fragment length of 2048 bytesMichael Brown2012-06-291-1/+8
| | | | | | | | | | | The default maximum plaintext fragment length for TLS is 16kB, which is a substantial amount of memory for iPXE to have to allocate for a temporary decryption buffer. Reduce the memory footprint of TLS connections by requesting a maximum fragment length of 2kB. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tcp] Add support for TCP window scalingMichael Brown2012-06-291-1/+29
| | | | | | | | The maximum unscaled TCP window (64kB) implies a maximum bandwidth of around 300kB/s on a WAN link with an RTT of 200ms. Add support for the TCP window scaling option to remove this upper limit. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tcpip] Allow for architecture-specific TCP/IP checksum routinesMichael Brown2012-06-271-2/+10
| | | | | | | Calculating the TCP/IP checksum on received packets accounts for a substantial fraction of the response latency. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [syslog] Include hostname within syslog messages where possibleMichael Brown2012-06-201-0/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Move "domain" setting from dns.c to settings.cMichael Brown2012-06-201-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Allow an error margin on X.509 certificate validity periodsMichael Brown2012-06-202-8/+8
| | | | | | | | | | | | | iPXE has no concept of the local time zone, mainly because there is no viable way to obtain time zone information in the absence of local state. This causes potential problems with newly-issued certificates and certificates that are about to expire. Avoid such problems by allowing an error margin of around 12 hours on certificate validity periods, similar to the error margin already allowed for OCSP response timestamps. Signed-off-by: Michael Brown <mcb30@ipxe.org>