/** @file\r
Routines for HttpDxe driver to perform DNS resolution based on UEFI DNS protocols.\r
\r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
//\r
Status = NetLibCreateServiceChild (\r
Service->ControllerHandle,\r
- Service->ImageHandle,\r
+ Service->Ip4DriverBindingHandle,\r
&gEfiDns4ServiceBindingProtocolGuid,\r
&Dns4Handle\r
);\r
Dns4Handle,\r
&gEfiDns4ProtocolGuid,\r
(VOID **) &Dns4,\r
- Service->ImageHandle,\r
+ Service->Ip4DriverBindingHandle,\r
Service->ControllerHandle,\r
EFI_OPEN_PROTOCOL_BY_DRIVER\r
);\r
gBS->CloseProtocol (\r
Dns4Handle,\r
&gEfiDns4ProtocolGuid,\r
- Service->ImageHandle,\r
+ Service->Ip4DriverBindingHandle,\r
Service->ControllerHandle\r
);\r
}\r
if (Dns4Handle != NULL) {\r
NetLibDestroyServiceChild (\r
Service->ControllerHandle,\r
- Service->ImageHandle,\r
+ Service->Ip4DriverBindingHandle,\r
&gEfiDns4ServiceBindingProtocolGuid,\r
Dns4Handle\r
);\r
//\r
Status = NetLibCreateServiceChild (\r
Service->ControllerHandle,\r
- Service->ImageHandle,\r
+ Service->Ip6DriverBindingHandle,\r
&gEfiDns6ServiceBindingProtocolGuid,\r
&Dns6Handle\r
);\r
Dns6Handle,\r
&gEfiDns6ProtocolGuid,\r
(VOID **) &Dns6,\r
- Service->ImageHandle,\r
+ Service->Ip6DriverBindingHandle,\r
Service->ControllerHandle,\r
EFI_OPEN_PROTOCOL_BY_DRIVER\r
);\r
gBS->CloseProtocol (\r
Dns6Handle,\r
&gEfiDns6ProtocolGuid,\r
- Service->ImageHandle,\r
+ Service->Ip6DriverBindingHandle,\r
Service->ControllerHandle\r
);\r
}\r
if (Dns6Handle != NULL) {\r
NetLibDestroyServiceChild (\r
Service->ControllerHandle,\r
- Service->ImageHandle,\r
+ Service->Ip6DriverBindingHandle,\r
&gEfiDns6ServiceBindingProtocolGuid,\r
Dns6Handle\r
);\r
/** @file\r
The driver binding and service binding protocol for HttpDxe driver.\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
\r
This program and the accompanying materials\r
\r
@param[in] Controller The controller that has TCP4 service binding\r
installed.\r
- @param[in] ImageHandle The HTTP driver's image handle.\r
@param[out] ServiceData Point to HTTP driver private instance.\r
\r
@retval EFI_OUT_OF_RESOURCES Failed to allocate some resources.\r
EFI_STATUS\r
HttpCreateService (\r
IN EFI_HANDLE Controller,\r
- IN EFI_HANDLE ImageHandle,\r
OUT HTTP_SERVICE **ServiceData\r
)\r
{\r
HttpService->Signature = HTTP_SERVICE_SIGNATURE;\r
HttpService->ServiceBinding.CreateChild = HttpServiceBindingCreateChild;\r
HttpService->ServiceBinding.DestroyChild = HttpServiceBindingDestroyChild;\r
- HttpService->ImageHandle = ImageHandle;\r
HttpService->ControllerHandle = Controller;\r
HttpService->ChildrenNumber = 0;\r
InitializeListHead (&HttpService->ChildrenList);\r
gBS->CloseProtocol (\r
HttpService->Tcp4ChildHandle,\r
&gEfiTcp4ProtocolGuid,\r
- HttpService->ImageHandle,\r
+ HttpService->Ip4DriverBindingHandle,\r
HttpService->ControllerHandle\r
);\r
\r
NetLibDestroyServiceChild (\r
HttpService->ControllerHandle,\r
- HttpService->ImageHandle,\r
+ HttpService->Ip4DriverBindingHandle,\r
&gEfiTcp4ServiceBindingProtocolGuid,\r
HttpService->Tcp4ChildHandle\r
);\r
gBS->CloseProtocol (\r
HttpService->Tcp6ChildHandle,\r
&gEfiTcp6ProtocolGuid,\r
- HttpService->ImageHandle,\r
+ HttpService->Ip6DriverBindingHandle,\r
HttpService->ControllerHandle\r
);\r
\r
NetLibDestroyServiceChild (\r
HttpService->ControllerHandle,\r
- HttpService->ImageHandle,\r
+ HttpService->Ip6DriverBindingHandle,\r
&gEfiTcp6ServiceBindingProtocolGuid,\r
HttpService->Tcp6ChildHandle\r
);\r
if (!EFI_ERROR (Status)) {\r
HttpService = HTTP_SERVICE_FROM_PROTOCOL (ServiceBinding);\r
} else {\r
- Status = HttpCreateService (ControllerHandle, This->DriverBindingHandle, &HttpService);\r
+ Status = HttpCreateService (ControllerHandle, &HttpService);\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
}\r
\r
if (IpVersion == IP_VERSION_4) {\r
- \r
+ HttpService->Ip4DriverBindingHandle = This->DriverBindingHandle;\r
+\r
if (HttpService->Tcp4ChildHandle == NULL) {\r
//\r
// Create a TCP4 child instance, but do not configure it. This will establish the parent-child relationship.\r
\r
} else {\r
UsingIpv6 = TRUE;\r
- \r
+ HttpService->Ip6DriverBindingHandle = This->DriverBindingHandle;\r
+\r
if (HttpService->Tcp6ChildHandle == NULL) {\r
//\r
// Create a TCP6 child instance, but do not configure it. This will establish the parent-child relationship.\r
//\r
Status = NetLibCreateServiceChild (\r
HttpInstance->Service->ControllerHandle,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip4DriverBindingHandle,\r
&gEfiTcp4ServiceBindingProtocolGuid,\r
&HttpInstance->Tcp4ChildHandle\r
);\r
HttpInstance->Tcp4ChildHandle,\r
&gEfiTcp4ProtocolGuid,\r
(VOID **) &Interface,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip4DriverBindingHandle,\r
HttpInstance->Service->ControllerHandle,\r
EFI_OPEN_PROTOCOL_BY_DRIVER\r
);\r
HttpInstance->Tcp4ChildHandle,\r
&gEfiTcp4ProtocolGuid,\r
(VOID **) &HttpInstance->Tcp4,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip4DriverBindingHandle,\r
HttpInstance->Handle,\r
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER\r
);\r
HttpInstance->Service->Tcp4ChildHandle,\r
&gEfiTcp4ProtocolGuid,\r
(VOID **) &Interface,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip4DriverBindingHandle,\r
HttpInstance->Handle,\r
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER\r
);\r
//\r
Status = NetLibCreateServiceChild (\r
HttpInstance->Service->ControllerHandle,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip6DriverBindingHandle,\r
&gEfiTcp6ServiceBindingProtocolGuid,\r
&HttpInstance->Tcp6ChildHandle\r
);\r
HttpInstance->Tcp6ChildHandle,\r
&gEfiTcp6ProtocolGuid,\r
(VOID **) &Interface,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip6DriverBindingHandle,\r
HttpInstance->Service->ControllerHandle,\r
EFI_OPEN_PROTOCOL_BY_DRIVER\r
);\r
HttpInstance->Tcp6ChildHandle,\r
&gEfiTcp6ProtocolGuid,\r
(VOID **) &HttpInstance->Tcp6,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip6DriverBindingHandle,\r
HttpInstance->Handle,\r
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER\r
);\r
HttpInstance->Service->Tcp6ChildHandle,\r
&gEfiTcp6ProtocolGuid,\r
(VOID **) &Interface,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip6DriverBindingHandle,\r
HttpInstance->Handle,\r
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER\r
);\r
gBS->CloseProtocol (\r
HttpInstance->Tcp4ChildHandle,\r
&gEfiTcp4ProtocolGuid,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip4DriverBindingHandle,\r
HttpInstance->Service->ControllerHandle\r
);\r
\r
gBS->CloseProtocol (\r
HttpInstance->Tcp4ChildHandle,\r
&gEfiTcp4ProtocolGuid,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip4DriverBindingHandle,\r
HttpInstance->Handle\r
); \r
\r
NetLibDestroyServiceChild (\r
HttpInstance->Service->ControllerHandle,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip4DriverBindingHandle,\r
&gEfiTcp4ServiceBindingProtocolGuid,\r
HttpInstance->Tcp4ChildHandle\r
);\r
gBS->CloseProtocol (\r
HttpInstance->Service->Tcp4ChildHandle,\r
&gEfiTcp4ProtocolGuid,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip4DriverBindingHandle,\r
HttpInstance->Handle\r
);\r
}\r
gBS->CloseProtocol (\r
HttpInstance->Tcp6ChildHandle,\r
&gEfiTcp6ProtocolGuid,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip6DriverBindingHandle,\r
HttpInstance->Service->ControllerHandle\r
);\r
\r
gBS->CloseProtocol (\r
HttpInstance->Tcp6ChildHandle,\r
&gEfiTcp6ProtocolGuid,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip6DriverBindingHandle,\r
HttpInstance->Handle\r
);\r
\r
NetLibDestroyServiceChild (\r
HttpInstance->Service->ControllerHandle,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip6DriverBindingHandle,\r
&gEfiTcp6ServiceBindingProtocolGuid,\r
HttpInstance->Tcp6ChildHandle\r
);\r
gBS->CloseProtocol (\r
HttpInstance->Service->Tcp6ChildHandle,\r
&gEfiTcp6ProtocolGuid,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip6DriverBindingHandle,\r
HttpInstance->Handle\r
);\r
}\r
gBS->CloseProtocol (\r
HttpInstance->Tcp4ChildHandle,\r
&gEfiTcp4ProtocolGuid,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip4DriverBindingHandle,\r
HttpInstance->Service->ControllerHandle\r
);\r
\r
gBS->CloseProtocol (\r
HttpInstance->Tcp4ChildHandle,\r
&gEfiTcp4ProtocolGuid,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip4DriverBindingHandle,\r
HttpInstance->Handle\r
);\r
\r
NetLibDestroyServiceChild (\r
HttpInstance->Service->ControllerHandle,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip4DriverBindingHandle,\r
&gEfiTcp4ServiceBindingProtocolGuid,\r
HttpInstance->Tcp4ChildHandle\r
);\r
gBS->CloseProtocol (\r
HttpInstance->Service->Tcp4ChildHandle,\r
&gEfiTcp4ProtocolGuid,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip4DriverBindingHandle,\r
HttpInstance->Handle\r
);\r
} \r
gBS->CloseProtocol (\r
HttpInstance->Tcp6ChildHandle,\r
&gEfiTcp6ProtocolGuid,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip6DriverBindingHandle,\r
HttpInstance->Service->ControllerHandle\r
);\r
\r
gBS->CloseProtocol (\r
HttpInstance->Tcp6ChildHandle,\r
&gEfiTcp6ProtocolGuid,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip6DriverBindingHandle,\r
HttpInstance->Handle\r
);\r
\r
NetLibDestroyServiceChild (\r
HttpInstance->Service->ControllerHandle,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip6DriverBindingHandle,\r
&gEfiTcp6ServiceBindingProtocolGuid,\r
HttpInstance->Tcp6ChildHandle\r
);\r
gBS->CloseProtocol (\r
HttpInstance->Service->Tcp6ChildHandle,\r
&gEfiTcp6ProtocolGuid,\r
- HttpInstance->Service->ImageHandle,\r
+ HttpInstance->Service->Ip6DriverBindingHandle,\r
HttpInstance->Handle\r
);\r
}\r