diff options
author | Michael Brown | 2009-01-31 08:36:05 +0100 |
---|---|---|
committer | Michael Brown | 2009-02-01 02:21:40 +0100 |
commit | e65afc4b10552ec9ac7de2f0d924b96bc71aaad0 (patch) | |
tree | 36e528a6d947aa8701208953e74cd496728955b4 /src/usr/dhcpmgmt.c | |
parent | [settings] Avoid duplicate settings block names (diff) | |
download | ipxe-e65afc4b10552ec9ac7de2f0d924b96bc71aaad0.tar.gz ipxe-e65afc4b10552ec9ac7de2f0d924b96bc71aaad0.tar.xz ipxe-e65afc4b10552ec9ac7de2f0d924b96bc71aaad0.zip |
[dhcp] Split PXE menuing code out of dhcp.c
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.
Diffstat (limited to 'src/usr/dhcpmgmt.c')
-rw-r--r-- | src/usr/dhcpmgmt.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/usr/dhcpmgmt.c b/src/usr/dhcpmgmt.c index 2e429cd6..c68808b1 100644 --- a/src/usr/dhcpmgmt.c +++ b/src/usr/dhcpmgmt.c @@ -46,3 +46,17 @@ int dhcp ( struct net_device *netdev ) { return rc; } + +int pxebs ( struct net_device *netdev, struct in_addr pxe_server, + unsigned int pxe_type ) { + int rc; + + /* Perform PXE Boot Server Discovery */ + printf ( "PXEBS (%s %s type %d)", + netdev->name, inet_ntoa ( pxe_server ), pxe_type ); + if ( ( rc = start_pxebs ( &monojob, netdev, pxe_server, + pxe_type ) ) == 0 ) + rc = monojob_wait ( "" ); + + return rc; +} |