--- /dev/null
+#ifndef _I386_UUID_H
+#define _I386_UUID_H
+
+#include <smbios.h>
+
+static inline int get_uuid ( union uuid *uuid ) {
+ return smbios_get_uuid ( uuid );
+}
+
+#endif /* _I386_UUID_H */
extern int find_smbios_string ( struct smbios_strings *strings,
unsigned int index,
char *buffer, size_t length );
+extern int smbios_get_uuid ( union uuid *uuid );
#endif /* _SMBIOS_H */
*/
#define DHCP_BOOTFILE_NAME 67
+/** UUID client identifier */
+#define DHCP_CLIENT_UUID 97
+
/** Etherboot-specific encapsulated options
*
* This encapsulated options field is used to contain all options
#include <gpxe/retry.h>
#include <gpxe/tcpip.h>
#include <gpxe/ip.h>
+#include <gpxe/uuid.h>
#include <gpxe/dhcp.h>
/** @file
struct device_description *desc = &netdev->dev->desc;
struct dhcp_netdev_desc dhcp_desc;
struct dhcp_client_id client_id;
+ union uuid uuid;
size_t dhcp_features_len;
size_t ll_addr_len;
int rc;
return rc;
}
+ /* Add client UUID, if we have one. Required for PXE. */
+ if ( ( rc = get_uuid ( &uuid ) ) == 0 ) {
+ if ( ( rc = set_dhcp_packet_option ( dhcppkt,
+ DHCP_CLIENT_UUID, &uuid,
+ sizeof ( uuid ) ) ) !=0){
+ DBG ( "DHCP could not set client UUID: %s\n",
+ strerror ( rc ) );
+ return rc;
+ }
+ }
+
return 0;
}