summaryrefslogtreecommitdiffstats
path: root/src/usr/dhcpmgmt.c
Commit message (Collapse)AuthorAgeFilesLines
* [build] Rename gPXE to iPXEMichael Brown2010-04-201-4/+4
| | | | | | | | | | | Access to the gpxe.org and etherboot.org domains and associated resources has been revoked by the registrant of the domain. Work around this problem by renaming project from gPXE to iPXE, and updating URLs to match. Also update README, LOG and COPYRIGHTS to remove obsolete information. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Add generic facility for using cached network settingsJoshua Oreman2010-01-201-1/+6
| | | | | | | | | | | | | | | | | | | | | | When a DHCP session is started (using autoboot or a command-line `dhcp net0'), check whether the new setting use-cached (DHCP option 175.178) is TRUE; if so, skip DHCP and rely on currently registered settings. This lets one combine a static IP with autoboot. Before checking the use-cached setting, call a weak get_cached_dhcpack() hook that can be implemented by particular builds of gPXE supporting some fashion of retrieving a cached DHCPACK packet. If one is available, it is registered as an options source, and then either that packet's option 175.178 or the user's prior manual use-cached setting can allow skipping duplicate DHCP. Using cached packets is not the default because DHCP servers are often configured to give gPXE different options than they give a vendor PXE client; in order to break the infinite loop of PXE chaining, one would need to load a gPXE with an embedded image that does something more than autoboot. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [dhcp] Fall back to using the hardware address to populate the chaddr fieldMichael Brown2009-08-121-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | For IPoIB, the chaddr field is too small (16 bytes) to contain the 20-byte IPoIB link-layer address. RFC4390 mandates that we should pass an empty chaddr field and rely on the DHCP client identifier instead. This has many problems, not least of which is that a client identifier containing an IPoIB link-layer address is not very useful from the point of view of creating DHCP reservations, since the QPN component is assigned at runtime and may vary between boots. Leave the DHCP client identifier as-is, to avoid breaking existing setups as far as possible, but expose the real hardware address (the port GUID) via the DHCP chaddr field, using the broadcast flag to instruct the DHCP server not to use this chaddr value as a link-layer address. This makes it possible (at least with ISC dhcpd) to create DHCP reservations using host declarations such as: host duckling { fixed-address 10.252.252.99; hardware unknown-32 00:02:c9:02:00:25:a1:b5; }
* [netdevice] Separate out the concept of hardware and link-layer addressesMichael Brown2009-08-121-1/+1
| | | | | | | | | | | The hardware address is an intrinsic property of the hardware, while the link-layer address can be changed at runtime. This separation is exposed via APIs such as PXE and EFI, but is currently elided by gPXE. Expose the hardware and link-layer addresses as separate properties within a net device. Drivers should now fill in hw_addr, which will be used to initialise ll_addr at the time of calling register_netdev().
* [dhcp] Await link-up before starting DHCPJoshua Oreman2009-06-241-0/+6
| | | | | Modified-by: Michael Brown <mcb30@etherboot.org> Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [legal] Add a selection of FILE_LICENCE declarationsMichael Brown2009-05-181-0/+2
| | | | | Add FILE_LICENCE declarations to almost all files that make up the various standard builds of gPXE.
* [pxe] Obey lists of PXE Boot Servers and associated Discovery Control bitsMichael Brown2009-02-051-6/+3Star
| | | | | | | | Various combinations of options 43.6, 43.7 and 43.8 dictate which servers we send Boot Server Discovery requests to, and which servers we should accept responses from. Obey these options, and remove the explicit specification of a single Boot Server from start_pxebs() and dependent functions.
* [dhcp] Split PXE menuing code out of dhcp.cMichael Brown2009-02-011-0/+14
| | | | | | | | | The DHCP client code now implements only the mechanism of the DHCP and PXE Boot Server protocols. Boot Server Discovery can be initiated manually using the "pxebs" command. The menuing code is separated out into a user-level function on a par with boot_root_path(), and is entered in preference to a normal filename boot if the DHCP vendor class is "PXEClient" and the PXE boot menu option exists.
* [DHCP] Fix up fake-packet creation as used by PXENV_GET_CACHED_INFOMichael Brown2008-03-231-6/+0Star
| | | | | | | | | | | Add dedicated functions create_dhcpdiscover(), create_dhcpack() and create_proxydhcpack() for use by external code such as the PXE preboot code. Register ProxyDHCP options under the global scope "proxydhcp". Unregister previously-acquired DHCP and ProxyDHCP settings when DHCP succeeds.
* [Settings] Migrate DHCP and NVO code to the new settings API (untested)Michael Brown2008-03-211-18/+5Star
|
* [Settings] Use a settings applicator to configure IPv4 routes.Michael Brown2008-03-211-2/+2
|
* Remove some assumptions about DHCP obtaining only a single options block.Michael Brown2007-11-211-8/+11
|
* Display name and status of each file as it is downloaded.Michael Brown2007-08-031-8/+2Star
|
* Use monojob and dhcp_configure_netdev().Michael Brown2007-06-281-68/+19Star
|
* Update DHCP to use data-xfer interface (not yet tested).Michael Brown2007-06-281-1/+10
|
* DNS code now records a whole struct sockaddr for the name server.Michael Brown2007-06-121-2/+5
|
* hoffmeis: Preparations for syslog support (LOGSERVER in DHCP, linewiseAnselm Martin Hoffmeister2007-04-091-0/+5
| | | | output buffering defintions and the like)
* Use stdio.h instead of vsprintf.hMichael Brown2007-01-191-1/+1
|
* A working name resolution frameworkMichael Brown2007-01-181-2/+10
|
* Create and use async_block() macro; it cuts down on the visual overheadMichael Brown2007-01-161-7/+3Star
| | | | | of blocking on asynchronous operations, when that isn't an important aspect of the code.
* When a network device is specified to tcpip_tx() or it's children, treatMichael Brown2007-01-161-0/+3
| | | | | | | it as a fallback network device rather than an explicitly forced network device. Clear routing table entries before re-attempting DHCP.
* Gave asynchronous operations approximate POSIX signal semantics. ThisMichael Brown2007-01-151-2/+10
| | | | | | | | | | | will enable us to cascade async operations, which is necessary in order to properly support DNS. (For example, an HTTP request may have to redirect to a new location and will have to perform a new DNS lookup, so we can't just rely on doing the name lookup at the time of parsing the initial URL). Anything other than HTTP is probably broken right now; I'll fix the others up asap.
* Add "dhcp" commandMichael Brown2007-01-121-0/+4
|
* Added dhcp() user-level command.Michael Brown2007-01-121-0/+83