aboutsummaryrefslogtreecommitdiff
path: root/src/net/fakedhcp.c
AgeCommit message (Collapse)AuthorFilesLines
2009-05-18[legal] Add a selection of FILE_LICENCE declarationsMichael Brown1-0/+2
Add FILE_LICENCE declarations to almost all files that make up the various standard builds of gPXE.
2009-02-01[dhcp] Split PXE menuing code out of dhcp.cMichael Brown1-25/+24
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.
2009-01-23[dhcp] Pass PXE boot menu item to PXE Boot ServerMichael Brown1-3/+4
Pick out the first boot menu item from the boot menu (option 43.9) and pass it to the boot server as the boot menu item (option 43.71). Also improve DHCP debug messages to include more details of the packets being transmitted.
2009-01-21[dhcp] Add preliminary support for PXE Boot ServersMichael Brown1-0/+11
Some PXE configurations require us to perform a third DHCP transaction (in addition to the real DHCP transaction and the ProxyDHCP transaction) in order to retrieve information from a "Boot Server". This is an experimental implementation, since the actual behaviour is not well specified in the PXE spec.
2008-08-02[pxe] If no ProxyDHCPACK exists, use DHCPACK for the fake ProxyDHCPACK packetMichael Brown1-5/+3
WinPE seems to have a bug that causes it to always use the TFTP server IP address and filename from the ProxyDHCPACK packet, even if the ProxyDHCPACK packet doesn't exist. This causes it to end up attempting to fetch a file such as tftp://0.0.0.0/bootmgr.exe If we don't have a ProxyDHCPACK to use, we pretend that it was a copy of the DHCPACK packet. This works around the problem, and hopefully won't surprise any NBPs.
2008-03-27[DHCP] Add support for ProxyDHCP requestsMichael Brown1-3/+4
The PXE spec is (as usual) unclear on precisely when ProxyDHCPREQUESTs should be issued. We adapt the following, slightly paranoid approach: If an offer contains an IP address, then it is a normal DHCPOFFER. If an offer contains an option #60 "PXEClient", then it is a ProxyDHCPOFFER. Note that the same packet can be both a normal DHCPOFFER and a ProxyDHCPOFFER. After receiving the normal DHCPACK, if we have received a ProxyDHCPOFFER, we unicast a ProxyDHCPREQUEST back to the ProxyDHCP server on port 4011. If we time out waiting for a ProxyDHCPACK, we treat this as a non-fatal error.
2008-03-25[Settings] Remove assumption that all settings have DHCP tag valuesMichael Brown1-0/+205
Allow for settings to be described by something other than a DHCP option tag if desirable. Currently used only for the MAC address setting. Separate out fake DHCP packet creation code from dhcp.c to fakedhcp.c. Remove notion of settings from dhcppkt.c. Rationalise dhcp.c to use settings API only for final registration of the DHCP options, rather than using {store,fetch}_setting throughout.