]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/HttpBootDxe/HttpBootDxe.h
MdeModulePkg: Replace ASSERT with error return code in PXE driver.
[mirror_edk2.git] / NetworkPkg / HttpBootDxe / HttpBootDxe.h
index 7cb4b2c55a14e40a58e9025065cfbcc965321ff5..7e8cd9d4f3d0d839424b5330d8eba3be01b4f100 100644 (file)
@@ -19,6 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Uefi.h>\r
 \r
 #include <IndustryStandard/Http11.h>\r
+#include <IndustryStandard/Dhcp.h>\r
 \r
 //\r
 // Libraries\r
@@ -55,6 +56,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/Http.h>\r
 #include <Protocol/Ip4Config2.h>\r
 #include <Protocol/Ip6Config.h>\r
+#include <Protocol/RamDisk.h>\r
 //\r
 // Produced Protocols\r
 //\r
@@ -70,6 +72,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 #define HTTP_BOOT_DXE_VERSION  0xa\r
 \r
+//\r
+// Provisional Standard Media Types defined in \r
+// http://www.iana.org/assignments/provisional-standard-media-types/provisional-standard-media-types.xhtml\r
+//\r
+#define HTTP_CONTENT_TYPE_APP_EFI           "application/efi"\r
+\r
 //\r
 // Protocol instances\r
 //\r
@@ -83,6 +91,13 @@ extern EFI_COMPONENT_NAME_PROTOCOL  gHttpBootDxeComponentName;
 typedef struct _HTTP_BOOT_PRIVATE_DATA      HTTP_BOOT_PRIVATE_DATA;\r
 typedef struct _HTTP_BOOT_VIRTUAL_NIC       HTTP_BOOT_VIRTUAL_NIC;\r
 \r
+typedef enum  {\r
+  ImageTypeEfi,\r
+  ImageTypeVirtualCd,\r
+  ImageTypeVirtualDisk,\r
+  ImageTypeMax\r
+} HTTP_BOOT_IMAGE_TYPE;\r
+\r
 //\r
 // Include files with internal function prototypes\r
 //\r
@@ -102,6 +117,7 @@ typedef union {
 struct _HTTP_BOOT_VIRTUAL_NIC {\r
   UINT32                                    Signature;\r
   EFI_HANDLE                                Controller;\r
+  EFI_HANDLE                                ImageHandle;\r
   EFI_LOAD_FILE_PROTOCOL                    LoadFile;\r
   EFI_DEVICE_PATH_PROTOCOL                  *DevicePath;\r
   HTTP_BOOT_PRIVATE_DATA                    *Private;\r
@@ -118,7 +134,6 @@ struct _HTTP_BOOT_VIRTUAL_NIC {
 struct _HTTP_BOOT_PRIVATE_DATA {\r
   UINT32                                    Signature;\r
   EFI_HANDLE                                Controller;\r
-  EFI_HANDLE                                Image;\r
 \r
   HTTP_BOOT_VIRTUAL_NIC                     *Ip4Nic;\r
   HTTP_BOOT_VIRTUAL_NIC                     *Ip6Nic;\r
@@ -166,10 +181,16 @@ struct _HTTP_BOOT_PRIVATE_DATA {
   EFI_IP_ADDRESS                            GatewayIp;\r
   EFI_IP_ADDRESS                            ServerIp;\r
   UINT16                                    Port;\r
+\r
+  //\r
+  // The URI string attempt to download through HTTP, may point to\r
+  // the memory in cached DHCP offer, or to the memory in FilePathUri.\r
+  //\r
   CHAR8                                     *BootFileUri;\r
   VOID                                      *BootFileUriParser;\r
   UINTN                                     BootFileSize;\r
   BOOLEAN                                   NoGateway;\r
+  HTTP_BOOT_IMAGE_TYPE                      ImageType;\r
 \r
   //\r
   // URI string extracted from the input FilePath parameter.\r