]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/HttpBootDxe/HttpBootDxe.h
OvmfPkg/TlsAuthConfigLib: configure trusted CA certs for HTTPS boot
[mirror_edk2.git] / NetworkPkg / HttpBootDxe / HttpBootDxe.h
index 806429cad1b268b11c66cbdcbab40b604a808b21..166bc458f19007937b63e1e29a7b0b24cc94b55b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   UEFI HTTP boot driver's private data structure and interfaces declaration.\r
 \r
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials are licensed and made available under \r
 the terms and conditions of the BSD License that accompanies this distribution.  \r
@@ -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
@@ -35,6 +36,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/HttpLib.h>\r
 #include <Library/HiiLib.h>\r
 #include <Library/PrintLib.h>\r
+#include <Library/DpcLib.h>\r
 \r
 //\r
 // UEFI Driver Model Protocols\r
@@ -56,10 +58,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/Ip4Config2.h>\r
 #include <Protocol/Ip6Config.h>\r
 #include <Protocol/RamDisk.h>\r
+#include <Protocol/AdapterInformation.h>\r
+\r
 //\r
 // Produced Protocols\r
 //\r
 #include <Protocol/LoadFile.h>\r
+#include <Protocol/HttpBootCallback.h>\r
 \r
 //\r
 // Consumed Guids\r
@@ -72,10 +77,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #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
+// Standard Media Types defined in \r
+// http://www.iana.org/assignments/media-types\r
 //\r
 #define HTTP_CONTENT_TYPE_APP_EFI           "application/efi"\r
+#define HTTP_CONTENT_TYPE_APP_IMG           "application/vnd.efi-img"\r
+#define HTTP_CONTENT_TYPE_APP_ISO           "application/vnd.efi-iso"\r
 \r
 //\r
 // Protocol instances\r
@@ -129,6 +136,14 @@ struct _HTTP_BOOT_VIRTUAL_NIC {
   CallbackInfo, \\r
   HTTP_BOOT_PRIVATE_DATA_SIGNATURE \\r
   )\r
+  \r
+#define HTTP_BOOT_PRIVATE_DATA_FROM_CALLBACK_PROTOCOL(CallbackProtocol) \\r
+    CR ( \\r
+    CallbackProtocol, \\r
+    HTTP_BOOT_PRIVATE_DATA, \\r
+    LoadFileCallback, \\r
+    HTTP_BOOT_PRIVATE_DATA_SIGNATURE \\r
+    )\r
 \r
 struct _HTTP_BOOT_PRIVATE_DATA {\r
   UINT32                                    Signature;\r
@@ -164,6 +179,15 @@ struct _HTTP_BOOT_PRIVATE_DATA {
   EFI_LOAD_FILE_PROTOCOL                    LoadFile;\r
   EFI_DEVICE_PATH_PROTOCOL                  *DevicePath;\r
   UINT32                                    Id;\r
+  EFI_HTTP_BOOT_CALLBACK_PROTOCOL           *HttpBootCallback;\r
+  EFI_HTTP_BOOT_CALLBACK_PROTOCOL           LoadFileCallback;\r
+\r
+  //\r
+  // Data for the default HTTP Boot callback protocol\r
+  //\r
+  UINT64                                    FileSize;\r
+  UINT64                                    ReceivedSize;\r
+  UINT32                                    Percentage;\r
 \r
   //\r
   // HII callback info block\r
@@ -180,6 +204,8 @@ struct _HTTP_BOOT_PRIVATE_DATA {
   EFI_IP_ADDRESS                            GatewayIp;\r
   EFI_IP_ADDRESS                            ServerIp;\r
   UINT16                                    Port;\r
+  UINT32                                    DnsServerCount;\r
+  EFI_IP_ADDRESS                            *DnsServerIp;\r
 \r
   //\r
   // The URI string attempt to download through HTTP, may point to\r