diff options
author | Zhang Lubo <lubo.zhang@intel.com> | 2015-11-09 03:30:42 +0000 |
---|---|---|
committer | luobozhang <luobozhang@Edk2> | 2015-11-09 03:30:42 +0000 |
commit | b659408b933f40765960e877de3e1f8ceaab52cb (patch) | |
tree | 0a54cf99a62f599e230acdc7277fa3784fafa13f /NetworkPkg/HttpBootDxe/HttpBootSupport.h | |
parent | d1c275c651099c7f187885412b7751327b86ca38 (diff) | |
download | edk2-platforms-b659408b933f40765960e877de3e1f8ceaab52cb.tar.xz |
NetworkPkg:Enable Http Boot over Ipv6 stack
Add new features to support Http boot over ipv6 stack.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18743 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'NetworkPkg/HttpBootDxe/HttpBootSupport.h')
-rw-r--r-- | NetworkPkg/HttpBootDxe/HttpBootSupport.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/NetworkPkg/HttpBootDxe/HttpBootSupport.h b/NetworkPkg/HttpBootDxe/HttpBootSupport.h index bef80e81d8..d5956720a7 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootSupport.h +++ b/NetworkPkg/HttpBootDxe/HttpBootSupport.h @@ -30,6 +30,20 @@ HttpBootGetNicByIp4Children ( );
/**
+ Get the Nic handle using any child handle in the IPv6 stack.
+
+ @param[in] ControllerHandle Pointer to child handle over IPv6.
+
+ @return NicHandle The pointer to the Nic handle.
+ @return NULL Can't find the Nic handle.
+
+**/
+EFI_HANDLE
+HttpBootGetNicByIp6Children (
+ IN EFI_HANDLE ControllerHandle
+ );
+
+/**
This function is to convert UINTN to ASCII string with the required formatting.
@param[in] Number Numeric value to be converted.
@@ -56,6 +70,17 @@ HttpBootShowIp4Addr ( IN EFI_IPv4_ADDRESS *Ip
);
+/**
+ This function is to display the IPv6 address.
+
+ @param[in] Ip The pointer to the IPv6 address.
+
+**/
+VOID
+HttpBootShowIp6Addr (
+ IN EFI_IPv6_ADDRESS *Ip
+ );
+
//
// A wrapper structure to hold the HTTP headers.
//
@@ -123,10 +148,23 @@ typedef struct { } HTTP4_IO_CONFIG_DATA;
//
+// HTTP_IO configuration data for IPv6
+//
+typedef struct {
+ EFI_HTTP_VERSION HttpVersion;
+ UINT32 RequestTimeOut; // In milliseconds.
+ BOOLEAN UseDefaultAddress;
+ EFI_IPv6_ADDRESS LocalIp;
+ UINT16 LocalPort;
+} HTTP6_IO_CONFIG_DATA;
+
+
+//
// HTTP_IO configuration
//
typedef union {
HTTP4_IO_CONFIG_DATA Config4;
+ HTTP6_IO_CONFIG_DATA Config6;
} HTTP_IO_CONFIG_DATA;
//
@@ -161,6 +199,38 @@ typedef struct { } HTTP_IO_RESOPNSE_DATA;
/**
+ Retrieve the host address using the EFI_DNS6_PROTOCOL.
+
+ @param[in] Private The pointer to the driver's private data.
+ @param[in] HostName Pointer to buffer containing hostname.
+ @param[out] IpAddress On output, pointer to buffer containing IPv6 address.
+
+ @retval EFI_SUCCESS Operation succeeded.
+ @retval EFI_DEVICE_ERROR An unexpected network error occurred.
+ @retval Others Other errors as indicated.
+**/
+EFI_STATUS
+HttpBootDns (
+ IN HTTP_BOOT_PRIVATE_DATA *Private,
+ IN CHAR16 *HostName,
+ OUT EFI_IPv6_ADDRESS *IpAddress
+ );
+
+/**
+ Notify the callback function when an event is triggered.
+
+ @param[in] Event The triggered event.
+ @param[in] Context The opaque parameter to the function.
+
+**/
+VOID
+EFIAPI
+HttpBootCommonNotify (
+ IN EFI_EVENT Event,
+ IN VOID *Context
+ );
+
+/**
Create a HTTP_IO to access the HTTP service. It will create and configure
a HTTP child handle.
|