 +
 +	free(dhcpdata);
 +
-+	memset(&boot_info, 0, sizeof(boot_info_t));
-+	boot_info.version = BIVERSION_CURRENT;
-+	boot_info.opcode  = BIOPCODE_BOOTWHAT_REQUEST;
++	memset(buffer, 0, sizeof(buffer));
++	boot_info->version = BIVERSION_CURRENT;
++	boot_info->opcode  = BIOPCODE_BOOTWHAT_REQUEST;
 +
 +	udp_close();
 +	rc = udp_open(my_ip);

+		       ntop(&boss_ip, foobar, sizeof(foobar)) : "failed!");
+	}
+
+	boot_what_p = (boot_what_t *)buffer;
+
+	/* Extract our IP address from the cached DHCP data */
+	if (pxe_get_cached_info(PXENV_PACKET_TYPE_DHCP_ACK, &dhcpdata,

+			printf(" ok\n");
+		}
+
+		switch (boot_what->type) {
+			case BIBOOTWHAT_TYPE_REBOOT:
+				printf("Rebooting...\n");
+				syslinux_reboot(0);
+				break;
+			case BIBOOTWHAT_TYPE_PART:
+				return chain_boot("hd0", boot_what->what.partition);
+				break;
+			case BIBOOTWHAT_TYPE_MFS:
+				return kernel_boot(boss_name, boot_what->what.mfs,
+				            boot_what->cmdline);
+				break;
+			case BIBOOTWHAT_TYPE_AUTO:
+				printf("query: will query again\n");
+				break;
+			case BIBOOTWHAT_TYPE_SYSID:
+				printf("request to boot partition type 0x%02x not supported\n",
+						boot_what->what.sysid);
+				break;
+		}
+
