From 76d05a4da0184aea77ba8ca49062a2b26cbbebf4 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 23 Jan 2009 01:13:50 +0000 Subject: [dhcp] Pass PXE boot menu item to PXE Boot Server 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. --- src/include/gpxe/dhcp.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/include/gpxe') diff --git a/src/include/gpxe/dhcp.h b/src/include/gpxe/dhcp.h index a0a09412a..c45004cfc 100644 --- a/src/include/gpxe/dhcp.h +++ b/src/include/gpxe/dhcp.h @@ -17,6 +17,7 @@ struct net_device; struct job_interface; struct dhcp_options; struct dhcp_packet; +struct dhcp_pxe_boot_menu_item; /** BOOTP/DHCP server port */ #define BOOTPS_PORT 67 @@ -84,6 +85,12 @@ struct dhcp_packet; /** PXE boot server multicast address */ #define DHCP_PXE_BOOT_SERVER_MCAST DHCP_ENCAP_OPT ( DHCP_VENDOR_ENCAP, 7 ) +/** PXE boot menu */ +#define DHCP_PXE_BOOT_MENU DHCP_ENCAP_OPT ( DHCP_VENDOR_ENCAP, 9 ) + +/** PXE boot menu item */ +#define DHCP_PXE_BOOT_MENU_ITEM DHCP_ENCAP_OPT ( DHCP_VENDOR_ENCAP, 71 ) + /** Requested IP address */ #define DHCP_REQUESTED_ADDRESS 50 @@ -492,8 +499,10 @@ extern int dhcp_create_packet ( struct dhcp_packet *dhcppkt, void *data, size_t max_len ); extern int dhcp_create_request ( struct dhcp_packet *dhcppkt, struct net_device *netdev, - struct in_addr ciaddr, - struct dhcp_packet *dhcpoffer, + unsigned int msgtype, struct in_addr ciaddr, + struct in_addr server, + struct in_addr requested_ip, + struct dhcp_pxe_boot_menu_item *menu_item, void *data, size_t max_len ); extern int start_dhcp ( struct job_interface *job, struct net_device *netdev ); -- cgit v1.2.3-55-g7522