NetworkPkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The implementation of construct ENTRY_INDEXER in IpSecConfig application.
|
The implementation of construct ENTRY_INDEXER in IpSecConfig application.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -50,7 +50,7 @@ ConstructSpdIndexer (
|
|||||||
if (ValueStr == NULL) {
|
if (ValueStr == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
Value64 = StrToUInteger (ValueStr, &Status);
|
Value64 = StrToUInteger (ValueStr, &Status);
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
Indexer->Index = (UINTN) Value64;
|
Indexer->Index = (UINTN) Value64;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
## @file
|
## @file
|
||||||
# Shell application IpSecConfig.
|
# Shell application IpSecConfig.
|
||||||
#
|
#
|
||||||
# This application is used to set and retrieve security and policy related information
|
# This application is used to set and retrieve security and policy related information
|
||||||
# for the EFI IPsec protocol driver.
|
# for the EFI IPsec protocol driver.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
// This application is used to set and retrieve security and policy related information
|
// This application is used to set and retrieve security and policy related information
|
||||||
// for the EFI IPsec protocol driver.
|
// for the EFI IPsec protocol driver.
|
||||||
//
|
//
|
||||||
// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
|
// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
//
|
//
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
// which accompanies this distribution. The full text of the license may be found at
|
// which accompanies this distribution. The full text of the license may be found at
|
||||||
// http://opensource.org/licenses/bsd-license.php.
|
// http://opensource.org/licenses/bsd-license.php.
|
||||||
//
|
//
|
||||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
//
|
//
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// /** @file
|
// /** @file
|
||||||
// IpSecConfig Localized Strings and Content
|
// IpSecConfig Localized Strings and Content
|
||||||
//
|
//
|
||||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
//
|
//
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -13,8 +13,8 @@
|
|||||||
//
|
//
|
||||||
// **/
|
// **/
|
||||||
|
|
||||||
#string STR_PROPERTIES_MODULE_NAME
|
#string STR_PROPERTIES_MODULE_NAME
|
||||||
#language en-US
|
#language en-US
|
||||||
"IpSec Config App"
|
"IpSec Config App"
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The internal structure and function declaration of
|
The internal structure and function declaration of
|
||||||
match policy entry function in IpSecConfig application.
|
match policy entry function in IpSecConfig application.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The implementation of policy entry operation function in IpSecConfig application.
|
The implementation of policy entry operation function in IpSecConfig application.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -1875,7 +1875,7 @@ EditOperatePolicyEntry (
|
|||||||
Selector
|
Selector
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
if (CreateNew) {
|
if (CreateNew) {
|
||||||
//
|
//
|
||||||
// Edit the entry to a new one. So, we need delete the old entry.
|
// Edit the entry to a new one. So, we need delete the old entry.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Shell application for VLAN configuration.
|
Shell application for VLAN configuration.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -618,7 +618,7 @@ VlanConfigMain (
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
mImageHandle = ImageHandle;
|
mImageHandle = ImageHandle;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Retrieve HII package list from ImageHandle
|
// Retrieve HII package list from ImageHandle
|
||||||
//
|
//
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
//
|
//
|
||||||
// It is shell application which is used to get and set VLAN configuration.
|
// It is shell application which is used to get and set VLAN configuration.
|
||||||
//
|
//
|
||||||
// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
|
// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
//
|
//
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
// which accompanies this distribution. The full text of the license may be found at
|
// which accompanies this distribution. The full text of the license may be found at
|
||||||
// http://opensource.org/licenses/bsd-license.php.
|
// http://opensource.org/licenses/bsd-license.php.
|
||||||
//
|
//
|
||||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
//
|
//
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// /** @file
|
// /** @file
|
||||||
// VConfig Localized Strings and Content
|
// VConfig Localized Strings and Content
|
||||||
//
|
//
|
||||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
//
|
//
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -13,8 +13,8 @@
|
|||||||
//
|
//
|
||||||
// **/
|
// **/
|
||||||
|
|
||||||
#string STR_PROPERTIES_MODULE_NAME
|
#string STR_PROPERTIES_MODULE_NAME
|
||||||
#language en-US
|
#language en-US
|
||||||
"Vlan Config App"
|
"Vlan Config App"
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
UEFI Component Name(2) protocol implementation for Dhcp6 driver.
|
UEFI Component Name(2) protocol implementation for Dhcp6 driver.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -247,10 +247,10 @@ Dhcp6ComponentNameGetDriverName (
|
|||||||
|
|
||||||
@param Dhcp6[in] A pointer to the EFI_DHCP6_PROTOCOL.
|
@param Dhcp6[in] A pointer to the EFI_DHCP6_PROTOCOL.
|
||||||
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
|
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
|
||||||
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
|
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
UpdateName (
|
UpdateName (
|
||||||
@ -272,12 +272,12 @@ UpdateName (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gDhcp6ControllerNameTable != NULL) {
|
if (gDhcp6ControllerNameTable != NULL) {
|
||||||
FreeUnicodeStringTable (gDhcp6ControllerNameTable);
|
FreeUnicodeStringTable (gDhcp6ControllerNameTable);
|
||||||
gDhcp6ControllerNameTable = NULL;
|
gDhcp6ControllerNameTable = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Dhcp6ModeData.Ia == NULL) {
|
if (Dhcp6ModeData.Ia == NULL) {
|
||||||
HandleName = L"DHCPv6 (No configured IA)";
|
HandleName = L"DHCPv6 (No configured IA)";
|
||||||
} else {
|
} else {
|
||||||
@ -304,7 +304,7 @@ UpdateName (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
return AddUnicodeString2 (
|
return AddUnicodeString2 (
|
||||||
"en",
|
"en",
|
||||||
gDhcp6ComponentName2.SupportedLanguages,
|
gDhcp6ComponentName2.SupportedLanguages,
|
||||||
@ -401,13 +401,13 @@ Dhcp6ComponentNameGetControllerName (
|
|||||||
if (ChildHandle == NULL) {
|
if (ChildHandle == NULL) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Make sure this driver produced ChildHandle
|
// Make sure this driver produced ChildHandle
|
||||||
//
|
//
|
||||||
Status = EfiTestChildHandle (
|
Status = EfiTestChildHandle (
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
ChildHandle,
|
ChildHandle,
|
||||||
&gEfiUdp6ProtocolGuid
|
&gEfiUdp6ProtocolGuid
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
@ -420,7 +420,7 @@ Dhcp6ComponentNameGetControllerName (
|
|||||||
Status = gBS->OpenProtocol (
|
Status = gBS->OpenProtocol (
|
||||||
ChildHandle,
|
ChildHandle,
|
||||||
&gEfiDhcp6ProtocolGuid,
|
&gEfiDhcp6ProtocolGuid,
|
||||||
(VOID **)&Dhcp6,
|
(VOID **)&Dhcp6,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Driver Binding functions and Service Binding functions
|
Driver Binding functions and Service Binding functions
|
||||||
implementationfor for Dhcp6 Driver.
|
implementationfor for Dhcp6 Driver.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -328,7 +328,7 @@ Dhcp6CreateInstance (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Callback function which provided by user to remove one node in NetDestroyLinkList process.
|
Callback function which provided by user to remove one node in NetDestroyLinkList process.
|
||||||
|
|
||||||
@param[in] Entry The entry to be removed.
|
@param[in] Entry The entry to be removed.
|
||||||
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
|
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
|
||||||
|
|
||||||
@ -352,7 +352,7 @@ Dhcp6DestroyChildEntry (
|
|||||||
|
|
||||||
Instance = NET_LIST_USER_STRUCT_S (Entry, DHCP6_INSTANCE, Link, DHCP6_INSTANCE_SIGNATURE);
|
Instance = NET_LIST_USER_STRUCT_S (Entry, DHCP6_INSTANCE, Link, DHCP6_INSTANCE_SIGNATURE);
|
||||||
ServiceBinding = (EFI_SERVICE_BINDING_PROTOCOL *) Context;
|
ServiceBinding = (EFI_SERVICE_BINDING_PROTOCOL *) Context;
|
||||||
|
|
||||||
return ServiceBinding->DestroyChild (ServiceBinding, Instance->Handle);
|
return ServiceBinding->DestroyChild (ServiceBinding, Instance->Handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -558,7 +558,7 @@ Dhcp6DriverBindingStop (
|
|||||||
if (!IsListEmpty (&Service->Child)) {
|
if (!IsListEmpty (&Service->Child)) {
|
||||||
//
|
//
|
||||||
// Destroy all the children instances before destory the service.
|
// Destroy all the children instances before destory the service.
|
||||||
//
|
//
|
||||||
List = &Service->Child;
|
List = &Service->Child;
|
||||||
Status = NetDestroyLinkList (
|
Status = NetDestroyLinkList (
|
||||||
List,
|
List,
|
||||||
@ -591,7 +591,7 @@ Dhcp6DriverBindingStop (
|
|||||||
Dhcp6DestroyService (Service);
|
Dhcp6DestroyService (Service);
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
ON_EXIT:
|
ON_EXIT:
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
## @file
|
## @file
|
||||||
# Client-side DHCPv6 services.
|
# Client-side DHCPv6 services.
|
||||||
#
|
#
|
||||||
# This driver produces EFI DHCPv6 Protocol which is used to get IPv6 addresses
|
# This driver produces EFI DHCPv6 Protocol which is used to get IPv6 addresses
|
||||||
# and other configuration parameters from DHCPv6 servers.
|
# and other configuration parameters from DHCPv6 servers.
|
||||||
#
|
#
|
||||||
# (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
# (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||||
# Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -74,9 +74,9 @@
|
|||||||
gEfiDhcp6ProtocolGuid ## BY_START
|
gEfiDhcp6ProtocolGuid ## BY_START
|
||||||
gEfiIp6ConfigProtocolGuid ## TO_START
|
gEfiIp6ConfigProtocolGuid ## TO_START
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gZeroGuid ## SOMETIMES_CONSUMES ## GUID
|
gZeroGuid ## SOMETIMES_CONSUMES ## GUID
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gEfiNetworkPkgTokenSpaceGuid.PcdDhcp6UidType ## SOMETIMES_CONSUMES
|
gEfiNetworkPkgTokenSpaceGuid.PcdDhcp6UidType ## SOMETIMES_CONSUMES
|
||||||
|
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
// This driver produces EFI DHCPv6 Protocol which is used to get IPv6 addresses
|
// This driver produces EFI DHCPv6 Protocol which is used to get IPv6 addresses
|
||||||
// and other configuration parameters from DHCPv6 servers.
|
// and other configuration parameters from DHCPv6 servers.
|
||||||
//
|
//
|
||||||
// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
|
// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
//
|
//
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
// which accompanies this distribution. The full text of the license may be found at
|
// which accompanies this distribution. The full text of the license may be found at
|
||||||
// http://opensource.org/licenses/bsd-license.php.
|
// http://opensource.org/licenses/bsd-license.php.
|
||||||
//
|
//
|
||||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
//
|
//
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// /** @file
|
// /** @file
|
||||||
// Dhcp6Dxe Localized Strings and Content
|
// Dhcp6Dxe Localized Strings and Content
|
||||||
//
|
//
|
||||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
//
|
//
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -13,8 +13,8 @@
|
|||||||
//
|
//
|
||||||
// **/
|
// **/
|
||||||
|
|
||||||
#string STR_PROPERTIES_MODULE_NAME
|
#string STR_PROPERTIES_MODULE_NAME
|
||||||
#language en-US
|
#language en-US
|
||||||
"DHCP6 DXE"
|
"DHCP6 DXE"
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
This EFI_DHCP6_PROTOCOL interface implementation.
|
This EFI_DHCP6_PROTOCOL interface implementation.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -237,7 +237,7 @@ EfiDhcp6Stop (
|
|||||||
}
|
}
|
||||||
Status = Instance->UdpSts;
|
Status = Instance->UdpSts;
|
||||||
}
|
}
|
||||||
|
|
||||||
ON_EXIT:
|
ON_EXIT:
|
||||||
//
|
//
|
||||||
// Clean up the session data for the released Ia.
|
// Clean up the session data for the released Ia.
|
||||||
@ -678,7 +678,7 @@ EfiDhcp6InfoRequest (
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
TimerStatus = gBS->CheckEvent (Timer);
|
TimerStatus = gBS->CheckEvent (Timer);
|
||||||
if (!EFI_ERROR (TimerStatus)) {
|
if (!EFI_ERROR (TimerStatus)) {
|
||||||
Status = Dhcp6StartInfoRequest (
|
Status = Dhcp6StartInfoRequest (
|
||||||
@ -694,7 +694,7 @@ EfiDhcp6InfoRequest (
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
} while (TimerStatus == EFI_NOT_READY);
|
} while (TimerStatus == EFI_NOT_READY);
|
||||||
|
|
||||||
gBS->CloseEvent (Timer);
|
gBS->CloseEvent (Timer);
|
||||||
}
|
}
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Dhcp6 internal data structure and definition declaration.
|
Dhcp6 internal data structure and definition declaration.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -132,7 +132,7 @@ struct _DHCP6_INSTANCE {
|
|||||||
BOOLEAN MediaPresent;
|
BOOLEAN MediaPresent;
|
||||||
//
|
//
|
||||||
// StartTime is used to calculate the 'elapsed-time' option. Refer to RFC3315,
|
// StartTime is used to calculate the 'elapsed-time' option. Refer to RFC3315,
|
||||||
// the elapsed-time is amount of time since the client began its current DHCP transaction.
|
// the elapsed-time is amount of time since the client began its current DHCP transaction.
|
||||||
//
|
//
|
||||||
UINT64 StartTime;
|
UINT64 StartTime;
|
||||||
};
|
};
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Dhcp6 internal functions implementation.
|
Dhcp6 internal functions implementation.
|
||||||
|
|
||||||
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||||
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -372,7 +372,7 @@ Dhcp6CleanupRetry (
|
|||||||
|
|
||||||
@retval TRUE The control block is in Instance's retry list.
|
@retval TRUE The control block is in Instance's retry list.
|
||||||
@retval FALSE The control block is NOT in Instance's retry list.
|
@retval FALSE The control block is NOT in Instance's retry list.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
Dhcp6IsValidTxCb (
|
Dhcp6IsValidTxCb (
|
||||||
@ -1767,12 +1767,12 @@ Dhcp6StartInfoRequest (
|
|||||||
if (EFI_ERROR (Status) && (Status != EFI_ALREADY_STARTED)) {
|
if (EFI_ERROR (Status) && (Status != EFI_ALREADY_STARTED)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
gBS->RestoreTPL (OldTpl);
|
gBS->RestoreTPL (OldTpl);
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
ON_ERROR:
|
ON_ERROR:
|
||||||
gBS->RestoreTPL (OldTpl);
|
gBS->RestoreTPL (OldTpl);
|
||||||
RemoveEntryList (&InfCb->Link);
|
RemoveEntryList (&InfCb->Link);
|
||||||
FreePool (InfCb);
|
FreePool (InfCb);
|
||||||
|
|
||||||
@ -1896,7 +1896,7 @@ Dhcp6SendInfoRequestMsg (
|
|||||||
//
|
//
|
||||||
Packet->Length += (UINT32) (Cursor - Packet->Dhcp6.Option);
|
Packet->Length += (UINT32) (Cursor - Packet->Dhcp6.Option);
|
||||||
ASSERT (Packet->Size > Packet->Length + 8);
|
ASSERT (Packet->Size > Packet->Length + 8);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Clear initial time for current transaction.
|
// Clear initial time for current transaction.
|
||||||
//
|
//
|
||||||
@ -2232,15 +2232,15 @@ Dhcp6HandleReplyMsg (
|
|||||||
}
|
}
|
||||||
} else if (Status == EFI_NOT_FOUND) {
|
} else if (Status == EFI_NOT_FOUND) {
|
||||||
//
|
//
|
||||||
// Refer to RFC3315 Chapter 18.1.8, for each IA in the original Renew or Rebind message,
|
// Refer to RFC3315 Chapter 18.1.8, for each IA in the original Renew or Rebind message,
|
||||||
// the client sends a Renew or Rebind if the IA is not in the Reply message.
|
// the client sends a Renew or Rebind if the IA is not in the Reply message.
|
||||||
// Return EFI_SUCCESS so we can continue to restart the Renew/Rebind process.
|
// Return EFI_SUCCESS so we can continue to restart the Renew/Rebind process.
|
||||||
//
|
//
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
|
|
||||||
} else if (Option != NULL) {
|
} else if (Option != NULL) {
|
||||||
//
|
//
|
||||||
// Any error status code option is found.
|
// Any error status code option is found.
|
||||||
@ -2289,7 +2289,7 @@ Dhcp6HandleReplyMsg (
|
|||||||
case Dhcp6StsNoBinding:
|
case Dhcp6StsNoBinding:
|
||||||
if (Instance->IaCb.Ia->State == Dhcp6Renewing || Instance->IaCb.Ia->State == Dhcp6Rebinding) {
|
if (Instance->IaCb.Ia->State == Dhcp6Renewing || Instance->IaCb.Ia->State == Dhcp6Rebinding) {
|
||||||
//
|
//
|
||||||
// Refer to RFC3315 Chapter 18.1.8, for each IA in the original Renew or Rebind message, the client
|
// Refer to RFC3315 Chapter 18.1.8, for each IA in the original Renew or Rebind message, the client
|
||||||
// sends a Request message if the IA contained a Status Code option with the NoBinding status.
|
// sends a Request message if the IA contained a Status Code option with the NoBinding status.
|
||||||
//
|
//
|
||||||
Status = Dhcp6SendRequestMsg(Instance);
|
Status = Dhcp6SendRequestMsg(Instance);
|
||||||
@ -2308,7 +2308,7 @@ Dhcp6HandleReplyMsg (
|
|||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
ON_EXIT:
|
ON_EXIT:
|
||||||
|
|
||||||
if (!EFI_ERROR(Status)) {
|
if (!EFI_ERROR(Status)) {
|
||||||
@ -2318,7 +2318,7 @@ ON_EXIT:
|
|||||||
FALSE
|
FALSE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Dhcp6 support functions implementation.
|
Dhcp6 support functions implementation.
|
||||||
|
|
||||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||||
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -68,7 +68,7 @@ Dhcp6GenerateClientId (
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
// The format of DUID-UUID:
|
// The format of DUID-UUID:
|
||||||
//
|
//
|
||||||
// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
||||||
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||||
// | DUID-Type (4) | UUID (128 bits) |
|
// | DUID-Type (4) | UUID (128 bits) |
|
||||||
@ -91,16 +91,16 @@ Dhcp6GenerateClientId (
|
|||||||
// sizeof (Duid-type + UUID-size) = 18 bytes
|
// sizeof (Duid-type + UUID-size) = 18 bytes
|
||||||
//
|
//
|
||||||
Duid->Length = (UINT16) (18);
|
Duid->Length = (UINT16) (18);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set the Duid-type and copy UUID.
|
// Set the Duid-type and copy UUID.
|
||||||
//
|
//
|
||||||
WriteUnaligned16 ((UINT16 *) (Duid->Duid), HTONS (Dhcp6DuidTypeUuid));
|
WriteUnaligned16 ((UINT16 *) (Duid->Duid), HTONS (Dhcp6DuidTypeUuid));
|
||||||
|
|
||||||
CopyMem (Duid->Duid + 2, &Uuid, sizeof(EFI_GUID));
|
CopyMem (Duid->Duid + 2, &Uuid, sizeof(EFI_GUID));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// The format of DUID-LLT:
|
// The format of DUID-LLT:
|
||||||
@ -135,12 +135,12 @@ Dhcp6GenerateClientId (
|
|||||||
if (Duid == NULL) {
|
if (Duid == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// sizeof (Duid-type + hardware-type + time) = 8 bytes
|
// sizeof (Duid-type + hardware-type + time) = 8 bytes
|
||||||
//
|
//
|
||||||
Duid->Length = (UINT16) (Mode->HwAddressSize + 8);
|
Duid->Length = (UINT16) (Mode->HwAddressSize + 8);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set the Duid-type, hardware-type, time and copy the hardware address.
|
// Set the Duid-type, hardware-type, time and copy the hardware address.
|
||||||
//
|
//
|
||||||
@ -687,7 +687,7 @@ Dhcp6AppendIaAddrOption (
|
|||||||
// . IAaddr-options .
|
// . IAaddr-options .
|
||||||
// . .
|
// . .
|
||||||
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||||
|
|
||||||
//
|
//
|
||||||
// Fill the value of Ia Address option type
|
// Fill the value of Ia Address option type
|
||||||
//
|
//
|
||||||
@ -1000,7 +1000,7 @@ Dhcp6SeekIaOption (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Check whether the incoming IPv6 address in IaAddr is one of the maintained
|
Check whether the incoming IPv6 address in IaAddr is one of the maintained
|
||||||
addresses in the IA control blcok.
|
addresses in the IA control blcok.
|
||||||
|
|
||||||
@param[in] IaAddr The pointer to the IA Address to be checked.
|
@param[in] IaAddr The pointer to the IA Address to be checked.
|
||||||
@ -1019,7 +1019,7 @@ Dhcp6AddrIsInCurrentIa (
|
|||||||
UINT32 Index;
|
UINT32 Index;
|
||||||
|
|
||||||
ASSERT (IaAddr != NULL && CurrentIa != NULL);
|
ASSERT (IaAddr != NULL && CurrentIa != NULL);
|
||||||
|
|
||||||
for (Index = 0; Index < CurrentIa->IaAddressCount; Index++) {
|
for (Index = 0; Index < CurrentIa->IaAddressCount; Index++) {
|
||||||
if (EFI_IP6_EQUAL(&IaAddr->IpAddress, &CurrentIa->IaAddress[Index].IpAddress)) {
|
if (EFI_IP6_EQUAL(&IaAddr->IpAddress, &CurrentIa->IaAddress[Index].IpAddress)) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1303,7 +1303,7 @@ EFI_STATUS
|
|||||||
Dhcp6GetMappingTimeOut (
|
Dhcp6GetMappingTimeOut (
|
||||||
IN EFI_IP6_CONFIG_PROTOCOL *Ip6Cfg,
|
IN EFI_IP6_CONFIG_PROTOCOL *Ip6Cfg,
|
||||||
OUT UINTN *TimeOut
|
OUT UINTN *TimeOut
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UINTN DataSize;
|
UINTN DataSize;
|
||||||
@ -1323,8 +1323,8 @@ Dhcp6GetMappingTimeOut (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
*TimeOut = TICKS_PER_SECOND * DadXmits.DupAddrDetectTransmits + DHCP6_DAD_ADDITIONAL_DELAY;
|
*TimeOut = TICKS_PER_SECOND * DadXmits.DupAddrDetectTransmits + DHCP6_DAD_ADDITIONAL_DELAY;
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Implementation of EFI_COMPONENT_NAME_PROTOCOL and EFI_COMPONENT_NAME2_PROTOCOL protocol.
|
Implementation of EFI_COMPONENT_NAME_PROTOCOL and EFI_COMPONENT_NAME2_PROTOCOL protocol.
|
||||||
|
|
||||||
Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -101,7 +101,7 @@ DnsComponentNameGetControllerName (
|
|||||||
///
|
///
|
||||||
/// Component Name Protocol instance
|
/// Component Name Protocol instance
|
||||||
///
|
///
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED
|
GLOBAL_REMOVE_IF_UNREFERENCED
|
||||||
EFI_COMPONENT_NAME_PROTOCOL gDnsComponentName = {
|
EFI_COMPONENT_NAME_PROTOCOL gDnsComponentName = {
|
||||||
DnsComponentNameGetDriverName,
|
DnsComponentNameGetDriverName,
|
||||||
DnsComponentNameGetControllerName,
|
DnsComponentNameGetControllerName,
|
||||||
@ -111,7 +111,7 @@ EFI_COMPONENT_NAME_PROTOCOL gDnsComponentName = {
|
|||||||
///
|
///
|
||||||
/// Component Name 2 Protocol instance
|
/// Component Name 2 Protocol instance
|
||||||
///
|
///
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED
|
GLOBAL_REMOVE_IF_UNREFERENCED
|
||||||
EFI_COMPONENT_NAME2_PROTOCOL gDnsComponentName2 = {
|
EFI_COMPONENT_NAME2_PROTOCOL gDnsComponentName2 = {
|
||||||
(EFI_COMPONENT_NAME2_GET_DRIVER_NAME) DnsComponentNameGetDriverName,
|
(EFI_COMPONENT_NAME2_GET_DRIVER_NAME) DnsComponentNameGetDriverName,
|
||||||
(EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) DnsComponentNameGetControllerName,
|
(EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) DnsComponentNameGetControllerName,
|
||||||
@ -121,7 +121,7 @@ EFI_COMPONENT_NAME2_PROTOCOL gDnsComponentName2 = {
|
|||||||
///
|
///
|
||||||
/// Table of driver names
|
/// Table of driver names
|
||||||
///
|
///
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED
|
GLOBAL_REMOVE_IF_UNREFERENCED
|
||||||
EFI_UNICODE_STRING_TABLE mDnsDriverNameTable[] = {
|
EFI_UNICODE_STRING_TABLE mDnsDriverNameTable[] = {
|
||||||
{ "eng;en", (CHAR16 *)L"DNS Network Service Driver" },
|
{ "eng;en", (CHAR16 *)L"DNS Network Service Driver" },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
@ -173,10 +173,10 @@ DnsComponentNameGetDriverName (
|
|||||||
|
|
||||||
@param Dns4 A pointer to the EFI_DNS4_PROTOCOL.
|
@param Dns4 A pointer to the EFI_DNS4_PROTOCOL.
|
||||||
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
|
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
|
||||||
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
|
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
UpdateDns4Name (
|
UpdateDns4Name (
|
||||||
@ -190,7 +190,7 @@ UpdateDns4Name (
|
|||||||
if (Dns4 == NULL) {
|
if (Dns4 == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Format the child name into the string buffer as:
|
// Format the child name into the string buffer as:
|
||||||
// DNSv4 (StationIp=?, LocalPort=?)
|
// DNSv4 (StationIp=?, LocalPort=?)
|
||||||
@ -199,7 +199,7 @@ UpdateDns4Name (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
UnicodeSPrint (
|
UnicodeSPrint (
|
||||||
HandleName,
|
HandleName,
|
||||||
sizeof (HandleName),
|
sizeof (HandleName),
|
||||||
@ -222,7 +222,7 @@ UpdateDns4Name (
|
|||||||
FreeUnicodeStringTable (gDnsControllerNameTable);
|
FreeUnicodeStringTable (gDnsControllerNameTable);
|
||||||
gDnsControllerNameTable = NULL;
|
gDnsControllerNameTable = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = AddUnicodeString2 (
|
Status = AddUnicodeString2 (
|
||||||
"eng",
|
"eng",
|
||||||
gDnsComponentName.SupportedLanguages,
|
gDnsComponentName.SupportedLanguages,
|
||||||
@ -233,7 +233,7 @@ UpdateDns4Name (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
return AddUnicodeString2 (
|
return AddUnicodeString2 (
|
||||||
"en",
|
"en",
|
||||||
gDnsComponentName2.SupportedLanguages,
|
gDnsComponentName2.SupportedLanguages,
|
||||||
@ -248,10 +248,10 @@ UpdateDns4Name (
|
|||||||
|
|
||||||
@param Dns6 A pointer to the EFI_DNS6_PROTOCOL.
|
@param Dns6 A pointer to the EFI_DNS6_PROTOCOL.
|
||||||
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
|
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
|
||||||
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
|
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
UpdateDns6Name (
|
UpdateDns6Name (
|
||||||
@ -266,7 +266,7 @@ UpdateDns6Name (
|
|||||||
if (Dns6 == NULL) {
|
if (Dns6 == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Format the child name into the string buffer as:
|
// Format the child name into the string buffer as:
|
||||||
// DNSv6 (StationIp=?, LocalPort=?)
|
// DNSv6 (StationIp=?, LocalPort=?)
|
||||||
@ -282,7 +282,7 @@ UpdateDns6Name (
|
|||||||
}
|
}
|
||||||
UnicodeSPrint (
|
UnicodeSPrint (
|
||||||
HandleName,
|
HandleName,
|
||||||
sizeof (HandleName),
|
sizeof (HandleName),
|
||||||
L"DNSv6 (StationIp=%s, LocalPort=%d)",
|
L"DNSv6 (StationIp=%s, LocalPort=%d)",
|
||||||
Address,
|
Address,
|
||||||
ModeData.DnsConfigData.LocalPort
|
ModeData.DnsConfigData.LocalPort
|
||||||
@ -299,7 +299,7 @@ UpdateDns6Name (
|
|||||||
FreeUnicodeStringTable (gDnsControllerNameTable);
|
FreeUnicodeStringTable (gDnsControllerNameTable);
|
||||||
gDnsControllerNameTable = NULL;
|
gDnsControllerNameTable = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = AddUnicodeString2 (
|
Status = AddUnicodeString2 (
|
||||||
"eng",
|
"eng",
|
||||||
gDnsComponentName.SupportedLanguages,
|
gDnsComponentName.SupportedLanguages,
|
||||||
@ -310,7 +310,7 @@ UpdateDns6Name (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
return AddUnicodeString2 (
|
return AddUnicodeString2 (
|
||||||
"en",
|
"en",
|
||||||
gDnsComponentName2.SupportedLanguages,
|
gDnsComponentName2.SupportedLanguages,
|
||||||
@ -373,7 +373,7 @@ DnsComponentNameGetControllerName (
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_DNS4_PROTOCOL *Dns4;
|
EFI_DNS4_PROTOCOL *Dns4;
|
||||||
EFI_DNS6_PROTOCOL *Dns6;
|
EFI_DNS6_PROTOCOL *Dns6;
|
||||||
|
|
||||||
//
|
//
|
||||||
// ChildHandle must be NULL for a Device Driver
|
// ChildHandle must be NULL for a Device Driver
|
||||||
//
|
//
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Functions implementation related with DHCPv4/v6 for DNS driver.
|
Functions implementation related with DHCPv4/v6 for DNS driver.
|
||||||
|
|
||||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -48,7 +48,7 @@ DnsInitSeedPacket (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The common notify function.
|
The common notify function.
|
||||||
|
|
||||||
@param[in] Event The event signaled.
|
@param[in] Event The event signaled.
|
||||||
@param[in] Context The context.
|
@param[in] Context The context.
|
||||||
@ -149,16 +149,16 @@ ParseDhcp4Ack (
|
|||||||
}
|
}
|
||||||
|
|
||||||
gBS->FreePool (OptionList);
|
gBS->FreePool (OptionList);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
EFI_DHCP6_INFO_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol
|
EFI_DHCP6_INFO_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol
|
||||||
instance to intercept events that occurs in the DHCPv6 Information Request
|
instance to intercept events that occurs in the DHCPv6 Information Request
|
||||||
exchange process.
|
exchange process.
|
||||||
|
|
||||||
@param This Pointer to the EFI_DHCP6_PROTOCOL instance that
|
@param This Pointer to the EFI_DHCP6_PROTOCOL instance that
|
||||||
is used to configure this callback function.
|
is used to configure this callback function.
|
||||||
@param Context Pointer to the context that is initialized in
|
@param Context Pointer to the context that is initialized in
|
||||||
the EFI_DHCP6_PROTOCOL.InfoRequest().
|
the EFI_DHCP6_PROTOCOL.InfoRequest().
|
||||||
@ -186,11 +186,11 @@ ParseDhcp6Ack (
|
|||||||
EFI_IPv6_ADDRESS *ServerList;
|
EFI_IPv6_ADDRESS *ServerList;
|
||||||
UINT32 Index;
|
UINT32 Index;
|
||||||
UINT32 Count;
|
UINT32 Count;
|
||||||
|
|
||||||
OptionCount = 0;
|
OptionCount = 0;
|
||||||
ServerCount = 0;
|
ServerCount = 0;
|
||||||
ServerList = NULL;
|
ServerList = NULL;
|
||||||
|
|
||||||
Status = This->Parse (This, Packet, &OptionCount, NULL);
|
Status = This->Parse (This, Packet, &OptionCount, NULL);
|
||||||
if (Status != EFI_BUFFER_TOO_SMALL) {
|
if (Status != EFI_BUFFER_TOO_SMALL) {
|
||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
@ -206,7 +206,7 @@ ParseDhcp6Ack (
|
|||||||
gBS->FreePool (OptionList);
|
gBS->FreePool (OptionList);
|
||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
DnsServerInfor = (DNS6_SERVER_INFOR *) Context;
|
DnsServerInfor = (DNS6_SERVER_INFOR *) Context;
|
||||||
|
|
||||||
for (Index = 0; Index < OptionCount; Index++) {
|
for (Index = 0; Index < OptionCount; Index++) {
|
||||||
@ -223,7 +223,7 @@ ParseDhcp6Ack (
|
|||||||
gBS->FreePool (OptionList);
|
gBS->FreePool (OptionList);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
ServerCount = OptionList[Index]->OpLen/16;
|
ServerCount = OptionList[Index]->OpLen/16;
|
||||||
ServerList = AllocatePool (ServerCount * sizeof (EFI_IPv6_ADDRESS));
|
ServerList = AllocatePool (ServerCount * sizeof (EFI_IPv6_ADDRESS));
|
||||||
if (ServerList == NULL) {
|
if (ServerList == NULL) {
|
||||||
@ -241,7 +241,7 @@ ParseDhcp6Ack (
|
|||||||
}
|
}
|
||||||
|
|
||||||
gBS->FreePool (OptionList);
|
gBS->FreePool (OptionList);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -270,10 +270,10 @@ GetDns4ServerFromDhcp4 (
|
|||||||
EFI_HANDLE Image;
|
EFI_HANDLE Image;
|
||||||
EFI_HANDLE Controller;
|
EFI_HANDLE Controller;
|
||||||
EFI_STATUS MediaStatus;
|
EFI_STATUS MediaStatus;
|
||||||
EFI_HANDLE MnpChildHandle;
|
EFI_HANDLE MnpChildHandle;
|
||||||
EFI_MANAGED_NETWORK_PROTOCOL *Mnp;
|
EFI_MANAGED_NETWORK_PROTOCOL *Mnp;
|
||||||
EFI_MANAGED_NETWORK_CONFIG_DATA MnpConfigData;
|
EFI_MANAGED_NETWORK_CONFIG_DATA MnpConfigData;
|
||||||
EFI_HANDLE Dhcp4Handle;
|
EFI_HANDLE Dhcp4Handle;
|
||||||
EFI_DHCP4_PROTOCOL *Dhcp4;
|
EFI_DHCP4_PROTOCOL *Dhcp4;
|
||||||
EFI_IP4_CONFIG2_PROTOCOL *Ip4Config2;
|
EFI_IP4_CONFIG2_PROTOCOL *Ip4Config2;
|
||||||
UINTN DataSize;
|
UINTN DataSize;
|
||||||
@ -286,13 +286,13 @@ GetDns4ServerFromDhcp4 (
|
|||||||
EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN Token;
|
EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN Token;
|
||||||
BOOLEAN IsDone;
|
BOOLEAN IsDone;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
|
|
||||||
Image = Instance->Service->ImageHandle;
|
Image = Instance->Service->ImageHandle;
|
||||||
Controller = Instance->Service->ControllerHandle;
|
Controller = Instance->Service->ControllerHandle;
|
||||||
|
|
||||||
MnpChildHandle = NULL;
|
MnpChildHandle = NULL;
|
||||||
Mnp = NULL;
|
Mnp = NULL;
|
||||||
|
|
||||||
Dhcp4Handle = NULL;
|
Dhcp4Handle = NULL;
|
||||||
Dhcp4 = NULL;
|
Dhcp4 = NULL;
|
||||||
|
|
||||||
@ -304,11 +304,11 @@ GetDns4ServerFromDhcp4 (
|
|||||||
ZeroMem ((UINT8 *) ParaList, sizeof (ParaList));
|
ZeroMem ((UINT8 *) ParaList, sizeof (ParaList));
|
||||||
|
|
||||||
ZeroMem (&MnpConfigData, sizeof (EFI_MANAGED_NETWORK_CONFIG_DATA));
|
ZeroMem (&MnpConfigData, sizeof (EFI_MANAGED_NETWORK_CONFIG_DATA));
|
||||||
|
|
||||||
ZeroMem (&DnsServerInfor, sizeof (DNS4_SERVER_INFOR));
|
ZeroMem (&DnsServerInfor, sizeof (DNS4_SERVER_INFOR));
|
||||||
|
|
||||||
ZeroMem (&Token, sizeof (EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN));
|
ZeroMem (&Token, sizeof (EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN));
|
||||||
|
|
||||||
DnsServerInfor.ServerCount = DnsServerCount;
|
DnsServerInfor.ServerCount = DnsServerCount;
|
||||||
|
|
||||||
IsDone = FALSE;
|
IsDone = FALSE;
|
||||||
@ -346,7 +346,7 @@ GetDns4ServerFromDhcp4 (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
MnpConfigData.ReceivedQueueTimeoutValue = 0;
|
MnpConfigData.ReceivedQueueTimeoutValue = 0;
|
||||||
MnpConfigData.TransmitQueueTimeoutValue = 0;
|
MnpConfigData.TransmitQueueTimeoutValue = 0;
|
||||||
MnpConfigData.ProtocolTypeFilter = IP4_ETHER_PROTO;
|
MnpConfigData.ProtocolTypeFilter = IP4_ETHER_PROTO;
|
||||||
@ -362,7 +362,7 @@ GetDns4ServerFromDhcp4 (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create a DHCP4 child instance and get the protocol.
|
// Create a DHCP4 child instance and get the protocol.
|
||||||
//
|
//
|
||||||
@ -395,7 +395,7 @@ GetDns4ServerFromDhcp4 (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = Ip4Config2->GetData (Ip4Config2, Ip4Config2DataTypeInterfaceInfo, &DataSize, Data);
|
Status = Ip4Config2->GetData (Ip4Config2, Ip4Config2DataTypeInterfaceInfo, &DataSize, Data);
|
||||||
if (EFI_ERROR (Status) && Status != EFI_BUFFER_TOO_SMALL) {
|
if (EFI_ERROR (Status) && Status != EFI_BUFFER_TOO_SMALL) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
@ -413,7 +413,7 @@ GetDns4ServerFromDhcp4 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
InterfaceInfo = (EFI_IP4_CONFIG2_INTERFACE_INFO *)Data;
|
InterfaceInfo = (EFI_IP4_CONFIG2_INTERFACE_INFO *)Data;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Build required Token.
|
// Build required Token.
|
||||||
//
|
//
|
||||||
@ -427,13 +427,13 @@ GetDns4ServerFromDhcp4 (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetMem (&Token.RemoteAddress, sizeof (EFI_IPv4_ADDRESS), 0xff);
|
SetMem (&Token.RemoteAddress, sizeof (EFI_IPv4_ADDRESS), 0xff);
|
||||||
|
|
||||||
Token.RemotePort = 67;
|
Token.RemotePort = 67;
|
||||||
|
|
||||||
Token.ListenPointCount = 1;
|
Token.ListenPointCount = 1;
|
||||||
|
|
||||||
Token.ListenPoints = AllocateZeroPool (Token.ListenPointCount * sizeof (EFI_DHCP4_LISTEN_POINT));
|
Token.ListenPoints = AllocateZeroPool (Token.ListenPointCount * sizeof (EFI_DHCP4_LISTEN_POINT));
|
||||||
if (Token.ListenPoints == NULL) {
|
if (Token.ListenPoints == NULL) {
|
||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
@ -447,9 +447,9 @@ GetDns4ServerFromDhcp4 (
|
|||||||
CopyMem (&(Token.ListenPoints[0].ListenAddress), &(Instance->Dns4CfgData.StationIp), sizeof (EFI_IPv4_ADDRESS));
|
CopyMem (&(Token.ListenPoints[0].ListenAddress), &(Instance->Dns4CfgData.StationIp), sizeof (EFI_IPv4_ADDRESS));
|
||||||
CopyMem (&(Token.ListenPoints[0].SubnetMask), &(Instance->Dns4CfgData.SubnetMask), sizeof (EFI_IPv4_ADDRESS));
|
CopyMem (&(Token.ListenPoints[0].SubnetMask), &(Instance->Dns4CfgData.SubnetMask), sizeof (EFI_IPv4_ADDRESS));
|
||||||
}
|
}
|
||||||
|
|
||||||
Token.ListenPoints[0].ListenPort = 68;
|
Token.ListenPoints[0].ListenPort = 68;
|
||||||
|
|
||||||
Token.TimeoutValue = DNS_TIME_TO_GETMAP;
|
Token.TimeoutValue = DNS_TIME_TO_GETMAP;
|
||||||
|
|
||||||
DnsInitSeedPacket (&SeedPacket, InterfaceInfo);
|
DnsInitSeedPacket (&SeedPacket, InterfaceInfo);
|
||||||
@ -459,35 +459,35 @@ GetDns4ServerFromDhcp4 (
|
|||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
ParaList[0]->OpCode = DHCP4_TAG_TYPE;
|
ParaList[0]->OpCode = DHCP4_TAG_TYPE;
|
||||||
ParaList[0]->Length = 1;
|
ParaList[0]->Length = 1;
|
||||||
ParaList[0]->Data[0] = DHCP4_MSG_REQUEST;
|
ParaList[0]->Data[0] = DHCP4_MSG_REQUEST;
|
||||||
|
|
||||||
ParaList[1] = AllocateZeroPool (sizeof (EFI_DHCP4_PACKET_OPTION));
|
ParaList[1] = AllocateZeroPool (sizeof (EFI_DHCP4_PACKET_OPTION));
|
||||||
if (ParaList[1] == NULL) {
|
if (ParaList[1] == NULL) {
|
||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
ParaList[1]->OpCode = DHCP4_TAG_PARA_LIST;
|
ParaList[1]->OpCode = DHCP4_TAG_PARA_LIST;
|
||||||
ParaList[1]->Length = 1;
|
ParaList[1]->Length = 1;
|
||||||
ParaList[1]->Data[0] = DHCP4_TAG_DNS_SERVER;
|
ParaList[1]->Data[0] = DHCP4_TAG_DNS_SERVER;
|
||||||
|
|
||||||
Status = Dhcp4->Build (Dhcp4, &SeedPacket, 0, NULL, 2, ParaList, &Token.Packet);
|
Status = Dhcp4->Build (Dhcp4, &SeedPacket, 0, NULL, 2, ParaList, &Token.Packet);
|
||||||
|
|
||||||
Token.Packet->Dhcp4.Header.Xid = HTONL(NET_RANDOM (NetRandomInitSeed ()));
|
Token.Packet->Dhcp4.Header.Xid = HTONL(NET_RANDOM (NetRandomInitSeed ()));
|
||||||
|
|
||||||
Token.Packet->Dhcp4.Header.Reserved = HTONS ((UINT16)0x8000);
|
Token.Packet->Dhcp4.Header.Reserved = HTONS ((UINT16)0x8000);
|
||||||
|
|
||||||
if (Instance->Dns4CfgData.UseDefaultSetting) {
|
if (Instance->Dns4CfgData.UseDefaultSetting) {
|
||||||
CopyMem (&(Token.Packet->Dhcp4.Header.ClientAddr), &(InterfaceInfo->StationAddress), sizeof (EFI_IPv4_ADDRESS));
|
CopyMem (&(Token.Packet->Dhcp4.Header.ClientAddr), &(InterfaceInfo->StationAddress), sizeof (EFI_IPv4_ADDRESS));
|
||||||
} else {
|
} else {
|
||||||
CopyMem (&(Token.Packet->Dhcp4.Header.ClientAddr), &(Instance->Dns4CfgData.StationIp), sizeof (EFI_IPv4_ADDRESS));
|
CopyMem (&(Token.Packet->Dhcp4.Header.ClientAddr), &(Instance->Dns4CfgData.StationIp), sizeof (EFI_IPv4_ADDRESS));
|
||||||
}
|
}
|
||||||
|
|
||||||
CopyMem (Token.Packet->Dhcp4.Header.ClientHwAddr, &(InterfaceInfo->HwAddress), InterfaceInfo->HwAddressSize);
|
CopyMem (Token.Packet->Dhcp4.Header.ClientHwAddr, &(InterfaceInfo->HwAddress), InterfaceInfo->HwAddressSize);
|
||||||
|
|
||||||
Token.Packet->Dhcp4.Header.HwAddrLen = (UINT8)(InterfaceInfo->HwAddressSize);
|
Token.Packet->Dhcp4.Header.HwAddrLen = (UINT8)(InterfaceInfo->HwAddressSize);
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -504,7 +504,7 @@ GetDns4ServerFromDhcp4 (
|
|||||||
do {
|
do {
|
||||||
Status = Mnp->Poll (Mnp);
|
Status = Mnp->Poll (Mnp);
|
||||||
} while (!IsDone);
|
} while (!IsDone);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Parse the ACK to get required information if received done.
|
// Parse the ACK to get required information if received done.
|
||||||
//
|
//
|
||||||
@ -520,7 +520,7 @@ GetDns4ServerFromDhcp4 (
|
|||||||
} else {
|
} else {
|
||||||
Status = Token.Status;
|
Status = Token.Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
ON_EXIT:
|
ON_EXIT:
|
||||||
|
|
||||||
if (Data != NULL) {
|
if (Data != NULL) {
|
||||||
@ -540,15 +540,15 @@ ON_EXIT:
|
|||||||
if (Token.Packet) {
|
if (Token.Packet) {
|
||||||
FreePool (Token.Packet);
|
FreePool (Token.Packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Token.ResponseList != NULL) {
|
if (Token.ResponseList != NULL) {
|
||||||
FreePool (Token.ResponseList);
|
FreePool (Token.ResponseList);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Token.CompletionEvent != NULL) {
|
if (Token.CompletionEvent != NULL) {
|
||||||
gBS->CloseEvent (Token.CompletionEvent);
|
gBS->CloseEvent (Token.CompletionEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Dhcp4 != NULL) {
|
if (Dhcp4 != NULL) {
|
||||||
Dhcp4->Stop (Dhcp4);
|
Dhcp4->Stop (Dhcp4);
|
||||||
Dhcp4->Configure (Dhcp4, NULL);
|
Dhcp4->Configure (Dhcp4, NULL);
|
||||||
@ -560,7 +560,7 @@ ON_EXIT:
|
|||||||
Controller
|
Controller
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Dhcp4Handle != NULL) {
|
if (Dhcp4Handle != NULL) {
|
||||||
NetLibDestroyServiceChild (
|
NetLibDestroyServiceChild (
|
||||||
Controller,
|
Controller,
|
||||||
@ -580,14 +580,14 @@ ON_EXIT:
|
|||||||
Controller
|
Controller
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
NetLibDestroyServiceChild (
|
NetLibDestroyServiceChild (
|
||||||
Controller,
|
Controller,
|
||||||
Image,
|
Image,
|
||||||
&gEfiManagedNetworkServiceBindingProtocolGuid,
|
&gEfiManagedNetworkServiceBindingProtocolGuid,
|
||||||
MnpChildHandle
|
MnpChildHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -729,14 +729,14 @@ GetDns6ServerFromDhcp6 (
|
|||||||
}
|
}
|
||||||
} while (TimerStatus == EFI_NOT_READY);
|
} while (TimerStatus == EFI_NOT_READY);
|
||||||
}
|
}
|
||||||
|
|
||||||
*DnsServerList = DnsServerInfor.ServerList;
|
*DnsServerList = DnsServerInfor.ServerList;
|
||||||
|
|
||||||
ON_EXIT:
|
ON_EXIT:
|
||||||
|
|
||||||
if (Oro != NULL) {
|
if (Oro != NULL) {
|
||||||
FreePool (Oro);
|
FreePool (Oro);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Timer != NULL) {
|
if (Timer != NULL) {
|
||||||
gBS->CloseEvent (Timer);
|
gBS->CloseEvent (Timer);
|
||||||
@ -759,6 +759,6 @@ ON_EXIT:
|
|||||||
);
|
);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Functions implementation related with DHCPv4/v6 for DNS driver.
|
Functions implementation related with DHCPv4/v6 for DNS driver.
|
||||||
|
|
||||||
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -78,11 +78,11 @@ ParseDhcp4Ack (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
EFI_DHCP6_INFO_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol
|
EFI_DHCP6_INFO_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol
|
||||||
instance to intercept events that occurs in the DHCPv6 Information Request
|
instance to intercept events that occurs in the DHCPv6 Information Request
|
||||||
exchange process.
|
exchange process.
|
||||||
|
|
||||||
@param This Pointer to the EFI_DHCP6_PROTOCOL instance that
|
@param This Pointer to the EFI_DHCP6_PROTOCOL instance that
|
||||||
is used to configure this callback function.
|
is used to configure this callback function.
|
||||||
@param Context Pointer to the context that is initialized in
|
@param Context Pointer to the context that is initialized in
|
||||||
the EFI_DHCP6_PROTOCOL.InfoRequest().
|
the EFI_DHCP6_PROTOCOL.InfoRequest().
|
||||||
@ -143,5 +143,5 @@ GetDns6ServerFromDhcp6 (
|
|||||||
OUT UINT32 *DnsServerCount,
|
OUT UINT32 *DnsServerCount,
|
||||||
OUT EFI_IPv6_ADDRESS **DnsServerList
|
OUT EFI_IPv6_ADDRESS **DnsServerList
|
||||||
);
|
);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The driver binding and service binding protocol for DnsDxe driver.
|
The driver binding and service binding protocol for DnsDxe driver.
|
||||||
|
|
||||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -56,9 +56,9 @@ DnsDestroyInstance (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
ZeroMem (&Instance->Dns4CfgData, sizeof (EFI_DNS4_CONFIG_DATA));
|
ZeroMem (&Instance->Dns4CfgData, sizeof (EFI_DNS4_CONFIG_DATA));
|
||||||
|
|
||||||
ZeroMem (&Instance->Dns6CfgData, sizeof (EFI_DNS6_CONFIG_DATA));
|
ZeroMem (&Instance->Dns6CfgData, sizeof (EFI_DNS6_CONFIG_DATA));
|
||||||
|
|
||||||
if (!NetMapIsEmpty (&Instance->Dns4TxTokens)) {
|
if (!NetMapIsEmpty (&Instance->Dns4TxTokens)) {
|
||||||
Dns4InstanceCancelToken (Instance, NULL);
|
Dns4InstanceCancelToken (Instance, NULL);
|
||||||
}
|
}
|
||||||
@ -66,11 +66,11 @@ DnsDestroyInstance (
|
|||||||
if (!NetMapIsEmpty (&Instance->Dns6TxTokens)) {
|
if (!NetMapIsEmpty (&Instance->Dns6TxTokens)) {
|
||||||
Dns6InstanceCancelToken (Instance, NULL);
|
Dns6InstanceCancelToken (Instance, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Instance->UdpIo!= NULL) {
|
if (Instance->UdpIo!= NULL) {
|
||||||
UdpIoFreeIo (Instance->UdpIo);
|
UdpIoFreeIo (Instance->UdpIo);
|
||||||
}
|
}
|
||||||
|
|
||||||
FreePool (Instance);
|
FreePool (Instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ DnsCreateInstance (
|
|||||||
DNS_INSTANCE *DnsIns;
|
DNS_INSTANCE *DnsIns;
|
||||||
|
|
||||||
*Instance = NULL;
|
*Instance = NULL;
|
||||||
|
|
||||||
DnsIns = AllocateZeroPool (sizeof (DNS_INSTANCE));
|
DnsIns = AllocateZeroPool (sizeof (DNS_INSTANCE));
|
||||||
if (DnsIns == NULL) {
|
if (DnsIns == NULL) {
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
@ -104,7 +104,7 @@ DnsCreateInstance (
|
|||||||
DnsIns->State = DNS_STATE_UNCONFIGED;
|
DnsIns->State = DNS_STATE_UNCONFIGED;
|
||||||
DnsIns->InDestroy = FALSE;
|
DnsIns->InDestroy = FALSE;
|
||||||
DnsIns->Service = Service;
|
DnsIns->Service = Service;
|
||||||
|
|
||||||
if (Service->IpVersion == IP_VERSION_4) {
|
if (Service->IpVersion == IP_VERSION_4) {
|
||||||
CopyMem (&DnsIns->Dns4, &mDns4Protocol, sizeof (DnsIns->Dns4));
|
CopyMem (&DnsIns->Dns4, &mDns4Protocol, sizeof (DnsIns->Dns4));
|
||||||
NetMapInit (&DnsIns->Dns4TxTokens);
|
NetMapInit (&DnsIns->Dns4TxTokens);
|
||||||
@ -124,7 +124,7 @@ DnsCreateInstance (
|
|||||||
FreePool (DnsIns);
|
FreePool (DnsIns);
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
*Instance = DnsIns;
|
*Instance = DnsIns;
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
@ -132,7 +132,7 @@ DnsCreateInstance (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Callback function which provided by user to remove one node in NetDestroyLinkList process.
|
Callback function which provided by user to remove one node in NetDestroyLinkList process.
|
||||||
|
|
||||||
@param[in] Entry The entry to be removed.
|
@param[in] Entry The entry to be removed.
|
||||||
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
|
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ DnsDestroyService (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
UdpIoFreeIo (DnsSb->ConnectUdp);
|
UdpIoFreeIo (DnsSb->ConnectUdp);
|
||||||
|
|
||||||
if (DnsSb->TimerToGetMap != NULL){
|
if (DnsSb->TimerToGetMap != NULL){
|
||||||
gBS->CloseEvent (DnsSb->TimerToGetMap);
|
gBS->CloseEvent (DnsSb->TimerToGetMap);
|
||||||
}
|
}
|
||||||
@ -241,7 +241,7 @@ DnsCreateService (
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
DNS_SERVICE *DnsSb;
|
DNS_SERVICE *DnsSb;
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
DnsSb = NULL;
|
DnsSb = NULL;
|
||||||
|
|
||||||
@ -259,7 +259,7 @@ DnsCreateService (
|
|||||||
} else {
|
} else {
|
||||||
DnsSb->ServiceBinding = mDns6ServiceBinding;
|
DnsSb->ServiceBinding = mDns6ServiceBinding;
|
||||||
}
|
}
|
||||||
|
|
||||||
DnsSb->Dns4ChildrenNum = 0;
|
DnsSb->Dns4ChildrenNum = 0;
|
||||||
InitializeListHead (&DnsSb->Dns4ChildrenList);
|
InitializeListHead (&DnsSb->Dns4ChildrenList);
|
||||||
|
|
||||||
@ -270,9 +270,9 @@ DnsCreateService (
|
|||||||
DnsSb->ImageHandle = Image;
|
DnsSb->ImageHandle = Image;
|
||||||
|
|
||||||
DnsSb->TimerToGetMap = NULL;
|
DnsSb->TimerToGetMap = NULL;
|
||||||
|
|
||||||
DnsSb->Timer = NULL;
|
DnsSb->Timer = NULL;
|
||||||
|
|
||||||
DnsSb->IpVersion = IpVersion;
|
DnsSb->IpVersion = IpVersion;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -290,7 +290,7 @@ DnsCreateService (
|
|||||||
FreePool (DnsSb);
|
FreePool (DnsSb);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create the timer to retransmit packets.
|
// Create the timer to retransmit packets.
|
||||||
//
|
//
|
||||||
@ -308,7 +308,7 @@ DnsCreateService (
|
|||||||
FreePool (DnsSb);
|
FreePool (DnsSb);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
DnsSb->ConnectUdp = NULL;
|
DnsSb->ConnectUdp = NULL;
|
||||||
DnsSb->ConnectUdp = UdpIoCreateIo (
|
DnsSb->ConnectUdp = UdpIoCreateIo (
|
||||||
Controller,
|
Controller,
|
||||||
@ -339,7 +339,7 @@ DnsCreateService (
|
|||||||
@retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.
|
@retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
DnsUnload (
|
DnsUnload (
|
||||||
IN EFI_HANDLE ImageHandle
|
IN EFI_HANDLE ImageHandle
|
||||||
@ -357,7 +357,7 @@ DnsUnload (
|
|||||||
ItemServerIp4 = NULL;
|
ItemServerIp4 = NULL;
|
||||||
ItemCache6 = NULL;
|
ItemCache6 = NULL;
|
||||||
ItemServerIp6 = NULL;
|
ItemServerIp6 = NULL;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Disconnect the driver specified by ImageHandle
|
// Disconnect the driver specified by ImageHandle
|
||||||
//
|
//
|
||||||
@ -373,7 +373,7 @@ DnsUnload (
|
|||||||
if (mDriverData->Timer != NULL) {
|
if (mDriverData->Timer != NULL) {
|
||||||
gBS->CloseEvent (mDriverData->Timer);
|
gBS->CloseEvent (mDriverData->Timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!IsListEmpty (&mDriverData->Dns4CacheList)) {
|
while (!IsListEmpty (&mDriverData->Dns4CacheList)) {
|
||||||
Entry = NetListRemoveHead (&mDriverData->Dns4CacheList);
|
Entry = NetListRemoveHead (&mDriverData->Dns4CacheList);
|
||||||
ItemCache4 = NET_LIST_USER_STRUCT (Entry, DNS4_CACHE, AllCacheLink);
|
ItemCache4 = NET_LIST_USER_STRUCT (Entry, DNS4_CACHE, AllCacheLink);
|
||||||
@ -409,10 +409,10 @@ DnsUnload (
|
|||||||
ItemServerIp6 = NET_LIST_USER_STRUCT (Entry, DNS6_SERVER_IP, AllServerLink);
|
ItemServerIp6 = NET_LIST_USER_STRUCT (Entry, DNS6_SERVER_IP, AllServerLink);
|
||||||
FreePool (ItemServerIp6);
|
FreePool (ItemServerIp6);
|
||||||
}
|
}
|
||||||
|
|
||||||
FreePool (mDriverData);
|
FreePool (mDriverData);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -490,7 +490,7 @@ DnsDriverEntryPoint (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Error3;
|
goto Error3;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gBS->SetTimer (mDriverData->Timer, TimerPeriodic, TICKS_PER_SECOND);
|
Status = gBS->SetTimer (mDriverData->Timer, TimerPeriodic, TICKS_PER_SECOND);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Error4;
|
goto Error4;
|
||||||
@ -500,7 +500,7 @@ DnsDriverEntryPoint (
|
|||||||
InitializeListHead (&mDriverData->Dns4ServerList);
|
InitializeListHead (&mDriverData->Dns4ServerList);
|
||||||
InitializeListHead (&mDriverData->Dns6CacheList);
|
InitializeListHead (&mDriverData->Dns6CacheList);
|
||||||
InitializeListHead (&mDriverData->Dns6ServerList);
|
InitializeListHead (&mDriverData->Dns6ServerList);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
||||||
Error4:
|
Error4:
|
||||||
@ -508,18 +508,18 @@ DnsDriverEntryPoint (
|
|||||||
|
|
||||||
Error3:
|
Error3:
|
||||||
FreePool (mDriverData);
|
FreePool (mDriverData);
|
||||||
|
|
||||||
Error2:
|
Error2:
|
||||||
gBS->UninstallMultipleProtocolInterfaces (
|
gBS->UninstallMultipleProtocolInterfaces (
|
||||||
gDns6DriverBinding.DriverBindingHandle,
|
gDns6DriverBinding.DriverBindingHandle,
|
||||||
&gEfiDriverBindingProtocolGuid,
|
&gEfiDriverBindingProtocolGuid,
|
||||||
&gDns6DriverBinding,
|
&gDns6DriverBinding,
|
||||||
&gEfiComponentName2ProtocolGuid,
|
&gEfiComponentName2ProtocolGuid,
|
||||||
&gDnsComponentName2,
|
&gDnsComponentName2,
|
||||||
&gEfiComponentNameProtocolGuid,
|
&gEfiComponentNameProtocolGuid,
|
||||||
&gDnsComponentName,
|
&gDnsComponentName,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
Error1:
|
Error1:
|
||||||
gBS->UninstallMultipleProtocolInterfaces (
|
gBS->UninstallMultipleProtocolInterfaces (
|
||||||
@ -532,38 +532,38 @@ DnsDriverEntryPoint (
|
|||||||
&gDnsComponentName,
|
&gDnsComponentName,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||||
it further tests to see if this driver supports creating a handle for the specified child device.
|
it further tests to see if this driver supports creating a handle for the specified child device.
|
||||||
|
|
||||||
This function checks to see if the driver specified by This supports the device specified by
|
This function checks to see if the driver specified by This supports the device specified by
|
||||||
ControllerHandle. Drivers will typically use the device path attached to
|
ControllerHandle. Drivers will typically use the device path attached to
|
||||||
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
||||||
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
||||||
may be called many times during platform initialization. In order to reduce boot times, the tests
|
may be called many times during platform initialization. In order to reduce boot times, the tests
|
||||||
performed by this function must be very small, and take as little time as possible to execute. This
|
performed by this function must be very small, and take as little time as possible to execute. This
|
||||||
function must not change the state of any hardware devices, and this function must be aware that the
|
function must not change the state of any hardware devices, and this function must be aware that the
|
||||||
device specified by ControllerHandle may already be managed by the same driver or a
|
device specified by ControllerHandle may already be managed by the same driver or a
|
||||||
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
||||||
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
||||||
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
||||||
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
||||||
to guarantee the state of ControllerHandle is not modified by this function.
|
to guarantee the state of ControllerHandle is not modified by this function.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For bus drivers, if this parameter is not NULL, then
|
drivers. For bus drivers, if this parameter is not NULL, then
|
||||||
the bus driver must determine if the bus controller specified
|
the bus driver must determine if the bus controller specified
|
||||||
by ControllerHandle and the child controller specified
|
by ControllerHandle and the child controller specified
|
||||||
by RemainingDevicePath are both supported by this
|
by RemainingDevicePath are both supported by this
|
||||||
bus driver.
|
bus driver.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
||||||
@ -622,28 +622,28 @@ Dns4DriverBindingSupported (
|
|||||||
Starts a device controller or a bus controller.
|
Starts a device controller or a bus controller.
|
||||||
|
|
||||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||||
common boot service. It is legal to call Start() from other locations,
|
common boot service. It is legal to call Start() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||||
EFI_DEVICE_PATH_PROTOCOL.
|
EFI_DEVICE_PATH_PROTOCOL.
|
||||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For a bus driver, if this parameter is NULL, then handles
|
drivers. For a bus driver, if this parameter is NULL, then handles
|
||||||
for all the children of Controller are created by this driver.
|
for all the children of Controller are created by this driver.
|
||||||
If this parameter is not NULL and the first Device Path Node is
|
If this parameter is not NULL and the first Device Path Node is
|
||||||
not the End of Device Path Node, then only the handle for the
|
not the End of Device Path Node, then only the handle for the
|
||||||
child device specified by the first Device Path Node of
|
child device specified by the first Device Path Node of
|
||||||
RemainingDevicePath is created by this driver.
|
RemainingDevicePath is created by this driver.
|
||||||
If the first Device Path Node of RemainingDevicePath is
|
If the first Device Path Node of RemainingDevicePath is
|
||||||
the End of Device Path Node, no child handle is created by this
|
the End of Device Path Node, no child handle is created by this
|
||||||
driver.
|
driver.
|
||||||
|
|
||||||
@ -668,14 +668,14 @@ Dns4DriverBindingStart (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT (DnsSb != NULL);
|
ASSERT (DnsSb != NULL);
|
||||||
|
|
||||||
Status = gBS->SetTimer (DnsSb->Timer, TimerPeriodic, TICKS_PER_SECOND);
|
Status = gBS->SetTimer (DnsSb->Timer, TimerPeriodic, TICKS_PER_SECOND);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Install the Dns4ServiceBinding Protocol onto ControllerHandle.
|
// Install the Dns4ServiceBinding Protocol onto ControllerHandle.
|
||||||
//
|
//
|
||||||
@ -699,10 +699,10 @@ ON_ERROR:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Stops a device controller or a bus controller.
|
Stops a device controller or a bus controller.
|
||||||
|
|
||||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||||
into this common boot service. It is legal to call Stop() from other locations,
|
into this common boot service. It is legal to call Stop() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||||
same driver's Start() function.
|
same driver's Start() function.
|
||||||
@ -710,13 +710,13 @@ ON_ERROR:
|
|||||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||||
Start() function, and the Start() function must have called OpenProtocol() on
|
Start() function, and the Start() function must have called OpenProtocol() on
|
||||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||||
support a bus specific I/O protocol for the driver
|
support a bus specific I/O protocol for the driver
|
||||||
to use to stop the device.
|
to use to stop the device.
|
||||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||||
if NumberOfChildren is 0.
|
if NumberOfChildren is 0.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device was stopped.
|
@retval EFI_SUCCESS The device was stopped.
|
||||||
@ -788,7 +788,7 @@ Dns4DriverBindingStop (
|
|||||||
);
|
);
|
||||||
|
|
||||||
DnsDestroyService (DnsSb);
|
DnsDestroyService (DnsSb);
|
||||||
|
|
||||||
if (gDnsControllerNameTable != NULL) {
|
if (gDnsControllerNameTable != NULL) {
|
||||||
FreeUnicodeStringTable (gDnsControllerNameTable);
|
FreeUnicodeStringTable (gDnsControllerNameTable);
|
||||||
gDnsControllerNameTable = NULL;
|
gDnsControllerNameTable = NULL;
|
||||||
@ -801,33 +801,33 @@ Dns4DriverBindingStop (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||||
it further tests to see if this driver supports creating a handle for the specified child device.
|
it further tests to see if this driver supports creating a handle for the specified child device.
|
||||||
|
|
||||||
This function checks to see if the driver specified by This supports the device specified by
|
This function checks to see if the driver specified by This supports the device specified by
|
||||||
ControllerHandle. Drivers will typically use the device path attached to
|
ControllerHandle. Drivers will typically use the device path attached to
|
||||||
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
||||||
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
||||||
may be called many times during platform initialization. In order to reduce boot times, the tests
|
may be called many times during platform initialization. In order to reduce boot times, the tests
|
||||||
performed by this function must be very small, and take as little time as possible to execute. This
|
performed by this function must be very small, and take as little time as possible to execute. This
|
||||||
function must not change the state of any hardware devices, and this function must be aware that the
|
function must not change the state of any hardware devices, and this function must be aware that the
|
||||||
device specified by ControllerHandle may already be managed by the same driver or a
|
device specified by ControllerHandle may already be managed by the same driver or a
|
||||||
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
||||||
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
||||||
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
||||||
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
||||||
to guarantee the state of ControllerHandle is not modified by this function.
|
to guarantee the state of ControllerHandle is not modified by this function.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For bus drivers, if this parameter is not NULL, then
|
drivers. For bus drivers, if this parameter is not NULL, then
|
||||||
the bus driver must determine if the bus controller specified
|
the bus driver must determine if the bus controller specified
|
||||||
by ControllerHandle and the child controller specified
|
by ControllerHandle and the child controller specified
|
||||||
by RemainingDevicePath are both supported by this
|
by RemainingDevicePath are both supported by this
|
||||||
bus driver.
|
bus driver.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
||||||
@ -886,28 +886,28 @@ Dns6DriverBindingSupported (
|
|||||||
Starts a device controller or a bus controller.
|
Starts a device controller or a bus controller.
|
||||||
|
|
||||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||||
common boot service. It is legal to call Start() from other locations,
|
common boot service. It is legal to call Start() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||||
EFI_DEVICE_PATH_PROTOCOL.
|
EFI_DEVICE_PATH_PROTOCOL.
|
||||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For a bus driver, if this parameter is NULL, then handles
|
drivers. For a bus driver, if this parameter is NULL, then handles
|
||||||
for all the children of Controller are created by this driver.
|
for all the children of Controller are created by this driver.
|
||||||
If this parameter is not NULL and the first Device Path Node is
|
If this parameter is not NULL and the first Device Path Node is
|
||||||
not the End of Device Path Node, then only the handle for the
|
not the End of Device Path Node, then only the handle for the
|
||||||
child device specified by the first Device Path Node of
|
child device specified by the first Device Path Node of
|
||||||
RemainingDevicePath is created by this driver.
|
RemainingDevicePath is created by this driver.
|
||||||
If the first Device Path Node of RemainingDevicePath is
|
If the first Device Path Node of RemainingDevicePath is
|
||||||
the End of Device Path Node, no child handle is created by this
|
the End of Device Path Node, no child handle is created by this
|
||||||
driver.
|
driver.
|
||||||
|
|
||||||
@ -932,14 +932,14 @@ Dns6DriverBindingStart (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT (DnsSb != NULL);
|
ASSERT (DnsSb != NULL);
|
||||||
|
|
||||||
Status = gBS->SetTimer (DnsSb->Timer, TimerPeriodic, TICKS_PER_SECOND);
|
Status = gBS->SetTimer (DnsSb->Timer, TimerPeriodic, TICKS_PER_SECOND);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Install the Dns6ServiceBinding Protocol onto ControllerHandle
|
// Install the Dns6ServiceBinding Protocol onto ControllerHandle
|
||||||
//
|
//
|
||||||
@ -964,10 +964,10 @@ ON_ERROR:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Stops a device controller or a bus controller.
|
Stops a device controller or a bus controller.
|
||||||
|
|
||||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||||
into this common boot service. It is legal to call Stop() from other locations,
|
into this common boot service. It is legal to call Stop() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||||
same driver's Start() function.
|
same driver's Start() function.
|
||||||
@ -975,13 +975,13 @@ ON_ERROR:
|
|||||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||||
Start() function, and the Start() function must have called OpenProtocol() on
|
Start() function, and the Start() function must have called OpenProtocol() on
|
||||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||||
support a bus specific I/O protocol for the driver
|
support a bus specific I/O protocol for the driver
|
||||||
to use to stop the device.
|
to use to stop the device.
|
||||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||||
if NumberOfChildren is 0.
|
if NumberOfChildren is 0.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device was stopped.
|
@retval EFI_SUCCESS The device was stopped.
|
||||||
@ -1053,12 +1053,12 @@ Dns6DriverBindingStop (
|
|||||||
);
|
);
|
||||||
|
|
||||||
DnsDestroyService (DnsSb);
|
DnsDestroyService (DnsSb);
|
||||||
|
|
||||||
if (gDnsControllerNameTable != NULL) {
|
if (gDnsControllerNameTable != NULL) {
|
||||||
FreeUnicodeStringTable (gDnsControllerNameTable);
|
FreeUnicodeStringTable (gDnsControllerNameTable);
|
||||||
gDnsControllerNameTable = NULL;
|
gDnsControllerNameTable = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1067,14 +1067,14 @@ Dns6DriverBindingStop (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Creates a child handle and installs a protocol.
|
Creates a child handle and installs a protocol.
|
||||||
|
|
||||||
The CreateChild() function installs a protocol on ChildHandle.
|
The CreateChild() function installs a protocol on ChildHandle.
|
||||||
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
||||||
If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
|
If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
|
||||||
|
|
||||||
@param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||||
@param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
@param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
||||||
then a new handle is created. If it is a pointer to an existing UEFI handle,
|
then a new handle is created. If it is a pointer to an existing UEFI handle,
|
||||||
then the protocol is added to the existing UEFI handle.
|
then the protocol is added to the existing UEFI handle.
|
||||||
|
|
||||||
@retval EFI_SUCCES The protocol was added to ChildHandle.
|
@retval EFI_SUCCES The protocol was added to ChildHandle.
|
||||||
@ -1142,7 +1142,7 @@ Dns4ServiceBindingCreateChild (
|
|||||||
&Instance->Dns4,
|
&Instance->Dns4,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1167,14 +1167,14 @@ Dns4ServiceBindingCreateChild (
|
|||||||
gDns4DriverBinding.DriverBindingHandle,
|
gDns4DriverBinding.DriverBindingHandle,
|
||||||
ChildHandle
|
ChildHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
gBS->UninstallMultipleProtocolInterfaces (
|
gBS->UninstallMultipleProtocolInterfaces (
|
||||||
Instance->ChildHandle,
|
Instance->ChildHandle,
|
||||||
&gEfiDns4ProtocolGuid,
|
&gEfiDns4ProtocolGuid,
|
||||||
&Instance->Dns4,
|
&Instance->Dns4,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1198,9 +1198,9 @@ ON_ERROR:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Destroys a child handle with a protocol installed on it.
|
Destroys a child handle with a protocol installed on it.
|
||||||
|
|
||||||
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
||||||
that was installed by CreateChild() from ChildHandle. If the removed protocol is the
|
that was installed by CreateChild() from ChildHandle. If the removed protocol is the
|
||||||
last protocol on ChildHandle, then ChildHandle is destroyed.
|
last protocol on ChildHandle, then ChildHandle is destroyed.
|
||||||
|
|
||||||
@param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||||
@ -1260,7 +1260,7 @@ Dns4ServiceBindingDestroyChild (
|
|||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
Instance->InDestroy = TRUE;
|
Instance->InDestroy = TRUE;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -1292,7 +1292,7 @@ Dns4ServiceBindingDestroyChild (
|
|||||||
);
|
);
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
Instance->InDestroy = FALSE;
|
Instance->InDestroy = FALSE;
|
||||||
gBS->RestoreTPL (OldTpl);
|
gBS->RestoreTPL (OldTpl);
|
||||||
@ -1310,14 +1310,14 @@ Dns4ServiceBindingDestroyChild (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Creates a child handle and installs a protocol.
|
Creates a child handle and installs a protocol.
|
||||||
|
|
||||||
The CreateChild() function installs a protocol on ChildHandle.
|
The CreateChild() function installs a protocol on ChildHandle.
|
||||||
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
||||||
If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
|
If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
|
||||||
|
|
||||||
@param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||||
@param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
@param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
||||||
then a new handle is created. If it is a pointer to an existing UEFI handle,
|
then a new handle is created. If it is a pointer to an existing UEFI handle,
|
||||||
then the protocol is added to the existing UEFI handle.
|
then the protocol is added to the existing UEFI handle.
|
||||||
|
|
||||||
@retval EFI_SUCCES The protocol was added to ChildHandle.
|
@retval EFI_SUCCES The protocol was added to ChildHandle.
|
||||||
@ -1385,7 +1385,7 @@ Dns6ServiceBindingCreateChild (
|
|||||||
&Instance->Dns6,
|
&Instance->Dns6,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1410,14 +1410,14 @@ Dns6ServiceBindingCreateChild (
|
|||||||
gDns6DriverBinding.DriverBindingHandle,
|
gDns6DriverBinding.DriverBindingHandle,
|
||||||
ChildHandle
|
ChildHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
gBS->UninstallMultipleProtocolInterfaces (
|
gBS->UninstallMultipleProtocolInterfaces (
|
||||||
Instance->ChildHandle,
|
Instance->ChildHandle,
|
||||||
&gEfiDns6ProtocolGuid,
|
&gEfiDns6ProtocolGuid,
|
||||||
&Instance->Dns6,
|
&Instance->Dns6,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1441,9 +1441,9 @@ ON_ERROR:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Destroys a child handle with a protocol installed on it.
|
Destroys a child handle with a protocol installed on it.
|
||||||
|
|
||||||
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
||||||
that was installed by CreateChild() from ChildHandle. If the removed protocol is the
|
that was installed by CreateChild() from ChildHandle. If the removed protocol is the
|
||||||
last protocol on ChildHandle, then ChildHandle is destroyed.
|
last protocol on ChildHandle, then ChildHandle is destroyed.
|
||||||
|
|
||||||
@param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The header files of the driver binding and service binding protocol for DnsDxe driver.
|
The header files of the driver binding and service binding protocol for DnsDxe driver.
|
||||||
|
|
||||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -35,11 +35,11 @@ typedef struct _DNS_INSTANCE DNS_INSTANCE;
|
|||||||
|
|
||||||
#define DNS_SERVICE_SIGNATURE SIGNATURE_32 ('D', 'N', 'S', 'S')
|
#define DNS_SERVICE_SIGNATURE SIGNATURE_32 ('D', 'N', 'S', 'S')
|
||||||
|
|
||||||
#define DNS_INSTANCE_SIGNATURE SIGNATURE_32 ('D', 'N', 'S', 'I')
|
#define DNS_INSTANCE_SIGNATURE SIGNATURE_32 ('D', 'N', 'S', 'I')
|
||||||
|
|
||||||
struct _DNS_DRIVER_DATA {
|
struct _DNS_DRIVER_DATA {
|
||||||
EFI_EVENT Timer; /// Ticking timer for DNS cache update.
|
EFI_EVENT Timer; /// Ticking timer for DNS cache update.
|
||||||
|
|
||||||
LIST_ENTRY Dns4CacheList;
|
LIST_ENTRY Dns4CacheList;
|
||||||
LIST_ENTRY Dns4ServerList;
|
LIST_ENTRY Dns4ServerList;
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ struct _DNS_SERVICE {
|
|||||||
|
|
||||||
EFI_HANDLE ControllerHandle;
|
EFI_HANDLE ControllerHandle;
|
||||||
EFI_HANDLE ImageHandle;
|
EFI_HANDLE ImageHandle;
|
||||||
|
|
||||||
EFI_EVENT TimerToGetMap;
|
EFI_EVENT TimerToGetMap;
|
||||||
|
|
||||||
EFI_EVENT Timer; /// Ticking timer for packet retransmission.
|
EFI_EVENT Timer; /// Ticking timer for packet retransmission.
|
||||||
@ -71,10 +71,10 @@ struct _DNS_SERVICE {
|
|||||||
struct _DNS_INSTANCE {
|
struct _DNS_INSTANCE {
|
||||||
UINT32 Signature;
|
UINT32 Signature;
|
||||||
LIST_ENTRY Link;
|
LIST_ENTRY Link;
|
||||||
|
|
||||||
EFI_DNS4_PROTOCOL Dns4;
|
EFI_DNS4_PROTOCOL Dns4;
|
||||||
EFI_DNS6_PROTOCOL Dns6;
|
EFI_DNS6_PROTOCOL Dns6;
|
||||||
|
|
||||||
INTN State;
|
INTN State;
|
||||||
BOOLEAN InDestroy;
|
BOOLEAN InDestroy;
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ DnsCreateInstance (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Callback function which provided by user to remove one node in NetDestroyLinkList process.
|
Callback function which provided by user to remove one node in NetDestroyLinkList process.
|
||||||
|
|
||||||
@param[in] Entry The entry to be removed.
|
@param[in] Entry The entry to be removed.
|
||||||
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
|
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
|
||||||
|
|
||||||
@ -218,7 +218,7 @@ DnsCreateService (
|
|||||||
@retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.
|
@retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
DnsUnload (
|
DnsUnload (
|
||||||
IN EFI_HANDLE ImageHandle
|
IN EFI_HANDLE ImageHandle
|
||||||
@ -243,33 +243,33 @@ DnsDriverEntryPoint (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||||
it further tests to see if this driver supports creating a handle for the specified child device.
|
it further tests to see if this driver supports creating a handle for the specified child device.
|
||||||
|
|
||||||
This function checks to see if the driver specified by This supports the device specified by
|
This function checks to see if the driver specified by This supports the device specified by
|
||||||
ControllerHandle. Drivers will typically use the device path attached to
|
ControllerHandle. Drivers will typically use the device path attached to
|
||||||
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
||||||
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
||||||
may be called many times during platform initialization. In order to reduce boot times, the tests
|
may be called many times during platform initialization. In order to reduce boot times, the tests
|
||||||
performed by this function must be very small, and take as little time as possible to execute. This
|
performed by this function must be very small, and take as little time as possible to execute. This
|
||||||
function must not change the state of any hardware devices, and this function must be aware that the
|
function must not change the state of any hardware devices, and this function must be aware that the
|
||||||
device specified by ControllerHandle may already be managed by the same driver or a
|
device specified by ControllerHandle may already be managed by the same driver or a
|
||||||
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
||||||
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
||||||
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
||||||
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
||||||
to guarantee the state of ControllerHandle is not modified by this function.
|
to guarantee the state of ControllerHandle is not modified by this function.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For bus drivers, if this parameter is not NULL, then
|
drivers. For bus drivers, if this parameter is not NULL, then
|
||||||
the bus driver must determine if the bus controller specified
|
the bus driver must determine if the bus controller specified
|
||||||
by ControllerHandle and the child controller specified
|
by ControllerHandle and the child controller specified
|
||||||
by RemainingDevicePath are both supported by this
|
by RemainingDevicePath are both supported by this
|
||||||
bus driver.
|
bus driver.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
||||||
@ -296,28 +296,28 @@ Dns4DriverBindingSupported (
|
|||||||
Starts a device controller or a bus controller.
|
Starts a device controller or a bus controller.
|
||||||
|
|
||||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||||
common boot service. It is legal to call Start() from other locations,
|
common boot service. It is legal to call Start() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||||
EFI_DEVICE_PATH_PROTOCOL.
|
EFI_DEVICE_PATH_PROTOCOL.
|
||||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For a bus driver, if this parameter is NULL, then handles
|
drivers. For a bus driver, if this parameter is NULL, then handles
|
||||||
for all the children of Controller are created by this driver.
|
for all the children of Controller are created by this driver.
|
||||||
If this parameter is not NULL and the first Device Path Node is
|
If this parameter is not NULL and the first Device Path Node is
|
||||||
not the End of Device Path Node, then only the handle for the
|
not the End of Device Path Node, then only the handle for the
|
||||||
child device specified by the first Device Path Node of
|
child device specified by the first Device Path Node of
|
||||||
RemainingDevicePath is created by this driver.
|
RemainingDevicePath is created by this driver.
|
||||||
If the first Device Path Node of RemainingDevicePath is
|
If the first Device Path Node of RemainingDevicePath is
|
||||||
the End of Device Path Node, no child handle is created by this
|
the End of Device Path Node, no child handle is created by this
|
||||||
driver.
|
driver.
|
||||||
|
|
||||||
@ -337,10 +337,10 @@ Dns4DriverBindingStart (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Stops a device controller or a bus controller.
|
Stops a device controller or a bus controller.
|
||||||
|
|
||||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||||
into this common boot service. It is legal to call Stop() from other locations,
|
into this common boot service. It is legal to call Stop() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||||
same driver's Start() function.
|
same driver's Start() function.
|
||||||
@ -348,13 +348,13 @@ Dns4DriverBindingStart (
|
|||||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||||
Start() function, and the Start() function must have called OpenProtocol() on
|
Start() function, and the Start() function must have called OpenProtocol() on
|
||||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||||
support a bus specific I/O protocol for the driver
|
support a bus specific I/O protocol for the driver
|
||||||
to use to stop the device.
|
to use to stop the device.
|
||||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||||
if NumberOfChildren is 0.
|
if NumberOfChildren is 0.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device was stopped.
|
@retval EFI_SUCCESS The device was stopped.
|
||||||
@ -371,33 +371,33 @@ Dns4DriverBindingStop (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||||
it further tests to see if this driver supports creating a handle for the specified child device.
|
it further tests to see if this driver supports creating a handle for the specified child device.
|
||||||
|
|
||||||
This function checks to see if the driver specified by This supports the device specified by
|
This function checks to see if the driver specified by This supports the device specified by
|
||||||
ControllerHandle. Drivers will typically use the device path attached to
|
ControllerHandle. Drivers will typically use the device path attached to
|
||||||
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
||||||
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
||||||
may be called many times during platform initialization. In order to reduce boot times, the tests
|
may be called many times during platform initialization. In order to reduce boot times, the tests
|
||||||
performed by this function must be very small, and take as little time as possible to execute. This
|
performed by this function must be very small, and take as little time as possible to execute. This
|
||||||
function must not change the state of any hardware devices, and this function must be aware that the
|
function must not change the state of any hardware devices, and this function must be aware that the
|
||||||
device specified by ControllerHandle may already be managed by the same driver or a
|
device specified by ControllerHandle may already be managed by the same driver or a
|
||||||
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
||||||
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
||||||
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
||||||
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
||||||
to guarantee the state of ControllerHandle is not modified by this function.
|
to guarantee the state of ControllerHandle is not modified by this function.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For bus drivers, if this parameter is not NULL, then
|
drivers. For bus drivers, if this parameter is not NULL, then
|
||||||
the bus driver must determine if the bus controller specified
|
the bus driver must determine if the bus controller specified
|
||||||
by ControllerHandle and the child controller specified
|
by ControllerHandle and the child controller specified
|
||||||
by RemainingDevicePath are both supported by this
|
by RemainingDevicePath are both supported by this
|
||||||
bus driver.
|
bus driver.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
||||||
@ -424,28 +424,28 @@ Dns6DriverBindingSupported (
|
|||||||
Starts a device controller or a bus controller.
|
Starts a device controller or a bus controller.
|
||||||
|
|
||||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||||
common boot service. It is legal to call Start() from other locations,
|
common boot service. It is legal to call Start() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||||
EFI_DEVICE_PATH_PROTOCOL.
|
EFI_DEVICE_PATH_PROTOCOL.
|
||||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For a bus driver, if this parameter is NULL, then handles
|
drivers. For a bus driver, if this parameter is NULL, then handles
|
||||||
for all the children of Controller are created by this driver.
|
for all the children of Controller are created by this driver.
|
||||||
If this parameter is not NULL and the first Device Path Node is
|
If this parameter is not NULL and the first Device Path Node is
|
||||||
not the End of Device Path Node, then only the handle for the
|
not the End of Device Path Node, then only the handle for the
|
||||||
child device specified by the first Device Path Node of
|
child device specified by the first Device Path Node of
|
||||||
RemainingDevicePath is created by this driver.
|
RemainingDevicePath is created by this driver.
|
||||||
If the first Device Path Node of RemainingDevicePath is
|
If the first Device Path Node of RemainingDevicePath is
|
||||||
the End of Device Path Node, no child handle is created by this
|
the End of Device Path Node, no child handle is created by this
|
||||||
driver.
|
driver.
|
||||||
|
|
||||||
@ -465,10 +465,10 @@ Dns6DriverBindingStart (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Stops a device controller or a bus controller.
|
Stops a device controller or a bus controller.
|
||||||
|
|
||||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||||
into this common boot service. It is legal to call Stop() from other locations,
|
into this common boot service. It is legal to call Stop() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||||
same driver's Start() function.
|
same driver's Start() function.
|
||||||
@ -476,13 +476,13 @@ Dns6DriverBindingStart (
|
|||||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||||
Start() function, and the Start() function must have called OpenProtocol() on
|
Start() function, and the Start() function must have called OpenProtocol() on
|
||||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||||
support a bus specific I/O protocol for the driver
|
support a bus specific I/O protocol for the driver
|
||||||
to use to stop the device.
|
to use to stop the device.
|
||||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||||
if NumberOfChildren is 0.
|
if NumberOfChildren is 0.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device was stopped.
|
@retval EFI_SUCCESS The device was stopped.
|
||||||
@ -500,14 +500,14 @@ Dns6DriverBindingStop (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Creates a child handle and installs a protocol.
|
Creates a child handle and installs a protocol.
|
||||||
|
|
||||||
The CreateChild() function installs a protocol on ChildHandle.
|
The CreateChild() function installs a protocol on ChildHandle.
|
||||||
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
||||||
If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
|
If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
|
||||||
|
|
||||||
@param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||||
@param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
@param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
||||||
then a new handle is created. If it is a pointer to an existing UEFI handle,
|
then a new handle is created. If it is a pointer to an existing UEFI handle,
|
||||||
then the protocol is added to the existing UEFI handle.
|
then the protocol is added to the existing UEFI handle.
|
||||||
|
|
||||||
@retval EFI_SUCCES The protocol was added to ChildHandle.
|
@retval EFI_SUCCES The protocol was added to ChildHandle.
|
||||||
@ -526,9 +526,9 @@ Dns4ServiceBindingCreateChild (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Destroys a child handle with a protocol installed on it.
|
Destroys a child handle with a protocol installed on it.
|
||||||
|
|
||||||
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
||||||
that was installed by CreateChild() from ChildHandle. If the removed protocol is the
|
that was installed by CreateChild() from ChildHandle. If the removed protocol is the
|
||||||
last protocol on ChildHandle, then ChildHandle is destroyed.
|
last protocol on ChildHandle, then ChildHandle is destroyed.
|
||||||
|
|
||||||
@param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||||
@ -551,14 +551,14 @@ Dns4ServiceBindingDestroyChild (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Creates a child handle and installs a protocol.
|
Creates a child handle and installs a protocol.
|
||||||
|
|
||||||
The CreateChild() function installs a protocol on ChildHandle.
|
The CreateChild() function installs a protocol on ChildHandle.
|
||||||
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
||||||
If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
|
If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
|
||||||
|
|
||||||
@param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||||
@param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
@param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
||||||
then a new handle is created. If it is a pointer to an existing UEFI handle,
|
then a new handle is created. If it is a pointer to an existing UEFI handle,
|
||||||
then the protocol is added to the existing UEFI handle.
|
then the protocol is added to the existing UEFI handle.
|
||||||
|
|
||||||
@retval EFI_SUCCES The protocol was added to ChildHandle.
|
@retval EFI_SUCCES The protocol was added to ChildHandle.
|
||||||
@ -577,9 +577,9 @@ Dns6ServiceBindingCreateChild (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Destroys a child handle with a protocol installed on it.
|
Destroys a child handle with a protocol installed on it.
|
||||||
|
|
||||||
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
||||||
that was installed by CreateChild() from ChildHandle. If the removed protocol is the
|
that was installed by CreateChild() from ChildHandle. If the removed protocol is the
|
||||||
last protocol on ChildHandle, then ChildHandle is destroyed.
|
last protocol on ChildHandle, then ChildHandle is destroyed.
|
||||||
|
|
||||||
@param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
@param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# Implementation of EFI_DNS4_PROTOCOL and EFI_DNS6_PROTOCOL interfaces.
|
# Implementation of EFI_DNS4_PROTOCOL and EFI_DNS6_PROTOCOL interfaces.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -37,8 +37,8 @@
|
|||||||
DnsProtocol.c
|
DnsProtocol.c
|
||||||
DnsDhcp.h
|
DnsDhcp.h
|
||||||
DnsDhcp.c
|
DnsDhcp.c
|
||||||
|
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
BaseLib
|
BaseLib
|
||||||
UefiLib
|
UefiLib
|
||||||
@ -52,7 +52,7 @@
|
|||||||
DpcLib
|
DpcLib
|
||||||
PrintLib
|
PrintLib
|
||||||
UdpIoLib
|
UdpIoLib
|
||||||
|
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiDns4ServiceBindingProtocolGuid ## BY_START
|
gEfiDns4ServiceBindingProtocolGuid ## BY_START
|
||||||
@ -64,7 +64,7 @@
|
|||||||
gEfiIp4Config2ProtocolGuid ## SOMETIMES_CONSUMES
|
gEfiIp4Config2ProtocolGuid ## SOMETIMES_CONSUMES
|
||||||
gEfiManagedNetworkServiceBindingProtocolGuid ## SOMETIMES_CONSUMES
|
gEfiManagedNetworkServiceBindingProtocolGuid ## SOMETIMES_CONSUMES
|
||||||
gEfiManagedNetworkProtocolGuid ## SOMETIMES_CONSUMES
|
gEfiManagedNetworkProtocolGuid ## SOMETIMES_CONSUMES
|
||||||
|
|
||||||
gEfiDns6ServiceBindingProtocolGuid ## BY_START
|
gEfiDns6ServiceBindingProtocolGuid ## BY_START
|
||||||
gEfiDns6ProtocolGuid ## BY_START
|
gEfiDns6ProtocolGuid ## BY_START
|
||||||
gEfiUdp6ServiceBindingProtocolGuid ## TO_START
|
gEfiUdp6ServiceBindingProtocolGuid ## TO_START
|
||||||
|
@ -2,15 +2,15 @@
|
|||||||
// UEFI DNS DXE Driver.
|
// UEFI DNS DXE Driver.
|
||||||
//
|
//
|
||||||
// This driver provides UEFI 2.5 DNS protocols. It could work with an IPv4 and IPv6 stack.
|
// This driver provides UEFI 2.5 DNS protocols. It could work with an IPv4 and IPv6 stack.
|
||||||
//
|
|
||||||
//
|
//
|
||||||
// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
//
|
||||||
|
// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
//
|
//
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
// which accompanies this distribution. The full text of the license may be found at
|
// which accompanies this distribution. The full text of the license may be found at
|
||||||
// http://opensource.org/licenses/bsd-license.php.
|
// http://opensource.org/licenses/bsd-license.php.
|
||||||
//
|
//
|
||||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
//
|
//
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// /** @file
|
// /** @file
|
||||||
// DnsDxe Localized Strings and Content
|
// DnsDxe Localized Strings and Content
|
||||||
//
|
//
|
||||||
// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
//
|
//
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -13,8 +13,8 @@
|
|||||||
//
|
//
|
||||||
// **/
|
// **/
|
||||||
|
|
||||||
#string STR_PROPERTIES_MODULE_NAME
|
#string STR_PROPERTIES_MODULE_NAME
|
||||||
#language en-US
|
#language en-US
|
||||||
"UEFI DNS DXE"
|
"UEFI DNS DXE"
|
||||||
|
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
DnsDxe support functions implementation.
|
DnsDxe support functions implementation.
|
||||||
|
|
||||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -95,22 +95,22 @@ typedef union _DNS_FLAGS DNS_FLAGS;
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
LIST_ENTRY AllCacheLink;
|
LIST_ENTRY AllCacheLink;
|
||||||
EFI_DNS4_CACHE_ENTRY DnsCache;
|
EFI_DNS4_CACHE_ENTRY DnsCache;
|
||||||
} DNS4_CACHE;
|
} DNS4_CACHE;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
LIST_ENTRY AllCacheLink;
|
LIST_ENTRY AllCacheLink;
|
||||||
EFI_DNS6_CACHE_ENTRY DnsCache;
|
EFI_DNS6_CACHE_ENTRY DnsCache;
|
||||||
} DNS6_CACHE;
|
} DNS6_CACHE;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
LIST_ENTRY AllServerLink;
|
LIST_ENTRY AllServerLink;
|
||||||
EFI_IPv4_ADDRESS Dns4ServerIp;
|
EFI_IPv4_ADDRESS Dns4ServerIp;
|
||||||
} DNS4_SERVER_IP;
|
} DNS4_SERVER_IP;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
LIST_ENTRY AllServerLink;
|
LIST_ENTRY AllServerLink;
|
||||||
EFI_IPv6_ADDRESS Dns6ServerIp;
|
EFI_IPv6_ADDRESS Dns6ServerIp;
|
||||||
} DNS6_SERVER_IP;
|
} DNS6_SERVER_IP;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -206,7 +206,7 @@ Dns4RemoveTokenEntry (
|
|||||||
|
|
||||||
@retval EFI_SUCCESS Remove TokenEntry from TokenMap sucessfully.
|
@retval EFI_SUCCESS Remove TokenEntry from TokenMap sucessfully.
|
||||||
@retval EFI_NOT_FOUND TokenEntry is not found in TokenMap.
|
@retval EFI_NOT_FOUND TokenEntry is not found in TokenMap.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
Dns6RemoveTokenEntry (
|
Dns6RemoveTokenEntry (
|
||||||
@ -277,7 +277,7 @@ EFI_STATUS
|
|||||||
EFIAPI
|
EFIAPI
|
||||||
GetDns4TokenEntry (
|
GetDns4TokenEntry (
|
||||||
IN NET_MAP *TokensMap,
|
IN NET_MAP *TokensMap,
|
||||||
IN EFI_DNS4_COMPLETION_TOKEN *Token,
|
IN EFI_DNS4_COMPLETION_TOKEN *Token,
|
||||||
OUT DNS4_TOKEN_ENTRY **TokenEntry
|
OUT DNS4_TOKEN_ENTRY **TokenEntry
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -296,7 +296,7 @@ EFI_STATUS
|
|||||||
EFIAPI
|
EFIAPI
|
||||||
GetDns6TokenEntry (
|
GetDns6TokenEntry (
|
||||||
IN NET_MAP *TokensMap,
|
IN NET_MAP *TokensMap,
|
||||||
IN EFI_DNS6_COMPLETION_TOKEN *Token,
|
IN EFI_DNS6_COMPLETION_TOKEN *Token,
|
||||||
OUT DNS6_TOKEN_ENTRY **TokenEntry
|
OUT DNS6_TOKEN_ENTRY **TokenEntry
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -406,9 +406,9 @@ DnsDummyExtFree (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Poll the UDP to get the IP4 default address, which may be retrieved
|
Poll the UDP to get the IP4 default address, which may be retrieved
|
||||||
by DHCP.
|
by DHCP.
|
||||||
|
|
||||||
The default time out value is 5 seconds. If IP has retrieved the default address,
|
The default time out value is 5 seconds. If IP has retrieved the default address,
|
||||||
the UDP is reconfigured.
|
the UDP is reconfigured.
|
||||||
|
|
||||||
@param Instance The DNS instance
|
@param Instance The DNS instance
|
||||||
@ -447,10 +447,10 @@ Dns6GetMapping (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Configure the UDP.
|
Configure the UDP.
|
||||||
|
|
||||||
@param Instance The DNS session
|
@param Instance The DNS session
|
||||||
@param UdpIo The UDP_IO instance
|
@param UdpIo The UDP_IO instance
|
||||||
|
|
||||||
@retval EFI_SUCCESS The UDP is successfully configured for the
|
@retval EFI_SUCCESS The UDP is successfully configured for the
|
||||||
session.
|
session.
|
||||||
|
|
||||||
@ -463,7 +463,7 @@ Dns4ConfigUdp (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Configure the UDP.
|
Configure the UDP.
|
||||||
|
|
||||||
@param Instance The DNS session
|
@param Instance The DNS session
|
||||||
@param UdpIo The UDP_IO instance
|
@param UdpIo The UDP_IO instance
|
||||||
|
|
||||||
@ -479,17 +479,17 @@ Dns6ConfigUdp (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Update Dns4 cache to shared list of caches of all DNSv4 instances.
|
Update Dns4 cache to shared list of caches of all DNSv4 instances.
|
||||||
|
|
||||||
@param Dns4CacheList All Dns4 cache list.
|
@param Dns4CacheList All Dns4 cache list.
|
||||||
@param DeleteFlag If FALSE, this function is to add one entry to the DNS Cache.
|
@param DeleteFlag If FALSE, this function is to add one entry to the DNS Cache.
|
||||||
If TRUE, this function will delete matching DNS Cache entry.
|
If TRUE, this function will delete matching DNS Cache entry.
|
||||||
@param Override If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter.
|
@param Override If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter.
|
||||||
If FALSE, EFI_ACCESS_DENIED will be returned if the entry to be added is already exists.
|
If FALSE, EFI_ACCESS_DENIED will be returned if the entry to be added is already exists.
|
||||||
@param DnsCacheEntry Entry Pointer to DNS Cache entry.
|
@param DnsCacheEntry Entry Pointer to DNS Cache entry.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Update Dns4 cache successfully.
|
@retval EFI_SUCCESS Update Dns4 cache successfully.
|
||||||
@retval Others Failed to update Dns4 cache.
|
@retval Others Failed to update Dns4 cache.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@ -501,18 +501,18 @@ UpdateDns4Cache (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Update Dns6 cache to shared list of caches of all DNSv6 instances.
|
Update Dns6 cache to shared list of caches of all DNSv6 instances.
|
||||||
|
|
||||||
@param Dns6CacheList All Dns6 cache list.
|
@param Dns6CacheList All Dns6 cache list.
|
||||||
@param DeleteFlag If FALSE, this function is to add one entry to the DNS Cache.
|
@param DeleteFlag If FALSE, this function is to add one entry to the DNS Cache.
|
||||||
If TRUE, this function will delete matching DNS Cache entry.
|
If TRUE, this function will delete matching DNS Cache entry.
|
||||||
@param Override If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter.
|
@param Override If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter.
|
||||||
If FALSE, EFI_ACCESS_DENIED will be returned if the entry to be added is already exists.
|
If FALSE, EFI_ACCESS_DENIED will be returned if the entry to be added is already exists.
|
||||||
@param DnsCacheEntry Entry Pointer to DNS Cache entry.
|
@param DnsCacheEntry Entry Pointer to DNS Cache entry.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Update Dns6 cache successfully.
|
@retval EFI_SUCCESS Update Dns6 cache successfully.
|
||||||
@retval Others Failed to update Dns6 cache.
|
@retval Others Failed to update Dns6 cache.
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
UpdateDns6Cache (
|
UpdateDns6Cache (
|
||||||
@ -523,14 +523,14 @@ UpdateDns6Cache (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Add Dns4 ServerIp to common list of addresses of all configured DNSv4 server.
|
Add Dns4 ServerIp to common list of addresses of all configured DNSv4 server.
|
||||||
|
|
||||||
@param Dns4ServerList Common list of addresses of all configured DNSv4 server.
|
@param Dns4ServerList Common list of addresses of all configured DNSv4 server.
|
||||||
@param ServerIp DNS server Ip.
|
@param ServerIp DNS server Ip.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Add Dns4 ServerIp to common list successfully.
|
@retval EFI_SUCCESS Add Dns4 ServerIp to common list successfully.
|
||||||
@retval Others Failed to add Dns4 ServerIp to common list.
|
@retval Others Failed to add Dns4 ServerIp to common list.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@ -540,15 +540,15 @@ AddDns4ServerIp (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Add Dns6 ServerIp to common list of addresses of all configured DNSv6 server.
|
Add Dns6 ServerIp to common list of addresses of all configured DNSv6 server.
|
||||||
|
|
||||||
@param Dns6ServerList Common list of addresses of all configured DNSv6 server.
|
@param Dns6ServerList Common list of addresses of all configured DNSv6 server.
|
||||||
@param ServerIp DNS server Ip.
|
@param ServerIp DNS server Ip.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Add Dns6 ServerIp to common list successfully.
|
@retval EFI_SUCCESS Add Dns6 ServerIp to common list successfully.
|
||||||
@retval Others Failed to add Dns6 ServerIp to common list.
|
@retval Others Failed to add Dns6 ServerIp to common list.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
AddDns6ServerIp (
|
AddDns6ServerIp (
|
||||||
@ -559,16 +559,16 @@ AddDns6ServerIp (
|
|||||||
/**
|
/**
|
||||||
Find out whether the response is valid or invalid.
|
Find out whether the response is valid or invalid.
|
||||||
|
|
||||||
@param TokensMap All DNS transmittal Tokens entry.
|
@param TokensMap All DNS transmittal Tokens entry.
|
||||||
@param Identification Identification for queried packet.
|
@param Identification Identification for queried packet.
|
||||||
@param Type Type for queried packet.
|
@param Type Type for queried packet.
|
||||||
@param Class Class for queried packet.
|
@param Class Class for queried packet.
|
||||||
@param Item Return corresponding Token entry.
|
@param Item Return corresponding Token entry.
|
||||||
|
|
||||||
@retval TRUE The response is valid.
|
@retval TRUE The response is valid.
|
||||||
@retval FALSE The response is invalid.
|
@retval FALSE The response is invalid.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
IsValidDnsResponse (
|
IsValidDnsResponse (
|
||||||
IN NET_MAP *TokensMap,
|
IN NET_MAP *TokensMap,
|
||||||
@ -583,12 +583,12 @@ IsValidDnsResponse (
|
|||||||
|
|
||||||
@param Instance The DNS instance
|
@param Instance The DNS instance
|
||||||
@param RxString Received buffer.
|
@param RxString Received buffer.
|
||||||
@param Completed Flag to indicate that Dns response is valid.
|
@param Completed Flag to indicate that Dns response is valid.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Parse Dns Response successfully.
|
@retval EFI_SUCCESS Parse Dns Response successfully.
|
||||||
@retval Others Failed to parse Dns Response.
|
@retval Others Failed to parse Dns Response.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
ParseDnsResponse (
|
ParseDnsResponse (
|
||||||
IN OUT DNS_INSTANCE *Instance,
|
IN OUT DNS_INSTANCE *Instance,
|
||||||
@ -604,7 +604,7 @@ ParseDnsResponse (
|
|||||||
@param IoStatus The status of the UDP receive
|
@param IoStatus The status of the UDP receive
|
||||||
@param Context The opaque parameter to the function.
|
@param Context The opaque parameter to the function.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
DnsOnPacketReceived (
|
DnsOnPacketReceived (
|
||||||
@ -652,9 +652,9 @@ DoDnsQuery (
|
|||||||
Construct the Packet according query section.
|
Construct the Packet according query section.
|
||||||
|
|
||||||
@param Instance The DNS instance
|
@param Instance The DNS instance
|
||||||
@param QueryName Queried Name
|
@param QueryName Queried Name
|
||||||
@param Type Queried Type
|
@param Type Queried Type
|
||||||
@param Class Queried Class
|
@param Class Queried Class
|
||||||
@param Packet The packet for query
|
@param Packet The packet for query
|
||||||
|
|
||||||
@retval EFI_SUCCESS The packet is constructed.
|
@retval EFI_SUCCESS The packet is constructed.
|
||||||
@ -674,7 +674,7 @@ ConstructDNSQuery (
|
|||||||
Retransmit the packet.
|
Retransmit the packet.
|
||||||
|
|
||||||
@param Instance The DNS instance
|
@param Instance The DNS instance
|
||||||
@param Packet Retransmit the packet
|
@param Packet Retransmit the packet
|
||||||
|
|
||||||
@retval EFI_SUCCESS The packet is retransmitted.
|
@retval EFI_SUCCESS The packet is retransmitted.
|
||||||
@retval Others Failed to retransmit.
|
@retval Others Failed to retransmit.
|
||||||
@ -748,7 +748,7 @@ Dns4GetModeData (
|
|||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_UNSUPPORTED The designated protocol is not supported.
|
@retval EFI_UNSUPPORTED The designated protocol is not supported.
|
||||||
@retval EFI_INVALID_PARAMTER Thisis NULL.
|
@retval EFI_INVALID_PARAMTER Thisis NULL.
|
||||||
The StationIp address provided in DnsConfigData is not a
|
The StationIp address provided in DnsConfigData is not a
|
||||||
valid unicast.
|
valid unicast.
|
||||||
DnsServerList is NULL while DnsServerListCount
|
DnsServerList is NULL while DnsServerListCount
|
||||||
is not ZERO.
|
is not ZERO.
|
||||||
@ -758,8 +758,8 @@ Dns4GetModeData (
|
|||||||
allocated.
|
allocated.
|
||||||
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The
|
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The
|
||||||
EFI DNSv4 Protocol instance is not configured.
|
EFI DNSv4 Protocol instance is not configured.
|
||||||
@retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To
|
@retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To
|
||||||
reconfigure the instance the caller must call Configure()
|
reconfigure the instance the caller must call Configure()
|
||||||
with NULL first to return driver to unconfigured state.
|
with NULL first to return driver to unconfigured state.
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -800,7 +800,7 @@ Dns4HostNameToIp (
|
|||||||
/**
|
/**
|
||||||
IPv4 address to host name translation also known as Reverse DNS lookup.
|
IPv4 address to host name translation also known as Reverse DNS lookup.
|
||||||
|
|
||||||
The IpToHostName() function is used to translate the host address to host name. A type PTR
|
The IpToHostName() function is used to translate the host address to host name. A type PTR
|
||||||
query is used to get the primary name of the host. Support of this function is optional.
|
query is used to get the primary name of the host. Support of this function is optional.
|
||||||
|
|
||||||
@param[in] This Pointer to EFI_DNS4_PROTOCOL instance.
|
@param[in] This Pointer to EFI_DNS4_PROTOCOL instance.
|
||||||
@ -828,7 +828,7 @@ Dns4IpToHostName (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Retrieve arbitrary information from the DNS server.
|
Retrieve arbitrary information from the DNS server.
|
||||||
|
|
||||||
This GeneralLookup() function retrieves arbitrary information from the DNS. The caller
|
This GeneralLookup() function retrieves arbitrary information from the DNS. The caller
|
||||||
supplies a QNAME, QTYPE, and QCLASS, and all of the matching RRs are returned. All
|
supplies a QNAME, QTYPE, and QCLASS, and all of the matching RRs are returned. All
|
||||||
@ -859,7 +859,7 @@ EFIAPI
|
|||||||
Dns4GeneralLookUp (
|
Dns4GeneralLookUp (
|
||||||
IN EFI_DNS4_PROTOCOL *This,
|
IN EFI_DNS4_PROTOCOL *This,
|
||||||
IN CHAR8 *QName,
|
IN CHAR8 *QName,
|
||||||
IN UINT16 QType,
|
IN UINT16 QType,
|
||||||
IN UINT16 QClass,
|
IN UINT16 QClass,
|
||||||
IN EFI_DNS4_COMPLETION_TOKEN *Token
|
IN EFI_DNS4_COMPLETION_TOKEN *Token
|
||||||
);
|
);
|
||||||
@ -965,7 +965,7 @@ Dns4Cancel (
|
|||||||
This function is used to retrieve DNS mode data for this DNS instance.
|
This function is used to retrieve DNS mode data for this DNS instance.
|
||||||
|
|
||||||
@param[in] This Pointer to EFI_DNS6_PROTOCOL instance.
|
@param[in] This Pointer to EFI_DNS6_PROTOCOL instance.
|
||||||
@param[out] DnsModeData Pointer to the caller-allocated storage for the
|
@param[out] DnsModeData Pointer to the caller-allocated storage for the
|
||||||
EFI_DNS6_MODE_DATA data.
|
EFI_DNS6_MODE_DATA data.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@ -989,7 +989,7 @@ Dns6GetModeData (
|
|||||||
EFI DNSv6 Protocol driver instance. Reset the DNS instance if DnsConfigData is NULL.
|
EFI DNSv6 Protocol driver instance. Reset the DNS instance if DnsConfigData is NULL.
|
||||||
|
|
||||||
@param[in] This Pointer to EFI_DNS6_PROTOCOL instance.
|
@param[in] This Pointer to EFI_DNS6_PROTOCOL instance.
|
||||||
@param[in] DnsConfigData Pointer to the configuration data structure. All associated
|
@param[in] DnsConfigData Pointer to the configuration data structure. All associated
|
||||||
storage to be allocated and released by caller.
|
storage to be allocated and released by caller.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@ -1001,8 +1001,8 @@ Dns6GetModeData (
|
|||||||
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The
|
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The
|
||||||
EFI DNSv6 Protocol instance is not configured.
|
EFI DNSv6 Protocol instance is not configured.
|
||||||
@retval EFI_UNSUPPORTED The designated protocol is not supported.
|
@retval EFI_UNSUPPORTED The designated protocol is not supported.
|
||||||
@retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To
|
@retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To
|
||||||
reconfigure the instance the caller must call Configure() with
|
reconfigure the instance the caller must call Configure() with
|
||||||
NULL first to return driver to unconfigured state.
|
NULL first to return driver to unconfigured state.
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -1107,7 +1107,7 @@ EFIAPI
|
|||||||
Dns6GeneralLookUp (
|
Dns6GeneralLookUp (
|
||||||
IN EFI_DNS6_PROTOCOL *This,
|
IN EFI_DNS6_PROTOCOL *This,
|
||||||
IN CHAR8 *QName,
|
IN CHAR8 *QName,
|
||||||
IN UINT16 QType,
|
IN UINT16 QType,
|
||||||
IN UINT16 QClass,
|
IN UINT16 QClass,
|
||||||
IN EFI_DNS6_COMPLETION_TOKEN *Token
|
IN EFI_DNS6_COMPLETION_TOKEN *Token
|
||||||
);
|
);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Implementation of EFI_DNS4_PROTOCOL and EFI_DNS6_PROTOCOL interfaces.
|
Implementation of EFI_DNS4_PROTOCOL and EFI_DNS6_PROTOCOL interfaces.
|
||||||
|
|
||||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -59,14 +59,14 @@ Dns4GetModeData (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
DNS_INSTANCE *Instance;
|
DNS_INSTANCE *Instance;
|
||||||
|
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
|
|
||||||
LIST_ENTRY *Entry;
|
LIST_ENTRY *Entry;
|
||||||
LIST_ENTRY *Next;
|
LIST_ENTRY *Next;
|
||||||
|
|
||||||
DNS4_SERVER_IP *ServerItem;
|
DNS4_SERVER_IP *ServerItem;
|
||||||
EFI_IPv4_ADDRESS *ServerList;
|
EFI_IPv4_ADDRESS *ServerList;
|
||||||
DNS4_CACHE *CacheItem;
|
DNS4_CACHE *CacheItem;
|
||||||
@ -78,24 +78,24 @@ Dns4GetModeData (
|
|||||||
CacheItem = NULL;
|
CacheItem = NULL;
|
||||||
CacheList = NULL;
|
CacheList = NULL;
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
|
|
||||||
if ((This == NULL) || (DnsModeData == NULL)) {
|
if ((This == NULL) || (DnsModeData == NULL)) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL4 (This);
|
Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL4 (This);
|
||||||
if (Instance->State == DNS_STATE_UNCONFIGED) {
|
if (Instance->State == DNS_STATE_UNCONFIGED) {
|
||||||
Status = EFI_NOT_STARTED;
|
Status = EFI_NOT_STARTED;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
ZeroMem (DnsModeData, sizeof (EFI_DNS4_MODE_DATA));
|
ZeroMem (DnsModeData, sizeof (EFI_DNS4_MODE_DATA));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get the current configuration data of this instance.
|
// Get the current configuration data of this instance.
|
||||||
//
|
//
|
||||||
Status = Dns4CopyConfigure (&DnsModeData->DnsConfigData, &Instance->Dns4CfgData);
|
Status = Dns4CopyConfigure (&DnsModeData->DnsConfigData, &Instance->Dns4CfgData);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
@ -116,7 +116,7 @@ Dns4GetModeData (
|
|||||||
Dns4CleanConfigure (&DnsModeData->DnsConfigData);
|
Dns4CleanConfigure (&DnsModeData->DnsConfigData);
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
Index = 0;
|
Index = 0;
|
||||||
NET_LIST_FOR_EACH_SAFE (Entry, Next, &mDriverData->Dns4ServerList) {
|
NET_LIST_FOR_EACH_SAFE (Entry, Next, &mDriverData->Dns4ServerList) {
|
||||||
ServerItem = NET_LIST_USER_STRUCT (Entry, DNS4_SERVER_IP, AllServerLink);
|
ServerItem = NET_LIST_USER_STRUCT (Entry, DNS4_SERVER_IP, AllServerLink);
|
||||||
@ -140,7 +140,7 @@ Dns4GetModeData (
|
|||||||
FreePool (ServerList);
|
FreePool (ServerList);
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
Index =0;
|
Index =0;
|
||||||
NET_LIST_FOR_EACH_SAFE (Entry, Next, &mDriverData->Dns4CacheList) {
|
NET_LIST_FOR_EACH_SAFE (Entry, Next, &mDriverData->Dns4CacheList) {
|
||||||
CacheItem = NET_LIST_USER_STRUCT (Entry, DNS4_CACHE, AllCacheLink);
|
CacheItem = NET_LIST_USER_STRUCT (Entry, DNS4_CACHE, AllCacheLink);
|
||||||
@ -165,7 +165,7 @@ ON_EXIT:
|
|||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@retval EFI_UNSUPPORTED The designated protocol is not supported.
|
@retval EFI_UNSUPPORTED The designated protocol is not supported.
|
||||||
@retval EFI_INVALID_PARAMTER Thisis NULL.
|
@retval EFI_INVALID_PARAMTER Thisis NULL.
|
||||||
The StationIp address provided in DnsConfigData is not a
|
The StationIp address provided in DnsConfigData is not a
|
||||||
valid unicast.
|
valid unicast.
|
||||||
DnsServerList is NULL while DnsServerListCount
|
DnsServerList is NULL while DnsServerListCount
|
||||||
is not ZERO.
|
is not ZERO.
|
||||||
@ -175,8 +175,8 @@ ON_EXIT:
|
|||||||
allocated.
|
allocated.
|
||||||
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The
|
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The
|
||||||
EFI DNSv4 Protocol instance is not configured.
|
EFI DNSv4 Protocol instance is not configured.
|
||||||
@retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To
|
@retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To
|
||||||
reconfigure the instance the caller must call Configure()
|
reconfigure the instance the caller must call Configure()
|
||||||
with NULL first to return driver to unconfigured state.
|
with NULL first to return driver to unconfigured state.
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -188,19 +188,19 @@ Dns4Configure (
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
DNS_INSTANCE *Instance;
|
DNS_INSTANCE *Instance;
|
||||||
|
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
IP4_ADDR Ip;
|
IP4_ADDR Ip;
|
||||||
IP4_ADDR Netmask;
|
IP4_ADDR Netmask;
|
||||||
|
|
||||||
UINT32 ServerListCount;
|
UINT32 ServerListCount;
|
||||||
EFI_IPv4_ADDRESS *ServerList;
|
EFI_IPv4_ADDRESS *ServerList;
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
ServerList = NULL;
|
ServerList = NULL;
|
||||||
|
|
||||||
if (This == NULL ||
|
if (This == NULL ||
|
||||||
(DnsConfigData != NULL && ((DnsConfigData->DnsServerListCount != 0 && DnsConfigData->DnsServerList == NULL) ||
|
(DnsConfigData != NULL && ((DnsConfigData->DnsServerListCount != 0 && DnsConfigData->DnsServerList == NULL) ||
|
||||||
(DnsConfigData->DnsServerListCount == 0 && DnsConfigData->DnsServerList != NULL)))) {
|
(DnsConfigData->DnsServerListCount == 0 && DnsConfigData->DnsServerList != NULL)))) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
@ -215,7 +215,7 @@ Dns4Configure (
|
|||||||
|
|
||||||
if (DnsConfigData == NULL) {
|
if (DnsConfigData == NULL) {
|
||||||
ZeroMem (&Instance->SessionDnsServer, sizeof (EFI_IP_ADDRESS));
|
ZeroMem (&Instance->SessionDnsServer, sizeof (EFI_IP_ADDRESS));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Reset the Instance if ConfigData is NULL
|
// Reset the Instance if ConfigData is NULL
|
||||||
//
|
//
|
||||||
@ -226,12 +226,12 @@ Dns4Configure (
|
|||||||
if (Instance->UdpIo != NULL){
|
if (Instance->UdpIo != NULL){
|
||||||
UdpIoCleanIo (Instance->UdpIo);
|
UdpIoCleanIo (Instance->UdpIo);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Instance->Dns4CfgData.DnsServerList != NULL) {
|
if (Instance->Dns4CfgData.DnsServerList != NULL) {
|
||||||
FreePool (Instance->Dns4CfgData.DnsServerList);
|
FreePool (Instance->Dns4CfgData.DnsServerList);
|
||||||
}
|
}
|
||||||
ZeroMem (&Instance->Dns4CfgData, sizeof (EFI_DNS4_CONFIG_DATA));
|
ZeroMem (&Instance->Dns4CfgData, sizeof (EFI_DNS4_CONFIG_DATA));
|
||||||
|
|
||||||
Instance->State = DNS_STATE_UNCONFIGED;
|
Instance->State = DNS_STATE_UNCONFIGED;
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
@ -255,14 +255,14 @@ Dns4Configure (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (DnsConfigData->DnsServerListCount == 0) {
|
if (DnsConfigData->DnsServerListCount == 0) {
|
||||||
gBS->RestoreTPL (OldTpl);
|
gBS->RestoreTPL (OldTpl);
|
||||||
|
|
||||||
//
|
//
|
||||||
// The DNS instance will retrieve DNS server from DHCP Server
|
// The DNS instance will retrieve DNS server from DHCP Server
|
||||||
//
|
//
|
||||||
Status = GetDns4ServerFromDhcp4 (
|
Status = GetDns4ServerFromDhcp4 (
|
||||||
Instance,
|
Instance,
|
||||||
&ServerListCount,
|
&ServerListCount,
|
||||||
&ServerList
|
&ServerList
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
@ -270,7 +270,7 @@ Dns4Configure (
|
|||||||
}
|
}
|
||||||
|
|
||||||
ASSERT(ServerList != NULL);
|
ASSERT(ServerList != NULL);
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
CopyMem (&Instance->SessionDnsServer.v4, &ServerList[0], sizeof (EFI_IPv4_ADDRESS));
|
CopyMem (&Instance->SessionDnsServer.v4, &ServerList[0], sizeof (EFI_IPv4_ADDRESS));
|
||||||
@ -301,7 +301,7 @@ Dns4Configure (
|
|||||||
}
|
}
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
Instance->State = DNS_STATE_CONFIGED;
|
Instance->State = DNS_STATE_CONFIGED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -339,42 +339,42 @@ Dns4HostNameToIp (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
DNS_INSTANCE *Instance;
|
DNS_INSTANCE *Instance;
|
||||||
|
|
||||||
EFI_DNS4_CONFIG_DATA *ConfigData;
|
EFI_DNS4_CONFIG_DATA *ConfigData;
|
||||||
|
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
DNS4_CACHE *Item;
|
DNS4_CACHE *Item;
|
||||||
LIST_ENTRY *Entry;
|
LIST_ENTRY *Entry;
|
||||||
LIST_ENTRY *Next;
|
LIST_ENTRY *Next;
|
||||||
|
|
||||||
CHAR8 *QueryName;
|
CHAR8 *QueryName;
|
||||||
|
|
||||||
DNS4_TOKEN_ENTRY *TokenEntry;
|
DNS4_TOKEN_ENTRY *TokenEntry;
|
||||||
NET_BUF *Packet;
|
NET_BUF *Packet;
|
||||||
|
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
Item = NULL;
|
Item = NULL;
|
||||||
QueryName = NULL;
|
QueryName = NULL;
|
||||||
TokenEntry = NULL;
|
TokenEntry = NULL;
|
||||||
Packet = NULL;
|
Packet = NULL;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Validate the parameters
|
// Validate the parameters
|
||||||
//
|
//
|
||||||
if ((This == NULL) || (HostName == NULL) || Token == NULL) {
|
if ((This == NULL) || (HostName == NULL) || Token == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL4 (This);
|
Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL4 (This);
|
||||||
|
|
||||||
ConfigData = &(Instance->Dns4CfgData);
|
ConfigData = &(Instance->Dns4CfgData);
|
||||||
|
|
||||||
if (Instance->State != DNS_STATE_CONFIGED) {
|
if (Instance->State != DNS_STATE_CONFIGED) {
|
||||||
Status = EFI_NOT_STARTED;
|
Status = EFI_NOT_STARTED;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
@ -395,9 +395,9 @@ Dns4HostNameToIp (
|
|||||||
if (Token->RetryInterval == 0) {
|
if (Token->RetryInterval == 0) {
|
||||||
Token->RetryInterval = ConfigData->RetryInterval;
|
Token->RetryInterval = ConfigData->RetryInterval;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Minimum interval of retry is 2 second. If the retry interval is less than 2 second, then use the 2 second.
|
// Minimum interval of retry is 2 second. If the retry interval is less than 2 second, then use the 2 second.
|
||||||
//
|
//
|
||||||
if (Token->RetryInterval < DNS_DEFAULT_TIMEOUT) {
|
if (Token->RetryInterval < DNS_DEFAULT_TIMEOUT) {
|
||||||
Token->RetryInterval = DNS_DEFAULT_TIMEOUT;
|
Token->RetryInterval = DNS_DEFAULT_TIMEOUT;
|
||||||
@ -428,7 +428,7 @@ Dns4HostNameToIp (
|
|||||||
if (Token->RspData.H2AData != NULL) {
|
if (Token->RspData.H2AData != NULL) {
|
||||||
FreePool (Token->RspData.H2AData);
|
FreePool (Token->RspData.H2AData);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
@ -438,12 +438,12 @@ Dns4HostNameToIp (
|
|||||||
Item = NET_LIST_USER_STRUCT (Entry, DNS4_CACHE, AllCacheLink);
|
Item = NET_LIST_USER_STRUCT (Entry, DNS4_CACHE, AllCacheLink);
|
||||||
if ((UINT32)Index < Token->RspData.H2AData->IpCount && StrCmp (HostName, Item->DnsCache.HostName) == 0) {
|
if ((UINT32)Index < Token->RspData.H2AData->IpCount && StrCmp (HostName, Item->DnsCache.HostName) == 0) {
|
||||||
CopyMem ((Token->RspData.H2AData->IpList) + Index, Item->DnsCache.IpAddress, sizeof (EFI_IPv4_ADDRESS));
|
CopyMem ((Token->RspData.H2AData->IpList) + Index, Item->DnsCache.IpAddress, sizeof (EFI_IPv4_ADDRESS));
|
||||||
Index++;
|
Index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Token->Status = EFI_SUCCESS;
|
Token->Status = EFI_SUCCESS;
|
||||||
|
|
||||||
if (Token->Event != NULL) {
|
if (Token->Event != NULL) {
|
||||||
gBS->SignalEvent (Token->Event);
|
gBS->SignalEvent (Token->Event);
|
||||||
DispatchDpc ();
|
DispatchDpc ();
|
||||||
@ -451,7 +451,7 @@ Dns4HostNameToIp (
|
|||||||
|
|
||||||
Status = Token->Status;
|
Status = Token->Status;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -462,7 +462,7 @@ Dns4HostNameToIp (
|
|||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
TokenEntry->PacketToLive = Token->RetryInterval;
|
TokenEntry->PacketToLive = Token->RetryInterval;
|
||||||
TokenEntry->Token = Token;
|
TokenEntry->Token = Token;
|
||||||
TokenEntry->QueryHostName = AllocateZeroPool (StrSize (HostName));
|
TokenEntry->QueryHostName = AllocateZeroPool (StrSize (HostName));
|
||||||
@ -470,9 +470,9 @@ Dns4HostNameToIp (
|
|||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
CopyMem (TokenEntry->QueryHostName, HostName, StrSize (HostName));
|
CopyMem (TokenEntry->QueryHostName, HostName, StrSize (HostName));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Construct QName.
|
// Construct QName.
|
||||||
//
|
//
|
||||||
@ -481,12 +481,12 @@ Dns4HostNameToIp (
|
|||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Construct DNS Query Packet.
|
// Construct DNS Query Packet.
|
||||||
//
|
//
|
||||||
Status = ConstructDNSQuery (Instance, QueryName, DNS_TYPE_A, DNS_CLASS_INET, &Packet);
|
Status = ConstructDNSQuery (Instance, QueryName, DNS_TYPE_A, DNS_CLASS_INET, &Packet);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -499,7 +499,7 @@ Dns4HostNameToIp (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Dns Query Ip
|
// Dns Query Ip
|
||||||
//
|
//
|
||||||
@ -507,7 +507,7 @@ Dns4HostNameToIp (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
Dns4RemoveTokenEntry (&Instance->Dns4TxTokens, TokenEntry);
|
Dns4RemoveTokenEntry (&Instance->Dns4TxTokens, TokenEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
ON_EXIT:
|
ON_EXIT:
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
@ -515,19 +515,19 @@ ON_EXIT:
|
|||||||
if (TokenEntry->QueryHostName != NULL) {
|
if (TokenEntry->QueryHostName != NULL) {
|
||||||
FreePool (TokenEntry->QueryHostName);
|
FreePool (TokenEntry->QueryHostName);
|
||||||
}
|
}
|
||||||
|
|
||||||
FreePool (TokenEntry);
|
FreePool (TokenEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Packet != NULL) {
|
if (Packet != NULL) {
|
||||||
NetbufFree (Packet);
|
NetbufFree (Packet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (QueryName != NULL) {
|
if (QueryName != NULL) {
|
||||||
FreePool (QueryName);
|
FreePool (QueryName);
|
||||||
}
|
}
|
||||||
|
|
||||||
gBS->RestoreTPL (OldTpl);
|
gBS->RestoreTPL (OldTpl);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
@ -535,7 +535,7 @@ ON_EXIT:
|
|||||||
/**
|
/**
|
||||||
IPv4 address to host name translation also known as Reverse DNS lookup.
|
IPv4 address to host name translation also known as Reverse DNS lookup.
|
||||||
|
|
||||||
The IpToHostName() function is used to translate the host address to host name. A type PTR
|
The IpToHostName() function is used to translate the host address to host name. A type PTR
|
||||||
query is used to get the primary name of the host. Support of this function is optional.
|
query is used to get the primary name of the host. Support of this function is optional.
|
||||||
|
|
||||||
@param[in] This Pointer to EFI_DNS4_PROTOCOL instance.
|
@param[in] This Pointer to EFI_DNS4_PROTOCOL instance.
|
||||||
@ -566,7 +566,7 @@ Dns4IpToHostName (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Retrieve arbitrary information from the DNS server.
|
Retrieve arbitrary information from the DNS server.
|
||||||
|
|
||||||
This GeneralLookup() function retrieves arbitrary information from the DNS. The caller
|
This GeneralLookup() function retrieves arbitrary information from the DNS. The caller
|
||||||
supplies a QNAME, QTYPE, and QCLASS, and all of the matching RRs are returned. All
|
supplies a QNAME, QTYPE, and QCLASS, and all of the matching RRs are returned. All
|
||||||
@ -597,37 +597,37 @@ EFIAPI
|
|||||||
Dns4GeneralLookUp (
|
Dns4GeneralLookUp (
|
||||||
IN EFI_DNS4_PROTOCOL *This,
|
IN EFI_DNS4_PROTOCOL *This,
|
||||||
IN CHAR8 *QName,
|
IN CHAR8 *QName,
|
||||||
IN UINT16 QType,
|
IN UINT16 QType,
|
||||||
IN UINT16 QClass,
|
IN UINT16 QClass,
|
||||||
IN EFI_DNS4_COMPLETION_TOKEN *Token
|
IN EFI_DNS4_COMPLETION_TOKEN *Token
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
DNS_INSTANCE *Instance;
|
DNS_INSTANCE *Instance;
|
||||||
|
|
||||||
EFI_DNS4_CONFIG_DATA *ConfigData;
|
EFI_DNS4_CONFIG_DATA *ConfigData;
|
||||||
|
|
||||||
DNS4_TOKEN_ENTRY *TokenEntry;
|
DNS4_TOKEN_ENTRY *TokenEntry;
|
||||||
NET_BUF *Packet;
|
NET_BUF *Packet;
|
||||||
|
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
TokenEntry = NULL;
|
TokenEntry = NULL;
|
||||||
Packet = NULL;
|
Packet = NULL;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Validate the parameters
|
// Validate the parameters
|
||||||
//
|
//
|
||||||
if ((This == NULL) || (QName == NULL) || Token == NULL) {
|
if ((This == NULL) || (QName == NULL) || Token == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL4 (This);
|
Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL4 (This);
|
||||||
|
|
||||||
ConfigData = &(Instance->Dns4CfgData);
|
ConfigData = &(Instance->Dns4CfgData);
|
||||||
|
|
||||||
if (Instance->State != DNS_STATE_CONFIGED) {
|
if (Instance->State != DNS_STATE_CONFIGED) {
|
||||||
@ -636,14 +636,14 @@ Dns4GeneralLookUp (
|
|||||||
}
|
}
|
||||||
|
|
||||||
Token->Status = EFI_NOT_READY;
|
Token->Status = EFI_NOT_READY;
|
||||||
|
|
||||||
//
|
//
|
||||||
// If zero, use the parameter configured through Dns.Configure() interface.
|
// If zero, use the parameter configured through Dns.Configure() interface.
|
||||||
//
|
//
|
||||||
if (Token->RetryCount == 0) {
|
if (Token->RetryCount == 0) {
|
||||||
Token->RetryCount = ConfigData->RetryCount;
|
Token->RetryCount = ConfigData->RetryCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// If zero, use the parameter configured through Dns.Configure() interface.
|
// If zero, use the parameter configured through Dns.Configure() interface.
|
||||||
//
|
//
|
||||||
@ -652,7 +652,7 @@ Dns4GeneralLookUp (
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Minimum interval of retry is 2 second. If the retry interval is less than 2 second, then use the 2 second.
|
// Minimum interval of retry is 2 second. If the retry interval is less than 2 second, then use the 2 second.
|
||||||
//
|
//
|
||||||
if (Token->RetryInterval < DNS_DEFAULT_TIMEOUT) {
|
if (Token->RetryInterval < DNS_DEFAULT_TIMEOUT) {
|
||||||
Token->RetryInterval = DNS_DEFAULT_TIMEOUT;
|
Token->RetryInterval = DNS_DEFAULT_TIMEOUT;
|
||||||
@ -666,7 +666,7 @@ Dns4GeneralLookUp (
|
|||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
TokenEntry->PacketToLive = Token->RetryInterval;
|
TokenEntry->PacketToLive = Token->RetryInterval;
|
||||||
TokenEntry->GeneralLookUp = TRUE;
|
TokenEntry->GeneralLookUp = TRUE;
|
||||||
TokenEntry->Token = Token;
|
TokenEntry->Token = Token;
|
||||||
@ -679,7 +679,7 @@ Dns4GeneralLookUp (
|
|||||||
if (TokenEntry != NULL) {
|
if (TokenEntry != NULL) {
|
||||||
FreePool (TokenEntry);
|
FreePool (TokenEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -693,12 +693,12 @@ Dns4GeneralLookUp (
|
|||||||
if (TokenEntry != NULL) {
|
if (TokenEntry != NULL) {
|
||||||
FreePool (TokenEntry);
|
FreePool (TokenEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
NetbufFree (Packet);
|
NetbufFree (Packet);
|
||||||
|
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Dns Query Ip
|
// Dns Query Ip
|
||||||
//
|
//
|
||||||
@ -709,10 +709,10 @@ Dns4GeneralLookUp (
|
|||||||
if (TokenEntry != NULL) {
|
if (TokenEntry != NULL) {
|
||||||
FreePool (TokenEntry);
|
FreePool (TokenEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
NetbufFree (Packet);
|
NetbufFree (Packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
ON_EXIT:
|
ON_EXIT:
|
||||||
gBS->RestoreTPL (OldTpl);
|
gBS->RestoreTPL (OldTpl);
|
||||||
return Status;
|
return Status;
|
||||||
@ -753,15 +753,15 @@ Dns4UpdateDnsCache (
|
|||||||
IN EFI_DNS4_CACHE_ENTRY DnsCacheEntry
|
IN EFI_DNS4_CACHE_ENTRY DnsCacheEntry
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
if (DnsCacheEntry.HostName == NULL || DnsCacheEntry.IpAddress == NULL || DnsCacheEntry.Timeout == 0) {
|
if (DnsCacheEntry.HostName == NULL || DnsCacheEntry.IpAddress == NULL || DnsCacheEntry.Timeout == 0) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -770,7 +770,7 @@ Dns4UpdateDnsCache (
|
|||||||
Status = UpdateDns4Cache (&mDriverData->Dns4CacheList, DeleteFlag, Override, DnsCacheEntry);
|
Status = UpdateDns4Cache (&mDriverData->Dns4CacheList, DeleteFlag, Override, DnsCacheEntry);
|
||||||
|
|
||||||
gBS->RestoreTPL (OldTpl);
|
gBS->RestoreTPL (OldTpl);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -817,7 +817,7 @@ Dns4Poll (
|
|||||||
}
|
}
|
||||||
|
|
||||||
Udp = Instance->UdpIo->Protocol.Udp4;
|
Udp = Instance->UdpIo->Protocol.Udp4;
|
||||||
|
|
||||||
return Udp->Poll (Udp);
|
return Udp->Poll (Udp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -890,7 +890,7 @@ Dns4Cancel (
|
|||||||
This function is used to retrieve DNS mode data for this DNS instance.
|
This function is used to retrieve DNS mode data for this DNS instance.
|
||||||
|
|
||||||
@param[in] This Pointer to EFI_DNS6_PROTOCOL instance.
|
@param[in] This Pointer to EFI_DNS6_PROTOCOL instance.
|
||||||
@param[out] DnsModeData Pointer to the caller-allocated storage for the
|
@param[out] DnsModeData Pointer to the caller-allocated storage for the
|
||||||
EFI_DNS6_MODE_DATA data.
|
EFI_DNS6_MODE_DATA data.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@ -908,11 +908,11 @@ Dns6GetModeData (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
DNS_INSTANCE *Instance;
|
DNS_INSTANCE *Instance;
|
||||||
|
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
|
|
||||||
LIST_ENTRY *Entry;
|
LIST_ENTRY *Entry;
|
||||||
LIST_ENTRY *Next;
|
LIST_ENTRY *Next;
|
||||||
|
|
||||||
@ -933,7 +933,7 @@ Dns6GetModeData (
|
|||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL6 (This);
|
Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL6 (This);
|
||||||
if (Instance->State == DNS_STATE_UNCONFIGED) {
|
if (Instance->State == DNS_STATE_UNCONFIGED) {
|
||||||
Status = EFI_NOT_STARTED;
|
Status = EFI_NOT_STARTED;
|
||||||
@ -943,13 +943,13 @@ Dns6GetModeData (
|
|||||||
ZeroMem (DnsModeData, sizeof (EFI_DNS6_MODE_DATA));
|
ZeroMem (DnsModeData, sizeof (EFI_DNS6_MODE_DATA));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get the current configuration data of this instance.
|
// Get the current configuration data of this instance.
|
||||||
//
|
//
|
||||||
Status = Dns6CopyConfigure (&DnsModeData->DnsConfigData, &Instance->Dns6CfgData);
|
Status = Dns6CopyConfigure (&DnsModeData->DnsConfigData, &Instance->Dns6CfgData);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get the DnsServerCount and DnsServerList
|
// Get the DnsServerCount and DnsServerList
|
||||||
//
|
//
|
||||||
@ -964,7 +964,7 @@ Dns6GetModeData (
|
|||||||
Dns6CleanConfigure (&DnsModeData->DnsConfigData);
|
Dns6CleanConfigure (&DnsModeData->DnsConfigData);
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
Index = 0;
|
Index = 0;
|
||||||
NET_LIST_FOR_EACH_SAFE (Entry, Next, &mDriverData->Dns6ServerList) {
|
NET_LIST_FOR_EACH_SAFE (Entry, Next, &mDriverData->Dns6ServerList) {
|
||||||
ServerItem = NET_LIST_USER_STRUCT (Entry, DNS6_SERVER_IP, AllServerLink);
|
ServerItem = NET_LIST_USER_STRUCT (Entry, DNS6_SERVER_IP, AllServerLink);
|
||||||
@ -988,7 +988,7 @@ Dns6GetModeData (
|
|||||||
FreePool (ServerList);
|
FreePool (ServerList);
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
Index =0;
|
Index =0;
|
||||||
NET_LIST_FOR_EACH_SAFE (Entry, Next, &mDriverData->Dns6CacheList) {
|
NET_LIST_FOR_EACH_SAFE (Entry, Next, &mDriverData->Dns6CacheList) {
|
||||||
CacheItem = NET_LIST_USER_STRUCT (Entry, DNS6_CACHE, AllCacheLink);
|
CacheItem = NET_LIST_USER_STRUCT (Entry, DNS6_CACHE, AllCacheLink);
|
||||||
@ -996,7 +996,7 @@ Dns6GetModeData (
|
|||||||
Index++;
|
Index++;
|
||||||
}
|
}
|
||||||
DnsModeData->DnsCacheList = CacheList;
|
DnsModeData->DnsCacheList = CacheList;
|
||||||
|
|
||||||
ON_EXIT:
|
ON_EXIT:
|
||||||
gBS->RestoreTPL (OldTpl);
|
gBS->RestoreTPL (OldTpl);
|
||||||
return Status;
|
return Status;
|
||||||
@ -1009,7 +1009,7 @@ ON_EXIT:
|
|||||||
EFI DNSv6 Protocol driver instance. Reset the DNS instance if DnsConfigData is NULL.
|
EFI DNSv6 Protocol driver instance. Reset the DNS instance if DnsConfigData is NULL.
|
||||||
|
|
||||||
@param[in] This Pointer to EFI_DNS6_PROTOCOL instance.
|
@param[in] This Pointer to EFI_DNS6_PROTOCOL instance.
|
||||||
@param[in] DnsConfigData Pointer to the configuration data structure. All associated
|
@param[in] DnsConfigData Pointer to the configuration data structure. All associated
|
||||||
storage to be allocated and released by caller.
|
storage to be allocated and released by caller.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation completed successfully.
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
@ -1021,8 +1021,8 @@ ON_EXIT:
|
|||||||
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The
|
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The
|
||||||
EFI DNSv6 Protocol instance is not configured.
|
EFI DNSv6 Protocol instance is not configured.
|
||||||
@retval EFI_UNSUPPORTED The designated protocol is not supported.
|
@retval EFI_UNSUPPORTED The designated protocol is not supported.
|
||||||
@retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To
|
@retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To
|
||||||
reconfigure the instance the caller must call Configure() with
|
reconfigure the instance the caller must call Configure() with
|
||||||
NULL first to return driver to unconfigured state.
|
NULL first to return driver to unconfigured state.
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -1034,17 +1034,17 @@ Dns6Configure (
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
DNS_INSTANCE *Instance;
|
DNS_INSTANCE *Instance;
|
||||||
|
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
UINT32 ServerListCount;
|
UINT32 ServerListCount;
|
||||||
EFI_IPv6_ADDRESS *ServerList;
|
EFI_IPv6_ADDRESS *ServerList;
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
ServerList = NULL;
|
ServerList = NULL;
|
||||||
|
|
||||||
if (This == NULL ||
|
if (This == NULL ||
|
||||||
(DnsConfigData != NULL && ((DnsConfigData->DnsServerCount != 0 && DnsConfigData->DnsServerList == NULL) ||
|
(DnsConfigData != NULL && ((DnsConfigData->DnsServerCount != 0 && DnsConfigData->DnsServerList == NULL) ||
|
||||||
(DnsConfigData->DnsServerCount == 0 && DnsConfigData->DnsServerList != NULL)))) {
|
(DnsConfigData->DnsServerCount == 0 && DnsConfigData->DnsServerList != NULL)))) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
@ -1075,7 +1075,7 @@ Dns6Configure (
|
|||||||
FreePool (Instance->Dns6CfgData.DnsServerList);
|
FreePool (Instance->Dns6CfgData.DnsServerList);
|
||||||
}
|
}
|
||||||
ZeroMem (&Instance->Dns6CfgData, sizeof (EFI_DNS6_CONFIG_DATA));
|
ZeroMem (&Instance->Dns6CfgData, sizeof (EFI_DNS6_CONFIG_DATA));
|
||||||
|
|
||||||
Instance->State = DNS_STATE_UNCONFIGED;
|
Instance->State = DNS_STATE_UNCONFIGED;
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
@ -1099,14 +1099,14 @@ Dns6Configure (
|
|||||||
//
|
//
|
||||||
Status = GetDns6ServerFromDhcp6 (
|
Status = GetDns6ServerFromDhcp6 (
|
||||||
Instance->Service->ImageHandle,
|
Instance->Service->ImageHandle,
|
||||||
Instance->Service->ControllerHandle,
|
Instance->Service->ControllerHandle,
|
||||||
&ServerListCount,
|
&ServerListCount,
|
||||||
&ServerList
|
&ServerList
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT(ServerList != NULL);
|
ASSERT(ServerList != NULL);
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
@ -1141,7 +1141,7 @@ Dns6Configure (
|
|||||||
}
|
}
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
Instance->State = DNS_STATE_CONFIGED;
|
Instance->State = DNS_STATE_CONFIGED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1181,23 +1181,23 @@ Dns6HostNameToIp (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
DNS_INSTANCE *Instance;
|
DNS_INSTANCE *Instance;
|
||||||
|
|
||||||
EFI_DNS6_CONFIG_DATA *ConfigData;
|
EFI_DNS6_CONFIG_DATA *ConfigData;
|
||||||
|
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
DNS6_CACHE *Item;
|
DNS6_CACHE *Item;
|
||||||
LIST_ENTRY *Entry;
|
LIST_ENTRY *Entry;
|
||||||
LIST_ENTRY *Next;
|
LIST_ENTRY *Next;
|
||||||
|
|
||||||
CHAR8 *QueryName;
|
CHAR8 *QueryName;
|
||||||
|
|
||||||
DNS6_TOKEN_ENTRY *TokenEntry;
|
DNS6_TOKEN_ENTRY *TokenEntry;
|
||||||
NET_BUF *Packet;
|
NET_BUF *Packet;
|
||||||
|
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
Item = NULL;
|
Item = NULL;
|
||||||
QueryName = NULL;
|
QueryName = NULL;
|
||||||
@ -1212,9 +1212,9 @@ Dns6HostNameToIp (
|
|||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL6 (This);
|
Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL6 (This);
|
||||||
|
|
||||||
ConfigData = &(Instance->Dns6CfgData);
|
ConfigData = &(Instance->Dns6CfgData);
|
||||||
|
|
||||||
if (Instance->State != DNS_STATE_CONFIGED) {
|
if (Instance->State != DNS_STATE_CONFIGED) {
|
||||||
@ -1237,9 +1237,9 @@ Dns6HostNameToIp (
|
|||||||
if (Token->RetryInterval == 0) {
|
if (Token->RetryInterval == 0) {
|
||||||
Token->RetryInterval = ConfigData->RetryInterval;
|
Token->RetryInterval = ConfigData->RetryInterval;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Minimum interval of retry is 2 second. If the retry interval is less than 2 second, then use the 2 second.
|
// Minimum interval of retry is 2 second. If the retry interval is less than 2 second, then use the 2 second.
|
||||||
//
|
//
|
||||||
if (Token->RetryInterval < DNS_DEFAULT_TIMEOUT) {
|
if (Token->RetryInterval < DNS_DEFAULT_TIMEOUT) {
|
||||||
Token->RetryInterval = DNS_DEFAULT_TIMEOUT;
|
Token->RetryInterval = DNS_DEFAULT_TIMEOUT;
|
||||||
@ -1270,7 +1270,7 @@ Dns6HostNameToIp (
|
|||||||
if (Token->RspData.H2AData != NULL) {
|
if (Token->RspData.H2AData != NULL) {
|
||||||
FreePool (Token->RspData.H2AData);
|
FreePool (Token->RspData.H2AData);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
@ -1283,17 +1283,17 @@ Dns6HostNameToIp (
|
|||||||
Index++;
|
Index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Token->Status = EFI_SUCCESS;
|
Token->Status = EFI_SUCCESS;
|
||||||
|
|
||||||
if (Token->Event != NULL) {
|
if (Token->Event != NULL) {
|
||||||
gBS->SignalEvent (Token->Event);
|
gBS->SignalEvent (Token->Event);
|
||||||
DispatchDpc ();
|
DispatchDpc ();
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = Token->Status;
|
Status = Token->Status;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -1304,7 +1304,7 @@ Dns6HostNameToIp (
|
|||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
TokenEntry->PacketToLive = Token->RetryInterval;
|
TokenEntry->PacketToLive = Token->RetryInterval;
|
||||||
TokenEntry->Token = Token;
|
TokenEntry->Token = Token;
|
||||||
TokenEntry->QueryHostName = AllocateZeroPool (StrSize (HostName));
|
TokenEntry->QueryHostName = AllocateZeroPool (StrSize (HostName));
|
||||||
@ -1312,7 +1312,7 @@ Dns6HostNameToIp (
|
|||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
CopyMem (TokenEntry->QueryHostName, HostName, StrSize (HostName));
|
CopyMem (TokenEntry->QueryHostName, HostName, StrSize (HostName));
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -1323,7 +1323,7 @@ Dns6HostNameToIp (
|
|||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Construct DNS Query Packet.
|
// Construct DNS Query Packet.
|
||||||
//
|
//
|
||||||
@ -1341,7 +1341,7 @@ Dns6HostNameToIp (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Dns Query Ip
|
// Dns Query Ip
|
||||||
//
|
//
|
||||||
@ -1349,7 +1349,7 @@ Dns6HostNameToIp (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
Dns6RemoveTokenEntry (&Instance->Dns6TxTokens, TokenEntry);
|
Dns6RemoveTokenEntry (&Instance->Dns6TxTokens, TokenEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
ON_EXIT:
|
ON_EXIT:
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
@ -1357,19 +1357,19 @@ ON_EXIT:
|
|||||||
if (TokenEntry->QueryHostName != NULL) {
|
if (TokenEntry->QueryHostName != NULL) {
|
||||||
FreePool (TokenEntry->QueryHostName);
|
FreePool (TokenEntry->QueryHostName);
|
||||||
}
|
}
|
||||||
|
|
||||||
FreePool (TokenEntry);
|
FreePool (TokenEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Packet != NULL) {
|
if (Packet != NULL) {
|
||||||
NetbufFree (Packet);
|
NetbufFree (Packet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (QueryName != NULL) {
|
if (QueryName != NULL) {
|
||||||
FreePool (QueryName);
|
FreePool (QueryName);
|
||||||
}
|
}
|
||||||
|
|
||||||
gBS->RestoreTPL (OldTpl);
|
gBS->RestoreTPL (OldTpl);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
@ -1442,37 +1442,37 @@ EFIAPI
|
|||||||
Dns6GeneralLookUp (
|
Dns6GeneralLookUp (
|
||||||
IN EFI_DNS6_PROTOCOL *This,
|
IN EFI_DNS6_PROTOCOL *This,
|
||||||
IN CHAR8 *QName,
|
IN CHAR8 *QName,
|
||||||
IN UINT16 QType,
|
IN UINT16 QType,
|
||||||
IN UINT16 QClass,
|
IN UINT16 QClass,
|
||||||
IN EFI_DNS6_COMPLETION_TOKEN *Token
|
IN EFI_DNS6_COMPLETION_TOKEN *Token
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
DNS_INSTANCE *Instance;
|
DNS_INSTANCE *Instance;
|
||||||
|
|
||||||
EFI_DNS6_CONFIG_DATA *ConfigData;
|
EFI_DNS6_CONFIG_DATA *ConfigData;
|
||||||
|
|
||||||
DNS6_TOKEN_ENTRY *TokenEntry;
|
DNS6_TOKEN_ENTRY *TokenEntry;
|
||||||
NET_BUF *Packet;
|
NET_BUF *Packet;
|
||||||
|
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
TokenEntry = NULL;
|
TokenEntry = NULL;
|
||||||
Packet = NULL;
|
Packet = NULL;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Validate the parameters
|
// Validate the parameters
|
||||||
//
|
//
|
||||||
if ((This == NULL) || (QName == NULL) || Token == NULL) {
|
if ((This == NULL) || (QName == NULL) || Token == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL6 (This);
|
Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL6 (This);
|
||||||
|
|
||||||
ConfigData = &(Instance->Dns6CfgData);
|
ConfigData = &(Instance->Dns6CfgData);
|
||||||
|
|
||||||
if (Instance->State != DNS_STATE_CONFIGED) {
|
if (Instance->State != DNS_STATE_CONFIGED) {
|
||||||
@ -1481,14 +1481,14 @@ Dns6GeneralLookUp (
|
|||||||
}
|
}
|
||||||
|
|
||||||
Token->Status = EFI_NOT_READY;
|
Token->Status = EFI_NOT_READY;
|
||||||
|
|
||||||
//
|
//
|
||||||
// If zero, use the parameter configured through Dns.Configure() interface.
|
// If zero, use the parameter configured through Dns.Configure() interface.
|
||||||
//
|
//
|
||||||
if (Token->RetryCount == 0) {
|
if (Token->RetryCount == 0) {
|
||||||
Token->RetryCount = ConfigData->RetryCount;
|
Token->RetryCount = ConfigData->RetryCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// If zero, use the parameter configured through Dns.Configure() interface.
|
// If zero, use the parameter configured through Dns.Configure() interface.
|
||||||
//
|
//
|
||||||
@ -1497,7 +1497,7 @@ Dns6GeneralLookUp (
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Minimum interval of retry is 2 second. If the retry interval is less than 2 second, then use the 2 second.
|
// Minimum interval of retry is 2 second. If the retry interval is less than 2 second, then use the 2 second.
|
||||||
//
|
//
|
||||||
if (Token->RetryInterval < DNS_DEFAULT_TIMEOUT) {
|
if (Token->RetryInterval < DNS_DEFAULT_TIMEOUT) {
|
||||||
Token->RetryInterval = DNS_DEFAULT_TIMEOUT;
|
Token->RetryInterval = DNS_DEFAULT_TIMEOUT;
|
||||||
@ -1511,7 +1511,7 @@ Dns6GeneralLookUp (
|
|||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
TokenEntry->PacketToLive = Token->RetryInterval;
|
TokenEntry->PacketToLive = Token->RetryInterval;
|
||||||
TokenEntry->GeneralLookUp = TRUE;
|
TokenEntry->GeneralLookUp = TRUE;
|
||||||
TokenEntry->Token = Token;
|
TokenEntry->Token = Token;
|
||||||
@ -1524,7 +1524,7 @@ Dns6GeneralLookUp (
|
|||||||
if (TokenEntry != NULL) {
|
if (TokenEntry != NULL) {
|
||||||
FreePool (TokenEntry);
|
FreePool (TokenEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1538,12 +1538,12 @@ Dns6GeneralLookUp (
|
|||||||
if (TokenEntry != NULL) {
|
if (TokenEntry != NULL) {
|
||||||
FreePool (TokenEntry);
|
FreePool (TokenEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
NetbufFree (Packet);
|
NetbufFree (Packet);
|
||||||
|
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Dns Query Ip
|
// Dns Query Ip
|
||||||
//
|
//
|
||||||
@ -1554,10 +1554,10 @@ Dns6GeneralLookUp (
|
|||||||
if (TokenEntry != NULL) {
|
if (TokenEntry != NULL) {
|
||||||
FreePool (TokenEntry);
|
FreePool (TokenEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
NetbufFree (Packet);
|
NetbufFree (Packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
ON_EXIT:
|
ON_EXIT:
|
||||||
gBS->RestoreTPL (OldTpl);
|
gBS->RestoreTPL (OldTpl);
|
||||||
return Status;
|
return Status;
|
||||||
@ -1599,24 +1599,24 @@ Dns6UpdateDnsCache (
|
|||||||
IN EFI_DNS6_CACHE_ENTRY DnsCacheEntry
|
IN EFI_DNS6_CACHE_ENTRY DnsCacheEntry
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
if (DnsCacheEntry.HostName == NULL || DnsCacheEntry.IpAddress == NULL || DnsCacheEntry.Timeout == 0) {
|
if (DnsCacheEntry.HostName == NULL || DnsCacheEntry.IpAddress == NULL || DnsCacheEntry.Timeout == 0) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Update Dns6Cache here.
|
// Update Dns6Cache here.
|
||||||
//
|
//
|
||||||
Status = UpdateDns6Cache (&mDriverData->Dns6CacheList, DeleteFlag, Override, DnsCacheEntry);
|
Status = UpdateDns6Cache (&mDriverData->Dns6CacheList, DeleteFlag, Override, DnsCacheEntry);
|
||||||
|
|
||||||
gBS->RestoreTPL (OldTpl);
|
gBS->RestoreTPL (OldTpl);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1665,7 +1665,7 @@ Dns6Poll (
|
|||||||
}
|
}
|
||||||
|
|
||||||
Udp = Instance->UdpIo->Protocol.Udp6;
|
Udp = Instance->UdpIo->Protocol.Udp6;
|
||||||
|
|
||||||
return Udp->Poll (Udp);
|
return Udp->Poll (Udp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
|
|
||||||
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||||
This program and the accompanying materials are licensed and made available under
|
This program and the accompanying materials are licensed and made available under
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
The full text of the license may be found at
|
The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php.
|
http://opensource.org/licenses/bsd-license.php.
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -23,7 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
@retval EFI_SUCCESS Device patch successfully updated.
|
@retval EFI_SUCCESS Device patch successfully updated.
|
||||||
@retval EFI_OUT_OF_RESOURCES Could not allocate needed resources.
|
@retval EFI_OUT_OF_RESOURCES Could not allocate needed resources.
|
||||||
@retval Others Unexpected error happened.
|
@retval Others Unexpected error happened.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
HttpBootUpdateDevicePath (
|
HttpBootUpdateDevicePath (
|
||||||
@ -39,7 +39,7 @@ HttpBootUpdateDevicePath (
|
|||||||
|
|
||||||
TmpIpDevicePath = NULL;
|
TmpIpDevicePath = NULL;
|
||||||
TmpDnsDevicePath = NULL;
|
TmpDnsDevicePath = NULL;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Update the IP node with DHCP assigned information.
|
// Update the IP node with DHCP assigned information.
|
||||||
//
|
//
|
||||||
@ -67,13 +67,13 @@ HttpBootUpdateDevicePath (
|
|||||||
SetDevicePathNodeLength (Node, sizeof (IPv6_DEVICE_PATH));
|
SetDevicePathNodeLength (Node, sizeof (IPv6_DEVICE_PATH));
|
||||||
Node->Ipv6.PrefixLength = IP6_PREFIX_LENGTH;
|
Node->Ipv6.PrefixLength = IP6_PREFIX_LENGTH;
|
||||||
Node->Ipv6.RemotePort = Private->Port;
|
Node->Ipv6.RemotePort = Private->Port;
|
||||||
Node->Ipv6.Protocol = EFI_IP_PROTO_TCP;
|
Node->Ipv6.Protocol = EFI_IP_PROTO_TCP;
|
||||||
Node->Ipv6.IpAddressOrigin = 0;
|
Node->Ipv6.IpAddressOrigin = 0;
|
||||||
CopyMem (&Node->Ipv6.LocalIpAddress, &Private->StationIp.v6, sizeof (EFI_IPv6_ADDRESS));
|
CopyMem (&Node->Ipv6.LocalIpAddress, &Private->StationIp.v6, sizeof (EFI_IPv6_ADDRESS));
|
||||||
CopyMem (&Node->Ipv6.RemoteIpAddress, &Private->ServerIp.v6, sizeof (EFI_IPv6_ADDRESS));
|
CopyMem (&Node->Ipv6.RemoteIpAddress, &Private->ServerIp.v6, sizeof (EFI_IPv6_ADDRESS));
|
||||||
CopyMem (&Node->Ipv6.GatewayIpAddress, &Private->GatewayIp.v6, sizeof (EFI_IPv6_ADDRESS));
|
CopyMem (&Node->Ipv6.GatewayIpAddress, &Private->GatewayIp.v6, sizeof (EFI_IPv6_ADDRESS));
|
||||||
}
|
}
|
||||||
|
|
||||||
TmpIpDevicePath = AppendDevicePathNode (Private->ParentDevicePath, (EFI_DEVICE_PATH_PROTOCOL*) Node);
|
TmpIpDevicePath = AppendDevicePathNode (Private->ParentDevicePath, (EFI_DEVICE_PATH_PROTOCOL*) Node);
|
||||||
FreePool (Node);
|
FreePool (Node);
|
||||||
if (TmpIpDevicePath == NULL) {
|
if (TmpIpDevicePath == NULL) {
|
||||||
@ -95,7 +95,7 @@ HttpBootUpdateDevicePath (
|
|||||||
SetDevicePathNodeLength (Node, Length);
|
SetDevicePathNodeLength (Node, Length);
|
||||||
Node->Dns.IsIPv6 = Private->UsingIpv6 ? 0x01 : 0x00;
|
Node->Dns.IsIPv6 = Private->UsingIpv6 ? 0x01 : 0x00;
|
||||||
CopyMem ((UINT8*) Node + sizeof (EFI_DEVICE_PATH_PROTOCOL) + sizeof (Node->Dns.IsIPv6), Private->DnsServerIp, Private->DnsServerCount * sizeof (EFI_IP_ADDRESS));
|
CopyMem ((UINT8*) Node + sizeof (EFI_DEVICE_PATH_PROTOCOL) + sizeof (Node->Dns.IsIPv6), Private->DnsServerIp, Private->DnsServerCount * sizeof (EFI_IP_ADDRESS));
|
||||||
|
|
||||||
TmpDnsDevicePath = AppendDevicePathNode (TmpIpDevicePath, (EFI_DEVICE_PATH_PROTOCOL*) Node);
|
TmpDnsDevicePath = AppendDevicePathNode (TmpIpDevicePath, (EFI_DEVICE_PATH_PROTOCOL*) Node);
|
||||||
FreePool (Node);
|
FreePool (Node);
|
||||||
FreePool (TmpIpDevicePath);
|
FreePool (TmpIpDevicePath);
|
||||||
@ -150,7 +150,7 @@ HttpBootUpdateDevicePath (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
FreePool (Private->Ip4Nic->DevicePath);
|
FreePool (Private->Ip4Nic->DevicePath);
|
||||||
Private->Ip4Nic->DevicePath = NewDevicePath;
|
Private->Ip4Nic->DevicePath = NewDevicePath;
|
||||||
} else {
|
} else {
|
||||||
@ -169,7 +169,7 @@ HttpBootUpdateDevicePath (
|
|||||||
FreePool (Private->Ip6Nic->DevicePath);
|
FreePool (Private->Ip6Nic->DevicePath);
|
||||||
Private->Ip6Nic->DevicePath = NewDevicePath;
|
Private->Ip6Nic->DevicePath = NewDevicePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,7 +201,7 @@ HttpBootDhcp4ExtractUriInfo (
|
|||||||
ASSERT (SelectIndex < HTTP_BOOT_OFFER_MAX_NUM);
|
ASSERT (SelectIndex < HTTP_BOOT_OFFER_MAX_NUM);
|
||||||
|
|
||||||
DnsServerIndex = 0;
|
DnsServerIndex = 0;
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -213,7 +213,7 @@ HttpBootDhcp4ExtractUriInfo (
|
|||||||
//
|
//
|
||||||
// In Corporate environment, we need a HttpOffer.
|
// In Corporate environment, we need a HttpOffer.
|
||||||
//
|
//
|
||||||
if ((SelectOffer->OfferType == HttpOfferTypeDhcpIpUri) ||
|
if ((SelectOffer->OfferType == HttpOfferTypeDhcpIpUri) ||
|
||||||
(SelectOffer->OfferType == HttpOfferTypeDhcpIpUriDns) ||
|
(SelectOffer->OfferType == HttpOfferTypeDhcpIpUriDns) ||
|
||||||
(SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns)) {
|
(SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns)) {
|
||||||
HttpOffer = SelectOffer;
|
HttpOffer = SelectOffer;
|
||||||
@ -246,7 +246,7 @@ HttpBootDhcp4ExtractUriInfo (
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns) ||
|
if ((SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns) ||
|
||||||
(SelectOffer->OfferType == HttpOfferTypeDhcpDns) ||
|
(SelectOffer->OfferType == HttpOfferTypeDhcpDns) ||
|
||||||
(SelectOffer->OfferType == HttpOfferTypeDhcpIpUriDns)) {
|
(SelectOffer->OfferType == HttpOfferTypeDhcpIpUriDns)) {
|
||||||
Option = SelectOffer->OptList[HTTP_BOOT_DHCP4_TAG_INDEX_DNS_SERVER];
|
Option = SelectOffer->OptList[HTTP_BOOT_DHCP4_TAG_INDEX_DNS_SERVER];
|
||||||
@ -265,10 +265,10 @@ HttpBootDhcp4ExtractUriInfo (
|
|||||||
for (DnsServerIndex = 0; DnsServerIndex < Private->DnsServerCount; DnsServerIndex++) {
|
for (DnsServerIndex = 0; DnsServerIndex < Private->DnsServerCount; DnsServerIndex++) {
|
||||||
CopyMem (&(Private->DnsServerIp[DnsServerIndex].v4), &(((EFI_IPv4_ADDRESS *) Option->Data)[DnsServerIndex]), sizeof (EFI_IPv4_ADDRESS));
|
CopyMem (&(Private->DnsServerIp[DnsServerIndex].v4), &(((EFI_IPv4_ADDRESS *) Option->Data)[DnsServerIndex]), sizeof (EFI_IPv4_ADDRESS));
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Configure the default DNS server if server assigned.
|
// Configure the default DNS server if server assigned.
|
||||||
//
|
//
|
||||||
Status = HttpBootRegisterIp4Dns (
|
Status = HttpBootRegisterIp4Dns (
|
||||||
Private,
|
Private,
|
||||||
Option->Length,
|
Option->Length,
|
||||||
@ -292,7 +292,7 @@ HttpBootDhcp4ExtractUriInfo (
|
|||||||
if (EFI_ERROR (Status) || Private->Port == 0) {
|
if (EFI_ERROR (Status) || Private->Port == 0) {
|
||||||
Private->Port = 80;
|
Private->Port = 80;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// All boot informations are valid here.
|
// All boot informations are valid here.
|
||||||
//
|
//
|
||||||
@ -402,7 +402,7 @@ HttpBootDhcp6ExtractUriInfo (
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns) ||
|
if ((SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns) ||
|
||||||
(SelectOffer->OfferType == HttpOfferTypeDhcpDns) ||
|
(SelectOffer->OfferType == HttpOfferTypeDhcpDns) ||
|
||||||
(SelectOffer->OfferType == HttpOfferTypeDhcpIpUriDns)) {
|
(SelectOffer->OfferType == HttpOfferTypeDhcpIpUriDns)) {
|
||||||
Option = SelectOffer->OptList[HTTP_BOOT_DHCP6_IDX_DNS_SERVER];
|
Option = SelectOffer->OptList[HTTP_BOOT_DHCP6_IDX_DNS_SERVER];
|
||||||
@ -434,9 +434,9 @@ HttpBootDhcp6ExtractUriInfo (
|
|||||||
goto Error;
|
goto Error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Extract the HTTP server Ip from URL. This is used to Check route table
|
// Extract the HTTP server Ip from URL. This is used to Check route table
|
||||||
// whether can send message to HTTP Server Ip through the GateWay.
|
// whether can send message to HTTP Server Ip through the GateWay.
|
||||||
//
|
//
|
||||||
Status = HttpUrlGetIp6 (
|
Status = HttpUrlGetIp6 (
|
||||||
@ -444,7 +444,7 @@ HttpBootDhcp6ExtractUriInfo (
|
|||||||
Private->BootFileUriParser,
|
Private->BootFileUriParser,
|
||||||
&IpAddr
|
&IpAddr
|
||||||
);
|
);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
//
|
//
|
||||||
// The Http server address is expressed by Name Ip, so perform DNS resolution
|
// The Http server address is expressed by Name Ip, so perform DNS resolution
|
||||||
@ -464,23 +464,23 @@ HttpBootDhcp6ExtractUriInfo (
|
|||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto Error;
|
goto Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
AsciiStrToUnicodeStrS (HostName, HostNameStr, HostNameSize);
|
AsciiStrToUnicodeStrS (HostName, HostNameStr, HostNameSize);
|
||||||
|
|
||||||
if (HostName != NULL) {
|
if (HostName != NULL) {
|
||||||
FreePool (HostName);
|
FreePool (HostName);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = HttpBootDns (Private, HostNameStr, &IpAddr);
|
Status = HttpBootDns (Private, HostNameStr, &IpAddr);
|
||||||
FreePool (HostNameStr);
|
FreePool (HostNameStr);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
AsciiPrint ("\n Error: Could not retrieve the host address from DNS server.\n");
|
AsciiPrint ("\n Error: Could not retrieve the host address from DNS server.\n");
|
||||||
goto Error;
|
goto Error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CopyMem (&Private->ServerIp.v6, &IpAddr, sizeof (EFI_IPv6_ADDRESS));
|
CopyMem (&Private->ServerIp.v6, &IpAddr, sizeof (EFI_IPv6_ADDRESS));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Extract the port from URL, and use default HTTP port 80 if not provided.
|
// Extract the port from URL, and use default HTTP port 80 if not provided.
|
||||||
//
|
//
|
||||||
@ -492,7 +492,7 @@ HttpBootDhcp6ExtractUriInfo (
|
|||||||
if (EFI_ERROR (Status) || Private->Port == 0) {
|
if (EFI_ERROR (Status) || Private->Port == 0) {
|
||||||
Private->Port = 80;
|
Private->Port = 80;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// All boot informations are valid here.
|
// All boot informations are valid here.
|
||||||
//
|
//
|
||||||
@ -504,7 +504,7 @@ HttpBootDhcp6ExtractUriInfo (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Error;
|
goto Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
||||||
Error:
|
Error:
|
||||||
@ -512,7 +512,7 @@ Error:
|
|||||||
FreePool (Private->DnsServerIp);
|
FreePool (Private->DnsServerIp);
|
||||||
Private->DnsServerIp = NULL;
|
Private->DnsServerIp = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -532,7 +532,7 @@ HttpBootDiscoverBootInfo (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Start D.O.R.A/S.A.R.R exchange to acquire station ip address and
|
// Start D.O.R.A/S.A.R.R exchange to acquire station ip address and
|
||||||
// other Http boot information.
|
// other Http boot information.
|
||||||
@ -557,7 +557,7 @@ HttpBootDiscoverBootInfo (
|
|||||||
@param[in] EventType Indicate the Event type that occurs in the current callback.
|
@param[in] EventType Indicate the Event type that occurs in the current callback.
|
||||||
@param[in] Message HTTP message which will be send to, or just received from HTTP server.
|
@param[in] Message HTTP message which will be send to, or just received from HTTP server.
|
||||||
@param[in] Context The Callback Context pointer.
|
@param[in] Context The Callback Context pointer.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Tells the HttpIo to continue the HTTP process.
|
@retval EFI_SUCCESS Tells the HttpIo to continue the HTTP process.
|
||||||
@retval Others Tells the HttpIo to abort the current HTTP process.
|
@retval Others Tells the HttpIo to abort the current HTTP process.
|
||||||
**/
|
**/
|
||||||
@ -706,7 +706,7 @@ HttpBootFreeCacheList (
|
|||||||
LIST_ENTRY *Entry;
|
LIST_ENTRY *Entry;
|
||||||
LIST_ENTRY *NextEntry;
|
LIST_ENTRY *NextEntry;
|
||||||
HTTP_BOOT_CACHE_CONTENT *Cache;
|
HTTP_BOOT_CACHE_CONTENT *Cache;
|
||||||
|
|
||||||
NET_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Private->CacheList) {
|
NET_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Private->CacheList) {
|
||||||
Cache = NET_LIST_USER_STRUCT (Entry, HTTP_BOOT_CACHE_CONTENT, Link);
|
Cache = NET_LIST_USER_STRUCT (Entry, HTTP_BOOT_CACHE_CONTENT, Link);
|
||||||
RemoveEntryList (&Cache->Link);
|
RemoveEntryList (&Cache->Link);
|
||||||
@ -746,7 +746,7 @@ HttpBootGetFileFromCache (
|
|||||||
HTTP_BOOT_CACHE_CONTENT *Cache;
|
HTTP_BOOT_CACHE_CONTENT *Cache;
|
||||||
HTTP_BOOT_ENTITY_DATA *EntityData;
|
HTTP_BOOT_ENTITY_DATA *EntityData;
|
||||||
UINTN CopyedSize;
|
UINTN CopyedSize;
|
||||||
|
|
||||||
if (Uri == NULL || BufferSize == NULL || Buffer == NULL || ImageType == NULL) {
|
if (Uri == NULL || BufferSize == NULL || Buffer == NULL || ImageType == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
@ -808,7 +808,7 @@ HttpBootGetFileFromCache (
|
|||||||
|
|
||||||
@retval EFI_SUCCESS Continue to parser the message body.
|
@retval EFI_SUCCESS Continue to parser the message body.
|
||||||
@retval Others Abort the parse.
|
@retval Others Abort the parse.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@ -878,7 +878,7 @@ HttpBootGetBootFileCallback (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
This function download the boot file by using UEFI HTTP protocol.
|
This function download the boot file by using UEFI HTTP protocol.
|
||||||
|
|
||||||
@param[in] Private The pointer to the driver's private data.
|
@param[in] Private The pointer to the driver's private data.
|
||||||
@param[in] HeaderOnly Only request the response header, it could save a lot of time if
|
@param[in] HeaderOnly Only request the response header, it could save a lot of time if
|
||||||
the caller only want to know the size of the requested file.
|
the caller only want to know the size of the requested file.
|
||||||
@ -926,7 +926,7 @@ HttpBootGetBootFile (
|
|||||||
CHAR16 *Url;
|
CHAR16 *Url;
|
||||||
BOOLEAN IdentityMode;
|
BOOLEAN IdentityMode;
|
||||||
UINTN ReceivedSize;
|
UINTN ReceivedSize;
|
||||||
|
|
||||||
ASSERT (Private != NULL);
|
ASSERT (Private != NULL);
|
||||||
ASSERT (Private->HttpCreated);
|
ASSERT (Private->HttpCreated);
|
||||||
|
|
||||||
@ -1116,7 +1116,7 @@ HttpBootGetBootFile (
|
|||||||
Cache->ResponseData = ResponseData;
|
Cache->ResponseData = ResponseData;
|
||||||
Cache->ImageType = *ImageType;
|
Cache->ImageType = *ImageType;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// 3.3 Init a message-body parser from the header information.
|
// 3.3 Init a message-body parser from the header information.
|
||||||
//
|
//
|
||||||
@ -1278,7 +1278,7 @@ HttpBootGetBootFile (
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
||||||
ERROR_6:
|
ERROR_6:
|
||||||
if (Parser != NULL) {
|
if (Parser != NULL) {
|
||||||
HttpFreeMsgParser (Parser);
|
HttpFreeMsgParser (Parser);
|
||||||
@ -1287,7 +1287,7 @@ ERROR_6:
|
|||||||
FreePool (Context.Block);
|
FreePool (Context.Block);
|
||||||
}
|
}
|
||||||
HttpBootFreeCache (Cache);
|
HttpBootFreeCache (Cache);
|
||||||
|
|
||||||
ERROR_5:
|
ERROR_5:
|
||||||
if (ResponseData != NULL) {
|
if (ResponseData != NULL) {
|
||||||
FreePool (ResponseData);
|
FreePool (ResponseData);
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Declaration of the boot file download function.
|
Declaration of the boot file download function.
|
||||||
|
|
||||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||||
This program and the accompanying materials are licensed and made available under
|
This program and the accompanying materials are licensed and made available under
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
The full text of the license may be found at
|
The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php.
|
http://opensource.org/licenses/bsd-license.php.
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -98,7 +98,7 @@ HttpBootCreateHttpIo (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
This function download the boot file by using UEFI HTTP protocol.
|
This function download the boot file by using UEFI HTTP protocol.
|
||||||
|
|
||||||
@param[in] Private The pointer to the driver's private data.
|
@param[in] Private The pointer to the driver's private data.
|
||||||
@param[in] HeaderOnly Only request the response header, it could save a lot of time if
|
@param[in] HeaderOnly Only request the response header, it could save a lot of time if
|
||||||
the caller only want to know the size of the requested file.
|
the caller only want to know the size of the requested file.
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Implementation of EFI_COMPONENT_NAME_PROTOCOL and EFI_COMPONENT_NAME2_PROTOCOL protocol.
|
Implementation of EFI_COMPONENT_NAME_PROTOCOL and EFI_COMPONENT_NAME2_PROTOCOL protocol.
|
||||||
|
|
||||||
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials are licensed and made available under
|
This program and the accompanying materials are licensed and made available under
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
The full text of the license may be found at
|
The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php.
|
http://opensource.org/licenses/bsd-license.php.
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -17,7 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
///
|
///
|
||||||
/// Component Name Protocol instance
|
/// Component Name Protocol instance
|
||||||
///
|
///
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED
|
GLOBAL_REMOVE_IF_UNREFERENCED
|
||||||
EFI_COMPONENT_NAME_PROTOCOL gHttpBootDxeComponentName = {
|
EFI_COMPONENT_NAME_PROTOCOL gHttpBootDxeComponentName = {
|
||||||
(EFI_COMPONENT_NAME_GET_DRIVER_NAME) HttpBootDxeComponentNameGetDriverName,
|
(EFI_COMPONENT_NAME_GET_DRIVER_NAME) HttpBootDxeComponentNameGetDriverName,
|
||||||
(EFI_COMPONENT_NAME_GET_CONTROLLER_NAME)HttpBootDxeComponentNameGetControllerName,
|
(EFI_COMPONENT_NAME_GET_CONTROLLER_NAME)HttpBootDxeComponentNameGetControllerName,
|
||||||
@ -27,7 +27,7 @@ EFI_COMPONENT_NAME_PROTOCOL gHttpBootDxeComponentName = {
|
|||||||
///
|
///
|
||||||
/// Component Name 2 Protocol instance
|
/// Component Name 2 Protocol instance
|
||||||
///
|
///
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED
|
GLOBAL_REMOVE_IF_UNREFERENCED
|
||||||
EFI_COMPONENT_NAME2_PROTOCOL gHttpBootDxeComponentName2 = {
|
EFI_COMPONENT_NAME2_PROTOCOL gHttpBootDxeComponentName2 = {
|
||||||
HttpBootDxeComponentNameGetDriverName,
|
HttpBootDxeComponentNameGetDriverName,
|
||||||
HttpBootDxeComponentNameGetControllerName,
|
HttpBootDxeComponentNameGetControllerName,
|
||||||
@ -37,7 +37,7 @@ EFI_COMPONENT_NAME2_PROTOCOL gHttpBootDxeComponentName2 = {
|
|||||||
///
|
///
|
||||||
/// Table of driver names
|
/// Table of driver names
|
||||||
///
|
///
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED
|
GLOBAL_REMOVE_IF_UNREFERENCED
|
||||||
EFI_UNICODE_STRING_TABLE mHttpBootDxeDriverNameTable[] = {
|
EFI_UNICODE_STRING_TABLE mHttpBootDxeDriverNameTable[] = {
|
||||||
{ "eng;en", (CHAR16 *)L"UEFI HTTP Boot Driver" },
|
{ "eng;en", (CHAR16 *)L"UEFI HTTP Boot Driver" },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
@ -46,7 +46,7 @@ EFI_UNICODE_STRING_TABLE mHttpBootDxeDriverNameTable[] = {
|
|||||||
///
|
///
|
||||||
/// Table of controller names
|
/// Table of controller names
|
||||||
///
|
///
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED
|
GLOBAL_REMOVE_IF_UNREFERENCED
|
||||||
EFI_UNICODE_STRING_TABLE mHttpBootDxeControllerNameTable[] = {
|
EFI_UNICODE_STRING_TABLE mHttpBootDxeControllerNameTable[] = {
|
||||||
{ "eng;en", (CHAR16 *)L"UEFI Http Boot Controller" },
|
{ "eng;en", (CHAR16 *)L"UEFI Http Boot Controller" },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
@ -148,7 +148,7 @@ HttpBootDxeComponentNameGetControllerName (
|
|||||||
if (ControllerHandle == NULL || ChildHandle != NULL) {
|
if (ControllerHandle == NULL || ChildHandle != NULL) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
NicHandle = HttpBootGetNicByIp4Children (ControllerHandle);
|
NicHandle = HttpBootGetNicByIp4Children (ControllerHandle);
|
||||||
if (NicHandle == NULL) {
|
if (NicHandle == NULL) {
|
||||||
NicHandle = HttpBootGetNicByIp6Children(ControllerHandle);
|
NicHandle = HttpBootGetNicByIp6Children(ControllerHandle);
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Declaration of HTTP boot driver's EFI_COMPONENT_NAME_PROTOCOL and
|
Declaration of HTTP boot driver's EFI_COMPONENT_NAME_PROTOCOL and
|
||||||
EFI_COMPONENT_NAME2_PROTOCOL function.
|
EFI_COMPONENT_NAME2_PROTOCOL function.
|
||||||
|
|
||||||
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials are licensed and made available under
|
This program and the accompanying materials are licensed and made available under
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
The full text of the license may be found at
|
The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php.
|
http://opensource.org/licenses/bsd-license.php.
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Helper functions for configuring or getting the parameters relating to HTTP Boot.
|
Helper functions for configuring or getting the parameters relating to HTTP Boot.
|
||||||
|
|
||||||
Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -24,7 +24,7 @@ CHAR16 mHttpBootConfigStorageName[] = L"HTTP_BOOT_CONFIG_IFR_NVDATA";
|
|||||||
@param[in] UsingIpv6 Set to TRUE if creating boot option for IPv6.
|
@param[in] UsingIpv6 Set to TRUE if creating boot option for IPv6.
|
||||||
@param[in] Description The description text of the boot option.
|
@param[in] Description The description text of the boot option.
|
||||||
@param[in] Uri The URI string of the boot file.
|
@param[in] Uri The URI string of the boot file.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The boot option is created successfully.
|
@retval EFI_SUCCESS The boot option is created successfully.
|
||||||
@retval Others Failed to create new boot option.
|
@retval Others Failed to create new boot option.
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ HttpBootAddBootOption (
|
|||||||
if ((StrLen (Uri) != 0) && (StrnCmp (Uri, L"http://", 7) != 0) && (StrnCmp (Uri, L"https://", 8) != 0)) {
|
if ((StrLen (Uri) != 0) && (StrnCmp (Uri, L"http://", 7) != 0) && (StrnCmp (Uri, L"https://", 8) != 0)) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create a new device path by appending the IP node and URI node to
|
// Create a new device path by appending the IP node and URI node to
|
||||||
// the driver's parent device path
|
// the driver's parent device path
|
||||||
@ -154,7 +154,7 @@ ON_EXIT:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
This function allows the caller to request the current
|
This function allows the caller to request the current
|
||||||
configuration for one or more named elements. The resulting
|
configuration for one or more named elements. The resulting
|
||||||
string is in <ConfigAltResp> format. Also, any and all alternative
|
string is in <ConfigAltResp> format. Also, any and all alternative
|
||||||
@ -183,7 +183,7 @@ ON_EXIT:
|
|||||||
to the most recent "&" before the first
|
to the most recent "&" before the first
|
||||||
failing name / value pair (or the beginning
|
failing name / value pair (or the beginning
|
||||||
of the string if the failure is in the first
|
of the string if the failure is in the first
|
||||||
name / value pair) if the request was not successful.
|
name / value pair) if the request was not successful.
|
||||||
|
|
||||||
@param[out] Results A null-terminated Unicode string in
|
@param[out] Results A null-terminated Unicode string in
|
||||||
<ConfigAltResp> format which has all values
|
<ConfigAltResp> format which has all values
|
||||||
@ -204,7 +204,7 @@ ON_EXIT:
|
|||||||
would result in this type of
|
would result in this type of
|
||||||
error. In this case, the
|
error. In this case, the
|
||||||
Progress parameter would be
|
Progress parameter would be
|
||||||
set to NULL.
|
set to NULL.
|
||||||
|
|
||||||
@retval EFI_NOT_FOUND Routing data doesn't match any
|
@retval EFI_NOT_FOUND Routing data doesn't match any
|
||||||
known driver. Progress set to the
|
known driver. Progress set to the
|
||||||
@ -249,7 +249,7 @@ HttpBootFormExtractConfig (
|
|||||||
if ((Request != NULL) && !HiiIsConfigHdrMatch (Request, &gHttpBootConfigGuid, mHttpBootConfigStorageName)) {
|
if ((Request != NULL) && !HiiIsConfigHdrMatch (Request, &gHttpBootConfigGuid, mHttpBootConfigStorageName)) {
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigRequestHdr = NULL;
|
ConfigRequestHdr = NULL;
|
||||||
ConfigRequest = NULL;
|
ConfigRequest = NULL;
|
||||||
AllocatedRequest = FALSE;
|
AllocatedRequest = FALSE;
|
||||||
@ -289,7 +289,7 @@ HttpBootFormExtractConfig (
|
|||||||
Results,
|
Results,
|
||||||
Progress
|
Progress
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Free the allocated config request string.
|
// Free the allocated config request string.
|
||||||
//
|
//
|
||||||
@ -310,7 +310,7 @@ HttpBootFormExtractConfig (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
This function applies changes in a driver's configuration.
|
This function applies changes in a driver's configuration.
|
||||||
Input is a Configuration, which has the routing data for this
|
Input is a Configuration, which has the routing data for this
|
||||||
driver followed by name / value configuration pairs. The driver
|
driver followed by name / value configuration pairs. The driver
|
||||||
@ -323,8 +323,8 @@ HttpBootFormExtractConfig (
|
|||||||
@param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
|
@param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
|
||||||
|
|
||||||
@param[in] Configuration A null-terminated Unicode string in
|
@param[in] Configuration A null-terminated Unicode string in
|
||||||
<ConfigString> format.
|
<ConfigString> format.
|
||||||
|
|
||||||
@param[out] Progress A pointer to a string filled in with the
|
@param[out] Progress A pointer to a string filled in with the
|
||||||
offset of the most recent '&' before the
|
offset of the most recent '&' before the
|
||||||
first failing name / value pair (or the
|
first failing name / value pair (or the
|
||||||
@ -335,16 +335,16 @@ HttpBootFormExtractConfig (
|
|||||||
|
|
||||||
@retval EFI_SUCCESS The results have been distributed or are
|
@retval EFI_SUCCESS The results have been distributed or are
|
||||||
awaiting distribution.
|
awaiting distribution.
|
||||||
|
|
||||||
@retval EFI_OUT_OF_RESOURCES Not enough memory to store the
|
@retval EFI_OUT_OF_RESOURCES Not enough memory to store the
|
||||||
parts of the results that must be
|
parts of the results that must be
|
||||||
stored awaiting possible future
|
stored awaiting possible future
|
||||||
protocols.
|
protocols.
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETERS Passing in a NULL for the
|
@retval EFI_INVALID_PARAMETERS Passing in a NULL for the
|
||||||
Results parameter would result
|
Results parameter would result
|
||||||
in this type of error.
|
in this type of error.
|
||||||
|
|
||||||
@retval EFI_NOT_FOUND Target for the specified routing data
|
@retval EFI_NOT_FOUND Target for the specified routing data
|
||||||
was not found.
|
was not found.
|
||||||
|
|
||||||
@ -381,7 +381,7 @@ HttpBootFormRouteConfig (
|
|||||||
|
|
||||||
CallbackInfo = HTTP_BOOT_FORM_CALLBACK_INFO_FROM_CONFIG_ACCESS (This);
|
CallbackInfo = HTTP_BOOT_FORM_CALLBACK_INFO_FROM_CONFIG_ACCESS (This);
|
||||||
Private = HTTP_BOOT_PRIVATE_DATA_FROM_CALLBACK_INFO (CallbackInfo);
|
Private = HTTP_BOOT_PRIVATE_DATA_FROM_CALLBACK_INFO (CallbackInfo);
|
||||||
|
|
||||||
BufferSize = sizeof (HTTP_BOOT_CONFIG_IFR_NVDATA);
|
BufferSize = sizeof (HTTP_BOOT_CONFIG_IFR_NVDATA);
|
||||||
ZeroMem (&CallbackInfo->HttpBootNvData, BufferSize);
|
ZeroMem (&CallbackInfo->HttpBootNvData, BufferSize);
|
||||||
|
|
||||||
@ -405,12 +405,12 @@ HttpBootFormRouteConfig (
|
|||||||
CallbackInfo->HttpBootNvData.Description,
|
CallbackInfo->HttpBootNvData.Description,
|
||||||
CallbackInfo->HttpBootNvData.Uri
|
CallbackInfo->HttpBootNvData.Uri
|
||||||
);
|
);
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
This function is called to provide results data to the driver.
|
This function is called to provide results data to the driver.
|
||||||
This data consists of a unique key that is used to identify
|
This data consists of a unique key that is used to identify
|
||||||
which data is either being passed back or being asked for.
|
which data is either being passed back or being asked for.
|
||||||
@ -419,7 +419,7 @@ HttpBootFormRouteConfig (
|
|||||||
@param[in] Action Specifies the type of action taken by the browser.
|
@param[in] Action Specifies the type of action taken by the browser.
|
||||||
@param[in] QuestionId A unique value which is sent to the original
|
@param[in] QuestionId A unique value which is sent to the original
|
||||||
exporting driver so that it can identify the type
|
exporting driver so that it can identify the type
|
||||||
of data to expect. The format of the data tends to
|
of data to expect. The format of the data tends to
|
||||||
vary based on the opcode that generated the callback.
|
vary based on the opcode that generated the callback.
|
||||||
@param[in] Type The type of value for the question.
|
@param[in] Type The type of value for the question.
|
||||||
@param[in, out] Value A pointer to the data being sent to the original
|
@param[in, out] Value A pointer to the data being sent to the original
|
||||||
@ -456,17 +456,17 @@ HttpBootFormCallback (
|
|||||||
UriLen = 0;
|
UriLen = 0;
|
||||||
AsciiUri = NULL;
|
AsciiUri = NULL;
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
if (This == NULL || Value == NULL) {
|
if (This == NULL || Value == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
CallbackInfo = HTTP_BOOT_FORM_CALLBACK_INFO_FROM_CONFIG_ACCESS (This);
|
CallbackInfo = HTTP_BOOT_FORM_CALLBACK_INFO_FROM_CONFIG_ACCESS (This);
|
||||||
|
|
||||||
if (Action != EFI_BROWSER_ACTION_CHANGING) {
|
if (Action != EFI_BROWSER_ACTION_CHANGING) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (QuestionId) {
|
switch (QuestionId) {
|
||||||
case KEY_INITIATOR_URI:
|
case KEY_INITIATOR_URI:
|
||||||
//
|
//
|
||||||
@ -474,8 +474,8 @@ HttpBootFormCallback (
|
|||||||
//
|
//
|
||||||
Uri = HiiGetString (CallbackInfo->RegisteredHandle, Value->string, NULL);
|
Uri = HiiGetString (CallbackInfo->RegisteredHandle, Value->string, NULL);
|
||||||
if(Uri == NULL) {
|
if(Uri == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// The URI should be either an empty string (for corporate environment) ,or http(s) for home environment.
|
// The URI should be either an empty string (for corporate environment) ,or http(s) for home environment.
|
||||||
@ -492,7 +492,7 @@ HttpBootFormCallback (
|
|||||||
UnicodeStrToAsciiStrS (Uri, AsciiUri, UriLen);
|
UnicodeStrToAsciiStrS (Uri, AsciiUri, UriLen);
|
||||||
|
|
||||||
Status = HttpBootCheckUriScheme (AsciiUri);
|
Status = HttpBootCheckUriScheme (AsciiUri);
|
||||||
|
|
||||||
if (Status == EFI_INVALID_PARAMETER) {
|
if (Status == EFI_INVALID_PARAMETER) {
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "HttpBootFormCallback: %r.\n", Status));
|
DEBUG ((EFI_D_ERROR, "HttpBootFormCallback: %r.\n", Status));
|
||||||
@ -503,11 +503,11 @@ HttpBootFormCallback (
|
|||||||
L"ERROR: Unsupported URI!",
|
L"ERROR: Unsupported URI!",
|
||||||
L"Only supports HTTP and HTTPS",
|
L"Only supports HTTP and HTTPS",
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
} else if (Status == EFI_ACCESS_DENIED) {
|
} else if (Status == EFI_ACCESS_DENIED) {
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "HttpBootFormCallback: %r.\n", Status));
|
DEBUG ((EFI_D_ERROR, "HttpBootFormCallback: %r.\n", Status));
|
||||||
|
|
||||||
CreatePopUp (
|
CreatePopUp (
|
||||||
EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
|
EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
|
||||||
&Key,
|
&Key,
|
||||||
@ -524,8 +524,8 @@ HttpBootFormCallback (
|
|||||||
|
|
||||||
if (AsciiUri != NULL) {
|
if (AsciiUri != NULL) {
|
||||||
FreePool (AsciiUri);
|
FreePool (AsciiUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -561,7 +561,7 @@ HttpBootConfigFormInit (
|
|||||||
if (CallbackInfo->Initilized) {
|
if (CallbackInfo->Initilized) {
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
CallbackInfo->Signature = HTTP_BOOT_FORM_CALLBACK_INFO_SIGNATURE;
|
CallbackInfo->Signature = HTTP_BOOT_FORM_CALLBACK_INFO_SIGNATURE;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -586,7 +586,7 @@ HttpBootConfigFormInit (
|
|||||||
CallbackInfo->ConfigAccess.ExtractConfig = HttpBootFormExtractConfig;
|
CallbackInfo->ConfigAccess.ExtractConfig = HttpBootFormExtractConfig;
|
||||||
CallbackInfo->ConfigAccess.RouteConfig = HttpBootFormRouteConfig;
|
CallbackInfo->ConfigAccess.RouteConfig = HttpBootFormRouteConfig;
|
||||||
CallbackInfo->ConfigAccess.Callback = HttpBootFormCallback;
|
CallbackInfo->ConfigAccess.Callback = HttpBootFormCallback;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Install Device Path Protocol and Config Access protocol to driver handle.
|
// Install Device Path Protocol and Config Access protocol to driver handle.
|
||||||
//
|
//
|
||||||
@ -623,25 +623,25 @@ HttpBootConfigFormInit (
|
|||||||
Status = NetLibGetMacString (Private->Controller, NULL, &MacString);
|
Status = NetLibGetMacString (Private->Controller, NULL, &MacString);
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
OldMenuString = HiiGetString (
|
OldMenuString = HiiGetString (
|
||||||
CallbackInfo->RegisteredHandle,
|
CallbackInfo->RegisteredHandle,
|
||||||
STRING_TOKEN (STR_HTTP_BOOT_CONFIG_FORM_HELP),
|
STRING_TOKEN (STR_HTTP_BOOT_CONFIG_FORM_HELP),
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
UnicodeSPrint (MenuString, 128, L"%s (MAC:%s)", OldMenuString, MacString);
|
UnicodeSPrint (MenuString, 128, L"%s (MAC:%s)", OldMenuString, MacString);
|
||||||
HiiSetString (
|
HiiSetString (
|
||||||
CallbackInfo->RegisteredHandle,
|
CallbackInfo->RegisteredHandle,
|
||||||
STRING_TOKEN (STR_HTTP_BOOT_CONFIG_FORM_HELP),
|
STRING_TOKEN (STR_HTTP_BOOT_CONFIG_FORM_HELP),
|
||||||
MenuString,
|
MenuString,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
FreePool (MacString);
|
FreePool (MacString);
|
||||||
FreePool (OldMenuString);
|
FreePool (OldMenuString);
|
||||||
|
|
||||||
CallbackInfo->Initilized = TRUE;
|
CallbackInfo->Initilized = TRUE;
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
Error:
|
Error:
|
||||||
|
|
||||||
HttpBootConfigFormUnload (Private);
|
HttpBootConfigFormUnload (Private);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
VFR file used by the HTTP Boot configuration component.
|
VFR file used by the HTTP Boot configuration component.
|
||||||
|
|
||||||
Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -24,7 +24,7 @@ formset
|
|||||||
varstore HTTP_BOOT_CONFIG_IFR_NVDATA,
|
varstore HTTP_BOOT_CONFIG_IFR_NVDATA,
|
||||||
name = HTTP_BOOT_CONFIG_IFR_NVDATA,
|
name = HTTP_BOOT_CONFIG_IFR_NVDATA,
|
||||||
guid = HTTP_BOOT_CONFIG_GUID;
|
guid = HTTP_BOOT_CONFIG_GUID;
|
||||||
|
|
||||||
form formid = FORMID_MAIN_FORM,
|
form formid = FORMID_MAIN_FORM,
|
||||||
title = STRING_TOKEN(STR_HTTP_BOOT_CONFIG_FORM_TITLE);
|
title = STRING_TOKEN(STR_HTTP_BOOT_CONFIG_FORM_TITLE);
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Functions implementation related with DHCPv4 for HTTP boot driver.
|
Functions implementation related with DHCPv4 for HTTP boot driver.
|
||||||
|
|
||||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials are licensed and made available under
|
This program and the accompanying materials are licensed and made available under
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
The full text of the license may be found at
|
The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php.
|
http://opensource.org/licenses/bsd-license.php.
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -267,7 +267,7 @@ HttpBootParseDhcp4Packet (
|
|||||||
HTTP_BOOT_OFFER_TYPE OfferType;
|
HTTP_BOOT_OFFER_TYPE OfferType;
|
||||||
EFI_IPv4_ADDRESS IpAddr;
|
EFI_IPv4_ADDRESS IpAddr;
|
||||||
BOOLEAN FileFieldOverloaded;
|
BOOLEAN FileFieldOverloaded;
|
||||||
|
|
||||||
IsDnsOffer = FALSE;
|
IsDnsOffer = FALSE;
|
||||||
IpExpressedUri = FALSE;
|
IpExpressedUri = FALSE;
|
||||||
IsProxyOffer = FALSE;
|
IsProxyOffer = FALSE;
|
||||||
@ -291,7 +291,7 @@ HttpBootParseDhcp4Packet (
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Second, Check if bootfilename and serverhostname is overloaded to carry DHCP options refers to rfc-2132.
|
// Second, Check if bootfilename and serverhostname is overloaded to carry DHCP options refers to rfc-2132.
|
||||||
// If yes, try to parse options from the BootFileName field, then ServerName field.
|
// If yes, try to parse options from the BootFileName field, then ServerName field.
|
||||||
//
|
//
|
||||||
Option = Options[HTTP_BOOT_DHCP4_TAG_INDEX_OVERLOAD];
|
Option = Options[HTTP_BOOT_DHCP4_TAG_INDEX_OVERLOAD];
|
||||||
@ -379,7 +379,7 @@ HttpBootParseDhcp4Packet (
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Try to retrieve the IP of HTTP server from URI.
|
// Try to retrieve the IP of HTTP server from URI.
|
||||||
//
|
//
|
||||||
if (IsHttpOffer) {
|
if (IsHttpOffer) {
|
||||||
Status = HttpParseUrl (
|
Status = HttpParseUrl (
|
||||||
@ -428,7 +428,7 @@ HttpBootParseDhcp4Packet (
|
|||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Cache4->OfferType = OfferType;
|
Cache4->OfferType = OfferType;
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -506,70 +506,70 @@ HttpBootSelectDhcpOffer (
|
|||||||
// The offer with DNS server address takes priority here.
|
// The offer with DNS server address takes priority here.
|
||||||
//
|
//
|
||||||
if (Private->OfferCount[HttpOfferTypeDhcpDns] > 0) {
|
if (Private->OfferCount[HttpOfferTypeDhcpDns] > 0) {
|
||||||
|
|
||||||
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpDns][0] + 1;
|
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpDns][0] + 1;
|
||||||
|
|
||||||
} else if (Private->OfferCount[HttpOfferTypeDhcpIpUriDns] > 0) {
|
} else if (Private->OfferCount[HttpOfferTypeDhcpIpUriDns] > 0) {
|
||||||
|
|
||||||
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpIpUriDns][0] + 1;
|
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpIpUriDns][0] + 1;
|
||||||
|
|
||||||
} else if (Private->OfferCount[HttpOfferTypeDhcpNameUriDns] > 0) {
|
} else if (Private->OfferCount[HttpOfferTypeDhcpNameUriDns] > 0) {
|
||||||
|
|
||||||
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpNameUriDns][0] + 1;
|
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpNameUriDns][0] + 1;
|
||||||
|
|
||||||
} else if (Private->OfferCount[HttpOfferTypeDhcpOnly] > 0) {
|
} else if (Private->OfferCount[HttpOfferTypeDhcpOnly] > 0) {
|
||||||
|
|
||||||
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpOnly][0] + 1;
|
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpOnly][0] + 1;
|
||||||
|
|
||||||
} else if (Private->OfferCount[HttpOfferTypeDhcpIpUri] > 0) {
|
} else if (Private->OfferCount[HttpOfferTypeDhcpIpUri] > 0) {
|
||||||
|
|
||||||
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpIpUri][0] + 1;
|
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpIpUri][0] + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// We are in corporate environment.
|
// We are in corporate environment.
|
||||||
//
|
//
|
||||||
// Priority1: HttpOfferTypeDhcpIpUri or HttpOfferTypeDhcpIpUriDns
|
// Priority1: HttpOfferTypeDhcpIpUri or HttpOfferTypeDhcpIpUriDns
|
||||||
// Priority2: HttpOfferTypeDhcpNameUriDns
|
// Priority2: HttpOfferTypeDhcpNameUriDns
|
||||||
// Priority3: HttpOfferTypeDhcpOnly + HttpOfferTypeProxyIpUri
|
// Priority3: HttpOfferTypeDhcpOnly + HttpOfferTypeProxyIpUri
|
||||||
// Priority4: HttpOfferTypeDhcpDns + HttpOfferTypeProxyIpUri
|
// Priority4: HttpOfferTypeDhcpDns + HttpOfferTypeProxyIpUri
|
||||||
// Priority5: HttpOfferTypeDhcpDns + HttpOfferTypeProxyNameUri
|
// Priority5: HttpOfferTypeDhcpDns + HttpOfferTypeProxyNameUri
|
||||||
// Priority6: HttpOfferTypeDhcpDns + HttpOfferTypeDhcpNameUri
|
// Priority6: HttpOfferTypeDhcpDns + HttpOfferTypeDhcpNameUri
|
||||||
//
|
//
|
||||||
if (Private->OfferCount[HttpOfferTypeDhcpIpUri] > 0) {
|
if (Private->OfferCount[HttpOfferTypeDhcpIpUri] > 0) {
|
||||||
|
|
||||||
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpIpUri][0] + 1;
|
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpIpUri][0] + 1;
|
||||||
|
|
||||||
} else if (Private->OfferCount[HttpOfferTypeDhcpIpUriDns] > 0) {
|
} else if (Private->OfferCount[HttpOfferTypeDhcpIpUriDns] > 0) {
|
||||||
|
|
||||||
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpIpUriDns][0] + 1;
|
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpIpUriDns][0] + 1;
|
||||||
|
|
||||||
}else if (Private->OfferCount[HttpOfferTypeDhcpNameUriDns] > 0) {
|
}else if (Private->OfferCount[HttpOfferTypeDhcpNameUriDns] > 0) {
|
||||||
|
|
||||||
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpNameUriDns][0] + 1;
|
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpNameUriDns][0] + 1;
|
||||||
|
|
||||||
} else if (Private->OfferCount[HttpOfferTypeDhcpOnly] > 0 &&
|
} else if (Private->OfferCount[HttpOfferTypeDhcpOnly] > 0 &&
|
||||||
Private->OfferCount[HttpOfferTypeProxyIpUri] > 0) {
|
Private->OfferCount[HttpOfferTypeProxyIpUri] > 0) {
|
||||||
|
|
||||||
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpOnly][0] + 1;
|
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpOnly][0] + 1;
|
||||||
Private->SelectProxyType = HttpOfferTypeProxyIpUri;
|
Private->SelectProxyType = HttpOfferTypeProxyIpUri;
|
||||||
|
|
||||||
} else if (Private->OfferCount[HttpOfferTypeDhcpDns] > 0 &&
|
} else if (Private->OfferCount[HttpOfferTypeDhcpDns] > 0 &&
|
||||||
Private->OfferCount[HttpOfferTypeProxyIpUri] > 0) {
|
Private->OfferCount[HttpOfferTypeProxyIpUri] > 0) {
|
||||||
|
|
||||||
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpDns][0] + 1;
|
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpDns][0] + 1;
|
||||||
Private->SelectProxyType = HttpOfferTypeProxyIpUri;
|
Private->SelectProxyType = HttpOfferTypeProxyIpUri;
|
||||||
|
|
||||||
} else if (Private->OfferCount[HttpOfferTypeDhcpDns] > 0 &&
|
} else if (Private->OfferCount[HttpOfferTypeDhcpDns] > 0 &&
|
||||||
Private->OfferCount[HttpOfferTypeProxyNameUri] > 0) {
|
Private->OfferCount[HttpOfferTypeProxyNameUri] > 0) {
|
||||||
|
|
||||||
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpDns][0] + 1;
|
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpDns][0] + 1;
|
||||||
Private->SelectProxyType = HttpOfferTypeProxyNameUri;
|
Private->SelectProxyType = HttpOfferTypeProxyNameUri;
|
||||||
|
|
||||||
} else if (Private->OfferCount[HttpOfferTypeDhcpDns] > 0 &&
|
} else if (Private->OfferCount[HttpOfferTypeDhcpDns] > 0 &&
|
||||||
Private->OfferCount[HttpOfferTypeDhcpNameUri] > 0) {
|
Private->OfferCount[HttpOfferTypeDhcpNameUri] > 0) {
|
||||||
|
|
||||||
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpDns][0] + 1;
|
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpDns][0] + 1;
|
||||||
Private->SelectProxyType = HttpOfferTypeDhcpNameUri;
|
Private->SelectProxyType = HttpOfferTypeDhcpNameUri;
|
||||||
}
|
}
|
||||||
@ -614,14 +614,14 @@ HttpBootDhcp4CallBack (
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
BOOLEAN Received;
|
BOOLEAN Received;
|
||||||
|
|
||||||
if ((Dhcp4Event != Dhcp4SendDiscover) &&
|
if ((Dhcp4Event != Dhcp4SendDiscover) &&
|
||||||
(Dhcp4Event != Dhcp4RcvdOffer) &&
|
(Dhcp4Event != Dhcp4RcvdOffer) &&
|
||||||
(Dhcp4Event != Dhcp4SendRequest) &&
|
(Dhcp4Event != Dhcp4SendRequest) &&
|
||||||
(Dhcp4Event != Dhcp4RcvdAck) &&
|
(Dhcp4Event != Dhcp4RcvdAck) &&
|
||||||
(Dhcp4Event != Dhcp4SelectOffer)) {
|
(Dhcp4Event != Dhcp4SelectOffer)) {
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
Private = (HTTP_BOOT_PRIVATE_DATA *) Context;
|
Private = (HTTP_BOOT_PRIVATE_DATA *) Context;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -636,14 +636,14 @@ HttpBootDhcp4CallBack (
|
|||||||
Value = HTONS (HTTP_BOOT_DHCP4_PACKET_MAX_SIZE);
|
Value = HTONS (HTTP_BOOT_DHCP4_PACKET_MAX_SIZE);
|
||||||
CopyMem (MaxMsgSize->Data, &Value, sizeof (Value));
|
CopyMem (MaxMsgSize->Data, &Value, sizeof (Value));
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Callback to user if any packets sent or received.
|
// Callback to user if any packets sent or received.
|
||||||
//
|
//
|
||||||
if (Private->HttpBootCallback != NULL && Dhcp4Event != Dhcp4SelectOffer) {
|
if (Private->HttpBootCallback != NULL && Dhcp4Event != Dhcp4SelectOffer) {
|
||||||
Received = (BOOLEAN) (Dhcp4Event == Dhcp4RcvdOffer || Dhcp4Event == Dhcp4RcvdAck);
|
Received = (BOOLEAN) (Dhcp4Event == Dhcp4RcvdOffer || Dhcp4Event == Dhcp4RcvdAck);
|
||||||
Status = Private->HttpBootCallback->Callback (
|
Status = Private->HttpBootCallback->Callback (
|
||||||
Private->HttpBootCallback,
|
Private->HttpBootCallback,
|
||||||
HttpBootDhcp4,
|
HttpBootDhcp4,
|
||||||
Received,
|
Received,
|
||||||
Packet->Length,
|
Packet->Length,
|
||||||
@ -676,7 +676,7 @@ HttpBootDhcp4CallBack (
|
|||||||
|
|
||||||
case Dhcp4SelectOffer:
|
case Dhcp4SelectOffer:
|
||||||
//
|
//
|
||||||
// Select offer according to the priority in UEFI spec, and record the SelectIndex
|
// Select offer according to the priority in UEFI spec, and record the SelectIndex
|
||||||
// and SelectProxyType.
|
// and SelectProxyType.
|
||||||
//
|
//
|
||||||
HttpBootSelectDhcpOffer (Private);
|
HttpBootSelectDhcpOffer (Private);
|
||||||
@ -687,7 +687,7 @@ HttpBootDhcp4CallBack (
|
|||||||
*NewPacket = &Private->OfferBuffer[Private->SelectIndex - 1].Dhcp4.Packet.Offer;
|
*NewPacket = &Private->OfferBuffer[Private->SelectIndex - 1].Dhcp4.Packet.Offer;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -697,7 +697,7 @@ HttpBootDhcp4CallBack (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
This function will register the IPv4 gateway address to the network device.
|
This function will register the IPv4 gateway address to the network device.
|
||||||
|
|
||||||
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
|
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The new IP configuration has been configured successfully.
|
@retval EFI_SUCCESS The new IP configuration has been configured successfully.
|
||||||
@ -736,7 +736,7 @@ HttpBootRegisterIp4Gateway (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
This function will register the default DNS addresses to the network device.
|
This function will register the default DNS addresses to the network device.
|
||||||
|
|
||||||
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
|
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
|
||||||
@param[in] DataLength Size of the buffer pointed to by DnsServerData in bytes.
|
@param[in] DataLength Size of the buffer pointed to by DnsServerData in bytes.
|
||||||
@param[in] DnsServerData Point a list of DNS server address in an array
|
@param[in] DnsServerData Point a list of DNS server address in an array
|
||||||
@ -754,11 +754,11 @@ HttpBootRegisterIp4Dns (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_IP4_CONFIG2_PROTOCOL *Ip4Config2;
|
EFI_IP4_CONFIG2_PROTOCOL *Ip4Config2;
|
||||||
|
|
||||||
ASSERT (!Private->UsingIpv6);
|
ASSERT (!Private->UsingIpv6);
|
||||||
|
|
||||||
Ip4Config2 = Private->Ip4Config2;
|
Ip4Config2 = Private->Ip4Config2;
|
||||||
|
|
||||||
return Ip4Config2->SetData (
|
return Ip4Config2->SetData (
|
||||||
Ip4Config2,
|
Ip4Config2,
|
||||||
Ip4Config2DataTypeDnsServer,
|
Ip4Config2DataTypeDnsServer,
|
||||||
@ -810,7 +810,7 @@ HttpBootSetIp4Policy (
|
|||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
@ -837,7 +837,7 @@ HttpBootDhcp4Dora (
|
|||||||
EFI_DHCP4_CONFIG_DATA Config;
|
EFI_DHCP4_CONFIG_DATA Config;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_DHCP4_MODE_DATA Mode;
|
EFI_DHCP4_MODE_DATA Mode;
|
||||||
|
|
||||||
Dhcp4 = Private->Dhcp4;
|
Dhcp4 = Private->Dhcp4;
|
||||||
ASSERT (Dhcp4 != NULL);
|
ASSERT (Dhcp4 != NULL);
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Functions declaration related with DHCPv4 for HTTP boot driver.
|
Functions declaration related with DHCPv4 for HTTP boot driver.
|
||||||
|
|
||||||
Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials are licensed and made available under
|
This program and the accompanying materials are licensed and made available under
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
The full text of the license may be found at
|
The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php.
|
http://opensource.org/licenses/bsd-license.php.
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -28,7 +28,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#define HTTP_BOOT_DHCP4_OVERLOAD_SERVER_NAME 2
|
#define HTTP_BOOT_DHCP4_OVERLOAD_SERVER_NAME 2
|
||||||
|
|
||||||
///
|
///
|
||||||
/// HTTP Tag definition that identifies the processor
|
/// HTTP Tag definition that identifies the processor
|
||||||
/// and programming environment of the client system.
|
/// and programming environment of the client system.
|
||||||
/// These identifiers are defined by IETF:
|
/// These identifiers are defined by IETF:
|
||||||
/// http://www.ietf.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xml
|
/// http://www.ietf.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xml
|
||||||
@ -236,7 +236,7 @@ HttpBootDhcp4Dora (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
This function will register the default DNS addresses to the network device.
|
This function will register the default DNS addresses to the network device.
|
||||||
|
|
||||||
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
|
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
|
||||||
@param[in] DataLength Size of the buffer pointed to by DnsServerData in bytes.
|
@param[in] DataLength Size of the buffer pointed to by DnsServerData in bytes.
|
||||||
@param[in] DnsServerData Point a list of DNS server address in an array
|
@param[in] DnsServerData Point a list of DNS server address in an array
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Functions implementation related with DHCPv6 for HTTP boot driver.
|
Functions implementation related with DHCPv6 for HTTP boot driver.
|
||||||
|
|
||||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials are licensed and made available under
|
This program and the accompanying materials are licensed and made available under
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
The full text of the license may be found at
|
The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php.
|
http://opensource.org/licenses/bsd-license.php.
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -192,14 +192,14 @@ HttpBootParseDhcp6Packet (
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UINT32 Offset;
|
UINT32 Offset;
|
||||||
UINT32 Length;
|
UINT32 Length;
|
||||||
|
|
||||||
IsDnsOffer = FALSE;
|
IsDnsOffer = FALSE;
|
||||||
IpExpressedUri = FALSE;
|
IpExpressedUri = FALSE;
|
||||||
IsProxyOffer = TRUE;
|
IsProxyOffer = TRUE;
|
||||||
IsHttpOffer = FALSE;
|
IsHttpOffer = FALSE;
|
||||||
Offer = &Cache6->Packet.Offer;
|
Offer = &Cache6->Packet.Offer;
|
||||||
Options = Cache6->OptList;
|
Options = Cache6->OptList;
|
||||||
|
|
||||||
ZeroMem (Cache6->OptList, sizeof (Cache6->OptList));
|
ZeroMem (Cache6->OptList, sizeof (Cache6->OptList));
|
||||||
|
|
||||||
Option = (EFI_DHCP6_PACKET_OPTION *) (Offer->Dhcp6.Option);
|
Option = (EFI_DHCP6_PACKET_OPTION *) (Offer->Dhcp6.Option);
|
||||||
@ -270,9 +270,9 @@ HttpBootParseDhcp6Packet (
|
|||||||
if (IsHttpOffer && Options[HTTP_BOOT_DHCP6_IDX_BOOT_FILE_URL] == NULL) {
|
if (IsHttpOffer && Options[HTTP_BOOT_DHCP6_IDX_BOOT_FILE_URL] == NULL) {
|
||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Try to retrieve the IP of HTTP server from URI.
|
// Try to retrieve the IP of HTTP server from URI.
|
||||||
//
|
//
|
||||||
if (IsHttpOffer) {
|
if (IsHttpOffer) {
|
||||||
Status = HttpParseUrl (
|
Status = HttpParseUrl (
|
||||||
@ -318,7 +318,7 @@ HttpBootParseDhcp6Packet (
|
|||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Cache6->OfferType = OfferType;
|
Cache6->OfferType = OfferType;
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -345,7 +345,7 @@ HttpBootCacheDhcp6Packet (
|
|||||||
|
|
||||||
CopyMem (&Dst->Dhcp6, &Src->Dhcp6, Src->Length);
|
CopyMem (&Dst->Dhcp6, &Src->Dhcp6, Src->Length);
|
||||||
Dst->Length = Src->Length;
|
Dst->Length = Src->Length;
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -397,7 +397,7 @@ HttpBootCacheDhcp6Offer (
|
|||||||
Private->OfferIndex[OfferType][Private->OfferCount[OfferType]] = Private->OfferNum;
|
Private->OfferIndex[OfferType][Private->OfferCount[OfferType]] = Private->OfferNum;
|
||||||
Private->OfferCount[OfferType]++;
|
Private->OfferCount[OfferType]++;
|
||||||
Private->OfferNum++;
|
Private->OfferNum++;
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -435,7 +435,7 @@ HttpBootDhcp6CallBack (
|
|||||||
EFI_DHCP6_PACKET *SelectAd;
|
EFI_DHCP6_PACKET *SelectAd;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
BOOLEAN Received;
|
BOOLEAN Received;
|
||||||
|
|
||||||
if ((Dhcp6Event != Dhcp6SendSolicit) &&
|
if ((Dhcp6Event != Dhcp6SendSolicit) &&
|
||||||
(Dhcp6Event != Dhcp6RcvdAdvertise) &&
|
(Dhcp6Event != Dhcp6RcvdAdvertise) &&
|
||||||
(Dhcp6Event != Dhcp6SendRequest) &&
|
(Dhcp6Event != Dhcp6SendRequest) &&
|
||||||
@ -445,13 +445,13 @@ HttpBootDhcp6CallBack (
|
|||||||
}
|
}
|
||||||
|
|
||||||
ASSERT (Packet != NULL);
|
ASSERT (Packet != NULL);
|
||||||
|
|
||||||
Private = (HTTP_BOOT_PRIVATE_DATA *) Context;
|
Private = (HTTP_BOOT_PRIVATE_DATA *) Context;
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
if (Private->HttpBootCallback != NULL && Dhcp6Event != Dhcp6SelectAdvertise) {
|
if (Private->HttpBootCallback != NULL && Dhcp6Event != Dhcp6SelectAdvertise) {
|
||||||
Received = (BOOLEAN) (Dhcp6Event == Dhcp6RcvdAdvertise || Dhcp6Event == Dhcp6RcvdReply);
|
Received = (BOOLEAN) (Dhcp6Event == Dhcp6RcvdAdvertise || Dhcp6Event == Dhcp6RcvdReply);
|
||||||
Status = Private->HttpBootCallback->Callback (
|
Status = Private->HttpBootCallback->Callback (
|
||||||
Private->HttpBootCallback,
|
Private->HttpBootCallback,
|
||||||
HttpBootDhcp6,
|
HttpBootDhcp6,
|
||||||
Received,
|
Received,
|
||||||
Packet->Length,
|
Packet->Length,
|
||||||
@ -462,7 +462,7 @@ HttpBootDhcp6CallBack (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch (Dhcp6Event) {
|
switch (Dhcp6Event) {
|
||||||
|
|
||||||
case Dhcp6RcvdAdvertise:
|
case Dhcp6RcvdAdvertise:
|
||||||
Status = EFI_NOT_READY;
|
Status = EFI_NOT_READY;
|
||||||
if (Packet->Length > HTTP_BOOT_DHCP6_PACKET_MAX_SIZE) {
|
if (Packet->Length > HTTP_BOOT_DHCP6_PACKET_MAX_SIZE) {
|
||||||
@ -500,17 +500,17 @@ HttpBootDhcp6CallBack (
|
|||||||
CopyMem (*NewPacket, SelectAd, SelectAd->Size);
|
CopyMem (*NewPacket, SelectAd, SelectAd->Size);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Check whether IP driver could route the message which will be sent to ServerIp address.
|
Check whether IP driver could route the message which will be sent to ServerIp address.
|
||||||
|
|
||||||
This function will check the IP6 route table every 1 seconds until specified timeout is expired, if a valid
|
This function will check the IP6 route table every 1 seconds until specified timeout is expired, if a valid
|
||||||
route is found in IP6 route table, the address will be filed in GatewayAddr and return.
|
route is found in IP6 route table, the address will be filed in GatewayAddr and return.
|
||||||
|
|
||||||
@ -521,7 +521,7 @@ HttpBootDhcp6CallBack (
|
|||||||
@retval EFI_SUCCESS Found a valid gateway address successfully.
|
@retval EFI_SUCCESS Found a valid gateway address successfully.
|
||||||
@retval EFI_TIMEOUT The operation is time out.
|
@retval EFI_TIMEOUT The operation is time out.
|
||||||
@retval Other Unexpect error happened.
|
@retval Other Unexpect error happened.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
HttpBootCheckRouteTable (
|
HttpBootCheckRouteTable (
|
||||||
@ -553,7 +553,7 @@ HttpBootCheckRouteTable (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Find out the gateway address which can route the message which send to ServerIp.
|
// Find out the gateway address which can route the message which send to ServerIp.
|
||||||
//
|
//
|
||||||
@ -583,13 +583,13 @@ HttpBootCheckRouteTable (
|
|||||||
if (Ip6ModeData.IcmpTypeList != NULL) {
|
if (Ip6ModeData.IcmpTypeList != NULL) {
|
||||||
FreePool (Ip6ModeData.IcmpTypeList);
|
FreePool (Ip6ModeData.IcmpTypeList);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GatewayIsFound || RetryCount == TimeOutInSecond) {
|
if (GatewayIsFound || RetryCount == TimeOutInSecond) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
RetryCount++;
|
RetryCount++;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Delay 1 second then recheck it again.
|
// Delay 1 second then recheck it again.
|
||||||
//
|
//
|
||||||
@ -614,19 +614,19 @@ HttpBootCheckRouteTable (
|
|||||||
Ip6->Poll (Ip6);
|
Ip6->Poll (Ip6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ON_EXIT:
|
ON_EXIT:
|
||||||
if (TimeOutEvt != NULL) {
|
if (TimeOutEvt != NULL) {
|
||||||
gBS->CloseEvent (TimeOutEvt);
|
gBS->CloseEvent (TimeOutEvt);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GatewayIsFound) {
|
if (GatewayIsFound) {
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
} else if (RetryCount == TimeOutInSecond) {
|
} else if (RetryCount == TimeOutInSecond) {
|
||||||
Status = EFI_TIMEOUT;
|
Status = EFI_TIMEOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -650,7 +650,7 @@ HttpBootSetIp6Policy (
|
|||||||
|
|
||||||
Ip6Config = Private->Ip6Config;
|
Ip6Config = Private->Ip6Config;
|
||||||
DataSize = sizeof (EFI_IP6_CONFIG_POLICY);
|
DataSize = sizeof (EFI_IP6_CONFIG_POLICY);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get and store the current policy of IP6 driver.
|
// Get and store the current policy of IP6 driver.
|
||||||
//
|
//
|
||||||
@ -681,7 +681,7 @@ HttpBootSetIp6Policy (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
This function will register the default DNS addresses to the network device.
|
This function will register the default DNS addresses to the network device.
|
||||||
|
|
||||||
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
|
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
|
||||||
@param[in] DataLength Size of the buffer pointed to by DnsServerData in bytes.
|
@param[in] DataLength Size of the buffer pointed to by DnsServerData in bytes.
|
||||||
@param[in] DnsServerData Point a list of DNS server address in an array
|
@param[in] DnsServerData Point a list of DNS server address in an array
|
||||||
@ -699,11 +699,11 @@ HttpBootSetIp6Dns (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_IP6_CONFIG_PROTOCOL *Ip6Config;
|
EFI_IP6_CONFIG_PROTOCOL *Ip6Config;
|
||||||
|
|
||||||
ASSERT (Private->UsingIpv6);
|
ASSERT (Private->UsingIpv6);
|
||||||
|
|
||||||
Ip6Config = Private->Ip6Config;
|
Ip6Config = Private->Ip6Config;
|
||||||
|
|
||||||
return Ip6Config->SetData (
|
return Ip6Config->SetData (
|
||||||
Ip6Config,
|
Ip6Config,
|
||||||
Ip6ConfigDataTypeDnsServer,
|
Ip6ConfigDataTypeDnsServer,
|
||||||
@ -714,7 +714,7 @@ HttpBootSetIp6Dns (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
This function will register the IPv6 gateway address to the network device.
|
This function will register the IPv6 gateway address to the network device.
|
||||||
|
|
||||||
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
|
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The new IP configuration has been configured successfully.
|
@retval EFI_SUCCESS The new IP configuration has been configured successfully.
|
||||||
@ -731,9 +731,9 @@ HttpBootSetIp6Gateway (
|
|||||||
|
|
||||||
ASSERT (Private->UsingIpv6);
|
ASSERT (Private->UsingIpv6);
|
||||||
Ip6Config = Private->Ip6Config;
|
Ip6Config = Private->Ip6Config;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set the default gateway address.
|
// Set the default gateway address.
|
||||||
//
|
//
|
||||||
if (!Private->NoGateway && !NetIp6IsUnspecifiedAddr (&Private->GatewayIp.v6)) {
|
if (!Private->NoGateway && !NetIp6IsUnspecifiedAddr (&Private->GatewayIp.v6)) {
|
||||||
Status = Ip6Config->SetData (
|
Status = Ip6Config->SetData (
|
||||||
@ -752,7 +752,7 @@ HttpBootSetIp6Gateway (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
This function will register the station IP address.
|
This function will register the station IP address.
|
||||||
|
|
||||||
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
|
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The new IP address has been configured successfully.
|
@retval EFI_SUCCESS The new IP address has been configured successfully.
|
||||||
@ -772,29 +772,29 @@ HttpBootSetIp6Address (
|
|||||||
EFI_IPv6_ADDRESS *Ip6Addr;
|
EFI_IPv6_ADDRESS *Ip6Addr;
|
||||||
EFI_IPv6_ADDRESS GatewayAddr;
|
EFI_IPv6_ADDRESS GatewayAddr;
|
||||||
EFI_IP6_CONFIG_DATA Ip6CfgData;
|
EFI_IP6_CONFIG_DATA Ip6CfgData;
|
||||||
EFI_EVENT MappedEvt;
|
EFI_EVENT MappedEvt;
|
||||||
UINTN DataSize;
|
UINTN DataSize;
|
||||||
BOOLEAN IsAddressOk;
|
BOOLEAN IsAddressOk;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
|
|
||||||
ASSERT (Private->UsingIpv6);
|
ASSERT (Private->UsingIpv6);
|
||||||
|
|
||||||
MappedEvt = NULL;
|
MappedEvt = NULL;
|
||||||
IsAddressOk = FALSE;
|
IsAddressOk = FALSE;
|
||||||
Ip6Addr = NULL;
|
Ip6Addr = NULL;
|
||||||
Ip6Cfg = Private->Ip6Config;
|
Ip6Cfg = Private->Ip6Config;
|
||||||
Ip6 = Private->Ip6;
|
Ip6 = Private->Ip6;
|
||||||
|
|
||||||
ZeroMem (&CfgAddr, sizeof (EFI_IP6_CONFIG_MANUAL_ADDRESS));
|
ZeroMem (&CfgAddr, sizeof (EFI_IP6_CONFIG_MANUAL_ADDRESS));
|
||||||
CopyMem (&CfgAddr, &Private->StationIp.v6, sizeof (EFI_IPv6_ADDRESS));
|
CopyMem (&CfgAddr, &Private->StationIp.v6, sizeof (EFI_IPv6_ADDRESS));
|
||||||
ZeroMem (&Ip6CfgData, sizeof (EFI_IP6_CONFIG_DATA));
|
ZeroMem (&Ip6CfgData, sizeof (EFI_IP6_CONFIG_DATA));
|
||||||
|
|
||||||
Ip6CfgData.AcceptIcmpErrors = TRUE;
|
Ip6CfgData.AcceptIcmpErrors = TRUE;
|
||||||
Ip6CfgData.DefaultProtocol = IP6_ICMP;
|
Ip6CfgData.DefaultProtocol = IP6_ICMP;
|
||||||
Ip6CfgData.HopLimit = HTTP_BOOT_DEFAULT_HOPLIMIT;
|
Ip6CfgData.HopLimit = HTTP_BOOT_DEFAULT_HOPLIMIT;
|
||||||
Ip6CfgData.ReceiveTimeout = HTTP_BOOT_DEFAULT_LIFETIME;
|
Ip6CfgData.ReceiveTimeout = HTTP_BOOT_DEFAULT_LIFETIME;
|
||||||
Ip6CfgData.TransmitTimeout = HTTP_BOOT_DEFAULT_LIFETIME;
|
Ip6CfgData.TransmitTimeout = HTTP_BOOT_DEFAULT_LIFETIME;
|
||||||
|
|
||||||
Status = Ip6->Configure (Ip6, &Ip6CfgData);
|
Status = Ip6->Configure (Ip6, &Ip6CfgData);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
@ -823,7 +823,7 @@ HttpBootSetIp6Address (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create a notify event to set address flag when DAD if IP6 driver succeeded.
|
// Create a notify event to set address flag when DAD if IP6 driver succeeded.
|
||||||
//
|
//
|
||||||
@ -837,7 +837,7 @@ HttpBootSetIp6Address (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set static host ip6 address. This is a asynchronous process.
|
// Set static host ip6 address. This is a asynchronous process.
|
||||||
//
|
//
|
||||||
@ -855,7 +855,7 @@ HttpBootSetIp6Address (
|
|||||||
Ip6ConfigDataTypeManualAddress,
|
Ip6ConfigDataTypeManualAddress,
|
||||||
sizeof (EFI_IP6_CONFIG_MANUAL_ADDRESS),
|
sizeof (EFI_IP6_CONFIG_MANUAL_ADDRESS),
|
||||||
&CfgAddr
|
&CfgAddr
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status) && Status != EFI_NOT_READY) {
|
if (EFI_ERROR (Status) && Status != EFI_NOT_READY) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
} else if (Status == EFI_NOT_READY) {
|
} else if (Status == EFI_NOT_READY) {
|
||||||
@ -879,7 +879,7 @@ HttpBootSetIp6Address (
|
|||||||
Status = EFI_DEVICE_ERROR;
|
Status = EFI_DEVICE_ERROR;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ip6Addr = AllocatePool (DataSize);
|
Ip6Addr = AllocatePool (DataSize);
|
||||||
if (Ip6Addr == NULL) {
|
if (Ip6Addr == NULL) {
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
@ -903,9 +903,9 @@ HttpBootSetIp6Address (
|
|||||||
if (Index == DataSize / sizeof (EFI_IPv6_ADDRESS)) {
|
if (Index == DataSize / sizeof (EFI_IPv6_ADDRESS)) {
|
||||||
Status = EFI_ABORTED;
|
Status = EFI_ABORTED;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ON_EXIT:
|
ON_EXIT:
|
||||||
if (MappedEvt != NULL) {
|
if (MappedEvt != NULL) {
|
||||||
Ip6Cfg->UnregisterDataNotify (
|
Ip6Cfg->UnregisterDataNotify (
|
||||||
@ -919,8 +919,8 @@ ON_EXIT:
|
|||||||
if (Ip6Addr != NULL) {
|
if (Ip6Addr != NULL) {
|
||||||
FreePool (Ip6Addr);
|
FreePool (Ip6Addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -954,15 +954,15 @@ HttpBootDhcp6Sarr (
|
|||||||
//
|
//
|
||||||
OptCount = HttpBootBuildDhcp6Options (Private, OptList, Buffer);
|
OptCount = HttpBootBuildDhcp6Options (Private, OptList, Buffer);
|
||||||
ASSERT (OptCount >0);
|
ASSERT (OptCount >0);
|
||||||
|
|
||||||
Retransmit = AllocateZeroPool (sizeof (EFI_DHCP6_RETRANSMISSION));
|
Retransmit = AllocateZeroPool (sizeof (EFI_DHCP6_RETRANSMISSION));
|
||||||
if (Retransmit == NULL) {
|
if (Retransmit == NULL) {
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
ZeroMem (&Mode, sizeof (EFI_DHCP6_MODE_DATA));
|
ZeroMem (&Mode, sizeof (EFI_DHCP6_MODE_DATA));
|
||||||
ZeroMem (&Config, sizeof (EFI_DHCP6_CONFIG_DATA));
|
ZeroMem (&Config, sizeof (EFI_DHCP6_CONFIG_DATA));
|
||||||
|
|
||||||
Config.OptionCount = OptCount;
|
Config.OptionCount = OptCount;
|
||||||
Config.OptionList = OptList;
|
Config.OptionList = OptList;
|
||||||
Config.Dhcp6Callback = HttpBootDhcp6CallBack;
|
Config.Dhcp6Callback = HttpBootDhcp6CallBack;
|
||||||
@ -977,7 +977,7 @@ HttpBootDhcp6Sarr (
|
|||||||
Retransmit->Mrc = 4;
|
Retransmit->Mrc = 4;
|
||||||
Retransmit->Mrt = 32;
|
Retransmit->Mrt = 32;
|
||||||
Retransmit->Mrd = 60;
|
Retransmit->Mrd = 60;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Configure the DHCPv6 instance for HTTP boot.
|
// Configure the DHCPv6 instance for HTTP boot.
|
||||||
//
|
//
|
||||||
@ -993,7 +993,7 @@ HttpBootDhcp6Sarr (
|
|||||||
Private->SelectIndex = 0;
|
Private->SelectIndex = 0;
|
||||||
ZeroMem (Private->OfferCount, sizeof (Private->OfferCount));
|
ZeroMem (Private->OfferCount, sizeof (Private->OfferCount));
|
||||||
ZeroMem (Private->OfferIndex, sizeof (Private->OfferIndex));
|
ZeroMem (Private->OfferIndex, sizeof (Private->OfferIndex));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Start DHCPv6 S.A.R.R. process to acquire IPv6 address.
|
// Start DHCPv6 S.A.R.R. process to acquire IPv6 address.
|
||||||
//
|
//
|
||||||
@ -1001,7 +1001,7 @@ HttpBootDhcp6Sarr (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get the acquired IPv6 address and store them.
|
// Get the acquired IPv6 address and store them.
|
||||||
//
|
//
|
||||||
@ -1009,14 +1009,14 @@ HttpBootDhcp6Sarr (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT (Mode.Ia->State == Dhcp6Bound);
|
ASSERT (Mode.Ia->State == Dhcp6Bound);
|
||||||
CopyMem (&Private->StationIp.v6, &Mode.Ia->IaAddress[0].IpAddress, sizeof (EFI_IPv6_ADDRESS));
|
CopyMem (&Private->StationIp.v6, &Mode.Ia->IaAddress[0].IpAddress, sizeof (EFI_IPv6_ADDRESS));
|
||||||
|
|
||||||
AsciiPrint ("\n Station IPv6 address is ");
|
AsciiPrint ("\n Station IPv6 address is ");
|
||||||
HttpBootShowIp6Addr (&Private->StationIp.v6);
|
HttpBootShowIp6Addr (&Private->StationIp.v6);
|
||||||
AsciiPrint ("\n");
|
AsciiPrint ("\n");
|
||||||
|
|
||||||
ON_EXIT:
|
ON_EXIT:
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
Dhcp6->Stop (Dhcp6);
|
Dhcp6->Stop (Dhcp6);
|
||||||
@ -1032,7 +1032,7 @@ ON_EXIT:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Functions declaration related with DHCPv6 for HTTP boot driver.
|
Functions declaration related with DHCPv6 for HTTP boot driver.
|
||||||
|
|
||||||
Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials are licensed and made available under
|
This program and the accompanying materials are licensed and made available under
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
The full text of the license may be found at
|
The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php.
|
http://opensource.org/licenses/bsd-license.php.
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -127,7 +127,7 @@ HttpBootSetIp6Policy (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
This function will register the default DNS addresses to the network device.
|
This function will register the default DNS addresses to the network device.
|
||||||
|
|
||||||
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
|
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
|
||||||
@param[in] DataLength Size of the buffer pointed to by DnsServerData in bytes.
|
@param[in] DataLength Size of the buffer pointed to by DnsServerData in bytes.
|
||||||
@param[in] DnsServerData Point a list of DNS server address in an array
|
@param[in] DnsServerData Point a list of DNS server address in an array
|
||||||
@ -146,7 +146,7 @@ HttpBootSetIp6Dns (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
This function will register the IPv6 gateway address to the network device.
|
This function will register the IPv6 gateway address to the network device.
|
||||||
|
|
||||||
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
|
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The new IP configuration has been configured successfully.
|
@retval EFI_SUCCESS The new IP configuration has been configured successfully.
|
||||||
@ -160,7 +160,7 @@ HttpBootSetIp6Gateway (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
This function will register the station IP address.
|
This function will register the station IP address.
|
||||||
|
|
||||||
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
|
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The new IP address has been configured successfully.
|
@retval EFI_SUCCESS The new IP address has been configured successfully.
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Driver Binding functions implementation for UEFI HTTP boot.
|
Driver Binding functions implementation for UEFI HTTP boot.
|
||||||
|
|
||||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials are licensed and made available under
|
This program and the accompanying materials are licensed and made available under
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
The full text of the license may be found at
|
The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php.
|
http://opensource.org/licenses/bsd-license.php.
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ HttpBootCheckIpv6Support (
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Get the NIC handle by SNP protocol.
|
// Get the NIC handle by SNP protocol.
|
||||||
//
|
//
|
||||||
Handle = NetLibGetSnpHandle (Private->Controller, NULL);
|
Handle = NetLibGetSnpHandle (Private->Controller, NULL);
|
||||||
if (Handle == NULL) {
|
if (Handle == NULL) {
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
@ -121,11 +121,11 @@ HttpBootCheckIpv6Support (
|
|||||||
if (EFI_ERROR (Status) || InfoBlock == NULL) {
|
if (EFI_ERROR (Status) || InfoBlock == NULL) {
|
||||||
FreePool (InfoBlock);
|
FreePool (InfoBlock);
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
*Ipv6Support = ((EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT *) InfoBlock)->Ipv6Support;
|
*Ipv6Support = ((EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT *) InfoBlock)->Ipv6Support;
|
||||||
FreePool (InfoBlock);
|
FreePool (InfoBlock);
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,14 +167,14 @@ HttpBootDestroyIp4Children (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Private->Ip4Nic != NULL) {
|
if (Private->Ip4Nic != NULL) {
|
||||||
|
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
Private->Controller,
|
Private->Controller,
|
||||||
&gEfiCallerIdGuid,
|
&gEfiCallerIdGuid,
|
||||||
This->DriverBindingHandle,
|
This->DriverBindingHandle,
|
||||||
Private->Ip4Nic->Controller
|
Private->Ip4Nic->Controller
|
||||||
);
|
);
|
||||||
|
|
||||||
gBS->UninstallMultipleProtocolInterfaces (
|
gBS->UninstallMultipleProtocolInterfaces (
|
||||||
Private->Ip4Nic->Controller,
|
Private->Ip4Nic->Controller,
|
||||||
&gEfiLoadFileProtocolGuid,
|
&gEfiLoadFileProtocolGuid,
|
||||||
@ -204,7 +204,7 @@ HttpBootDestroyIp6Children (
|
|||||||
{
|
{
|
||||||
ASSERT (This != NULL);
|
ASSERT (This != NULL);
|
||||||
ASSERT (Private != NULL);
|
ASSERT (Private != NULL);
|
||||||
|
|
||||||
if (Private->Ip6Child != NULL) {
|
if (Private->Ip6Child != NULL) {
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
Private->Ip6Child,
|
Private->Ip6Child,
|
||||||
@ -241,16 +241,16 @@ HttpBootDestroyIp6Children (
|
|||||||
HttpIoDestroyIo(&Private->HttpIo);
|
HttpIoDestroyIo(&Private->HttpIo);
|
||||||
Private->HttpCreated = FALSE;
|
Private->HttpCreated = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Private->Ip6Nic != NULL) {
|
if (Private->Ip6Nic != NULL) {
|
||||||
|
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
Private->Controller,
|
Private->Controller,
|
||||||
&gEfiCallerIdGuid,
|
&gEfiCallerIdGuid,
|
||||||
This->DriverBindingHandle,
|
This->DriverBindingHandle,
|
||||||
Private->Ip6Nic->Controller
|
Private->Ip6Nic->Controller
|
||||||
);
|
);
|
||||||
|
|
||||||
gBS->UninstallMultipleProtocolInterfaces (
|
gBS->UninstallMultipleProtocolInterfaces (
|
||||||
Private->Ip6Nic->Controller,
|
Private->Ip6Nic->Controller,
|
||||||
&gEfiLoadFileProtocolGuid,
|
&gEfiLoadFileProtocolGuid,
|
||||||
@ -265,33 +265,33 @@ HttpBootDestroyIp6Children (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||||
it further tests to see if this driver supports creating a handle for the specified child device.
|
it further tests to see if this driver supports creating a handle for the specified child device.
|
||||||
|
|
||||||
This function checks to see if the driver specified by This supports the device specified by
|
This function checks to see if the driver specified by This supports the device specified by
|
||||||
ControllerHandle. Drivers will typically use the device path attached to
|
ControllerHandle. Drivers will typically use the device path attached to
|
||||||
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
||||||
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
||||||
may be called many times during platform initialization. In order to reduce boot times, the tests
|
may be called many times during platform initialization. In order to reduce boot times, the tests
|
||||||
performed by this function must be very small, and take as little time as possible to execute. This
|
performed by this function must be very small, and take as little time as possible to execute. This
|
||||||
function must not change the state of any hardware devices, and this function must be aware that the
|
function must not change the state of any hardware devices, and this function must be aware that the
|
||||||
device specified by ControllerHandle may already be managed by the same driver or a
|
device specified by ControllerHandle may already be managed by the same driver or a
|
||||||
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
||||||
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
||||||
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
||||||
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
||||||
to guarantee the state of ControllerHandle is not modified by this function.
|
to guarantee the state of ControllerHandle is not modified by this function.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For bus drivers, if this parameter is not NULL, then
|
drivers. For bus drivers, if this parameter is not NULL, then
|
||||||
the bus driver must determine if the bus controller specified
|
the bus driver must determine if the bus controller specified
|
||||||
by ControllerHandle and the child controller specified
|
by ControllerHandle and the child controller specified
|
||||||
by RemainingDevicePath are both supported by this
|
by RemainingDevicePath are both supported by this
|
||||||
bus driver.
|
bus driver.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
||||||
@ -315,7 +315,7 @@ HttpBootIp4DxeDriverBindingSupported (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Try to open the DHCP4, HTTP4 and Device Path protocol.
|
// Try to open the DHCP4, HTTP4 and Device Path protocol.
|
||||||
//
|
//
|
||||||
@ -360,28 +360,28 @@ HttpBootIp4DxeDriverBindingSupported (
|
|||||||
Starts a device controller or a bus controller.
|
Starts a device controller or a bus controller.
|
||||||
|
|
||||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||||
common boot service. It is legal to call Start() from other locations,
|
common boot service. It is legal to call Start() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||||
EFI_DEVICE_PATH_PROTOCOL.
|
EFI_DEVICE_PATH_PROTOCOL.
|
||||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For a bus driver, if this parameter is NULL, then handles
|
drivers. For a bus driver, if this parameter is NULL, then handles
|
||||||
for all the children of Controller are created by this driver.
|
for all the children of Controller are created by this driver.
|
||||||
If this parameter is not NULL and the first Device Path Node is
|
If this parameter is not NULL and the first Device Path Node is
|
||||||
not the End of Device Path Node, then only the handle for the
|
not the End of Device Path Node, then only the handle for the
|
||||||
child device specified by the first Device Path Node of
|
child device specified by the first Device Path Node of
|
||||||
RemainingDevicePath is created by this driver.
|
RemainingDevicePath is created by this driver.
|
||||||
If the first Device Path Node of RemainingDevicePath is
|
If the first Device Path Node of RemainingDevicePath is
|
||||||
the End of Device Path Node, no child handle is created by this
|
the End of Device Path Node, no child handle is created by this
|
||||||
driver.
|
driver.
|
||||||
|
|
||||||
@ -421,7 +421,7 @@ HttpBootIp4DxeDriverBindingStart (
|
|||||||
Private = HTTP_BOOT_PRIVATE_DATA_FROM_ID(Id);
|
Private = HTTP_BOOT_PRIVATE_DATA_FROM_ID(Id);
|
||||||
} else {
|
} else {
|
||||||
FirstStart = TRUE;
|
FirstStart = TRUE;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Initialize the private data structure.
|
// Initialize the private data structure.
|
||||||
//
|
//
|
||||||
@ -483,16 +483,16 @@ HttpBootIp4DxeDriverBindingStart (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Private->Ip4Nic != NULL) {
|
if (Private->Ip4Nic != NULL) {
|
||||||
//
|
//
|
||||||
// Already created before
|
// Already created before
|
||||||
//
|
//
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
Private->Ip4Nic = AllocateZeroPool (sizeof (HTTP_BOOT_VIRTUAL_NIC));
|
Private->Ip4Nic = AllocateZeroPool (sizeof (HTTP_BOOT_VIRTUAL_NIC));
|
||||||
if (Private->Ip4Nic == NULL) {
|
if (Private->Ip4Nic == NULL) {
|
||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
@ -501,7 +501,7 @@ HttpBootIp4DxeDriverBindingStart (
|
|||||||
Private->Ip4Nic->Private = Private;
|
Private->Ip4Nic->Private = Private;
|
||||||
Private->Ip4Nic->ImageHandle = This->DriverBindingHandle;
|
Private->Ip4Nic->ImageHandle = This->DriverBindingHandle;
|
||||||
Private->Ip4Nic->Signature = HTTP_BOOT_VIRTUAL_NIC_SIGNATURE;
|
Private->Ip4Nic->Signature = HTTP_BOOT_VIRTUAL_NIC_SIGNATURE;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create DHCP4 child instance.
|
// Create DHCP4 child instance.
|
||||||
//
|
//
|
||||||
@ -514,7 +514,7 @@ HttpBootIp4DxeDriverBindingStart (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gBS->OpenProtocol (
|
Status = gBS->OpenProtocol (
|
||||||
Private->Dhcp4Child,
|
Private->Dhcp4Child,
|
||||||
&gEfiDhcp4ProtocolGuid,
|
&gEfiDhcp4ProtocolGuid,
|
||||||
@ -526,7 +526,7 @@ HttpBootIp4DxeDriverBindingStart (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get the Ip4Config2 protocol, it's required to configure the default gateway address.
|
// Get the Ip4Config2 protocol, it's required to configure the default gateway address.
|
||||||
//
|
//
|
||||||
@ -541,7 +541,7 @@ HttpBootIp4DxeDriverBindingStart (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Append IPv4 device path node.
|
// Append IPv4 device path node.
|
||||||
//
|
//
|
||||||
@ -560,7 +560,7 @@ HttpBootIp4DxeDriverBindingStart (
|
|||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Append URI device path node.
|
// Append URI device path node.
|
||||||
//
|
//
|
||||||
@ -579,7 +579,7 @@ HttpBootIp4DxeDriverBindingStart (
|
|||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create a child handle for the HTTP boot and install DevPath and Load file protocol on it.
|
// Create a child handle for the HTTP boot and install DevPath and Load file protocol on it.
|
||||||
//
|
//
|
||||||
@ -595,7 +595,7 @@ HttpBootIp4DxeDriverBindingStart (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Open the Caller Id child to setup a parent-child relationship between
|
// Open the Caller Id child to setup a parent-child relationship between
|
||||||
// real NIC handle and the HTTP boot Ipv4 NIC handle.
|
// real NIC handle and the HTTP boot Ipv4 NIC handle.
|
||||||
@ -611,9 +611,9 @@ HttpBootIp4DxeDriverBindingStart (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
ON_ERROR:
|
ON_ERROR:
|
||||||
if (Private != NULL) {
|
if (Private != NULL) {
|
||||||
if (FirstStart) {
|
if (FirstStart) {
|
||||||
@ -623,7 +623,7 @@ ON_ERROR:
|
|||||||
&Private->Id
|
&Private->Id
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpBootDestroyIp4Children (This, Private);
|
HttpBootDestroyIp4Children (This, Private);
|
||||||
HttpBootConfigFormUnload (Private);
|
HttpBootConfigFormUnload (Private);
|
||||||
|
|
||||||
@ -638,10 +638,10 @@ ON_ERROR:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Stops a device controller or a bus controller.
|
Stops a device controller or a bus controller.
|
||||||
|
|
||||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||||
into this common boot service. It is legal to call Stop() from other locations,
|
into this common boot service. It is legal to call Stop() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||||
same driver's Start() function.
|
same driver's Start() function.
|
||||||
@ -649,13 +649,13 @@ ON_ERROR:
|
|||||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||||
Start() function, and the Start() function must have called OpenProtocol() on
|
Start() function, and the Start() function must have called OpenProtocol() on
|
||||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||||
support a bus specific I/O protocol for the driver
|
support a bus specific I/O protocol for the driver
|
||||||
to use to stop the device.
|
to use to stop the device.
|
||||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||||
if NumberOfChildren is 0.
|
if NumberOfChildren is 0.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device was stopped.
|
@retval EFI_SUCCESS The device was stopped.
|
||||||
@ -729,7 +729,7 @@ HttpBootIp4DxeDriverBindingStop (
|
|||||||
// Destory all child instance and uninstall protocol interface.
|
// Destory all child instance and uninstall protocol interface.
|
||||||
//
|
//
|
||||||
HttpBootDestroyIp4Children (This, Private);
|
HttpBootDestroyIp4Children (This, Private);
|
||||||
|
|
||||||
if (Private->Ip4Nic == NULL && Private->Ip6Nic == NULL) {
|
if (Private->Ip4Nic == NULL && Private->Ip6Nic == NULL) {
|
||||||
//
|
//
|
||||||
// Release the cached data.
|
// Release the cached data.
|
||||||
@ -740,7 +740,7 @@ HttpBootIp4DxeDriverBindingStop (
|
|||||||
// Unload the config form.
|
// Unload the config form.
|
||||||
//
|
//
|
||||||
HttpBootConfigFormUnload (Private);
|
HttpBootConfigFormUnload (Private);
|
||||||
|
|
||||||
gBS->UninstallProtocolInterface (
|
gBS->UninstallProtocolInterface (
|
||||||
NicHandle,
|
NicHandle,
|
||||||
&gEfiCallerIdGuid,
|
&gEfiCallerIdGuid,
|
||||||
@ -754,33 +754,33 @@ HttpBootIp4DxeDriverBindingStop (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||||
it further tests to see if this driver supports creating a handle for the specified child device.
|
it further tests to see if this driver supports creating a handle for the specified child device.
|
||||||
|
|
||||||
This function checks to see if the driver specified by This supports the device specified by
|
This function checks to see if the driver specified by This supports the device specified by
|
||||||
ControllerHandle. Drivers will typically use the device path attached to
|
ControllerHandle. Drivers will typically use the device path attached to
|
||||||
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
||||||
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
||||||
may be called many times during platform initialization. In order to reduce boot times, the tests
|
may be called many times during platform initialization. In order to reduce boot times, the tests
|
||||||
performed by this function must be very small, and take as little time as possible to execute. This
|
performed by this function must be very small, and take as little time as possible to execute. This
|
||||||
function must not change the state of any hardware devices, and this function must be aware that the
|
function must not change the state of any hardware devices, and this function must be aware that the
|
||||||
device specified by ControllerHandle may already be managed by the same driver or a
|
device specified by ControllerHandle may already be managed by the same driver or a
|
||||||
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
||||||
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
||||||
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
||||||
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
||||||
to guarantee the state of ControllerHandle is not modified by this function.
|
to guarantee the state of ControllerHandle is not modified by this function.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For bus drivers, if this parameter is not NULL, then
|
drivers. For bus drivers, if this parameter is not NULL, then
|
||||||
the bus driver must determine if the bus controller specified
|
the bus driver must determine if the bus controller specified
|
||||||
by ControllerHandle and the child controller specified
|
by ControllerHandle and the child controller specified
|
||||||
by RemainingDevicePath are both supported by this
|
by RemainingDevicePath are both supported by this
|
||||||
bus driver.
|
bus driver.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
||||||
@ -804,7 +804,7 @@ HttpBootIp6DxeDriverBindingSupported (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Try to open the DHCP6, HTTP and Device Path protocol.
|
// Try to open the DHCP6, HTTP and Device Path protocol.
|
||||||
//
|
//
|
||||||
@ -849,28 +849,28 @@ HttpBootIp6DxeDriverBindingSupported (
|
|||||||
Starts a device controller or a bus controller.
|
Starts a device controller or a bus controller.
|
||||||
|
|
||||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||||
common boot service. It is legal to call Start() from other locations,
|
common boot service. It is legal to call Start() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||||
EFI_DEVICE_PATH_PROTOCOL.
|
EFI_DEVICE_PATH_PROTOCOL.
|
||||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For a bus driver, if this parameter is NULL, then handles
|
drivers. For a bus driver, if this parameter is NULL, then handles
|
||||||
for all the children of Controller are created by this driver.
|
for all the children of Controller are created by this driver.
|
||||||
If this parameter is not NULL and the first Device Path Node is
|
If this parameter is not NULL and the first Device Path Node is
|
||||||
not the End of Device Path Node, then only the handle for the
|
not the End of Device Path Node, then only the handle for the
|
||||||
child device specified by the first Device Path Node of
|
child device specified by the first Device Path Node of
|
||||||
RemainingDevicePath is created by this driver.
|
RemainingDevicePath is created by this driver.
|
||||||
If the first Device Path Node of RemainingDevicePath is
|
If the first Device Path Node of RemainingDevicePath is
|
||||||
the End of Device Path Node, no child handle is created by this
|
the End of Device Path Node, no child handle is created by this
|
||||||
driver.
|
driver.
|
||||||
|
|
||||||
@ -897,7 +897,7 @@ HttpBootIp6DxeDriverBindingStart (
|
|||||||
BOOLEAN FirstStart;
|
BOOLEAN FirstStart;
|
||||||
|
|
||||||
FirstStart = FALSE;
|
FirstStart = FALSE;
|
||||||
|
|
||||||
Status = gBS->OpenProtocol (
|
Status = gBS->OpenProtocol (
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
&gEfiCallerIdGuid,
|
&gEfiCallerIdGuid,
|
||||||
@ -906,12 +906,12 @@ HttpBootIp6DxeDriverBindingStart (
|
|||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
Private = HTTP_BOOT_PRIVATE_DATA_FROM_ID(Id);
|
Private = HTTP_BOOT_PRIVATE_DATA_FROM_ID(Id);
|
||||||
} else {
|
} else {
|
||||||
FirstStart = TRUE;
|
FirstStart = TRUE;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Initialize the private data structure.
|
// Initialize the private data structure.
|
||||||
//
|
//
|
||||||
@ -973,16 +973,16 @@ HttpBootIp6DxeDriverBindingStart (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set IPv6 available flag.
|
// Set IPv6 available flag.
|
||||||
//
|
//
|
||||||
Status = HttpBootCheckIpv6Support (Private, &Ipv6Available);
|
Status = HttpBootCheckIpv6Support (Private, &Ipv6Available);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
//
|
//
|
||||||
// Fail to get the data whether UNDI supports IPv6.
|
// Fail to get the data whether UNDI supports IPv6.
|
||||||
// Set default value to TRUE.
|
// Set default value to TRUE.
|
||||||
//
|
//
|
||||||
Ipv6Available = TRUE;
|
Ipv6Available = TRUE;
|
||||||
@ -992,14 +992,14 @@ HttpBootIp6DxeDriverBindingStart (
|
|||||||
Status = EFI_UNSUPPORTED;
|
Status = EFI_UNSUPPORTED;
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Private->Ip6Nic != NULL) {
|
if (Private->Ip6Nic != NULL) {
|
||||||
//
|
//
|
||||||
// Already created before
|
// Already created before
|
||||||
//
|
//
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
Private->Ip6Nic = AllocateZeroPool (sizeof (HTTP_BOOT_VIRTUAL_NIC));
|
Private->Ip6Nic = AllocateZeroPool (sizeof (HTTP_BOOT_VIRTUAL_NIC));
|
||||||
if (Private->Ip6Nic == NULL) {
|
if (Private->Ip6Nic == NULL) {
|
||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
@ -1008,7 +1008,7 @@ HttpBootIp6DxeDriverBindingStart (
|
|||||||
Private->Ip6Nic->Private = Private;
|
Private->Ip6Nic->Private = Private;
|
||||||
Private->Ip6Nic->ImageHandle = This->DriverBindingHandle;
|
Private->Ip6Nic->ImageHandle = This->DriverBindingHandle;
|
||||||
Private->Ip6Nic->Signature = HTTP_BOOT_VIRTUAL_NIC_SIGNATURE;
|
Private->Ip6Nic->Signature = HTTP_BOOT_VIRTUAL_NIC_SIGNATURE;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create Dhcp6 child and open Dhcp6 protocol
|
// Create Dhcp6 child and open Dhcp6 protocol
|
||||||
Status = NetLibCreateServiceChild (
|
Status = NetLibCreateServiceChild (
|
||||||
@ -1144,7 +1144,7 @@ HttpBootIp6DxeDriverBindingStart (
|
|||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
ON_ERROR:
|
ON_ERROR:
|
||||||
if (Private != NULL) {
|
if (Private != NULL) {
|
||||||
if (FirstStart) {
|
if (FirstStart) {
|
||||||
@ -1168,10 +1168,10 @@ ON_ERROR:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Stops a device controller or a bus controller.
|
Stops a device controller or a bus controller.
|
||||||
|
|
||||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||||
into this common boot service. It is legal to call Stop() from other locations,
|
into this common boot service. It is legal to call Stop() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||||
same driver's Start() function.
|
same driver's Start() function.
|
||||||
@ -1179,13 +1179,13 @@ ON_ERROR:
|
|||||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||||
Start() function, and the Start() function must have called OpenProtocol() on
|
Start() function, and the Start() function must have called OpenProtocol() on
|
||||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||||
support a bus specific I/O protocol for the driver
|
support a bus specific I/O protocol for the driver
|
||||||
to use to stop the device.
|
to use to stop the device.
|
||||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||||
if NumberOfChildren is 0.
|
if NumberOfChildren is 0.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device was stopped.
|
@retval EFI_SUCCESS The device was stopped.
|
||||||
@ -1317,7 +1317,7 @@ HttpBootDxeDriverEntryPoint (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = EfiLibInstallDriverBindingComponentName2 (
|
Status = EfiLibInstallDriverBindingComponentName2 (
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
SystemTable,
|
SystemTable,
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
/** @file
|
/** @file
|
||||||
UEFI HTTP boot driver's private data structure and interfaces declaration.
|
UEFI HTTP boot driver's private data structure and interfaces declaration.
|
||||||
|
|
||||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||||
This program and the accompanying materials are licensed and made available under
|
This program and the accompanying materials are licensed and made available under
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
The full text of the license may be found at
|
The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php.
|
http://opensource.org/licenses/bsd-license.php.
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#define HTTP_BOOT_DXE_VERSION 0xa
|
#define HTTP_BOOT_DXE_VERSION 0xa
|
||||||
|
|
||||||
//
|
//
|
||||||
// Standard Media Types defined in
|
// Standard Media Types defined in
|
||||||
// http://www.iana.org/assignments/media-types
|
// http://www.iana.org/assignments/media-types
|
||||||
//
|
//
|
||||||
#define HTTP_CONTENT_TYPE_APP_EFI "application/efi"
|
#define HTTP_CONTENT_TYPE_APP_EFI "application/efi"
|
||||||
@ -136,7 +136,7 @@ struct _HTTP_BOOT_VIRTUAL_NIC {
|
|||||||
CallbackInfo, \
|
CallbackInfo, \
|
||||||
HTTP_BOOT_PRIVATE_DATA_SIGNATURE \
|
HTTP_BOOT_PRIVATE_DATA_SIGNATURE \
|
||||||
)
|
)
|
||||||
|
|
||||||
#define HTTP_BOOT_PRIVATE_DATA_FROM_CALLBACK_PROTOCOL(CallbackProtocol) \
|
#define HTTP_BOOT_PRIVATE_DATA_FROM_CALLBACK_PROTOCOL(CallbackProtocol) \
|
||||||
CR ( \
|
CR ( \
|
||||||
CallbackProtocol, \
|
CallbackProtocol, \
|
||||||
@ -172,7 +172,7 @@ struct _HTTP_BOOT_PRIVATE_DATA {
|
|||||||
EFI_DHCP6_PROTOCOL *Dhcp6;
|
EFI_DHCP6_PROTOCOL *Dhcp6;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
|
EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Produced protocol
|
// Produced protocol
|
||||||
//
|
//
|
||||||
@ -273,33 +273,33 @@ struct _HTTP_BOOT_PRIVATE_DATA {
|
|||||||
extern EFI_LOAD_FILE_PROTOCOL gHttpBootDxeLoadFile;
|
extern EFI_LOAD_FILE_PROTOCOL gHttpBootDxeLoadFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||||
it further tests to see if this driver supports creating a handle for the specified child device.
|
it further tests to see if this driver supports creating a handle for the specified child device.
|
||||||
|
|
||||||
This function checks to see if the driver specified by This supports the device specified by
|
This function checks to see if the driver specified by This supports the device specified by
|
||||||
ControllerHandle. Drivers will typically use the device path attached to
|
ControllerHandle. Drivers will typically use the device path attached to
|
||||||
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
||||||
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
||||||
may be called many times during platform initialization. In order to reduce boot times, the tests
|
may be called many times during platform initialization. In order to reduce boot times, the tests
|
||||||
performed by this function must be very small, and take as little time as possible to execute. This
|
performed by this function must be very small, and take as little time as possible to execute. This
|
||||||
function must not change the state of any hardware devices, and this function must be aware that the
|
function must not change the state of any hardware devices, and this function must be aware that the
|
||||||
device specified by ControllerHandle may already be managed by the same driver or a
|
device specified by ControllerHandle may already be managed by the same driver or a
|
||||||
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
||||||
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
||||||
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
||||||
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
||||||
to guarantee the state of ControllerHandle is not modified by this function.
|
to guarantee the state of ControllerHandle is not modified by this function.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For bus drivers, if this parameter is not NULL, then
|
drivers. For bus drivers, if this parameter is not NULL, then
|
||||||
the bus driver must determine if the bus controller specified
|
the bus driver must determine if the bus controller specified
|
||||||
by ControllerHandle and the child controller specified
|
by ControllerHandle and the child controller specified
|
||||||
by RemainingDevicePath are both supported by this
|
by RemainingDevicePath are both supported by this
|
||||||
bus driver.
|
bus driver.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
||||||
@ -326,28 +326,28 @@ HttpBootIp4DxeDriverBindingSupported (
|
|||||||
Starts a device controller or a bus controller.
|
Starts a device controller or a bus controller.
|
||||||
|
|
||||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||||
common boot service. It is legal to call Start() from other locations,
|
common boot service. It is legal to call Start() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||||
EFI_DEVICE_PATH_PROTOCOL.
|
EFI_DEVICE_PATH_PROTOCOL.
|
||||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For a bus driver, if this parameter is NULL, then handles
|
drivers. For a bus driver, if this parameter is NULL, then handles
|
||||||
for all the children of Controller are created by this driver.
|
for all the children of Controller are created by this driver.
|
||||||
If this parameter is not NULL and the first Device Path Node is
|
If this parameter is not NULL and the first Device Path Node is
|
||||||
not the End of Device Path Node, then only the handle for the
|
not the End of Device Path Node, then only the handle for the
|
||||||
child device specified by the first Device Path Node of
|
child device specified by the first Device Path Node of
|
||||||
RemainingDevicePath is created by this driver.
|
RemainingDevicePath is created by this driver.
|
||||||
If the first Device Path Node of RemainingDevicePath is
|
If the first Device Path Node of RemainingDevicePath is
|
||||||
the End of Device Path Node, no child handle is created by this
|
the End of Device Path Node, no child handle is created by this
|
||||||
driver.
|
driver.
|
||||||
|
|
||||||
@ -367,10 +367,10 @@ HttpBootIp4DxeDriverBindingStart (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Stops a device controller or a bus controller.
|
Stops a device controller or a bus controller.
|
||||||
|
|
||||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||||
into this common boot service. It is legal to call Stop() from other locations,
|
into this common boot service. It is legal to call Stop() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||||
same driver's Start() function.
|
same driver's Start() function.
|
||||||
@ -378,13 +378,13 @@ HttpBootIp4DxeDriverBindingStart (
|
|||||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||||
Start() function, and the Start() function must have called OpenProtocol() on
|
Start() function, and the Start() function must have called OpenProtocol() on
|
||||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||||
support a bus specific I/O protocol for the driver
|
support a bus specific I/O protocol for the driver
|
||||||
to use to stop the device.
|
to use to stop the device.
|
||||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||||
if NumberOfChildren is 0.
|
if NumberOfChildren is 0.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device was stopped.
|
@retval EFI_SUCCESS The device was stopped.
|
||||||
@ -401,33 +401,33 @@ HttpBootIp4DxeDriverBindingStop (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||||
it further tests to see if this driver supports creating a handle for the specified child device.
|
it further tests to see if this driver supports creating a handle for the specified child device.
|
||||||
|
|
||||||
This function checks to see if the driver specified by This supports the device specified by
|
This function checks to see if the driver specified by This supports the device specified by
|
||||||
ControllerHandle. Drivers will typically use the device path attached to
|
ControllerHandle. Drivers will typically use the device path attached to
|
||||||
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
||||||
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
||||||
may be called many times during platform initialization. In order to reduce boot times, the tests
|
may be called many times during platform initialization. In order to reduce boot times, the tests
|
||||||
performed by this function must be very small, and take as little time as possible to execute. This
|
performed by this function must be very small, and take as little time as possible to execute. This
|
||||||
function must not change the state of any hardware devices, and this function must be aware that the
|
function must not change the state of any hardware devices, and this function must be aware that the
|
||||||
device specified by ControllerHandle may already be managed by the same driver or a
|
device specified by ControllerHandle may already be managed by the same driver or a
|
||||||
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
||||||
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
||||||
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
||||||
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
||||||
to guarantee the state of ControllerHandle is not modified by this function.
|
to guarantee the state of ControllerHandle is not modified by this function.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For bus drivers, if this parameter is not NULL, then
|
drivers. For bus drivers, if this parameter is not NULL, then
|
||||||
the bus driver must determine if the bus controller specified
|
the bus driver must determine if the bus controller specified
|
||||||
by ControllerHandle and the child controller specified
|
by ControllerHandle and the child controller specified
|
||||||
by RemainingDevicePath are both supported by this
|
by RemainingDevicePath are both supported by this
|
||||||
bus driver.
|
bus driver.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
||||||
@ -454,28 +454,28 @@ HttpBootIp6DxeDriverBindingSupported (
|
|||||||
Starts a device controller or a bus controller.
|
Starts a device controller or a bus controller.
|
||||||
|
|
||||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||||
common boot service. It is legal to call Start() from other locations,
|
common boot service. It is legal to call Start() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||||
EFI_DEVICE_PATH_PROTOCOL.
|
EFI_DEVICE_PATH_PROTOCOL.
|
||||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For a bus driver, if this parameter is NULL, then handles
|
drivers. For a bus driver, if this parameter is NULL, then handles
|
||||||
for all the children of Controller are created by this driver.
|
for all the children of Controller are created by this driver.
|
||||||
If this parameter is not NULL and the first Device Path Node is
|
If this parameter is not NULL and the first Device Path Node is
|
||||||
not the End of Device Path Node, then only the handle for the
|
not the End of Device Path Node, then only the handle for the
|
||||||
child device specified by the first Device Path Node of
|
child device specified by the first Device Path Node of
|
||||||
RemainingDevicePath is created by this driver.
|
RemainingDevicePath is created by this driver.
|
||||||
If the first Device Path Node of RemainingDevicePath is
|
If the first Device Path Node of RemainingDevicePath is
|
||||||
the End of Device Path Node, no child handle is created by this
|
the End of Device Path Node, no child handle is created by this
|
||||||
driver.
|
driver.
|
||||||
|
|
||||||
@ -495,10 +495,10 @@ HttpBootIp6DxeDriverBindingStart (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Stops a device controller or a bus controller.
|
Stops a device controller or a bus controller.
|
||||||
|
|
||||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||||
into this common boot service. It is legal to call Stop() from other locations,
|
into this common boot service. It is legal to call Stop() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||||
same driver's Start() function.
|
same driver's Start() function.
|
||||||
@ -506,13 +506,13 @@ HttpBootIp6DxeDriverBindingStart (
|
|||||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||||
Start() function, and the Start() function must have called OpenProtocol() on
|
Start() function, and the Start() function must have called OpenProtocol() on
|
||||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||||
support a bus specific I/O protocol for the driver
|
support a bus specific I/O protocol for the driver
|
||||||
to use to stop the device.
|
to use to stop the device.
|
||||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||||
if NumberOfChildren is 0.
|
if NumberOfChildren is 0.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device was stopped.
|
@retval EFI_SUCCESS The device was stopped.
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
## @file
|
## @file
|
||||||
# This modules produce the Load File Protocol for UEFI HTTP boot.
|
# This modules produce the Load File Protocol for UEFI HTTP boot.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
# http://opensource.org/licenses/bsd-license.php
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
#
|
#
|
||||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#
|
#
|
||||||
##
|
##
|
||||||
|
|
||||||
[Defines]
|
[Defines]
|
||||||
@ -68,7 +68,7 @@
|
|||||||
## TO_START
|
## TO_START
|
||||||
## BY_START
|
## BY_START
|
||||||
gEfiDevicePathProtocolGuid
|
gEfiDevicePathProtocolGuid
|
||||||
|
|
||||||
gEfiLoadFileProtocolGuid ## BY_START
|
gEfiLoadFileProtocolGuid ## BY_START
|
||||||
gEfiHttpServiceBindingProtocolGuid ## CONSUMES
|
gEfiHttpServiceBindingProtocolGuid ## CONSUMES
|
||||||
gEfiHttpProtocolGuid ## CONSUMES
|
gEfiHttpProtocolGuid ## CONSUMES
|
||||||
@ -99,7 +99,7 @@
|
|||||||
gEfiAdapterInfoUndiIpv6SupportGuid ## SOMETIMES_CONSUMES ## GUID
|
gEfiAdapterInfoUndiIpv6SupportGuid ## SOMETIMES_CONSUMES ## GUID
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections ## CONSUMES
|
gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections ## CONSUMES
|
||||||
|
|
||||||
[UserExtensions.TianoCore."ExtraFiles"]
|
[UserExtensions.TianoCore."ExtraFiles"]
|
||||||
HttpBootDxeExtra.uni
|
HttpBootDxeExtra.uni
|
||||||
|
@ -3,15 +3,15 @@
|
|||||||
//
|
//
|
||||||
// This driver provides EFI Load File Protocol which is used to download
|
// This driver provides EFI Load File Protocol which is used to download
|
||||||
// the boot image from HTTP server. It could work with an IPv4 or IPv6 stack.
|
// the boot image from HTTP server. It could work with an IPv4 or IPv6 stack.
|
||||||
//
|
|
||||||
//
|
//
|
||||||
// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
//
|
||||||
|
// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
//
|
//
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
// which accompanies this distribution. The full text of the license may be found at
|
// which accompanies this distribution. The full text of the license may be found at
|
||||||
// http://opensource.org/licenses/bsd-license.php.
|
// http://opensource.org/licenses/bsd-license.php.
|
||||||
//
|
//
|
||||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
//
|
//
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// /** @file
|
// /** @file
|
||||||
// HttpBootDxe Localized Strings and Content
|
// HttpBootDxe Localized Strings and Content
|
||||||
//
|
//
|
||||||
// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
//
|
//
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -13,8 +13,8 @@
|
|||||||
//
|
//
|
||||||
// **/
|
// **/
|
||||||
|
|
||||||
#string STR_PROPERTIES_MODULE_NAME
|
#string STR_PROPERTIES_MODULE_NAME
|
||||||
#language en-US
|
#language en-US
|
||||||
"UEFI HTTP BOOT DXE"
|
"UEFI HTTP BOOT DXE"
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
|
|
||||||
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||||
This program and the accompanying materials are licensed and made available under
|
This program and the accompanying materials are licensed and made available under
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
The full text of the license may be found at
|
The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php.
|
http://opensource.org/licenses/bsd-license.php.
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -96,7 +96,7 @@ HttpBootUninstallCallback (
|
|||||||
/**
|
/**
|
||||||
Enable the use of UEFI HTTP boot function.
|
Enable the use of UEFI HTTP boot function.
|
||||||
|
|
||||||
If the driver has already been started but not satisfy the requirement (IP stack and
|
If the driver has already been started but not satisfy the requirement (IP stack and
|
||||||
specified boot file path), this function will stop the driver and start it again.
|
specified boot file path), this function will stop the driver and start it again.
|
||||||
|
|
||||||
@param[in] Private The pointer to the driver's private data.
|
@param[in] Private The pointer to the driver's private data.
|
||||||
@ -110,7 +110,7 @@ HttpBootUninstallCallback (
|
|||||||
@retval EFI_INVALID_PARAMETER The FilePath doesn't contain a valid URI device path node.
|
@retval EFI_INVALID_PARAMETER The FilePath doesn't contain a valid URI device path node.
|
||||||
@retval EFI_ALREADY_STARTED The driver is already in started state.
|
@retval EFI_ALREADY_STARTED The driver is already in started state.
|
||||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources.
|
@retval EFI_OUT_OF_RESOURCES There are not enough resources.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
HttpBootStart (
|
HttpBootStart (
|
||||||
@ -124,20 +124,20 @@ HttpBootStart (
|
|||||||
CHAR8 *Uri;
|
CHAR8 *Uri;
|
||||||
|
|
||||||
Uri = NULL;
|
Uri = NULL;
|
||||||
|
|
||||||
if (Private == NULL || FilePath == NULL) {
|
if (Private == NULL || FilePath == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check the URI in the input FilePath, in order to see whether it is
|
// Check the URI in the input FilePath, in order to see whether it is
|
||||||
// required to boot from a new specified boot file.
|
// required to boot from a new specified boot file.
|
||||||
//
|
//
|
||||||
Status = HttpBootParseFilePath (FilePath, &Uri);
|
Status = HttpBootParseFilePath (FilePath, &Uri);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check whether we need to stop and restart the HTTP boot driver.
|
// Check whether we need to stop and restart the HTTP boot driver.
|
||||||
//
|
//
|
||||||
@ -148,7 +148,7 @@ HttpBootStart (
|
|||||||
// 2. The specified boot file URI in FilePath is different with the one we have
|
// 2. The specified boot file URI in FilePath is different with the one we have
|
||||||
// recorded before.
|
// recorded before.
|
||||||
//
|
//
|
||||||
if ((UsingIpv6 != Private->UsingIpv6) ||
|
if ((UsingIpv6 != Private->UsingIpv6) ||
|
||||||
((Uri != NULL) && (AsciiStrCmp (Private->BootFileUri, Uri) != 0))) {
|
((Uri != NULL) && (AsciiStrCmp (Private->BootFileUri, Uri) != 0))) {
|
||||||
//
|
//
|
||||||
// Restart is required, first stop then continue this start function.
|
// Restart is required, first stop then continue this start function.
|
||||||
@ -201,7 +201,7 @@ HttpBootStart (
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Init the content of cached DHCP offer list.
|
// Init the content of cached DHCP offer list.
|
||||||
//
|
//
|
||||||
@ -241,7 +241,7 @@ HttpBootStart (
|
|||||||
@retval EFI_NOT_STARTED The driver is in stopped state.
|
@retval EFI_NOT_STARTED The driver is in stopped state.
|
||||||
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
|
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
|
||||||
@retval Others Other errors as indicated.
|
@retval Others Other errors as indicated.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
HttpBootDhcp (
|
HttpBootDhcp (
|
||||||
@ -253,7 +253,7 @@ HttpBootDhcp (
|
|||||||
if (Private == NULL) {
|
if (Private == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Private->Started) {
|
if (!Private->Started) {
|
||||||
return EFI_NOT_STARTED;
|
return EFI_NOT_STARTED;
|
||||||
}
|
}
|
||||||
@ -292,11 +292,11 @@ HttpBootDhcp (
|
|||||||
@retval EFI_INVALID_PARAMETER Private is NULL, or ImageType is NULL, or BufferSize is NULL.
|
@retval EFI_INVALID_PARAMETER Private is NULL, or ImageType is NULL, or BufferSize is NULL.
|
||||||
@retval EFI_INVALID_PARAMETER *BufferSize is not zero, and Buffer is NULL.
|
@retval EFI_INVALID_PARAMETER *BufferSize is not zero, and Buffer is NULL.
|
||||||
@retval EFI_NOT_STARTED The driver is in stopped state.
|
@retval EFI_NOT_STARTED The driver is in stopped state.
|
||||||
@retval EFI_BUFFER_TOO_SMALL The BufferSize is too small to read the boot file. BufferSize has
|
@retval EFI_BUFFER_TOO_SMALL The BufferSize is too small to read the boot file. BufferSize has
|
||||||
been updated with the size needed to complete the request.
|
been updated with the size needed to complete the request.
|
||||||
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
|
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
|
||||||
@retval Others Other errors as indicated.
|
@retval Others Other errors as indicated.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
HttpBootLoadFile (
|
HttpBootLoadFile (
|
||||||
@ -315,7 +315,7 @@ HttpBootLoadFile (
|
|||||||
if (*BufferSize != 0 && Buffer == NULL) {
|
if (*BufferSize != 0 && Buffer == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Private->Started) {
|
if (!Private->Started) {
|
||||||
return EFI_NOT_STARTED;
|
return EFI_NOT_STARTED;
|
||||||
}
|
}
|
||||||
@ -397,10 +397,10 @@ HttpBootLoadFile (
|
|||||||
Buffer,
|
Buffer,
|
||||||
ImageType
|
ImageType
|
||||||
);
|
);
|
||||||
|
|
||||||
ON_EXIT:
|
ON_EXIT:
|
||||||
HttpBootUninstallCallback (Private);
|
HttpBootUninstallCallback (Private);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
if (Status == EFI_ACCESS_DENIED) {
|
if (Status == EFI_ACCESS_DENIED) {
|
||||||
AsciiPrint ("\n Error: Could not establish connection with HTTP server.\n");
|
AsciiPrint ("\n Error: Could not establish connection with HTTP server.\n");
|
||||||
@ -418,7 +418,7 @@ ON_EXIT:
|
|||||||
AsciiPrint ("\n Error: Unexpected network error.\n");
|
AsciiPrint ("\n Error: Unexpected network error.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -431,7 +431,7 @@ ON_EXIT:
|
|||||||
@retval EFI_NOT_STARTED The driver is already in stopped state.
|
@retval EFI_NOT_STARTED The driver is already in stopped state.
|
||||||
@retval EFI_INVALID_PARAMETER Private is NULL.
|
@retval EFI_INVALID_PARAMETER Private is NULL.
|
||||||
@retval Others Unexpected error when stop the function.
|
@retval Others Unexpected error when stop the function.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
HttpBootStop (
|
HttpBootStop (
|
||||||
@ -443,16 +443,16 @@ HttpBootStop (
|
|||||||
if (Private == NULL) {
|
if (Private == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Private->Started) {
|
if (!Private->Started) {
|
||||||
return EFI_NOT_STARTED;
|
return EFI_NOT_STARTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Private->HttpCreated) {
|
if (Private->HttpCreated) {
|
||||||
HttpIoDestroyIo (&Private->HttpIo);
|
HttpIoDestroyIo (&Private->HttpIo);
|
||||||
Private->HttpCreated = FALSE;
|
Private->HttpCreated = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
Private->Started = FALSE;
|
Private->Started = FALSE;
|
||||||
ZeroMem (&Private->StationIp, sizeof (EFI_IP_ADDRESS));
|
ZeroMem (&Private->StationIp, sizeof (EFI_IP_ADDRESS));
|
||||||
ZeroMem (&Private->SubnetMask, sizeof (EFI_IP_ADDRESS));
|
ZeroMem (&Private->SubnetMask, sizeof (EFI_IP_ADDRESS));
|
||||||
@ -462,7 +462,7 @@ HttpBootStop (
|
|||||||
Private->BootFileUriParser = NULL;
|
Private->BootFileUriParser = NULL;
|
||||||
Private->BootFileSize = 0;
|
Private->BootFileSize = 0;
|
||||||
Private->SelectIndex = 0;
|
Private->SelectIndex = 0;
|
||||||
Private->SelectProxyType = HttpOfferTypeMax;
|
Private->SelectProxyType = HttpOfferTypeMax;
|
||||||
|
|
||||||
if (!Private->UsingIpv6) {
|
if (!Private->UsingIpv6) {
|
||||||
//
|
//
|
||||||
@ -482,7 +482,7 @@ HttpBootStop (
|
|||||||
//
|
//
|
||||||
Private->Dhcp6->Stop (Private->Dhcp6);
|
Private->Dhcp6->Stop (Private->Dhcp6);
|
||||||
Private->Dhcp6->Configure (Private->Dhcp6, NULL);
|
Private->Dhcp6->Configure (Private->Dhcp6, NULL);
|
||||||
|
|
||||||
for (Index = 0; Index < HTTP_BOOT_OFFER_MAX_NUM; Index++) {
|
for (Index = 0; Index < HTTP_BOOT_OFFER_MAX_NUM; Index++) {
|
||||||
if (Private->OfferBuffer[Index].Dhcp6.UriParser) {
|
if (Private->OfferBuffer[Index].Dhcp6.UriParser) {
|
||||||
HttpUrlFreeParser (Private->OfferBuffer[Index].Dhcp6.UriParser);
|
HttpUrlFreeParser (Private->OfferBuffer[Index].Dhcp6.UriParser);
|
||||||
@ -501,14 +501,14 @@ HttpBootStop (
|
|||||||
Private->FilePathUri = NULL;
|
Private->FilePathUri = NULL;
|
||||||
Private->FilePathUriParser = NULL;
|
Private->FilePathUriParser = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ZeroMem (Private->OfferBuffer, sizeof (Private->OfferBuffer));
|
ZeroMem (Private->OfferBuffer, sizeof (Private->OfferBuffer));
|
||||||
Private->OfferNum = 0;
|
Private->OfferNum = 0;
|
||||||
ZeroMem (Private->OfferCount, sizeof (Private->OfferCount));
|
ZeroMem (Private->OfferCount, sizeof (Private->OfferCount));
|
||||||
ZeroMem (Private->OfferIndex, sizeof (Private->OfferIndex));
|
ZeroMem (Private->OfferIndex, sizeof (Private->OfferIndex));
|
||||||
|
|
||||||
HttpBootFreeCacheList (Private);
|
HttpBootFreeCacheList (Private);
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -573,7 +573,7 @@ HttpBootDxeLoadFile (
|
|||||||
|
|
||||||
VirtualNic = HTTP_BOOT_VIRTUAL_NIC_FROM_LOADFILE (This);
|
VirtualNic = HTTP_BOOT_VIRTUAL_NIC_FROM_LOADFILE (This);
|
||||||
Private = VirtualNic->Private;
|
Private = VirtualNic->Private;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check media status before HTTP boot start
|
// Check media status before HTTP boot start
|
||||||
//
|
//
|
||||||
@ -583,7 +583,7 @@ HttpBootDxeLoadFile (
|
|||||||
AsciiPrint ("\n Error: Could not detect network connection.\n");
|
AsciiPrint ("\n Error: Could not detect network connection.\n");
|
||||||
return EFI_NO_MEDIA;
|
return EFI_NO_MEDIA;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check whether the virtual nic is using IPv6 or not.
|
// Check whether the virtual nic is using IPv6 or not.
|
||||||
//
|
//
|
||||||
@ -599,7 +599,7 @@ HttpBootDxeLoadFile (
|
|||||||
if (Status != EFI_SUCCESS && Status != EFI_ALREADY_STARTED) {
|
if (Status != EFI_SUCCESS && Status != EFI_ALREADY_STARTED) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Load the boot file.
|
// Load the boot file.
|
||||||
//
|
//
|
||||||
@ -636,7 +636,7 @@ HttpBootDxeLoadFile (
|
|||||||
///
|
///
|
||||||
/// Load File Protocol instance
|
/// Load File Protocol instance
|
||||||
///
|
///
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED
|
GLOBAL_REMOVE_IF_UNREFERENCED
|
||||||
EFI_LOAD_FILE_PROTOCOL gHttpBootDxeLoadFile = {
|
EFI_LOAD_FILE_PROTOCOL gHttpBootDxeLoadFile = {
|
||||||
HttpBootDxeLoadFile
|
HttpBootDxeLoadFile
|
||||||
};
|
};
|
||||||
@ -658,7 +658,7 @@ EFI_LOAD_FILE_PROTOCOL gHttpBootDxeLoadFile = {
|
|||||||
@param[in] DataLength The length in bytes of the buffer pointed to by Data.
|
@param[in] DataLength The length in bytes of the buffer pointed to by Data.
|
||||||
@param[in] Data A pointer to the buffer of data, the data type is specified by
|
@param[in] Data A pointer to the buffer of data, the data type is specified by
|
||||||
DataType.
|
DataType.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Tells the HTTP Boot driver to continue the HTTP Boot process.
|
@retval EFI_SUCCESS Tells the HTTP Boot driver to continue the HTTP Boot process.
|
||||||
@retval EFI_ABORTED Tells the HTTP Boot driver to abort the current HTTP Boot process.
|
@retval EFI_ABORTED Tells the HTTP Boot driver to abort the current HTTP Boot process.
|
||||||
**/
|
**/
|
||||||
@ -698,7 +698,7 @@ HttpBootCallback (
|
|||||||
case HttpBootHttpResponse:
|
case HttpBootHttpResponse:
|
||||||
if (Data != NULL) {
|
if (Data != NULL) {
|
||||||
HttpMessage = (EFI_HTTP_MESSAGE *) Data;
|
HttpMessage = (EFI_HTTP_MESSAGE *) Data;
|
||||||
|
|
||||||
if (HttpMessage->Data.Response != NULL) {
|
if (HttpMessage->Data.Response != NULL) {
|
||||||
if (HttpBootIsHttpRedirectStatusCode (HttpMessage->Data.Response->StatusCode)) {
|
if (HttpBootIsHttpRedirectStatusCode (HttpMessage->Data.Response->StatusCode)) {
|
||||||
//
|
//
|
||||||
@ -714,10 +714,10 @@ HttpBootCallback (
|
|||||||
if (HttpHeader != NULL) {
|
if (HttpHeader != NULL) {
|
||||||
Print (L"\n HTTP ERROR: Resource Redirected.\n New Location: %a\n", HttpHeader->FieldValue);
|
Print (L"\n HTTP ERROR: Resource Redirected.\n New Location: %a\n", HttpHeader->FieldValue);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpHeader = HttpFindHeader (
|
HttpHeader = HttpFindHeader (
|
||||||
HttpMessage->HeaderCount,
|
HttpMessage->HeaderCount,
|
||||||
HttpMessage->Headers,
|
HttpMessage->Headers,
|
||||||
@ -767,7 +767,7 @@ HttpBootCallback (
|
|||||||
///
|
///
|
||||||
/// HTTP Boot Callback Protocol instance
|
/// HTTP Boot Callback Protocol instance
|
||||||
///
|
///
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED
|
GLOBAL_REMOVE_IF_UNREFERENCED
|
||||||
EFI_HTTP_BOOT_CALLBACK_PROTOCOL gHttpBootDxeHttpBootCallback = {
|
EFI_HTTP_BOOT_CALLBACK_PROTOCOL gHttpBootDxeHttpBootCallback = {
|
||||||
HttpBootCallback
|
HttpBootCallback
|
||||||
};
|
};
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The declaration of UEFI HTTP boot function.
|
The declaration of UEFI HTTP boot function.
|
||||||
|
|
||||||
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials are licensed and made available under
|
This program and the accompanying materials are licensed and made available under
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
The full text of the license may be found at
|
The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php.
|
http://opensource.org/licenses/bsd-license.php.
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -26,7 +26,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
@retval EFI_NOT_STARTED The driver is in stopped state.
|
@retval EFI_NOT_STARTED The driver is in stopped state.
|
||||||
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
|
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
|
||||||
@retval Others Other errors as indicated.
|
@retval Others Other errors as indicated.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
HttpBootDhcp (
|
HttpBootDhcp (
|
||||||
@ -42,7 +42,7 @@ HttpBootDhcp (
|
|||||||
@retval EFI_NOT_STARTED The driver is already in stopped state.
|
@retval EFI_NOT_STARTED The driver is already in stopped state.
|
||||||
@retval EFI_INVALID_PARAMETER Private is NULL.
|
@retval EFI_INVALID_PARAMETER Private is NULL.
|
||||||
@retval Others Unexpected error when stop the function.
|
@retval Others Unexpected error when stop the function.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
HttpBootStop (
|
HttpBootStop (
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Support functions implementation for UEFI HTTP boot driver.
|
Support functions implementation for UEFI HTTP boot driver.
|
||||||
|
|
||||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||||
This program and the accompanying materials are licensed and made available under
|
This program and the accompanying materials are licensed and made available under
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
The full text of the license may be found at
|
The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php.
|
http://opensource.org/licenses/bsd-license.php.
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -162,27 +162,27 @@ HttpBootPrintErrorMessage (
|
|||||||
switch (StatusCode) {
|
switch (StatusCode) {
|
||||||
case HTTP_STATUS_300_MULTIPLE_CHOICES:
|
case HTTP_STATUS_300_MULTIPLE_CHOICES:
|
||||||
AsciiPrint ("\n Redirection: 300 Multiple Choices");
|
AsciiPrint ("\n Redirection: 300 Multiple Choices");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTTP_STATUS_301_MOVED_PERMANENTLY:
|
case HTTP_STATUS_301_MOVED_PERMANENTLY:
|
||||||
AsciiPrint ("\n Redirection: 301 Moved Permanently");
|
AsciiPrint ("\n Redirection: 301 Moved Permanently");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTTP_STATUS_302_FOUND:
|
case HTTP_STATUS_302_FOUND:
|
||||||
AsciiPrint ("\n Redirection: 302 Found");
|
AsciiPrint ("\n Redirection: 302 Found");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTTP_STATUS_303_SEE_OTHER:
|
case HTTP_STATUS_303_SEE_OTHER:
|
||||||
AsciiPrint ("\n Redirection: 303 See Other");
|
AsciiPrint ("\n Redirection: 303 See Other");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTTP_STATUS_304_NOT_MODIFIED:
|
case HTTP_STATUS_304_NOT_MODIFIED:
|
||||||
AsciiPrint ("\n Redirection: 304 Not Modified");
|
AsciiPrint ("\n Redirection: 304 Not Modified");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTTP_STATUS_305_USE_PROXY:
|
case HTTP_STATUS_305_USE_PROXY:
|
||||||
AsciiPrint ("\n Redirection: 305 Use Proxy");
|
AsciiPrint ("\n Redirection: 305 Use Proxy");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTTP_STATUS_307_TEMPORARY_REDIRECT:
|
case HTTP_STATUS_307_TEMPORARY_REDIRECT:
|
||||||
AsciiPrint ("\n Redirection: 307 Temporary Redirect");
|
AsciiPrint ("\n Redirection: 307 Temporary Redirect");
|
||||||
@ -190,16 +190,16 @@ HttpBootPrintErrorMessage (
|
|||||||
|
|
||||||
case HTTP_STATUS_308_PERMANENT_REDIRECT:
|
case HTTP_STATUS_308_PERMANENT_REDIRECT:
|
||||||
AsciiPrint ("\n Redirection: 308 Permanent Redirect");
|
AsciiPrint ("\n Redirection: 308 Permanent Redirect");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTTP_STATUS_400_BAD_REQUEST:
|
case HTTP_STATUS_400_BAD_REQUEST:
|
||||||
AsciiPrint ("\n Client Error: 400 Bad Request");
|
AsciiPrint ("\n Client Error: 400 Bad Request");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTTP_STATUS_401_UNAUTHORIZED:
|
case HTTP_STATUS_401_UNAUTHORIZED:
|
||||||
AsciiPrint ("\n Client Error: 401 Unauthorized");
|
AsciiPrint ("\n Client Error: 401 Unauthorized");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTTP_STATUS_402_PAYMENT_REQUIRED:
|
case HTTP_STATUS_402_PAYMENT_REQUIRED:
|
||||||
AsciiPrint ("\n Client Error: 402 Payment Required");
|
AsciiPrint ("\n Client Error: 402 Payment Required");
|
||||||
break;
|
break;
|
||||||
@ -289,7 +289,7 @@ HttpBootPrintErrorMessage (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default: ;
|
default: ;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -319,13 +319,13 @@ HttpBootCommonNotify (
|
|||||||
|
|
||||||
@retval EFI_SUCCESS Operation succeeded.
|
@retval EFI_SUCCESS Operation succeeded.
|
||||||
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
|
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
|
||||||
@retval Others Other errors as indicated.
|
@retval Others Other errors as indicated.
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
HttpBootDns (
|
HttpBootDns (
|
||||||
IN HTTP_BOOT_PRIVATE_DATA *Private,
|
IN HTTP_BOOT_PRIVATE_DATA *Private,
|
||||||
IN CHAR16 *HostName,
|
IN CHAR16 *HostName,
|
||||||
OUT EFI_IPv6_ADDRESS *IpAddress
|
OUT EFI_IPv6_ADDRESS *IpAddress
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
@ -337,14 +337,14 @@ HttpBootDns (
|
|||||||
EFI_IPv6_ADDRESS *DnsServerList;
|
EFI_IPv6_ADDRESS *DnsServerList;
|
||||||
UINTN DnsServerListCount;
|
UINTN DnsServerListCount;
|
||||||
UINTN DataSize;
|
UINTN DataSize;
|
||||||
BOOLEAN IsDone;
|
BOOLEAN IsDone;
|
||||||
|
|
||||||
DnsServerList = NULL;
|
DnsServerList = NULL;
|
||||||
DnsServerListCount = 0;
|
DnsServerListCount = 0;
|
||||||
Dns6 = NULL;
|
Dns6 = NULL;
|
||||||
Dns6Handle = NULL;
|
Dns6Handle = NULL;
|
||||||
ZeroMem (&Token, sizeof (EFI_DNS6_COMPLETION_TOKEN));
|
ZeroMem (&Token, sizeof (EFI_DNS6_COMPLETION_TOKEN));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get DNS server list from EFI IPv6 Configuration protocol.
|
// Get DNS server list from EFI IPv6 Configuration protocol.
|
||||||
//
|
//
|
||||||
@ -359,7 +359,7 @@ HttpBootDns (
|
|||||||
DnsServerList = AllocatePool (DataSize);
|
DnsServerList = AllocatePool (DataSize);
|
||||||
if (DnsServerList == NULL) {
|
if (DnsServerList == NULL) {
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = Ip6Config->GetData (Ip6Config, Ip6ConfigDataTypeDnsServer, &DataSize, DnsServerList);
|
Status = Ip6Config->GetData (Ip6Config, Ip6ConfigDataTypeDnsServer, &DataSize, DnsServerList);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
@ -381,8 +381,8 @@ HttpBootDns (
|
|||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gBS->OpenProtocol (
|
Status = gBS->OpenProtocol (
|
||||||
Dns6Handle,
|
Dns6Handle,
|
||||||
&gEfiDns6ProtocolGuid,
|
&gEfiDns6ProtocolGuid,
|
||||||
@ -411,7 +411,7 @@ HttpBootDns (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
Token.Status = EFI_NOT_READY;
|
Token.Status = EFI_NOT_READY;
|
||||||
IsDone = FALSE;
|
IsDone = FALSE;
|
||||||
//
|
//
|
||||||
@ -439,11 +439,11 @@ HttpBootDns (
|
|||||||
while (!IsDone) {
|
while (!IsDone) {
|
||||||
Dns6->Poll (Dns6);
|
Dns6->Poll (Dns6);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Name resolution is done, check result.
|
// Name resolution is done, check result.
|
||||||
//
|
//
|
||||||
Status = Token.Status;
|
Status = Token.Status;
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
if (Token.RspData.H2AData == NULL) {
|
if (Token.RspData.H2AData == NULL) {
|
||||||
Status = EFI_DEVICE_ERROR;
|
Status = EFI_DEVICE_ERROR;
|
||||||
@ -473,7 +473,7 @@ Exit:
|
|||||||
|
|
||||||
if (Dns6 != NULL) {
|
if (Dns6 != NULL) {
|
||||||
Dns6->Configure (Dns6, NULL);
|
Dns6->Configure (Dns6, NULL);
|
||||||
|
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
Dns6Handle,
|
Dns6Handle,
|
||||||
&gEfiDns6ProtocolGuid,
|
&gEfiDns6ProtocolGuid,
|
||||||
@ -494,8 +494,8 @@ Exit:
|
|||||||
if (DnsServerList != NULL) {
|
if (DnsServerList != NULL) {
|
||||||
FreePool (DnsServerList);
|
FreePool (DnsServerList);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
Create a HTTP_IO_HEADER to hold the HTTP header items.
|
Create a HTTP_IO_HEADER to hold the HTTP header items.
|
||||||
@ -503,7 +503,7 @@ Exit:
|
|||||||
@param[in] MaxHeaderCount The maximun number of HTTP header in this holder.
|
@param[in] MaxHeaderCount The maximun number of HTTP header in this holder.
|
||||||
|
|
||||||
@return A pointer of the HTTP header holder or NULL if failed.
|
@return A pointer of the HTTP header holder or NULL if failed.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
HTTP_IO_HEADER *
|
HTTP_IO_HEADER *
|
||||||
HttpBootCreateHeader (
|
HttpBootCreateHeader (
|
||||||
@ -528,7 +528,7 @@ HttpBootCreateHeader (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destroy the HTTP_IO_HEADER and release the resouces.
|
Destroy the HTTP_IO_HEADER and release the resouces.
|
||||||
|
|
||||||
@param[in] HttpIoHeader Point to the HTTP header holder to be destroyed.
|
@param[in] HttpIoHeader Point to the HTTP header holder to be destroyed.
|
||||||
|
|
||||||
@ -539,7 +539,7 @@ HttpBootFreeHeader (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
|
|
||||||
if (HttpIoHeader != NULL) {
|
if (HttpIoHeader != NULL) {
|
||||||
if (HttpIoHeader->HeaderCount != 0) {
|
if (HttpIoHeader->HeaderCount != 0) {
|
||||||
for (Index = 0; Index < HttpIoHeader->HeaderCount; Index++) {
|
for (Index = 0; Index < HttpIoHeader->HeaderCount; Index++) {
|
||||||
@ -562,7 +562,7 @@ HttpBootFreeHeader (
|
|||||||
@retval EFI_INVALID_PARAMETER Any input parameter is invalid.
|
@retval EFI_INVALID_PARAMETER Any input parameter is invalid.
|
||||||
@retval EFI_OUT_OF_RESOURCES Insufficient resource to complete the operation.
|
@retval EFI_OUT_OF_RESOURCES Insufficient resource to complete the operation.
|
||||||
@retval Other Unexpected error happened.
|
@retval Other Unexpected error happened.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
HttpBootSetHeader (
|
HttpBootSetHeader (
|
||||||
@ -574,7 +574,7 @@ HttpBootSetHeader (
|
|||||||
EFI_HTTP_HEADER *Header;
|
EFI_HTTP_HEADER *Header;
|
||||||
UINTN StrSize;
|
UINTN StrSize;
|
||||||
CHAR8 *NewFieldValue;
|
CHAR8 *NewFieldValue;
|
||||||
|
|
||||||
if (HttpIoHeader == NULL || FieldName == NULL || FieldValue == NULL) {
|
if (HttpIoHeader == NULL || FieldName == NULL || FieldValue == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
@ -618,7 +618,7 @@ HttpBootSetHeader (
|
|||||||
}
|
}
|
||||||
CopyMem (NewFieldValue, FieldValue, StrSize);
|
CopyMem (NewFieldValue, FieldValue, StrSize);
|
||||||
NewFieldValue[StrSize -1] = '\0';
|
NewFieldValue[StrSize -1] = '\0';
|
||||||
|
|
||||||
if (Header->FieldValue != NULL) {
|
if (Header->FieldValue != NULL) {
|
||||||
FreePool (Header->FieldValue);
|
FreePool (Header->FieldValue);
|
||||||
}
|
}
|
||||||
@ -675,7 +675,7 @@ HttpIoNotify (
|
|||||||
HTTP_IO_CALLBACK_EVENT happened.
|
HTTP_IO_CALLBACK_EVENT happened.
|
||||||
@param[in] Context The Context data which will be passed to the Callback function.
|
@param[in] Context The Context data which will be passed to the Callback function.
|
||||||
@param[out] HttpIo The HTTP_IO.
|
@param[out] HttpIo The HTTP_IO.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The HTTP_IO is created and configured.
|
@retval EFI_SUCCESS The HTTP_IO is created and configured.
|
||||||
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||||
@retval EFI_UNSUPPORTED One or more of the control options are not
|
@retval EFI_UNSUPPORTED One or more of the control options are not
|
||||||
@ -701,7 +701,7 @@ HttpIoCreateIo (
|
|||||||
EFI_HTTPv6_ACCESS_POINT Http6AccessPoint;
|
EFI_HTTPv6_ACCESS_POINT Http6AccessPoint;
|
||||||
EFI_HTTP_PROTOCOL *Http;
|
EFI_HTTP_PROTOCOL *Http;
|
||||||
EFI_EVENT Event;
|
EFI_EVENT Event;
|
||||||
|
|
||||||
if ((Image == NULL) || (Controller == NULL) || (ConfigData == NULL) || (HttpIo == NULL)) {
|
if ((Image == NULL) || (Controller == NULL) || (ConfigData == NULL) || (HttpIo == NULL)) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
@ -711,10 +711,10 @@ HttpIoCreateIo (
|
|||||||
}
|
}
|
||||||
|
|
||||||
ZeroMem (HttpIo, sizeof (HTTP_IO));
|
ZeroMem (HttpIo, sizeof (HTTP_IO));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create the HTTP child instance and get the HTTP protocol.
|
// Create the HTTP child instance and get the HTTP protocol.
|
||||||
//
|
//
|
||||||
Status = NetLibCreateServiceChild (
|
Status = NetLibCreateServiceChild (
|
||||||
Controller,
|
Controller,
|
||||||
Image,
|
Image,
|
||||||
@ -752,19 +752,19 @@ HttpIoCreateIo (
|
|||||||
HttpConfigData.TimeOutMillisec = ConfigData->Config4.RequestTimeOut;
|
HttpConfigData.TimeOutMillisec = ConfigData->Config4.RequestTimeOut;
|
||||||
if (HttpIo->IpVersion == IP_VERSION_4) {
|
if (HttpIo->IpVersion == IP_VERSION_4) {
|
||||||
HttpConfigData.LocalAddressIsIPv6 = FALSE;
|
HttpConfigData.LocalAddressIsIPv6 = FALSE;
|
||||||
|
|
||||||
Http4AccessPoint.UseDefaultAddress = ConfigData->Config4.UseDefaultAddress;
|
Http4AccessPoint.UseDefaultAddress = ConfigData->Config4.UseDefaultAddress;
|
||||||
Http4AccessPoint.LocalPort = ConfigData->Config4.LocalPort;
|
Http4AccessPoint.LocalPort = ConfigData->Config4.LocalPort;
|
||||||
IP4_COPY_ADDRESS (&Http4AccessPoint.LocalAddress, &ConfigData->Config4.LocalIp);
|
IP4_COPY_ADDRESS (&Http4AccessPoint.LocalAddress, &ConfigData->Config4.LocalIp);
|
||||||
IP4_COPY_ADDRESS (&Http4AccessPoint.LocalSubnet, &ConfigData->Config4.SubnetMask);
|
IP4_COPY_ADDRESS (&Http4AccessPoint.LocalSubnet, &ConfigData->Config4.SubnetMask);
|
||||||
HttpConfigData.AccessPoint.IPv4Node = &Http4AccessPoint;
|
HttpConfigData.AccessPoint.IPv4Node = &Http4AccessPoint;
|
||||||
} else {
|
} else {
|
||||||
HttpConfigData.LocalAddressIsIPv6 = TRUE;
|
HttpConfigData.LocalAddressIsIPv6 = TRUE;
|
||||||
Http6AccessPoint.LocalPort = ConfigData->Config6.LocalPort;
|
Http6AccessPoint.LocalPort = ConfigData->Config6.LocalPort;
|
||||||
IP6_COPY_ADDRESS (&Http6AccessPoint.LocalAddress, &ConfigData->Config6.LocalIp);
|
IP6_COPY_ADDRESS (&Http6AccessPoint.LocalAddress, &ConfigData->Config6.LocalIp);
|
||||||
HttpConfigData.AccessPoint.IPv6Node = &Http6AccessPoint;
|
HttpConfigData.AccessPoint.IPv6Node = &Http6AccessPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = Http->Configure (Http, &HttpConfigData);
|
Status = Http->Configure (Http, &HttpConfigData);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
@ -815,7 +815,7 @@ HttpIoCreateIo (
|
|||||||
HttpIo->TimeoutEvent = Event;
|
HttpIo->TimeoutEvent = Event;
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
ON_ERROR:
|
ON_ERROR:
|
||||||
HttpIoDestroyIo (HttpIo);
|
HttpIoDestroyIo (HttpIo);
|
||||||
|
|
||||||
@ -823,7 +823,7 @@ ON_ERROR:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destroy the HTTP_IO and release the resouces.
|
Destroy the HTTP_IO and release the resouces.
|
||||||
|
|
||||||
@param[in] HttpIo The HTTP_IO which wraps the HTTP service to be destroyed.
|
@param[in] HttpIo The HTTP_IO which wraps the HTTP service to be destroyed.
|
||||||
|
|
||||||
@ -854,7 +854,7 @@ HttpIoDestroyIo (
|
|||||||
if (Event != NULL) {
|
if (Event != NULL) {
|
||||||
gBS->CloseEvent (Event);
|
gBS->CloseEvent (Event);
|
||||||
}
|
}
|
||||||
|
|
||||||
Http = HttpIo->Http;
|
Http = HttpIo->Http;
|
||||||
if (Http != NULL) {
|
if (Http != NULL) {
|
||||||
Http->Configure (Http, NULL);
|
Http->Configure (Http, NULL);
|
||||||
@ -876,14 +876,14 @@ HttpIoDestroyIo (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Synchronously send a HTTP REQUEST message to the server.
|
Synchronously send a HTTP REQUEST message to the server.
|
||||||
|
|
||||||
@param[in] HttpIo The HttpIo wrapping the HTTP service.
|
@param[in] HttpIo The HttpIo wrapping the HTTP service.
|
||||||
@param[in] Request A pointer to storage such data as URL and HTTP method.
|
@param[in] Request A pointer to storage such data as URL and HTTP method.
|
||||||
@param[in] HeaderCount Number of HTTP header structures in Headers list.
|
@param[in] HeaderCount Number of HTTP header structures in Headers list.
|
||||||
@param[in] Headers Array containing list of HTTP headers.
|
@param[in] Headers Array containing list of HTTP headers.
|
||||||
@param[in] BodyLength Length in bytes of the HTTP body.
|
@param[in] BodyLength Length in bytes of the HTTP body.
|
||||||
@param[in] Body Body associated with the HTTP request.
|
@param[in] Body Body associated with the HTTP request.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The HTTP request is trasmitted.
|
@retval EFI_SUCCESS The HTTP request is trasmitted.
|
||||||
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||||
@ -951,12 +951,12 @@ HttpIoSendRequest (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Synchronously receive a HTTP RESPONSE message from the server.
|
Synchronously receive a HTTP RESPONSE message from the server.
|
||||||
|
|
||||||
@param[in] HttpIo The HttpIo wrapping the HTTP service.
|
@param[in] HttpIo The HttpIo wrapping the HTTP service.
|
||||||
@param[in] RecvMsgHeader TRUE to receive a new HTTP response (from message header).
|
@param[in] RecvMsgHeader TRUE to receive a new HTTP response (from message header).
|
||||||
FALSE to continue receive the previous response message.
|
FALSE to continue receive the previous response message.
|
||||||
@param[out] ResponseData Point to a wrapper of the received response data.
|
@param[out] ResponseData Point to a wrapper of the received response data.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The HTTP response is received.
|
@retval EFI_SUCCESS The HTTP response is received.
|
||||||
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||||
@ -1006,7 +1006,7 @@ HttpIoRecvResponse (
|
|||||||
Http,
|
Http,
|
||||||
&HttpIo->RspToken
|
&HttpIo->RspToken
|
||||||
);
|
);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
gBS->SetTimer (HttpIo->TimeoutEvent, TimerCancel, 0);
|
gBS->SetTimer (HttpIo->TimeoutEvent, TimerCancel, 0);
|
||||||
return Status;
|
return Status;
|
||||||
@ -1026,15 +1026,15 @@ HttpIoRecvResponse (
|
|||||||
// Timeout occurs, cancel the response token.
|
// Timeout occurs, cancel the response token.
|
||||||
//
|
//
|
||||||
Http->Cancel (Http, &HttpIo->RspToken);
|
Http->Cancel (Http, &HttpIo->RspToken);
|
||||||
|
|
||||||
Status = EFI_TIMEOUT;
|
Status = EFI_TIMEOUT;
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
} else {
|
} else {
|
||||||
HttpIo->IsRxDone = FALSE;
|
HttpIo->IsRxDone = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((HttpIo->Callback != NULL) &&
|
if ((HttpIo->Callback != NULL) &&
|
||||||
(HttpIo->RspToken.Status == EFI_SUCCESS || HttpIo->RspToken.Status == EFI_HTTP_ERROR)) {
|
(HttpIo->RspToken.Status == EFI_SUCCESS || HttpIo->RspToken.Status == EFI_HTTP_ERROR)) {
|
||||||
Status = HttpIo->Callback (
|
Status = HttpIo->Callback (
|
||||||
HttpIoResponse,
|
HttpIoResponse,
|
||||||
@ -1061,7 +1061,7 @@ HttpIoRecvResponse (
|
|||||||
This function checks the HTTP(S) URI scheme.
|
This function checks the HTTP(S) URI scheme.
|
||||||
|
|
||||||
@param[in] Uri The pointer to the URI string.
|
@param[in] Uri The pointer to the URI string.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The URI scheme is valid.
|
@retval EFI_SUCCESS The URI scheme is valid.
|
||||||
@retval EFI_INVALID_PARAMETER The URI scheme is not HTTP or HTTPS.
|
@retval EFI_INVALID_PARAMETER The URI scheme is not HTTP or HTTPS.
|
||||||
@retval EFI_ACCESS_DENIED HTTP is disabled and the URI is HTTP.
|
@retval EFI_ACCESS_DENIED HTTP is disabled and the URI is HTTP.
|
||||||
@ -1096,7 +1096,7 @@ HttpBootCheckUriScheme (
|
|||||||
DEBUG ((EFI_D_ERROR, "HttpBootCheckUriScheme: Invalid Uri.\n"));
|
DEBUG ((EFI_D_ERROR, "HttpBootCheckUriScheme: Invalid Uri.\n"));
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// HTTP is disabled, return EFI_ACCESS_DENIED if the URI is HTTP.
|
// HTTP is disabled, return EFI_ACCESS_DENIED if the URI is HTTP.
|
||||||
//
|
//
|
||||||
@ -1112,10 +1112,10 @@ HttpBootCheckUriScheme (
|
|||||||
Get the URI address string from the input device path.
|
Get the URI address string from the input device path.
|
||||||
|
|
||||||
Caller need to free the buffer in the UriAddress pointer.
|
Caller need to free the buffer in the UriAddress pointer.
|
||||||
|
|
||||||
@param[in] FilePath Pointer to the device path which contains a URI device path node.
|
@param[in] FilePath Pointer to the device path which contains a URI device path node.
|
||||||
@param[out] UriAddress The URI address string extract from the device path.
|
@param[out] UriAddress The URI address string extract from the device path.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The URI string is returned.
|
@retval EFI_SUCCESS The URI string is returned.
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||||
|
|
||||||
@ -1176,11 +1176,11 @@ HttpBootParseFilePath (
|
|||||||
and also the image's URI info.
|
and also the image's URI info.
|
||||||
|
|
||||||
@param[in] Uri The pointer to the image's URI string.
|
@param[in] Uri The pointer to the image's URI string.
|
||||||
@param[in] UriParser URI Parse result returned by NetHttpParseUrl().
|
@param[in] UriParser URI Parse result returned by NetHttpParseUrl().
|
||||||
@param[in] HeaderCount Number of HTTP header structures in Headers list.
|
@param[in] HeaderCount Number of HTTP header structures in Headers list.
|
||||||
@param[in] Headers Array containing list of HTTP headers.
|
@param[in] Headers Array containing list of HTTP headers.
|
||||||
@param[out] ImageType The image type of the downloaded file.
|
@param[out] ImageType The image type of the downloaded file.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The image type is returned in ImageType.
|
@retval EFI_SUCCESS The image type is returned in ImageType.
|
||||||
@retval EFI_INVALID_PARAMETER ImageType, Uri or UriParser is NULL.
|
@retval EFI_INVALID_PARAMETER ImageType, Uri or UriParser is NULL.
|
||||||
@retval EFI_INVALID_PARAMETER HeaderCount is not zero, and Headers is NULL.
|
@retval EFI_INVALID_PARAMETER HeaderCount is not zero, and Headers is NULL.
|
||||||
@ -1263,7 +1263,7 @@ HttpBootCheckImageType (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
This function register the RAM disk info to the system.
|
This function register the RAM disk info to the system.
|
||||||
|
|
||||||
@param[in] Private The pointer to the driver's private data.
|
@param[in] Private The pointer to the driver's private data.
|
||||||
@param[in] BufferSize The size of Buffer in bytes.
|
@param[in] BufferSize The size of Buffer in bytes.
|
||||||
@param[in] Buffer The base address of the RAM disk.
|
@param[in] Buffer The base address of the RAM disk.
|
||||||
@ -1287,7 +1287,7 @@ HttpBootRegisterRamDisk (
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||||
EFI_GUID *RamDiskType;
|
EFI_GUID *RamDiskType;
|
||||||
|
|
||||||
ASSERT (Private != NULL);
|
ASSERT (Private != NULL);
|
||||||
ASSERT (Buffer != NULL);
|
ASSERT (Buffer != NULL);
|
||||||
ASSERT (BufferSize != 0);
|
ASSERT (BufferSize != 0);
|
||||||
@ -1305,7 +1305,7 @@ HttpBootRegisterRamDisk (
|
|||||||
} else {
|
} else {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = RamDisk->Register (
|
Status = RamDisk->Register (
|
||||||
(UINTN)Buffer,
|
(UINTN)Buffer,
|
||||||
(UINT64)BufferSize,
|
(UINT64)BufferSize,
|
||||||
@ -1322,7 +1322,7 @@ HttpBootRegisterRamDisk (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Indicate if the HTTP status code indicates a redirection.
|
Indicate if the HTTP status code indicates a redirection.
|
||||||
|
|
||||||
@param[in] StatusCode HTTP status code from server.
|
@param[in] StatusCode HTTP status code from server.
|
||||||
|
|
||||||
@return TRUE if it's redirection.
|
@return TRUE if it's redirection.
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Support functions declaration for UEFI HTTP boot driver.
|
Support functions declaration for UEFI HTTP boot driver.
|
||||||
|
|
||||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials are licensed and made available under
|
This program and the accompanying materials are licensed and made available under
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
The full text of the license may be found at
|
The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php.
|
http://opensource.org/licenses/bsd-license.php.
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -107,7 +107,7 @@ typedef struct {
|
|||||||
@param[in] MaxHeaderCount The maximun number of HTTP header in this holder.
|
@param[in] MaxHeaderCount The maximun number of HTTP header in this holder.
|
||||||
|
|
||||||
@return A pointer of the HTTP header holder or NULL if failed.
|
@return A pointer of the HTTP header holder or NULL if failed.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
HTTP_IO_HEADER *
|
HTTP_IO_HEADER *
|
||||||
HttpBootCreateHeader (
|
HttpBootCreateHeader (
|
||||||
@ -115,7 +115,7 @@ HttpBootCreateHeader (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destroy the HTTP_IO_HEADER and release the resouces.
|
Destroy the HTTP_IO_HEADER and release the resouces.
|
||||||
|
|
||||||
@param[in] HttpIoHeader Point to the HTTP header holder to be destroyed.
|
@param[in] HttpIoHeader Point to the HTTP header holder to be destroyed.
|
||||||
|
|
||||||
@ -129,14 +129,14 @@ HttpBootFreeHeader (
|
|||||||
Set or update a HTTP header with the field name and corresponding value.
|
Set or update a HTTP header with the field name and corresponding value.
|
||||||
|
|
||||||
@param[in] HttpIoHeader Point to the HTTP header holder.
|
@param[in] HttpIoHeader Point to the HTTP header holder.
|
||||||
@param[in] FieldName Null terminated string which describes a field name.
|
@param[in] FieldName Null terminated string which describes a field name.
|
||||||
@param[in] FieldValue Null terminated string which describes the corresponding field value.
|
@param[in] FieldValue Null terminated string which describes the corresponding field value.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The HTTP header has been set or updated.
|
@retval EFI_SUCCESS The HTTP header has been set or updated.
|
||||||
@retval EFI_INVALID_PARAMETER Any input parameter is invalid.
|
@retval EFI_INVALID_PARAMETER Any input parameter is invalid.
|
||||||
@retval EFI_OUT_OF_RESOURCES Insufficient resource to complete the operation.
|
@retval EFI_OUT_OF_RESOURCES Insufficient resource to complete the operation.
|
||||||
@retval Other Unexpected error happened.
|
@retval Other Unexpected error happened.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
HttpBootSetHeader (
|
HttpBootSetHeader (
|
||||||
@ -159,7 +159,7 @@ typedef enum {
|
|||||||
@param[in] EventType Indicate the Event type that occurs in the current callback.
|
@param[in] EventType Indicate the Event type that occurs in the current callback.
|
||||||
@param[in] Message HTTP message which will be send to, or just received from HTTP server.
|
@param[in] Message HTTP message which will be send to, or just received from HTTP server.
|
||||||
@param[in] Context The Callback Context pointer.
|
@param[in] Context The Callback Context pointer.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Tells the HttpIo to continue the HTTP process.
|
@retval EFI_SUCCESS Tells the HttpIo to continue the HTTP process.
|
||||||
@retval Others Tells the HttpIo to abort the current HTTP process.
|
@retval Others Tells the HttpIo to abort the current HTTP process.
|
||||||
**/
|
**/
|
||||||
@ -212,7 +212,7 @@ typedef struct {
|
|||||||
EFI_HANDLE Image;
|
EFI_HANDLE Image;
|
||||||
EFI_HANDLE Controller;
|
EFI_HANDLE Controller;
|
||||||
EFI_HANDLE Handle;
|
EFI_HANDLE Handle;
|
||||||
|
|
||||||
EFI_HTTP_PROTOCOL *Http;
|
EFI_HTTP_PROTOCOL *Http;
|
||||||
|
|
||||||
HTTP_IO_CALLBACK Callback;
|
HTTP_IO_CALLBACK Callback;
|
||||||
@ -250,13 +250,13 @@ typedef struct {
|
|||||||
|
|
||||||
@retval EFI_SUCCESS Operation succeeded.
|
@retval EFI_SUCCESS Operation succeeded.
|
||||||
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
|
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
|
||||||
@retval Others Other errors as indicated.
|
@retval Others Other errors as indicated.
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
HttpBootDns (
|
HttpBootDns (
|
||||||
IN HTTP_BOOT_PRIVATE_DATA *Private,
|
IN HTTP_BOOT_PRIVATE_DATA *Private,
|
||||||
IN CHAR16 *HostName,
|
IN CHAR16 *HostName,
|
||||||
OUT EFI_IPv6_ADDRESS *IpAddress
|
OUT EFI_IPv6_ADDRESS *IpAddress
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -285,7 +285,7 @@ HttpBootCommonNotify (
|
|||||||
HTTP_IO_CALLBACK_EVENT happened.
|
HTTP_IO_CALLBACK_EVENT happened.
|
||||||
@param[in] Context The Context data which will be passed to the Callback function.
|
@param[in] Context The Context data which will be passed to the Callback function.
|
||||||
@param[out] HttpIo The HTTP_IO.
|
@param[out] HttpIo The HTTP_IO.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The HTTP_IO is created and configured.
|
@retval EFI_SUCCESS The HTTP_IO is created and configured.
|
||||||
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||||
@retval EFI_UNSUPPORTED One or more of the control options are not
|
@retval EFI_UNSUPPORTED One or more of the control options are not
|
||||||
@ -306,7 +306,7 @@ HttpIoCreateIo (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destroy the HTTP_IO and release the resouces.
|
Destroy the HTTP_IO and release the resouces.
|
||||||
|
|
||||||
@param[in] HttpIo The HTTP_IO which wraps the HTTP service to be destroyed.
|
@param[in] HttpIo The HTTP_IO which wraps the HTTP service to be destroyed.
|
||||||
|
|
||||||
@ -318,14 +318,14 @@ HttpIoDestroyIo (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Synchronously send a HTTP REQUEST message to the server.
|
Synchronously send a HTTP REQUEST message to the server.
|
||||||
|
|
||||||
@param[in] HttpIo The HttpIo wrapping the HTTP service.
|
@param[in] HttpIo The HttpIo wrapping the HTTP service.
|
||||||
@param[in] Request A pointer to storage such data as URL and HTTP method.
|
@param[in] Request A pointer to storage such data as URL and HTTP method.
|
||||||
@param[in] HeaderCount Number of HTTP header structures in Headers list.
|
@param[in] HeaderCount Number of HTTP header structures in Headers list.
|
||||||
@param[in] Headers Array containing list of HTTP headers.
|
@param[in] Headers Array containing list of HTTP headers.
|
||||||
@param[in] BodyLength Length in bytes of the HTTP body.
|
@param[in] BodyLength Length in bytes of the HTTP body.
|
||||||
@param[in] Body Body associated with the HTTP request.
|
@param[in] Body Body associated with the HTTP request.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The HTTP request is trasmitted.
|
@retval EFI_SUCCESS The HTTP request is trasmitted.
|
||||||
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||||
@ -345,12 +345,12 @@ HttpIoSendRequest (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Synchronously receive a HTTP RESPONSE message from the server.
|
Synchronously receive a HTTP RESPONSE message from the server.
|
||||||
|
|
||||||
@param[in] HttpIo The HttpIo wrapping the HTTP service.
|
@param[in] HttpIo The HttpIo wrapping the HTTP service.
|
||||||
@param[in] RecvMsgHeader TRUE to receive a new HTTP response (from message header).
|
@param[in] RecvMsgHeader TRUE to receive a new HTTP response (from message header).
|
||||||
FALSE to continue receive the previous response message.
|
FALSE to continue receive the previous response message.
|
||||||
@param[out] ResponseData Point to a wrapper of the received response data.
|
@param[out] ResponseData Point to a wrapper of the received response data.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The HTTP response is received.
|
@retval EFI_SUCCESS The HTTP response is received.
|
||||||
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||||
@ -369,7 +369,7 @@ HttpIoRecvResponse (
|
|||||||
This function checks the HTTP(S) URI scheme.
|
This function checks the HTTP(S) URI scheme.
|
||||||
|
|
||||||
@param[in] Uri The pointer to the URI string.
|
@param[in] Uri The pointer to the URI string.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The URI scheme is valid.
|
@retval EFI_SUCCESS The URI scheme is valid.
|
||||||
@retval EFI_INVALID_PARAMETER The URI scheme is not HTTP or HTTPS.
|
@retval EFI_INVALID_PARAMETER The URI scheme is not HTTP or HTTPS.
|
||||||
@retval EFI_ACCESS_DENIED HTTP is disabled and the URI is HTTP.
|
@retval EFI_ACCESS_DENIED HTTP is disabled and the URI is HTTP.
|
||||||
@ -384,10 +384,10 @@ HttpBootCheckUriScheme (
|
|||||||
Get the URI address string from the input device path.
|
Get the URI address string from the input device path.
|
||||||
|
|
||||||
Caller need to free the buffer in the UriAddress pointer.
|
Caller need to free the buffer in the UriAddress pointer.
|
||||||
|
|
||||||
@param[in] FilePath Pointer to the device path which contains a URI device path node.
|
@param[in] FilePath Pointer to the device path which contains a URI device path node.
|
||||||
@param[out] UriAddress The URI address string extract from the device path.
|
@param[out] UriAddress The URI address string extract from the device path.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The URI string is returned.
|
@retval EFI_SUCCESS The URI string is returned.
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||||
|
|
||||||
@ -403,11 +403,11 @@ HttpBootParseFilePath (
|
|||||||
and also the image's URI info.
|
and also the image's URI info.
|
||||||
|
|
||||||
@param[in] Uri The pointer to the image's URI string.
|
@param[in] Uri The pointer to the image's URI string.
|
||||||
@param[in] UriParser URI Parse result returned by NetHttpParseUrl().
|
@param[in] UriParser URI Parse result returned by NetHttpParseUrl().
|
||||||
@param[in] HeaderCount Number of HTTP header structures in Headers list.
|
@param[in] HeaderCount Number of HTTP header structures in Headers list.
|
||||||
@param[in] Headers Array containing list of HTTP headers.
|
@param[in] Headers Array containing list of HTTP headers.
|
||||||
@param[out] ImageType The image type of the downloaded file.
|
@param[out] ImageType The image type of the downloaded file.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The image type is returned in ImageType.
|
@retval EFI_SUCCESS The image type is returned in ImageType.
|
||||||
@retval EFI_INVALID_PARAMETER ImageType, Uri or UriParser is NULL.
|
@retval EFI_INVALID_PARAMETER ImageType, Uri or UriParser is NULL.
|
||||||
@retval EFI_INVALID_PARAMETER HeaderCount is not zero, and Headers is NULL.
|
@retval EFI_INVALID_PARAMETER HeaderCount is not zero, and Headers is NULL.
|
||||||
@ -426,7 +426,7 @@ HttpBootCheckImageType (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
This function register the RAM disk info to the system.
|
This function register the RAM disk info to the system.
|
||||||
|
|
||||||
@param[in] Private The pointer to the driver's private data.
|
@param[in] Private The pointer to the driver's private data.
|
||||||
@param[in] BufferSize The size of Buffer in bytes.
|
@param[in] BufferSize The size of Buffer in bytes.
|
||||||
@param[in] Buffer The base address of the RAM disk.
|
@param[in] Buffer The base address of the RAM disk.
|
||||||
@ -448,7 +448,7 @@ HttpBootRegisterRamDisk (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Indicate if the HTTP status code indicates a redirection.
|
Indicate if the HTTP status code indicates a redirection.
|
||||||
|
|
||||||
@param[in] StatusCode HTTP status code from server.
|
@param[in] StatusCode HTTP status code from server.
|
||||||
|
|
||||||
@return TRUE if it's redirection.
|
@return TRUE if it's redirection.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Implementation of EFI_COMPONENT_NAME_PROTOCOL and
|
Implementation of EFI_COMPONENT_NAME_PROTOCOL and
|
||||||
EFI_COMPONENT_NAME2_PROTOCOL protocol.
|
EFI_COMPONENT_NAME2_PROTOCOL protocol.
|
||||||
|
|
||||||
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -19,7 +19,7 @@
|
|||||||
///
|
///
|
||||||
/// Component Name Protocol instance
|
/// Component Name Protocol instance
|
||||||
///
|
///
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED
|
GLOBAL_REMOVE_IF_UNREFERENCED
|
||||||
EFI_COMPONENT_NAME_PROTOCOL gHttpDxeComponentName = {
|
EFI_COMPONENT_NAME_PROTOCOL gHttpDxeComponentName = {
|
||||||
(EFI_COMPONENT_NAME_GET_DRIVER_NAME) HttpDxeComponentNameGetDriverName,
|
(EFI_COMPONENT_NAME_GET_DRIVER_NAME) HttpDxeComponentNameGetDriverName,
|
||||||
(EFI_COMPONENT_NAME_GET_CONTROLLER_NAME) HttpDxeComponentNameGetControllerName,
|
(EFI_COMPONENT_NAME_GET_CONTROLLER_NAME) HttpDxeComponentNameGetControllerName,
|
||||||
@ -29,7 +29,7 @@ EFI_COMPONENT_NAME_PROTOCOL gHttpDxeComponentName = {
|
|||||||
///
|
///
|
||||||
/// Component Name 2 Protocol instance
|
/// Component Name 2 Protocol instance
|
||||||
///
|
///
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED
|
GLOBAL_REMOVE_IF_UNREFERENCED
|
||||||
EFI_COMPONENT_NAME2_PROTOCOL gHttpDxeComponentName2 = {
|
EFI_COMPONENT_NAME2_PROTOCOL gHttpDxeComponentName2 = {
|
||||||
HttpDxeComponentNameGetDriverName,
|
HttpDxeComponentNameGetDriverName,
|
||||||
HttpDxeComponentNameGetControllerName,
|
HttpDxeComponentNameGetControllerName,
|
||||||
@ -39,7 +39,7 @@ EFI_COMPONENT_NAME2_PROTOCOL gHttpDxeComponentName2 = {
|
|||||||
///
|
///
|
||||||
/// Table of driver names
|
/// Table of driver names
|
||||||
///
|
///
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED
|
GLOBAL_REMOVE_IF_UNREFERENCED
|
||||||
EFI_UNICODE_STRING_TABLE mHttpDxeDriverNameTable[] = {
|
EFI_UNICODE_STRING_TABLE mHttpDxeDriverNameTable[] = {
|
||||||
{ "eng;en", (CHAR16 *) L"HttpDxe" },
|
{ "eng;en", (CHAR16 *) L"HttpDxe" },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Routines for HttpDxe driver to perform DNS resolution based on UEFI DNS protocols.
|
Routines for HttpDxe driver to perform DNS resolution based on UEFI DNS protocols.
|
||||||
|
|
||||||
Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -25,13 +25,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
|
||||||
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
|
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
|
||||||
@retval Others Other errors as indicated.
|
@retval Others Other errors as indicated.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
HttpDns4 (
|
HttpDns4 (
|
||||||
IN HTTP_PROTOCOL *HttpInstance,
|
IN HTTP_PROTOCOL *HttpInstance,
|
||||||
IN CHAR16 *HostName,
|
IN CHAR16 *HostName,
|
||||||
OUT EFI_IPv4_ADDRESS *IpAddress
|
OUT EFI_IPv4_ADDRESS *IpAddress
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
@ -45,7 +45,7 @@ HttpDns4 (
|
|||||||
UINTN DnsServerListCount;
|
UINTN DnsServerListCount;
|
||||||
EFI_IPv4_ADDRESS *DnsServerList;
|
EFI_IPv4_ADDRESS *DnsServerList;
|
||||||
UINTN DataSize;
|
UINTN DataSize;
|
||||||
|
|
||||||
|
|
||||||
Service = HttpInstance->Service;
|
Service = HttpInstance->Service;
|
||||||
ASSERT (Service != NULL);
|
ASSERT (Service != NULL);
|
||||||
@ -82,7 +82,7 @@ HttpDns4 (
|
|||||||
|
|
||||||
Dns4Handle = NULL;
|
Dns4Handle = NULL;
|
||||||
Dns4 = NULL;
|
Dns4 = NULL;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create a DNS child instance and get the protocol.
|
// Create a DNS child instance and get the protocol.
|
||||||
//
|
//
|
||||||
@ -94,7 +94,7 @@ HttpDns4 (
|
|||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gBS->OpenProtocol (
|
Status = gBS->OpenProtocol (
|
||||||
Dns4Handle,
|
Dns4Handle,
|
||||||
@ -128,7 +128,7 @@ HttpDns4 (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create event to set the is done flag when name resolution is finished.
|
// Create event to set the is done flag when name resolution is finished.
|
||||||
//
|
//
|
||||||
@ -161,7 +161,7 @@ HttpDns4 (
|
|||||||
//
|
//
|
||||||
// Name resolution is done, check result.
|
// Name resolution is done, check result.
|
||||||
//
|
//
|
||||||
Status = Token.Status;
|
Status = Token.Status;
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
if (Token.RspData.H2AData == NULL) {
|
if (Token.RspData.H2AData == NULL) {
|
||||||
Status = EFI_DEVICE_ERROR;
|
Status = EFI_DEVICE_ERROR;
|
||||||
@ -179,7 +179,7 @@ HttpDns4 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
Exit:
|
Exit:
|
||||||
|
|
||||||
if (Token.Event != NULL) {
|
if (Token.Event != NULL) {
|
||||||
gBS->CloseEvent (Token.Event);
|
gBS->CloseEvent (Token.Event);
|
||||||
}
|
}
|
||||||
@ -192,7 +192,7 @@ Exit:
|
|||||||
|
|
||||||
if (Dns4 != NULL) {
|
if (Dns4 != NULL) {
|
||||||
Dns4->Configure (Dns4, NULL);
|
Dns4->Configure (Dns4, NULL);
|
||||||
|
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
Dns4Handle,
|
Dns4Handle,
|
||||||
&gEfiDns4ProtocolGuid,
|
&gEfiDns4ProtocolGuid,
|
||||||
@ -213,7 +213,7 @@ Exit:
|
|||||||
if (DnsServerList != NULL) {
|
if (DnsServerList != NULL) {
|
||||||
FreePool (DnsServerList);
|
FreePool (DnsServerList);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,13 +228,13 @@ Exit:
|
|||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
|
||||||
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
|
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
|
||||||
@retval Others Other errors as indicated.
|
@retval Others Other errors as indicated.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
HttpDns6 (
|
HttpDns6 (
|
||||||
IN HTTP_PROTOCOL *HttpInstance,
|
IN HTTP_PROTOCOL *HttpInstance,
|
||||||
IN CHAR16 *HostName,
|
IN CHAR16 *HostName,
|
||||||
OUT EFI_IPv6_ADDRESS *IpAddress
|
OUT EFI_IPv6_ADDRESS *IpAddress
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
@ -248,7 +248,7 @@ HttpDns6 (
|
|||||||
UINTN DnsServerListCount;
|
UINTN DnsServerListCount;
|
||||||
UINTN DataSize;
|
UINTN DataSize;
|
||||||
BOOLEAN IsDone;
|
BOOLEAN IsDone;
|
||||||
|
|
||||||
|
|
||||||
Service = HttpInstance->Service;
|
Service = HttpInstance->Service;
|
||||||
ASSERT (Service != NULL);
|
ASSERT (Service != NULL);
|
||||||
@ -258,7 +258,7 @@ HttpDns6 (
|
|||||||
Dns6 = NULL;
|
Dns6 = NULL;
|
||||||
Dns6Handle = NULL;
|
Dns6Handle = NULL;
|
||||||
ZeroMem (&Token, sizeof (EFI_DNS6_COMPLETION_TOKEN));
|
ZeroMem (&Token, sizeof (EFI_DNS6_COMPLETION_TOKEN));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get DNS server list from EFI IPv6 Configuration protocol.
|
// Get DNS server list from EFI IPv6 Configuration protocol.
|
||||||
//
|
//
|
||||||
@ -273,7 +273,7 @@ HttpDns6 (
|
|||||||
DnsServerList = AllocatePool (DataSize);
|
DnsServerList = AllocatePool (DataSize);
|
||||||
if (DnsServerList == NULL) {
|
if (DnsServerList == NULL) {
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = Ip6Config->GetData (Ip6Config, Ip6ConfigDataTypeDnsServer, &DataSize, DnsServerList);
|
Status = Ip6Config->GetData (Ip6Config, Ip6ConfigDataTypeDnsServer, &DataSize, DnsServerList);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
@ -296,8 +296,8 @@ HttpDns6 (
|
|||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gBS->OpenProtocol (
|
Status = gBS->OpenProtocol (
|
||||||
Dns6Handle,
|
Dns6Handle,
|
||||||
&gEfiDns6ProtocolGuid,
|
&gEfiDns6ProtocolGuid,
|
||||||
@ -358,7 +358,7 @@ HttpDns6 (
|
|||||||
//
|
//
|
||||||
// Name resolution is done, check result.
|
// Name resolution is done, check result.
|
||||||
//
|
//
|
||||||
Status = Token.Status;
|
Status = Token.Status;
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
if (Token.RspData.H2AData == NULL) {
|
if (Token.RspData.H2AData == NULL) {
|
||||||
Status = EFI_DEVICE_ERROR;
|
Status = EFI_DEVICE_ERROR;
|
||||||
@ -374,7 +374,7 @@ HttpDns6 (
|
|||||||
IP6_COPY_ADDRESS (IpAddress, Token.RspData.H2AData->IpList);
|
IP6_COPY_ADDRESS (IpAddress, Token.RspData.H2AData->IpList);
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
Exit:
|
Exit:
|
||||||
|
|
||||||
if (Token.Event != NULL) {
|
if (Token.Event != NULL) {
|
||||||
@ -389,7 +389,7 @@ Exit:
|
|||||||
|
|
||||||
if (Dns6 != NULL) {
|
if (Dns6 != NULL) {
|
||||||
Dns6->Configure (Dns6, NULL);
|
Dns6->Configure (Dns6, NULL);
|
||||||
|
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
Dns6Handle,
|
Dns6Handle,
|
||||||
&gEfiDns6ProtocolGuid,
|
&gEfiDns6ProtocolGuid,
|
||||||
@ -410,6 +410,6 @@ Exit:
|
|||||||
if (DnsServerList != NULL) {
|
if (DnsServerList != NULL) {
|
||||||
FreePool (DnsServerList);
|
FreePool (DnsServerList);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The header file of routines for HttpDxe driver to perform DNS resolution based on UEFI DNS protocols.
|
The header file of routines for HttpDxe driver to perform DNS resolution based on UEFI DNS protocols.
|
||||||
|
|
||||||
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -26,13 +26,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
|
||||||
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
|
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
|
||||||
@retval Others Other errors as indicated.
|
@retval Others Other errors as indicated.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
HttpDns4 (
|
HttpDns4 (
|
||||||
IN HTTP_PROTOCOL *HttpInstance,
|
IN HTTP_PROTOCOL *HttpInstance,
|
||||||
IN CHAR16 *HostName,
|
IN CHAR16 *HostName,
|
||||||
OUT EFI_IPv4_ADDRESS *IpAddress
|
OUT EFI_IPv4_ADDRESS *IpAddress
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -46,13 +46,13 @@ HttpDns4 (
|
|||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
|
||||||
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
|
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
|
||||||
@retval Others Other errors as indicated.
|
@retval Others Other errors as indicated.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
HttpDns6 (
|
HttpDns6 (
|
||||||
IN HTTP_PROTOCOL *HttpInstance,
|
IN HTTP_PROTOCOL *HttpInstance,
|
||||||
IN CHAR16 *HostName,
|
IN CHAR16 *HostName,
|
||||||
OUT EFI_IPv6_ADDRESS *IpAddress
|
OUT EFI_IPv6_ADDRESS *IpAddress
|
||||||
);
|
);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The driver binding and service binding protocol for HttpDxe driver.
|
The driver binding and service binding protocol for HttpDxe driver.
|
||||||
|
|
||||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
@ -73,7 +73,7 @@ HttpCreateService (
|
|||||||
HttpService->ControllerHandle = Controller;
|
HttpService->ControllerHandle = Controller;
|
||||||
HttpService->ChildrenNumber = 0;
|
HttpService->ChildrenNumber = 0;
|
||||||
InitializeListHead (&HttpService->ChildrenList);
|
InitializeListHead (&HttpService->ChildrenList);
|
||||||
|
|
||||||
*ServiceData = HttpService;
|
*ServiceData = HttpService;
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -91,8 +91,8 @@ HttpCleanService (
|
|||||||
IN HTTP_SERVICE *HttpService,
|
IN HTTP_SERVICE *HttpService,
|
||||||
IN BOOLEAN UsingIpv6
|
IN BOOLEAN UsingIpv6
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (HttpService == NULL) {
|
if (HttpService == NULL) {
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
@ -104,14 +104,14 @@ HttpCleanService (
|
|||||||
HttpService->Ip4DriverBindingHandle,
|
HttpService->Ip4DriverBindingHandle,
|
||||||
HttpService->ControllerHandle
|
HttpService->ControllerHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
NetLibDestroyServiceChild (
|
NetLibDestroyServiceChild (
|
||||||
HttpService->ControllerHandle,
|
HttpService->ControllerHandle,
|
||||||
HttpService->Ip4DriverBindingHandle,
|
HttpService->Ip4DriverBindingHandle,
|
||||||
&gEfiTcp4ServiceBindingProtocolGuid,
|
&gEfiTcp4ServiceBindingProtocolGuid,
|
||||||
HttpService->Tcp4ChildHandle
|
HttpService->Tcp4ChildHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
HttpService->Tcp4ChildHandle = NULL;
|
HttpService->Tcp4ChildHandle = NULL;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -122,18 +122,18 @@ HttpCleanService (
|
|||||||
HttpService->Ip6DriverBindingHandle,
|
HttpService->Ip6DriverBindingHandle,
|
||||||
HttpService->ControllerHandle
|
HttpService->ControllerHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
NetLibDestroyServiceChild (
|
NetLibDestroyServiceChild (
|
||||||
HttpService->ControllerHandle,
|
HttpService->ControllerHandle,
|
||||||
HttpService->Ip6DriverBindingHandle,
|
HttpService->Ip6DriverBindingHandle,
|
||||||
&gEfiTcp6ServiceBindingProtocolGuid,
|
&gEfiTcp6ServiceBindingProtocolGuid,
|
||||||
HttpService->Tcp6ChildHandle
|
HttpService->Tcp6ChildHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
HttpService->Tcp6ChildHandle = NULL;
|
HttpService->Tcp6ChildHandle = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -152,11 +152,11 @@ HttpUtilitiesInstalledCallback (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
gBS->LocateProtocol (
|
gBS->LocateProtocol (
|
||||||
&gEfiHttpUtilitiesProtocolGuid,
|
&gEfiHttpUtilitiesProtocolGuid,
|
||||||
NULL,
|
NULL,
|
||||||
(VOID **) &mHttpUtilities
|
(VOID **) &mHttpUtilities
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Close the event if Http utilities protocol is loacted.
|
// Close the event if Http utilities protocol is loacted.
|
||||||
//
|
//
|
||||||
@ -183,13 +183,13 @@ HttpDxeDriverEntryPoint (
|
|||||||
IN EFI_HANDLE ImageHandle,
|
IN EFI_HANDLE ImageHandle,
|
||||||
IN EFI_SYSTEM_TABLE *SystemTable
|
IN EFI_SYSTEM_TABLE *SystemTable
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
VOID *Registration;
|
VOID *Registration;
|
||||||
|
|
||||||
gBS->LocateProtocol (
|
gBS->LocateProtocol (
|
||||||
&gEfiHttpUtilitiesProtocolGuid,
|
&gEfiHttpUtilitiesProtocolGuid,
|
||||||
NULL,
|
NULL,
|
||||||
(VOID **) &mHttpUtilities
|
(VOID **) &mHttpUtilities
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ HttpDxeDriverEntryPoint (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Callback function which provided by user to remove one node in NetDestroyLinkList process.
|
Callback function which provided by user to remove one node in NetDestroyLinkList process.
|
||||||
|
|
||||||
@param[in] Entry The entry to be removed.
|
@param[in] Entry The entry to be removed.
|
||||||
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
|
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
|
||||||
|
|
||||||
@ -292,7 +292,7 @@ HttpDestroyChildEntryInHandleBuffer (
|
|||||||
@param[in] RemainingDevicePath Optional parameter used to pick a specific child
|
@param[in] RemainingDevicePath Optional parameter used to pick a specific child
|
||||||
device to be started.
|
device to be started.
|
||||||
@param[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
|
@param[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver supports this device.
|
@retval EFI_SUCCESS This driver supports this device.
|
||||||
@retval EFI_UNSUPPORTED This driver does not support this device.
|
@retval EFI_UNSUPPORTED This driver does not support this device.
|
||||||
|
|
||||||
@ -383,9 +383,9 @@ HttpDxeStart (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT (HttpService != NULL);
|
ASSERT (HttpService != NULL);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Install the HttpServiceBinding Protocol onto Controller
|
// Install the HttpServiceBinding Protocol onto Controller
|
||||||
//
|
//
|
||||||
@ -395,7 +395,7 @@ HttpDxeStart (
|
|||||||
&HttpService->ServiceBinding,
|
&HttpService->ServiceBinding,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
@ -414,11 +414,11 @@ HttpDxeStart (
|
|||||||
&gEfiTcp4ServiceBindingProtocolGuid,
|
&gEfiTcp4ServiceBindingProtocolGuid,
|
||||||
&HttpService->Tcp4ChildHandle
|
&HttpService->Tcp4ChildHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gBS->OpenProtocol (
|
Status = gBS->OpenProtocol (
|
||||||
HttpService->Tcp4ChildHandle,
|
HttpService->Tcp4ChildHandle,
|
||||||
&gEfiTcp4ProtocolGuid,
|
&gEfiTcp4ProtocolGuid,
|
||||||
@ -427,11 +427,11 @@ HttpDxeStart (
|
|||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||||
);
|
);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return EFI_ALREADY_STARTED;
|
return EFI_ALREADY_STARTED;
|
||||||
}
|
}
|
||||||
@ -450,11 +450,11 @@ HttpDxeStart (
|
|||||||
&gEfiTcp6ServiceBindingProtocolGuid,
|
&gEfiTcp6ServiceBindingProtocolGuid,
|
||||||
&HttpService->Tcp6ChildHandle
|
&HttpService->Tcp6ChildHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gBS->OpenProtocol (
|
Status = gBS->OpenProtocol (
|
||||||
HttpService->Tcp6ChildHandle,
|
HttpService->Tcp6ChildHandle,
|
||||||
&gEfiTcp6ProtocolGuid,
|
&gEfiTcp6ProtocolGuid,
|
||||||
@ -463,11 +463,11 @@ HttpDxeStart (
|
|||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||||
);
|
);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return EFI_ALREADY_STARTED;
|
return EFI_ALREADY_STARTED;
|
||||||
}
|
}
|
||||||
@ -475,16 +475,16 @@ HttpDxeStart (
|
|||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
ON_ERROR:
|
ON_ERROR:
|
||||||
|
|
||||||
if (HttpService != NULL) {
|
if (HttpService != NULL) {
|
||||||
HttpCleanService (HttpService, UsingIpv6);
|
HttpCleanService (HttpService, UsingIpv6);
|
||||||
if (HttpService->Tcp4ChildHandle == NULL && HttpService->Tcp6ChildHandle == NULL) {
|
if (HttpService->Tcp4ChildHandle == NULL && HttpService->Tcp6ChildHandle == NULL) {
|
||||||
FreePool (HttpService);
|
FreePool (HttpService);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
||||||
|
|
||||||
@ -551,9 +551,9 @@ HttpDxeStop (
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
|
|
||||||
HttpService = HTTP_SERVICE_FROM_PROTOCOL (ServiceBinding);
|
HttpService = HTTP_SERVICE_FROM_PROTOCOL (ServiceBinding);
|
||||||
|
|
||||||
if (NumberOfChildren != 0) {
|
if (NumberOfChildren != 0) {
|
||||||
//
|
//
|
||||||
// Destroy the HTTP child instance in ChildHandleBuffer.
|
// Destroy the HTTP child instance in ChildHandleBuffer.
|
||||||
@ -569,9 +569,9 @@ HttpDxeStop (
|
|||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
HttpCleanService (HttpService, UsingIpv6);
|
HttpCleanService (HttpService, UsingIpv6);
|
||||||
|
|
||||||
if (HttpService->Tcp4ChildHandle == NULL && HttpService->Tcp6ChildHandle == NULL) {
|
if (HttpService->Tcp4ChildHandle == NULL && HttpService->Tcp6ChildHandle == NULL) {
|
||||||
gBS->UninstallProtocolInterface (
|
gBS->UninstallProtocolInterface (
|
||||||
NicHandle,
|
NicHandle,
|
||||||
@ -581,41 +581,41 @@ HttpDxeStop (
|
|||||||
FreePool (HttpService);
|
FreePool (HttpService);
|
||||||
}
|
}
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||||
it further tests to see if this driver supports creating a handle for the specified child device.
|
it further tests to see if this driver supports creating a handle for the specified child device.
|
||||||
|
|
||||||
This function checks to see if the driver specified by This supports the device specified by
|
This function checks to see if the driver specified by This supports the device specified by
|
||||||
ControllerHandle. Drivers will typically use the device path attached to
|
ControllerHandle. Drivers will typically use the device path attached to
|
||||||
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
||||||
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
||||||
may be called many times during platform initialization. In order to reduce boot times, the tests
|
may be called many times during platform initialization. In order to reduce boot times, the tests
|
||||||
performed by this function must be very small, and take as little time as possible to execute. This
|
performed by this function must be very small, and take as little time as possible to execute. This
|
||||||
function must not change the state of any hardware devices, and this function must be aware that the
|
function must not change the state of any hardware devices, and this function must be aware that the
|
||||||
device specified by ControllerHandle may already be managed by the same driver or a
|
device specified by ControllerHandle may already be managed by the same driver or a
|
||||||
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
||||||
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
||||||
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
||||||
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
||||||
to guarantee the state of ControllerHandle is not modified by this function.
|
to guarantee the state of ControllerHandle is not modified by this function.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For bus drivers, if this parameter is not NULL, then
|
drivers. For bus drivers, if this parameter is not NULL, then
|
||||||
the bus driver must determine if the bus controller specified
|
the bus driver must determine if the bus controller specified
|
||||||
by ControllerHandle and the child controller specified
|
by ControllerHandle and the child controller specified
|
||||||
by RemainingDevicePath are both supported by this
|
by RemainingDevicePath are both supported by this
|
||||||
bus driver.
|
bus driver.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
||||||
@ -650,28 +650,28 @@ HttpDxeIp4DriverBindingSupported (
|
|||||||
Starts a device controller or a bus controller.
|
Starts a device controller or a bus controller.
|
||||||
|
|
||||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||||
common boot service. It is legal to call Start() from other locations,
|
common boot service. It is legal to call Start() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||||
EFI_DEVICE_PATH_PROTOCOL.
|
EFI_DEVICE_PATH_PROTOCOL.
|
||||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For a bus driver, if this parameter is NULL, then handles
|
drivers. For a bus driver, if this parameter is NULL, then handles
|
||||||
for all the children of Controller are created by this driver.
|
for all the children of Controller are created by this driver.
|
||||||
If this parameter is not NULL and the first Device Path Node is
|
If this parameter is not NULL and the first Device Path Node is
|
||||||
not the End of Device Path Node, then only the handle for the
|
not the End of Device Path Node, then only the handle for the
|
||||||
child device specified by the first Device Path Node of
|
child device specified by the first Device Path Node of
|
||||||
RemainingDevicePath is created by this driver.
|
RemainingDevicePath is created by this driver.
|
||||||
If the first Device Path Node of RemainingDevicePath is
|
If the first Device Path Node of RemainingDevicePath is
|
||||||
the End of Device Path Node, no child handle is created by this
|
the End of Device Path Node, no child handle is created by this
|
||||||
driver.
|
driver.
|
||||||
|
|
||||||
@ -700,10 +700,10 @@ HttpDxeIp4DriverBindingStart (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Stops a device controller or a bus controller.
|
Stops a device controller or a bus controller.
|
||||||
|
|
||||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||||
into this common boot service. It is legal to call Stop() from other locations,
|
into this common boot service. It is legal to call Stop() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||||
same driver's Start() function.
|
same driver's Start() function.
|
||||||
@ -711,13 +711,13 @@ HttpDxeIp4DriverBindingStart (
|
|||||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||||
Start() function, and the Start() function must have called OpenProtocol() on
|
Start() function, and the Start() function must have called OpenProtocol() on
|
||||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||||
support a bus specific I/O protocol for the driver
|
support a bus specific I/O protocol for the driver
|
||||||
to use to stop the device.
|
to use to stop the device.
|
||||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||||
if NumberOfChildren is 0.
|
if NumberOfChildren is 0.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device was stopped.
|
@retval EFI_SUCCESS The device was stopped.
|
||||||
@ -743,33 +743,33 @@ HttpDxeIp4DriverBindingStop (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||||
it further tests to see if this driver supports creating a handle for the specified child device.
|
it further tests to see if this driver supports creating a handle for the specified child device.
|
||||||
|
|
||||||
This function checks to see if the driver specified by This supports the device specified by
|
This function checks to see if the driver specified by This supports the device specified by
|
||||||
ControllerHandle. Drivers will typically use the device path attached to
|
ControllerHandle. Drivers will typically use the device path attached to
|
||||||
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
||||||
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
||||||
may be called many times during platform initialization. In order to reduce boot times, the tests
|
may be called many times during platform initialization. In order to reduce boot times, the tests
|
||||||
performed by this function must be very small, and take as little time as possible to execute. This
|
performed by this function must be very small, and take as little time as possible to execute. This
|
||||||
function must not change the state of any hardware devices, and this function must be aware that the
|
function must not change the state of any hardware devices, and this function must be aware that the
|
||||||
device specified by ControllerHandle may already be managed by the same driver or a
|
device specified by ControllerHandle may already be managed by the same driver or a
|
||||||
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
||||||
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
||||||
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
||||||
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
||||||
to guarantee the state of ControllerHandle is not modified by this function.
|
to guarantee the state of ControllerHandle is not modified by this function.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For bus drivers, if this parameter is not NULL, then
|
drivers. For bus drivers, if this parameter is not NULL, then
|
||||||
the bus driver must determine if the bus controller specified
|
the bus driver must determine if the bus controller specified
|
||||||
by ControllerHandle and the child controller specified
|
by ControllerHandle and the child controller specified
|
||||||
by RemainingDevicePath are both supported by this
|
by RemainingDevicePath are both supported by this
|
||||||
bus driver.
|
bus driver.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
||||||
@ -791,7 +791,7 @@ HttpDxeIp6DriverBindingSupported (
|
|||||||
IN EFI_HANDLE ControllerHandle,
|
IN EFI_HANDLE ControllerHandle,
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
|
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return HttpDxeSupported (
|
return HttpDxeSupported (
|
||||||
This,
|
This,
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
@ -805,28 +805,28 @@ HttpDxeIp6DriverBindingSupported (
|
|||||||
Starts a device controller or a bus controller.
|
Starts a device controller or a bus controller.
|
||||||
|
|
||||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||||
common boot service. It is legal to call Start() from other locations,
|
common boot service. It is legal to call Start() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||||
EFI_DEVICE_PATH_PROTOCOL.
|
EFI_DEVICE_PATH_PROTOCOL.
|
||||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For a bus driver, if this parameter is NULL, then handles
|
drivers. For a bus driver, if this parameter is NULL, then handles
|
||||||
for all the children of Controller are created by this driver.
|
for all the children of Controller are created by this driver.
|
||||||
If this parameter is not NULL and the first Device Path Node is
|
If this parameter is not NULL and the first Device Path Node is
|
||||||
not the End of Device Path Node, then only the handle for the
|
not the End of Device Path Node, then only the handle for the
|
||||||
child device specified by the first Device Path Node of
|
child device specified by the first Device Path Node of
|
||||||
RemainingDevicePath is created by this driver.
|
RemainingDevicePath is created by this driver.
|
||||||
If the first Device Path Node of RemainingDevicePath is
|
If the first Device Path Node of RemainingDevicePath is
|
||||||
the End of Device Path Node, no child handle is created by this
|
the End of Device Path Node, no child handle is created by this
|
||||||
driver.
|
driver.
|
||||||
|
|
||||||
@ -855,10 +855,10 @@ HttpDxeIp6DriverBindingStart (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Stops a device controller or a bus controller.
|
Stops a device controller or a bus controller.
|
||||||
|
|
||||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||||
into this common boot service. It is legal to call Stop() from other locations,
|
into this common boot service. It is legal to call Stop() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||||
same driver's Start() function.
|
same driver's Start() function.
|
||||||
@ -866,13 +866,13 @@ HttpDxeIp6DriverBindingStart (
|
|||||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||||
Start() function, and the Start() function must have called OpenProtocol() on
|
Start() function, and the Start() function must have called OpenProtocol() on
|
||||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||||
support a bus specific I/O protocol for the driver
|
support a bus specific I/O protocol for the driver
|
||||||
to use to stop the device.
|
to use to stop the device.
|
||||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||||
if NumberOfChildren is 0.
|
if NumberOfChildren is 0.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device was stopped.
|
@retval EFI_SUCCESS The device was stopped.
|
||||||
@ -936,7 +936,7 @@ HttpServiceBindingCreateChild (
|
|||||||
if (HttpInstance == NULL) {
|
if (HttpInstance == NULL) {
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpInstance->Signature = HTTP_PROTOCOL_SIGNATURE;
|
HttpInstance->Signature = HTTP_PROTOCOL_SIGNATURE;
|
||||||
HttpInstance->Service = HttpService;
|
HttpInstance->Service = HttpService;
|
||||||
HttpInstance->Method = HttpMethodMax;
|
HttpInstance->Method = HttpMethodMax;
|
||||||
@ -972,9 +972,9 @@ HttpServiceBindingCreateChild (
|
|||||||
gBS->RestoreTPL (OldTpl);
|
gBS->RestoreTPL (OldTpl);
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
ON_ERROR:
|
ON_ERROR:
|
||||||
|
|
||||||
NetMapClean (&HttpInstance->TxTokens);
|
NetMapClean (&HttpInstance->TxTokens);
|
||||||
NetMapClean (&HttpInstance->RxTokens);
|
NetMapClean (&HttpInstance->RxTokens);
|
||||||
FreePool (HttpInstance);
|
FreePool (HttpInstance);
|
||||||
@ -1010,7 +1010,7 @@ HttpServiceBindingDestroyChild (
|
|||||||
EFI_HTTP_PROTOCOL *Http;
|
EFI_HTTP_PROTOCOL *Http;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
if ((This == NULL) || (ChildHandle == NULL)) {
|
if ((This == NULL) || (ChildHandle == NULL)) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
@ -1027,7 +1027,7 @@ HttpServiceBindingDestroyChild (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (Http);
|
HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (Http);
|
||||||
if (HttpInstance->Service != HttpService) {
|
if (HttpInstance->Service != HttpService) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
@ -1052,16 +1052,16 @@ HttpServiceBindingDestroyChild (
|
|||||||
HttpInstance->InDestroy = FALSE;
|
HttpInstance->InDestroy = FALSE;
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpCleanProtocol (HttpInstance);
|
HttpCleanProtocol (HttpInstance);
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||||
|
|
||||||
RemoveEntryList (&HttpInstance->Link);
|
RemoveEntryList (&HttpInstance->Link);
|
||||||
HttpService->ChildrenNumber--;
|
HttpService->ChildrenNumber--;
|
||||||
|
|
||||||
gBS->RestoreTPL (OldTpl);
|
gBS->RestoreTPL (OldTpl);
|
||||||
|
|
||||||
FreePool (HttpInstance);
|
FreePool (HttpInstance);
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -97,33 +97,33 @@ typedef struct {
|
|||||||
} HTTP_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT;
|
} HTTP_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||||
it further tests to see if this driver supports creating a handle for the specified child device.
|
it further tests to see if this driver supports creating a handle for the specified child device.
|
||||||
|
|
||||||
This function checks to see if the driver specified by This supports the device specified by
|
This function checks to see if the driver specified by This supports the device specified by
|
||||||
ControllerHandle. Drivers will typically use the device path attached to
|
ControllerHandle. Drivers will typically use the device path attached to
|
||||||
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
||||||
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
||||||
may be called many times during platform initialization. In order to reduce boot times, the tests
|
may be called many times during platform initialization. In order to reduce boot times, the tests
|
||||||
performed by this function must be very small, and take as little time as possible to execute. This
|
performed by this function must be very small, and take as little time as possible to execute. This
|
||||||
function must not change the state of any hardware devices, and this function must be aware that the
|
function must not change the state of any hardware devices, and this function must be aware that the
|
||||||
device specified by ControllerHandle may already be managed by the same driver or a
|
device specified by ControllerHandle may already be managed by the same driver or a
|
||||||
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
||||||
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
||||||
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
||||||
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
||||||
to guarantee the state of ControllerHandle is not modified by this function.
|
to guarantee the state of ControllerHandle is not modified by this function.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For bus drivers, if this parameter is not NULL, then
|
drivers. For bus drivers, if this parameter is not NULL, then
|
||||||
the bus driver must determine if the bus controller specified
|
the bus driver must determine if the bus controller specified
|
||||||
by ControllerHandle and the child controller specified
|
by ControllerHandle and the child controller specified
|
||||||
by RemainingDevicePath are both supported by this
|
by RemainingDevicePath are both supported by this
|
||||||
bus driver.
|
bus driver.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
||||||
@ -150,28 +150,28 @@ HttpDxeIp4DriverBindingSupported (
|
|||||||
Starts a device controller or a bus controller.
|
Starts a device controller or a bus controller.
|
||||||
|
|
||||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||||
common boot service. It is legal to call Start() from other locations,
|
common boot service. It is legal to call Start() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||||
EFI_DEVICE_PATH_PROTOCOL.
|
EFI_DEVICE_PATH_PROTOCOL.
|
||||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For a bus driver, if this parameter is NULL, then handles
|
drivers. For a bus driver, if this parameter is NULL, then handles
|
||||||
for all the children of Controller are created by this driver.
|
for all the children of Controller are created by this driver.
|
||||||
If this parameter is not NULL and the first Device Path Node is
|
If this parameter is not NULL and the first Device Path Node is
|
||||||
not the End of Device Path Node, then only the handle for the
|
not the End of Device Path Node, then only the handle for the
|
||||||
child device specified by the first Device Path Node of
|
child device specified by the first Device Path Node of
|
||||||
RemainingDevicePath is created by this driver.
|
RemainingDevicePath is created by this driver.
|
||||||
If the first Device Path Node of RemainingDevicePath is
|
If the first Device Path Node of RemainingDevicePath is
|
||||||
the End of Device Path Node, no child handle is created by this
|
the End of Device Path Node, no child handle is created by this
|
||||||
driver.
|
driver.
|
||||||
|
|
||||||
@ -191,10 +191,10 @@ HttpDxeIp4DriverBindingStart (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Stops a device controller or a bus controller.
|
Stops a device controller or a bus controller.
|
||||||
|
|
||||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||||
into this common boot service. It is legal to call Stop() from other locations,
|
into this common boot service. It is legal to call Stop() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||||
same driver's Start() function.
|
same driver's Start() function.
|
||||||
@ -202,13 +202,13 @@ HttpDxeIp4DriverBindingStart (
|
|||||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||||
Start() function, and the Start() function must have called OpenProtocol() on
|
Start() function, and the Start() function must have called OpenProtocol() on
|
||||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||||
support a bus specific I/O protocol for the driver
|
support a bus specific I/O protocol for the driver
|
||||||
to use to stop the device.
|
to use to stop the device.
|
||||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||||
if NumberOfChildren is 0.
|
if NumberOfChildren is 0.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device was stopped.
|
@retval EFI_SUCCESS The device was stopped.
|
||||||
@ -225,33 +225,33 @@ HttpDxeIp4DriverBindingStop (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||||
it further tests to see if this driver supports creating a handle for the specified child device.
|
it further tests to see if this driver supports creating a handle for the specified child device.
|
||||||
|
|
||||||
This function checks to see if the driver specified by This supports the device specified by
|
This function checks to see if the driver specified by This supports the device specified by
|
||||||
ControllerHandle. Drivers will typically use the device path attached to
|
ControllerHandle. Drivers will typically use the device path attached to
|
||||||
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
||||||
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
||||||
may be called many times during platform initialization. In order to reduce boot times, the tests
|
may be called many times during platform initialization. In order to reduce boot times, the tests
|
||||||
performed by this function must be very small, and take as little time as possible to execute. This
|
performed by this function must be very small, and take as little time as possible to execute. This
|
||||||
function must not change the state of any hardware devices, and this function must be aware that the
|
function must not change the state of any hardware devices, and this function must be aware that the
|
||||||
device specified by ControllerHandle may already be managed by the same driver or a
|
device specified by ControllerHandle may already be managed by the same driver or a
|
||||||
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
||||||
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
||||||
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
Because ControllerHandle may have been previously started by the same driver, if a protocol is
|
||||||
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
||||||
to guarantee the state of ControllerHandle is not modified by this function.
|
to guarantee the state of ControllerHandle is not modified by this function.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For bus drivers, if this parameter is not NULL, then
|
drivers. For bus drivers, if this parameter is not NULL, then
|
||||||
the bus driver must determine if the bus controller specified
|
the bus driver must determine if the bus controller specified
|
||||||
by ControllerHandle and the child controller specified
|
by ControllerHandle and the child controller specified
|
||||||
by RemainingDevicePath are both supported by this
|
by RemainingDevicePath are both supported by this
|
||||||
bus driver.
|
bus driver.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
||||||
@ -278,28 +278,28 @@ HttpDxeIp6DriverBindingSupported (
|
|||||||
Starts a device controller or a bus controller.
|
Starts a device controller or a bus controller.
|
||||||
|
|
||||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||||
common boot service. It is legal to call Start() from other locations,
|
common boot service. It is legal to call Start() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||||
EFI_DEVICE_PATH_PROTOCOL.
|
EFI_DEVICE_PATH_PROTOCOL.
|
||||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For a bus driver, if this parameter is NULL, then handles
|
drivers. For a bus driver, if this parameter is NULL, then handles
|
||||||
for all the children of Controller are created by this driver.
|
for all the children of Controller are created by this driver.
|
||||||
If this parameter is not NULL and the first Device Path Node is
|
If this parameter is not NULL and the first Device Path Node is
|
||||||
not the End of Device Path Node, then only the handle for the
|
not the End of Device Path Node, then only the handle for the
|
||||||
child device specified by the first Device Path Node of
|
child device specified by the first Device Path Node of
|
||||||
RemainingDevicePath is created by this driver.
|
RemainingDevicePath is created by this driver.
|
||||||
If the first Device Path Node of RemainingDevicePath is
|
If the first Device Path Node of RemainingDevicePath is
|
||||||
the End of Device Path Node, no child handle is created by this
|
the End of Device Path Node, no child handle is created by this
|
||||||
driver.
|
driver.
|
||||||
|
|
||||||
@ -320,10 +320,10 @@ HttpDxeIp6DriverBindingStart (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Stops a device controller or a bus controller.
|
Stops a device controller or a bus controller.
|
||||||
|
|
||||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||||
into this common boot service. It is legal to call Stop() from other locations,
|
into this common boot service. It is legal to call Stop() from other locations,
|
||||||
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||||
same driver's Start() function.
|
same driver's Start() function.
|
||||||
@ -331,13 +331,13 @@ HttpDxeIp6DriverBindingStart (
|
|||||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||||
Start() function, and the Start() function must have called OpenProtocol() on
|
Start() function, and the Start() function must have called OpenProtocol() on
|
||||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||||
support a bus specific I/O protocol for the driver
|
support a bus specific I/O protocol for the driver
|
||||||
to use to stop the device.
|
to use to stop the device.
|
||||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||||
if NumberOfChildren is 0.
|
if NumberOfChildren is 0.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device was stopped.
|
@retval EFI_SUCCESS The device was stopped.
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
gEfiCertX509Guid ## SOMETIMES_CONSUMES ## GUID # Check the cert type
|
gEfiCertX509Guid ## SOMETIMES_CONSUMES ## GUID # Check the cert type
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections ## CONSUMES
|
gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections ## CONSUMES
|
||||||
|
|
||||||
[UserExtensions.TianoCore."ExtraFiles"]
|
[UserExtensions.TianoCore."ExtraFiles"]
|
||||||
HttpDxeExtra.uni
|
HttpDxeExtra.uni
|
||||||
|
@ -2,15 +2,15 @@
|
|||||||
// UEFI HTTP DXE Driver.
|
// UEFI HTTP DXE Driver.
|
||||||
//
|
//
|
||||||
// This driver provides UEFI 2.5 HTTP protocols. It could work with an IPv4 or IPv6 stack.
|
// This driver provides UEFI 2.5 HTTP protocols. It could work with an IPv4 or IPv6 stack.
|
||||||
//
|
|
||||||
//
|
//
|
||||||
// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
//
|
||||||
|
// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
//
|
//
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
// which accompanies this distribution. The full text of the license may be found at
|
// which accompanies this distribution. The full text of the license may be found at
|
||||||
// http://opensource.org/licenses/bsd-license.php.
|
// http://opensource.org/licenses/bsd-license.php.
|
||||||
//
|
//
|
||||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
//
|
//
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// /** @file
|
// /** @file
|
||||||
// HttpDxe Localized Strings and Content
|
// HttpDxe Localized Strings and Content
|
||||||
//
|
//
|
||||||
// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
//
|
//
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -13,8 +13,8 @@
|
|||||||
//
|
//
|
||||||
// **/
|
// **/
|
||||||
|
|
||||||
#string STR_PROPERTIES_MODULE_NAME
|
#string STR_PROPERTIES_MODULE_NAME
|
||||||
#language en-US
|
#language en-US
|
||||||
"UEFI HTTP DXE"
|
"UEFI HTTP DXE"
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,17 +33,17 @@ EFI_HTTP_PROTOCOL mEfiHttpTemplate = {
|
|||||||
|
|
||||||
@param[in] This Pointer to EFI_HTTP_PROTOCOL instance.
|
@param[in] This Pointer to EFI_HTTP_PROTOCOL instance.
|
||||||
@param[out] HttpConfigData Point to buffer for operational parameters of this
|
@param[out] HttpConfigData Point to buffer for operational parameters of this
|
||||||
HTTP instance. It is the responsibility of the caller
|
HTTP instance. It is the responsibility of the caller
|
||||||
to allocate the memory for HttpConfigData and
|
to allocate the memory for HttpConfigData and
|
||||||
HttpConfigData->AccessPoint.IPv6Node/IPv4Node. In fact,
|
HttpConfigData->AccessPoint.IPv6Node/IPv4Node. In fact,
|
||||||
it is recommended to allocate sufficient memory to record
|
it is recommended to allocate sufficient memory to record
|
||||||
IPv6Node since it is big enough for all possibilities.
|
IPv6Node since it is big enough for all possibilities.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Operation succeeded.
|
@retval EFI_SUCCESS Operation succeeded.
|
||||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
||||||
This is NULL.
|
This is NULL.
|
||||||
HttpConfigData is NULL.
|
HttpConfigData is NULL.
|
||||||
HttpConfigData->AccessPoint.IPv4Node or
|
HttpConfigData->AccessPoint.IPv4Node or
|
||||||
HttpConfigData->AccessPoint.IPv6Node is NULL.
|
HttpConfigData->AccessPoint.IPv6Node is NULL.
|
||||||
@retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been started.
|
@retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been started.
|
||||||
|
|
||||||
@ -132,16 +132,16 @@ EFIAPI
|
|||||||
EfiHttpConfigure (
|
EfiHttpConfigure (
|
||||||
IN EFI_HTTP_PROTOCOL *This,
|
IN EFI_HTTP_PROTOCOL *This,
|
||||||
IN EFI_HTTP_CONFIG_DATA *HttpConfigData OPTIONAL
|
IN EFI_HTTP_CONFIG_DATA *HttpConfigData OPTIONAL
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
HTTP_PROTOCOL *HttpInstance;
|
HTTP_PROTOCOL *HttpInstance;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check input parameters.
|
// Check input parameters.
|
||||||
//
|
//
|
||||||
if (This == NULL ||
|
if (This == NULL ||
|
||||||
(HttpConfigData != NULL &&
|
(HttpConfigData != NULL &&
|
||||||
((HttpConfigData->LocalAddressIsIPv6 && HttpConfigData->AccessPoint.IPv6Node == NULL) ||
|
((HttpConfigData->LocalAddressIsIPv6 && HttpConfigData->AccessPoint.IPv6Node == NULL) ||
|
||||||
(!HttpConfigData->LocalAddressIsIPv6 && HttpConfigData->AccessPoint.IPv4Node == NULL)))) {
|
(!HttpConfigData->LocalAddressIsIPv6 && HttpConfigData->AccessPoint.IPv4Node == NULL)))) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
@ -166,8 +166,8 @@ EfiHttpConfigure (
|
|||||||
HttpInstance->HttpVersion = HttpConfigData->HttpVersion;
|
HttpInstance->HttpVersion = HttpConfigData->HttpVersion;
|
||||||
HttpInstance->TimeOutMillisec = HttpConfigData->TimeOutMillisec;
|
HttpInstance->TimeOutMillisec = HttpConfigData->TimeOutMillisec;
|
||||||
HttpInstance->LocalAddressIsIPv6 = HttpConfigData->LocalAddressIsIPv6;
|
HttpInstance->LocalAddressIsIPv6 = HttpConfigData->LocalAddressIsIPv6;
|
||||||
|
|
||||||
if (HttpConfigData->LocalAddressIsIPv6) {
|
if (HttpConfigData->LocalAddressIsIPv6) {
|
||||||
CopyMem (
|
CopyMem (
|
||||||
&HttpInstance->Ipv6Node,
|
&HttpInstance->Ipv6Node,
|
||||||
HttpConfigData->AccessPoint.IPv6Node,
|
HttpConfigData->AccessPoint.IPv6Node,
|
||||||
@ -180,7 +180,7 @@ EfiHttpConfigure (
|
|||||||
sizeof (HttpInstance->IPv4Node)
|
sizeof (HttpInstance->IPv4Node)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Creat Tcp child
|
// Creat Tcp child
|
||||||
//
|
//
|
||||||
@ -188,7 +188,7 @@ EfiHttpConfigure (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpInstance->State = HTTP_STATE_HTTP_CONFIGED;
|
HttpInstance->State = HTTP_STATE_HTTP_CONFIGED;
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
@ -201,7 +201,7 @@ EfiHttpConfigure (
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The Request() function queues an HTTP request to this HTTP instance.
|
The Request() function queues an HTTP request to this HTTP instance.
|
||||||
@ -284,8 +284,8 @@ EfiHttpRequest (
|
|||||||
// Only support GET, HEAD, DELETE, PATCH, PUT and POST method in current implementation.
|
// Only support GET, HEAD, DELETE, PATCH, PUT and POST method in current implementation.
|
||||||
//
|
//
|
||||||
if ((Request != NULL) && (Request->Method != HttpMethodGet) &&
|
if ((Request != NULL) && (Request->Method != HttpMethodGet) &&
|
||||||
(Request->Method != HttpMethodHead) && (Request->Method != HttpMethodDelete) &&
|
(Request->Method != HttpMethodHead) && (Request->Method != HttpMethodDelete) &&
|
||||||
(Request->Method != HttpMethodPut) && (Request->Method != HttpMethodPost) &&
|
(Request->Method != HttpMethodPut) && (Request->Method != HttpMethodPost) &&
|
||||||
(Request->Method != HttpMethodPatch)) {
|
(Request->Method != HttpMethodPatch)) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
@ -307,8 +307,8 @@ EfiHttpRequest (
|
|||||||
//
|
//
|
||||||
// Request would be NULL only for PUT/POST/PATCH operation (in the current implementation)
|
// Request would be NULL only for PUT/POST/PATCH operation (in the current implementation)
|
||||||
//
|
//
|
||||||
if ((HttpInstance->Method != HttpMethodPut) &&
|
if ((HttpInstance->Method != HttpMethodPut) &&
|
||||||
(HttpInstance->Method != HttpMethodPost) &&
|
(HttpInstance->Method != HttpMethodPost) &&
|
||||||
(HttpInstance->Method != HttpMethodPatch)) {
|
(HttpInstance->Method != HttpMethodPatch)) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
@ -358,7 +358,7 @@ EfiHttpRequest (
|
|||||||
UnicodeStrToAsciiStrS (Request->Url, Url, UrlLen);
|
UnicodeStrToAsciiStrS (Request->Url, Url, UrlLen);
|
||||||
|
|
||||||
//
|
//
|
||||||
// From the information in Url, the HTTP instance will
|
// From the information in Url, the HTTP instance will
|
||||||
// be able to determine whether to use http or https.
|
// be able to determine whether to use http or https.
|
||||||
//
|
//
|
||||||
HttpInstance->UseHttps = IsHttpsUrl (Url);
|
HttpInstance->UseHttps = IsHttpsUrl (Url);
|
||||||
@ -367,7 +367,7 @@ EfiHttpRequest (
|
|||||||
// HTTP is disabled, return directly if the URI is not HTTPS.
|
// HTTP is disabled, return directly if the URI is not HTTPS.
|
||||||
//
|
//
|
||||||
if (!PcdGetBool (PcdAllowHttpConnections) && !(HttpInstance->UseHttps)) {
|
if (!PcdGetBool (PcdAllowHttpConnections) && !(HttpInstance->UseHttps)) {
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "EfiHttpRequest: HTTP is disabled.\n"));
|
DEBUG ((EFI_D_ERROR, "EfiHttpRequest: HTTP is disabled.\n"));
|
||||||
|
|
||||||
return EFI_ACCESS_DENIED;
|
return EFI_ACCESS_DENIED;
|
||||||
@ -434,9 +434,9 @@ EfiHttpRequest (
|
|||||||
ReConfigure = FALSE;
|
ReConfigure = FALSE;
|
||||||
} else {
|
} else {
|
||||||
if ((HttpInstance->RemotePort == RemotePort) &&
|
if ((HttpInstance->RemotePort == RemotePort) &&
|
||||||
(AsciiStrCmp (HttpInstance->RemoteHost, HostName) == 0) &&
|
(AsciiStrCmp (HttpInstance->RemoteHost, HostName) == 0) &&
|
||||||
(!HttpInstance->UseHttps || (HttpInstance->UseHttps &&
|
(!HttpInstance->UseHttps || (HttpInstance->UseHttps &&
|
||||||
!TlsConfigure &&
|
!TlsConfigure &&
|
||||||
HttpInstance->TlsSessionState == EfiTlsSessionDataTransferring))) {
|
HttpInstance->TlsSessionState == EfiTlsSessionDataTransferring))) {
|
||||||
//
|
//
|
||||||
// Host Name and port number of the request URL are the same with previous call to Request().
|
// Host Name and port number of the request URL are the same with previous call to Request().
|
||||||
@ -495,7 +495,7 @@ EfiHttpRequest (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Configure) {
|
if (Configure) {
|
||||||
//
|
//
|
||||||
@ -514,14 +514,14 @@ EfiHttpRequest (
|
|||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto Error1;
|
goto Error1;
|
||||||
}
|
}
|
||||||
|
|
||||||
AsciiStrToUnicodeStrS (HostName, HostNameStr, HostNameSize);
|
AsciiStrToUnicodeStrS (HostName, HostNameStr, HostNameSize);
|
||||||
if (!HttpInstance->LocalAddressIsIPv6) {
|
if (!HttpInstance->LocalAddressIsIPv6) {
|
||||||
Status = HttpDns4 (HttpInstance, HostNameStr, &HttpInstance->RemoteAddr);
|
Status = HttpDns4 (HttpInstance, HostNameStr, &HttpInstance->RemoteAddr);
|
||||||
} else {
|
} else {
|
||||||
Status = HttpDns6 (HttpInstance, HostNameStr, &HttpInstance->RemoteIpv6Addr);
|
Status = HttpDns6 (HttpInstance, HostNameStr, &HttpInstance->RemoteIpv6Addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
FreePool (HostNameStr);
|
FreePool (HostNameStr);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((EFI_D_ERROR, "Error: Could not retrieve the host address from DNS server.\n"));
|
DEBUG ((EFI_D_ERROR, "Error: Could not retrieve the host address from DNS server.\n"));
|
||||||
@ -553,10 +553,10 @@ EfiHttpRequest (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Error1;
|
goto Error1;
|
||||||
}
|
}
|
||||||
|
|
||||||
TlsCloseTxRxEvent (HttpInstance);
|
TlsCloseTxRxEvent (HttpInstance);
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpCloseConnection (HttpInstance);
|
HttpCloseConnection (HttpInstance);
|
||||||
EfiHttpCancel (This, NULL);
|
EfiHttpCancel (This, NULL);
|
||||||
}
|
}
|
||||||
@ -575,11 +575,11 @@ EfiHttpRequest (
|
|||||||
if (Request != NULL) {
|
if (Request != NULL) {
|
||||||
Wrap->TcpWrap.Method = Request->Method;
|
Wrap->TcpWrap.Method = Request->Method;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = HttpInitSession (
|
Status = HttpInitSession (
|
||||||
HttpInstance,
|
HttpInstance,
|
||||||
Wrap,
|
Wrap,
|
||||||
Configure || ReConfigure,
|
Configure || ReConfigure,
|
||||||
TlsConfigure
|
TlsConfigure
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
@ -588,14 +588,14 @@ EfiHttpRequest (
|
|||||||
|
|
||||||
if (!Configure && !ReConfigure && !TlsConfigure) {
|
if (!Configure && !ReConfigure && !TlsConfigure) {
|
||||||
//
|
//
|
||||||
// For the new HTTP token, create TX TCP token events.
|
// For the new HTTP token, create TX TCP token events.
|
||||||
//
|
//
|
||||||
Status = HttpCreateTcpTxEvent (Wrap);
|
Status = HttpCreateTcpTxEvent (Wrap);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Error1;
|
goto Error1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create request message.
|
// Create request message.
|
||||||
//
|
//
|
||||||
@ -647,11 +647,11 @@ EfiHttpRequest (
|
|||||||
RequestMsgSize
|
RequestMsgSize
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Error5;
|
goto Error5;
|
||||||
}
|
}
|
||||||
|
|
||||||
DispatchDpc ();
|
DispatchDpc ();
|
||||||
|
|
||||||
if (HostName != NULL) {
|
if (HostName != NULL) {
|
||||||
FreePool (HostName);
|
FreePool (HostName);
|
||||||
}
|
}
|
||||||
@ -659,7 +659,7 @@ EfiHttpRequest (
|
|||||||
if (UrlParser != NULL) {
|
if (UrlParser != NULL) {
|
||||||
HttpUrlFreeParser (UrlParser);
|
HttpUrlFreeParser (UrlParser);
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
Error5:
|
Error5:
|
||||||
@ -674,7 +674,7 @@ Error5:
|
|||||||
Error4:
|
Error4:
|
||||||
if (RequestMsg != NULL) {
|
if (RequestMsg != NULL) {
|
||||||
FreePool (RequestMsg);
|
FreePool (RequestMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
Error3:
|
Error3:
|
||||||
if (HttpInstance->UseHttps) {
|
if (HttpInstance->UseHttps) {
|
||||||
@ -684,7 +684,7 @@ Error3:
|
|||||||
|
|
||||||
Error2:
|
Error2:
|
||||||
HttpCloseConnection (HttpInstance);
|
HttpCloseConnection (HttpInstance);
|
||||||
|
|
||||||
HttpCloseTcpConnCloseEvent (HttpInstance);
|
HttpCloseTcpConnCloseEvent (HttpInstance);
|
||||||
if (NULL != Wrap->TcpWrap.Tx4Token.CompletionToken.Event) {
|
if (NULL != Wrap->TcpWrap.Tx4Token.CompletionToken.Event) {
|
||||||
gBS->CloseEvent (Wrap->TcpWrap.Tx4Token.CompletionToken.Event);
|
gBS->CloseEvent (Wrap->TcpWrap.Tx4Token.CompletionToken.Event);
|
||||||
@ -707,12 +707,12 @@ Error1:
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Cancel a user's Token.
|
Cancel a user's Token.
|
||||||
|
|
||||||
@param[in] Map The HTTP instance's token queue.
|
@param[in] Map The HTTP instance's token queue.
|
||||||
@param[in] Item Object container for one HTTP token and token's wrap.
|
@param[in] Item Object container for one HTTP token and token's wrap.
|
||||||
@param[in] Context The user's token to cancel.
|
@param[in] Context The user's token to cancel.
|
||||||
@ -746,7 +746,7 @@ HttpCancelTokens (
|
|||||||
Wrap = (HTTP_TOKEN_WRAP *) Item->Value;
|
Wrap = (HTTP_TOKEN_WRAP *) Item->Value;
|
||||||
ASSERT (Wrap != NULL);
|
ASSERT (Wrap != NULL);
|
||||||
HttpInstance = Wrap->HttpInstance;
|
HttpInstance = Wrap->HttpInstance;
|
||||||
|
|
||||||
if (!HttpInstance->LocalAddressIsIPv6) {
|
if (!HttpInstance->LocalAddressIsIPv6) {
|
||||||
if (Wrap->TcpWrap.Rx4Token.CompletionToken.Event != NULL) {
|
if (Wrap->TcpWrap.Rx4Token.CompletionToken.Event != NULL) {
|
||||||
//
|
//
|
||||||
@ -781,7 +781,7 @@ HttpCancelTokens (
|
|||||||
return EFI_ABORTED;
|
return EFI_ABORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -794,7 +794,7 @@ HttpCancelTokens (
|
|||||||
cancelled.
|
cancelled.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The token is cancelled.
|
@retval EFI_SUCCESS The token is cancelled.
|
||||||
@retval EFI_NOT_FOUND The asynchronous request or response token is not found.
|
@retval EFI_NOT_FOUND The asynchronous request or response token is not found.
|
||||||
@retval Others Other error as indicated.
|
@retval Others Other error as indicated.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -814,7 +814,7 @@ HttpCancel (
|
|||||||
if (Token != NULL) {
|
if (Token != NULL) {
|
||||||
if (Status == EFI_ABORTED) {
|
if (Status == EFI_ABORTED) {
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
@ -843,7 +843,7 @@ HttpCancel (
|
|||||||
HttpInstance->Tcp6->Cancel (HttpInstance->Tcp6, &HttpInstance->Tcp6TlsRxToken.CompletionToken);
|
HttpInstance->Tcp6->Cancel (HttpInstance->Tcp6, &HttpInstance->Tcp6TlsRxToken.CompletionToken);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -936,7 +936,7 @@ HttpBodyParserCallback (
|
|||||||
} else {
|
} else {
|
||||||
Wrap->HttpInstance->NextMsg = NULL;
|
Wrap->HttpInstance->NextMsg = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Free Tx4Token or Tx6Token since already received corrsponding HTTP response.
|
// Free Tx4Token or Tx6Token since already received corrsponding HTTP response.
|
||||||
@ -953,7 +953,7 @@ HttpBodyParserCallback (
|
|||||||
|
|
||||||
@retval EFI_SUCCESS Allocation succeeded.
|
@retval EFI_SUCCESS Allocation succeeded.
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to complete the opration due to lack of resources.
|
@retval EFI_OUT_OF_RESOURCES Failed to complete the opration due to lack of resources.
|
||||||
@retval EFI_NOT_READY Can't find a corresponding Tx4Token/Tx6Token or
|
@retval EFI_NOT_READY Can't find a corresponding Tx4Token/Tx6Token or
|
||||||
the EFI_HTTP_UTILITIES_PROTOCOL is not available.
|
the EFI_HTTP_UTILITIES_PROTOCOL is not available.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -983,7 +983,7 @@ HttpResponseWorker (
|
|||||||
if (Wrap == NULL || Wrap->HttpInstance == NULL) {
|
if (Wrap == NULL || Wrap->HttpInstance == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpInstance = Wrap->HttpInstance;
|
HttpInstance = Wrap->HttpInstance;
|
||||||
Token = Wrap->HttpToken;
|
Token = Wrap->HttpToken;
|
||||||
HttpMsg = Token->Message;
|
HttpMsg = Token->Message;
|
||||||
@ -998,7 +998,7 @@ HttpResponseWorker (
|
|||||||
ValueInItem = NULL;
|
ValueInItem = NULL;
|
||||||
Fragment.Len = 0;
|
Fragment.Len = 0;
|
||||||
Fragment.Bulk = NULL;
|
Fragment.Bulk = NULL;
|
||||||
|
|
||||||
if (HttpMsg->Data.Response != NULL) {
|
if (HttpMsg->Data.Response != NULL) {
|
||||||
//
|
//
|
||||||
// Check whether we have cached header from previous call.
|
// Check whether we have cached header from previous call.
|
||||||
@ -1025,8 +1025,8 @@ HttpResponseWorker (
|
|||||||
//
|
//
|
||||||
// Check whether we cached the whole HTTP headers.
|
// Check whether we cached the whole HTTP headers.
|
||||||
//
|
//
|
||||||
EndofHeader = AsciiStrStr (HttpHeaders, HTTP_END_OF_HDR_STR);
|
EndofHeader = AsciiStrStr (HttpHeaders, HTTP_END_OF_HDR_STR);
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpInstance->EndofHeader = &EndofHeader;
|
HttpInstance->EndofHeader = &EndofHeader;
|
||||||
HttpInstance->HttpHeaders = &HttpHeaders;
|
HttpInstance->HttpHeaders = &HttpHeaders;
|
||||||
@ -1239,7 +1239,7 @@ HttpResponseWorker (
|
|||||||
//
|
//
|
||||||
// We have a cached HTTP message which includes a part of HTTP header of next message.
|
// We have a cached HTTP message which includes a part of HTTP header of next message.
|
||||||
//
|
//
|
||||||
BodyLen = HttpInstance->NextMsg - (HttpInstance->CacheBody + HttpInstance->CacheOffset);
|
BodyLen = HttpInstance->NextMsg - (HttpInstance->CacheBody + HttpInstance->CacheOffset);
|
||||||
} else {
|
} else {
|
||||||
BodyLen = HttpInstance->CacheLen - HttpInstance->CacheOffset;
|
BodyLen = HttpInstance->CacheLen - HttpInstance->CacheOffset;
|
||||||
}
|
}
|
||||||
@ -1274,7 +1274,7 @@ HttpResponseWorker (
|
|||||||
//
|
//
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BodyLen == 0 && HttpInstance->MsgParser == NULL) {
|
if (BodyLen == 0 && HttpInstance->MsgParser == NULL) {
|
||||||
//
|
//
|
||||||
@ -1282,8 +1282,8 @@ HttpResponseWorker (
|
|||||||
//
|
//
|
||||||
HttpMsg->BodyLength = 0;
|
HttpMsg->BodyLength = 0;
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT (HttpInstance->MsgParser != NULL);
|
ASSERT (HttpInstance->MsgParser != NULL);
|
||||||
@ -1297,7 +1297,7 @@ HttpResponseWorker (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Error2;
|
goto Error2;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (HttpInstance->TimeoutEvent == NULL) {
|
if (HttpInstance->TimeoutEvent == NULL) {
|
||||||
//
|
//
|
||||||
@ -1322,11 +1322,11 @@ HttpResponseWorker (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Error2;
|
goto Error2;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = HttpsReceive (HttpInstance, &Fragment, HttpInstance->TimeoutEvent);
|
Status = HttpsReceive (HttpInstance, &Fragment, HttpInstance->TimeoutEvent);
|
||||||
|
|
||||||
gBS->SetTimer (HttpInstance->TimeoutEvent, TimerCancel, 0);
|
gBS->SetTimer (HttpInstance->TimeoutEvent, TimerCancel, 0);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Error2;
|
goto Error2;
|
||||||
}
|
}
|
||||||
@ -1357,19 +1357,19 @@ HttpResponseWorker (
|
|||||||
if (HttpInstance->NextMsg != NULL) {
|
if (HttpInstance->NextMsg != NULL) {
|
||||||
HttpMsg->BodyLength = MIN ((UINTN) HttpInstance->NextMsg - (UINTN) Fragment.Bulk, HttpMsg->BodyLength);
|
HttpMsg->BodyLength = MIN ((UINTN) HttpInstance->NextMsg - (UINTN) Fragment.Bulk, HttpMsg->BodyLength);
|
||||||
CopyMem (HttpMsg->Body, Fragment.Bulk, HttpMsg->BodyLength);
|
CopyMem (HttpMsg->Body, Fragment.Bulk, HttpMsg->BodyLength);
|
||||||
|
|
||||||
HttpInstance->CacheLen = Fragment.Len - HttpMsg->BodyLength;
|
HttpInstance->CacheLen = Fragment.Len - HttpMsg->BodyLength;
|
||||||
if (HttpInstance->CacheLen != 0) {
|
if (HttpInstance->CacheLen != 0) {
|
||||||
if (HttpInstance->CacheBody != NULL) {
|
if (HttpInstance->CacheBody != NULL) {
|
||||||
FreePool (HttpInstance->CacheBody);
|
FreePool (HttpInstance->CacheBody);
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpInstance->CacheBody = AllocateZeroPool (HttpInstance->CacheLen);
|
HttpInstance->CacheBody = AllocateZeroPool (HttpInstance->CacheLen);
|
||||||
if (HttpInstance->CacheBody == NULL) {
|
if (HttpInstance->CacheBody == NULL) {
|
||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto Error2;
|
goto Error2;
|
||||||
}
|
}
|
||||||
|
|
||||||
CopyMem (HttpInstance->CacheBody, Fragment.Bulk + HttpMsg->BodyLength, HttpInstance->CacheLen);
|
CopyMem (HttpInstance->CacheBody, Fragment.Bulk + HttpMsg->BodyLength, HttpInstance->CacheLen);
|
||||||
HttpInstance->CacheOffset = 0;
|
HttpInstance->CacheOffset = 0;
|
||||||
|
|
||||||
@ -1383,7 +1383,7 @@ HttpResponseWorker (
|
|||||||
if (HttpInstance->CacheBody != NULL) {
|
if (HttpInstance->CacheBody != NULL) {
|
||||||
FreePool (HttpInstance->CacheBody);
|
FreePool (HttpInstance->CacheBody);
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpInstance->CacheBody = AllocateZeroPool (HttpInstance->CacheLen);
|
HttpInstance->CacheBody = AllocateZeroPool (HttpInstance->CacheLen);
|
||||||
if (HttpInstance->CacheBody == NULL) {
|
if (HttpInstance->CacheBody == NULL) {
|
||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
@ -1438,7 +1438,7 @@ Error:
|
|||||||
} else {
|
} else {
|
||||||
FreePool (Wrap);
|
FreePool (Wrap);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HttpHeaders != NULL) {
|
if (HttpHeaders != NULL) {
|
||||||
FreePool (HttpHeaders);
|
FreePool (HttpHeaders);
|
||||||
HttpHeaders = NULL;
|
HttpHeaders = NULL;
|
||||||
@ -1467,7 +1467,7 @@ Error:
|
|||||||
|
|
||||||
gBS->SignalEvent (Token->Event);
|
gBS->SignalEvent (Token->Event);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1539,7 +1539,7 @@ EfiHttpResponse (
|
|||||||
if (HttpMsg == NULL) {
|
if (HttpMsg == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);
|
HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);
|
||||||
|
|
||||||
if (HttpInstance->State != HTTP_STATE_TCP_CONNECTED) {
|
if (HttpInstance->State != HTTP_STATE_TCP_CONNECTED) {
|
||||||
@ -1550,7 +1550,7 @@ EfiHttpResponse (
|
|||||||
// Check whether the token already existed.
|
// Check whether the token already existed.
|
||||||
//
|
//
|
||||||
if (EFI_ERROR (NetMapIterate (&HttpInstance->RxTokens, HttpTokenExist, Token))) {
|
if (EFI_ERROR (NetMapIterate (&HttpInstance->RxTokens, HttpTokenExist, Token))) {
|
||||||
return EFI_ACCESS_DENIED;
|
return EFI_ACCESS_DENIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
Wrap = AllocateZeroPool (sizeof (HTTP_TOKEN_WRAP));
|
Wrap = AllocateZeroPool (sizeof (HTTP_TOKEN_WRAP));
|
||||||
@ -1562,8 +1562,8 @@ EfiHttpResponse (
|
|||||||
Wrap->HttpToken = Token;
|
Wrap->HttpToken = Token;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Notes: For Https, receive token wrapped in HTTP_TOKEN_WRAP is not used to
|
// Notes: For Https, receive token wrapped in HTTP_TOKEN_WRAP is not used to
|
||||||
// receive the https response. A special TlsRxToken is used for receiving TLS
|
// receive the https response. A special TlsRxToken is used for receiving TLS
|
||||||
// related messages. It should be a blocking response.
|
// related messages. It should be a blocking response.
|
||||||
//
|
//
|
||||||
if (!HttpInstance->UseHttps) {
|
if (!HttpInstance->UseHttps) {
|
||||||
@ -1597,9 +1597,9 @@ Error:
|
|||||||
gBS->CloseEvent (Wrap->TcpWrap.Rx6Token.CompletionToken.Event);
|
gBS->CloseEvent (Wrap->TcpWrap.Rx6Token.CompletionToken.Event);
|
||||||
}
|
}
|
||||||
FreePool (Wrap);
|
FreePool (Wrap);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1640,7 +1640,7 @@ EfiHttpPoll (
|
|||||||
if (HttpInstance->State != HTTP_STATE_TCP_CONNECTED) {
|
if (HttpInstance->State != HTTP_STATE_TCP_CONNECTED) {
|
||||||
return EFI_NOT_STARTED;
|
return EFI_NOT_STARTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HttpInstance->LocalAddressIsIPv6) {
|
if (HttpInstance->LocalAddressIsIPv6) {
|
||||||
if (HttpInstance->Tcp6 == NULL) {
|
if (HttpInstance->Tcp6 == NULL) {
|
||||||
return EFI_NOT_STARTED;
|
return EFI_NOT_STARTED;
|
||||||
@ -1652,8 +1652,8 @@ EfiHttpPoll (
|
|||||||
}
|
}
|
||||||
Status = HttpInstance->Tcp4->Poll (HttpInstance->Tcp4);
|
Status = HttpInstance->Tcp4->Poll (HttpInstance->Tcp4);
|
||||||
}
|
}
|
||||||
|
|
||||||
DispatchDpc ();
|
DispatchDpc ();
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The header files of implementation of EFI_HTTP_PROTOCOL protocol interfaces.
|
The header files of implementation of EFI_HTTP_PROTOCOL protocol interfaces.
|
||||||
|
|
||||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -33,17 +33,17 @@
|
|||||||
|
|
||||||
@param[in] This Pointer to EFI_HTTP_PROTOCOL instance.
|
@param[in] This Pointer to EFI_HTTP_PROTOCOL instance.
|
||||||
@param[out] HttpConfigData Point to buffer for operational parameters of this
|
@param[out] HttpConfigData Point to buffer for operational parameters of this
|
||||||
HTTP instance. It is the responsibility of the caller
|
HTTP instance. It is the responsibility of the caller
|
||||||
to allocate the memory for HttpConfigData and
|
to allocate the memory for HttpConfigData and
|
||||||
HttpConfigData->AccessPoint.IPv6Node/IPv4Node. In fact,
|
HttpConfigData->AccessPoint.IPv6Node/IPv4Node. In fact,
|
||||||
it is recommended to allocate sufficient memory to record
|
it is recommended to allocate sufficient memory to record
|
||||||
IPv6Node since it is big enough for all possibilities.
|
IPv6Node since it is big enough for all possibilities.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Operation succeeded.
|
@retval EFI_SUCCESS Operation succeeded.
|
||||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
||||||
This is NULL.
|
This is NULL.
|
||||||
HttpConfigData is NULL.
|
HttpConfigData is NULL.
|
||||||
HttpConfigData->AccessPoint.IPv4Node or
|
HttpConfigData->AccessPoint.IPv4Node or
|
||||||
HttpConfigData->AccessPoint.IPv6Node is NULL.
|
HttpConfigData->AccessPoint.IPv6Node is NULL.
|
||||||
@retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been started.
|
@retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been started.
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ EfiHttpGetModeData (
|
|||||||
connections with remote hosts, canceling all asynchronous tokens, and flush request
|
connections with remote hosts, canceling all asynchronous tokens, and flush request
|
||||||
and response buffers without informing the appropriate hosts.
|
and response buffers without informing the appropriate hosts.
|
||||||
|
|
||||||
No other EFI HTTP function can be executed by this instance until the Configure()
|
No other EFI HTTP function can be executed by this instance until the Configure()
|
||||||
function is executed and returns successfully.
|
function is executed and returns successfully.
|
||||||
|
|
||||||
@param[in] This Pointer to EFI_HTTP_PROTOCOL instance.
|
@param[in] This Pointer to EFI_HTTP_PROTOCOL instance.
|
||||||
|
@ -16,7 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#include "HttpDriver.h"
|
#include "HttpDriver.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The common notify function used in HTTP driver.
|
The common notify function used in HTTP driver.
|
||||||
|
|
||||||
@param[in] Event The event signaled.
|
@param[in] Event The event signaled.
|
||||||
@param[in] Context The context.
|
@param[in] Context The context.
|
||||||
@ -54,10 +54,10 @@ HttpTcpTransmitNotifyDpc (
|
|||||||
if (Context == NULL) {
|
if (Context == NULL) {
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
Wrap = (HTTP_TOKEN_WRAP *) Context;
|
Wrap = (HTTP_TOKEN_WRAP *) Context;
|
||||||
HttpInstance = Wrap->HttpInstance;
|
HttpInstance = Wrap->HttpInstance;
|
||||||
|
|
||||||
if (!HttpInstance->LocalAddressIsIPv6) {
|
if (!HttpInstance->LocalAddressIsIPv6) {
|
||||||
Wrap->HttpToken->Status = Wrap->TcpWrap.Tx4Token.CompletionToken.Status;
|
Wrap->HttpToken->Status = Wrap->TcpWrap.Tx4Token.CompletionToken.Status;
|
||||||
gBS->SignalEvent (Wrap->HttpToken->Event);
|
gBS->SignalEvent (Wrap->HttpToken->Event);
|
||||||
@ -72,11 +72,11 @@ HttpTcpTransmitNotifyDpc (
|
|||||||
if (Wrap->TcpWrap.Tx4Token.CompletionToken.Event != NULL) {
|
if (Wrap->TcpWrap.Tx4Token.CompletionToken.Event != NULL) {
|
||||||
gBS->CloseEvent (Wrap->TcpWrap.Tx4Token.CompletionToken.Event);
|
gBS->CloseEvent (Wrap->TcpWrap.Tx4Token.CompletionToken.Event);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Wrap->HttpToken->Status = Wrap->TcpWrap.Tx6Token.CompletionToken.Status;
|
Wrap->HttpToken->Status = Wrap->TcpWrap.Tx6Token.CompletionToken.Status;
|
||||||
gBS->SignalEvent (Wrap->HttpToken->Event);
|
gBS->SignalEvent (Wrap->HttpToken->Event);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Free resources.
|
// Free resources.
|
||||||
//
|
//
|
||||||
@ -86,7 +86,7 @@ HttpTcpTransmitNotifyDpc (
|
|||||||
|
|
||||||
if (Wrap->TcpWrap.Tx6Token.CompletionToken.Event != NULL) {
|
if (Wrap->TcpWrap.Tx6Token.CompletionToken.Event != NULL) {
|
||||||
gBS->CloseEvent (Wrap->TcpWrap.Tx6Token.CompletionToken.Event);
|
gBS->CloseEvent (Wrap->TcpWrap.Tx6Token.CompletionToken.Event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -145,11 +145,11 @@ HttpTcpReceiveNotifyDpc (
|
|||||||
Wrap = (HTTP_TOKEN_WRAP *) Context;
|
Wrap = (HTTP_TOKEN_WRAP *) Context;
|
||||||
HttpInstance = Wrap->HttpInstance;
|
HttpInstance = Wrap->HttpInstance;
|
||||||
UsingIpv6 = HttpInstance->LocalAddressIsIPv6;
|
UsingIpv6 = HttpInstance->LocalAddressIsIPv6;
|
||||||
|
|
||||||
if (UsingIpv6) {
|
if (UsingIpv6) {
|
||||||
gBS->CloseEvent (Wrap->TcpWrap.Rx6Token.CompletionToken.Event);
|
gBS->CloseEvent (Wrap->TcpWrap.Rx6Token.CompletionToken.Event);
|
||||||
Wrap->TcpWrap.Rx6Token.CompletionToken.Event = NULL;
|
Wrap->TcpWrap.Rx6Token.CompletionToken.Event = NULL;
|
||||||
|
|
||||||
if (EFI_ERROR (Wrap->TcpWrap.Rx6Token.CompletionToken.Status)) {
|
if (EFI_ERROR (Wrap->TcpWrap.Rx6Token.CompletionToken.Status)) {
|
||||||
DEBUG ((EFI_D_ERROR, "HttpTcpReceiveNotifyDpc: %r!\n", Wrap->TcpWrap.Rx6Token.CompletionToken.Status));
|
DEBUG ((EFI_D_ERROR, "HttpTcpReceiveNotifyDpc: %r!\n", Wrap->TcpWrap.Rx6Token.CompletionToken.Status));
|
||||||
Wrap->HttpToken->Status = Wrap->TcpWrap.Rx6Token.CompletionToken.Status;
|
Wrap->HttpToken->Status = Wrap->TcpWrap.Rx6Token.CompletionToken.Status;
|
||||||
@ -159,30 +159,30 @@ HttpTcpReceiveNotifyDpc (
|
|||||||
if (Item != NULL) {
|
if (Item != NULL) {
|
||||||
NetMapRemoveItem (&HttpInstance->RxTokens, Item, NULL);
|
NetMapRemoveItem (&HttpInstance->RxTokens, Item, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
FreePool (Wrap);
|
FreePool (Wrap);
|
||||||
Wrap = NULL;
|
Wrap = NULL;
|
||||||
|
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
gBS->CloseEvent (Wrap->TcpWrap.Rx4Token.CompletionToken.Event);
|
gBS->CloseEvent (Wrap->TcpWrap.Rx4Token.CompletionToken.Event);
|
||||||
Wrap->TcpWrap.Rx4Token.CompletionToken.Event = NULL;
|
Wrap->TcpWrap.Rx4Token.CompletionToken.Event = NULL;
|
||||||
|
|
||||||
if (EFI_ERROR (Wrap->TcpWrap.Rx4Token.CompletionToken.Status)) {
|
if (EFI_ERROR (Wrap->TcpWrap.Rx4Token.CompletionToken.Status)) {
|
||||||
DEBUG ((EFI_D_ERROR, "HttpTcpReceiveNotifyDpc: %r!\n", Wrap->TcpWrap.Rx4Token.CompletionToken.Status));
|
DEBUG ((EFI_D_ERROR, "HttpTcpReceiveNotifyDpc: %r!\n", Wrap->TcpWrap.Rx4Token.CompletionToken.Status));
|
||||||
Wrap->HttpToken->Status = Wrap->TcpWrap.Rx4Token.CompletionToken.Status;
|
Wrap->HttpToken->Status = Wrap->TcpWrap.Rx4Token.CompletionToken.Status;
|
||||||
gBS->SignalEvent (Wrap->HttpToken->Event);
|
gBS->SignalEvent (Wrap->HttpToken->Event);
|
||||||
|
|
||||||
Item = NetMapFindKey (&HttpInstance->RxTokens, Wrap->HttpToken);
|
Item = NetMapFindKey (&HttpInstance->RxTokens, Wrap->HttpToken);
|
||||||
if (Item != NULL) {
|
if (Item != NULL) {
|
||||||
NetMapRemoveItem (&HttpInstance->RxTokens, Item, NULL);
|
NetMapRemoveItem (&HttpInstance->RxTokens, Item, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
FreePool (Wrap);
|
FreePool (Wrap);
|
||||||
Wrap = NULL;
|
Wrap = NULL;
|
||||||
|
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -220,7 +220,7 @@ HttpTcpReceiveNotifyDpc (
|
|||||||
// We receive part of header of next HTTP msg.
|
// We receive part of header of next HTTP msg.
|
||||||
//
|
//
|
||||||
if (HttpInstance->NextMsg != NULL) {
|
if (HttpInstance->NextMsg != NULL) {
|
||||||
Wrap->HttpToken->Message->BodyLength = HttpInstance->NextMsg -
|
Wrap->HttpToken->Message->BodyLength = HttpInstance->NextMsg -
|
||||||
(CHAR8 *) Wrap->HttpToken->Message->Body;
|
(CHAR8 *) Wrap->HttpToken->Message->Body;
|
||||||
HttpInstance->CacheLen = Length - Wrap->HttpToken->Message->BodyLength;
|
HttpInstance->CacheLen = Length - Wrap->HttpToken->Message->BodyLength;
|
||||||
if (HttpInstance->CacheLen != 0) {
|
if (HttpInstance->CacheLen != 0) {
|
||||||
@ -246,7 +246,7 @@ HttpTcpReceiveNotifyDpc (
|
|||||||
} else {
|
} else {
|
||||||
Wrap->HttpToken->Status = Wrap->TcpWrap.Rx4Token.CompletionToken.Status;
|
Wrap->HttpToken->Status = Wrap->TcpWrap.Rx4Token.CompletionToken.Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gBS->SignalEvent (Wrap->HttpToken->Event);
|
gBS->SignalEvent (Wrap->HttpToken->Event);
|
||||||
|
|
||||||
@ -323,7 +323,7 @@ HttpCreateTcpConnCloseEvent (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ERROR;
|
goto ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// Create events for variuos asynchronous operations.
|
// Create events for variuos asynchronous operations.
|
||||||
@ -353,7 +353,7 @@ HttpCreateTcpConnCloseEvent (
|
|||||||
goto ERROR;
|
goto ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
ERROR:
|
ERROR:
|
||||||
@ -401,7 +401,7 @@ HttpCloseTcpConnCloseEvent (
|
|||||||
HttpInstance->Tcp4CloseToken.CompletionToken.Event = NULL;
|
HttpInstance->Tcp4CloseToken.CompletionToken.Event = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -436,7 +436,7 @@ HttpCreateTcpTxEvent (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
TcpWrap->Tx4Data.Push = TRUE;
|
TcpWrap->Tx4Data.Push = TRUE;
|
||||||
TcpWrap->Tx4Data.Urgent = FALSE;
|
TcpWrap->Tx4Data.Urgent = FALSE;
|
||||||
TcpWrap->Tx4Data.FragmentCount = 1;
|
TcpWrap->Tx4Data.FragmentCount = 1;
|
||||||
@ -460,9 +460,9 @@ HttpCreateTcpTxEvent (
|
|||||||
TcpWrap->Tx6Data.FragmentCount = 1;
|
TcpWrap->Tx6Data.FragmentCount = 1;
|
||||||
TcpWrap->Tx6Token.Packet.TxData = &Wrap->TcpWrap.Tx6Data;
|
TcpWrap->Tx6Token.Packet.TxData = &Wrap->TcpWrap.Tx6Data;
|
||||||
TcpWrap->Tx6Token.CompletionToken.Status =EFI_NOT_READY;
|
TcpWrap->Tx6Token.CompletionToken.Status =EFI_NOT_READY;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -493,7 +493,7 @@ HttpCreateTcpRxEventForHeader (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpInstance->Rx4Data.FragmentCount = 1;
|
HttpInstance->Rx4Data.FragmentCount = 1;
|
||||||
HttpInstance->Rx4Token.Packet.RxData = &HttpInstance->Rx4Data;
|
HttpInstance->Rx4Token.Packet.RxData = &HttpInstance->Rx4Data;
|
||||||
HttpInstance->Rx4Token.CompletionToken.Status = EFI_NOT_READY;
|
HttpInstance->Rx4Token.CompletionToken.Status = EFI_NOT_READY;
|
||||||
@ -513,7 +513,7 @@ HttpCreateTcpRxEventForHeader (
|
|||||||
HttpInstance->Rx6Data.FragmentCount =1;
|
HttpInstance->Rx6Data.FragmentCount =1;
|
||||||
HttpInstance->Rx6Token.Packet.RxData = &HttpInstance->Rx6Data;
|
HttpInstance->Rx6Token.Packet.RxData = &HttpInstance->Rx6Data;
|
||||||
HttpInstance->Rx6Token.CompletionToken.Status = EFI_NOT_READY;
|
HttpInstance->Rx6Token.CompletionToken.Status = EFI_NOT_READY;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -531,7 +531,7 @@ HttpCreateTcpRxEventForHeader (
|
|||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
HttpCreateTcpRxEvent (
|
HttpCreateTcpRxEvent (
|
||||||
IN HTTP_TOKEN_WRAP *Wrap
|
IN HTTP_TOKEN_WRAP *Wrap
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
@ -551,7 +551,7 @@ HttpCreateTcpRxEvent (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
TcpWrap->Rx4Data.FragmentCount = 1;
|
TcpWrap->Rx4Data.FragmentCount = 1;
|
||||||
TcpWrap->Rx4Token.Packet.RxData = &Wrap->TcpWrap.Rx4Data;
|
TcpWrap->Rx4Token.Packet.RxData = &Wrap->TcpWrap.Rx4Data;
|
||||||
TcpWrap->Rx4Token.CompletionToken.Status = EFI_NOT_READY;
|
TcpWrap->Rx4Token.CompletionToken.Status = EFI_NOT_READY;
|
||||||
@ -563,7 +563,7 @@ HttpCreateTcpRxEvent (
|
|||||||
HttpTcpReceiveNotify,
|
HttpTcpReceiveNotify,
|
||||||
Wrap,
|
Wrap,
|
||||||
&TcpWrap->Rx6Token.CompletionToken.Event
|
&TcpWrap->Rx6Token.CompletionToken.Event
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
@ -572,7 +572,7 @@ HttpCreateTcpRxEvent (
|
|||||||
TcpWrap->Rx6Token.Packet.RxData = &Wrap->TcpWrap.Rx6Data;
|
TcpWrap->Rx6Token.Packet.RxData = &Wrap->TcpWrap.Rx6Data;
|
||||||
TcpWrap->Rx6Token.CompletionToken.Status = EFI_NOT_READY;
|
TcpWrap->Rx6Token.CompletionToken.Status = EFI_NOT_READY;
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -580,7 +580,7 @@ HttpCreateTcpRxEvent (
|
|||||||
Close Events for Tcp Receive Tokens for HTTP body and HTTP header.
|
Close Events for Tcp Receive Tokens for HTTP body and HTTP header.
|
||||||
|
|
||||||
@param[in] Wrap Pointer to HTTP token's wrap data.
|
@param[in] Wrap Pointer to HTTP token's wrap data.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
HttpCloseTcpRxEvent (
|
HttpCloseTcpRxEvent (
|
||||||
@ -591,7 +591,7 @@ HttpCloseTcpRxEvent (
|
|||||||
|
|
||||||
ASSERT (Wrap != NULL);
|
ASSERT (Wrap != NULL);
|
||||||
HttpInstance = Wrap->HttpInstance;
|
HttpInstance = Wrap->HttpInstance;
|
||||||
|
|
||||||
if (HttpInstance->LocalAddressIsIPv6) {
|
if (HttpInstance->LocalAddressIsIPv6) {
|
||||||
if (Wrap->TcpWrap.Rx6Token.CompletionToken.Event != NULL) {
|
if (Wrap->TcpWrap.Rx6Token.CompletionToken.Event != NULL) {
|
||||||
gBS->CloseEvent (Wrap->TcpWrap.Rx6Token.CompletionToken.Event);
|
gBS->CloseEvent (Wrap->TcpWrap.Rx6Token.CompletionToken.Event);
|
||||||
@ -605,7 +605,7 @@ HttpCloseTcpRxEvent (
|
|||||||
if (Wrap->TcpWrap.Rx4Token.CompletionToken.Event != NULL) {
|
if (Wrap->TcpWrap.Rx4Token.CompletionToken.Event != NULL) {
|
||||||
gBS->CloseEvent (Wrap->TcpWrap.Rx4Token.CompletionToken.Event);
|
gBS->CloseEvent (Wrap->TcpWrap.Rx4Token.CompletionToken.Event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HttpInstance->Rx4Token.CompletionToken.Event != NULL) {
|
if (HttpInstance->Rx4Token.CompletionToken.Event != NULL) {
|
||||||
gBS->CloseEvent (HttpInstance->Rx4Token.CompletionToken.Event);
|
gBS->CloseEvent (HttpInstance->Rx4Token.CompletionToken.Event);
|
||||||
HttpInstance->Rx4Token.CompletionToken.Event = NULL;
|
HttpInstance->Rx4Token.CompletionToken.Event = NULL;
|
||||||
@ -619,7 +619,7 @@ HttpCloseTcpRxEvent (
|
|||||||
@param[in, out] HttpInstance Pointer to HTTP_PROTOCOL structure.
|
@param[in, out] HttpInstance Pointer to HTTP_PROTOCOL structure.
|
||||||
@param[in] IpVersion Indicate us TCP4 protocol or TCP6 protocol.
|
@param[in] IpVersion Indicate us TCP4 protocol or TCP6 protocol.
|
||||||
|
|
||||||
@retval EFI_SUCCESS HTTP_PROTOCOL structure is initialized successfully.
|
@retval EFI_SUCCESS HTTP_PROTOCOL structure is initialized successfully.
|
||||||
@retval Others Other error as indicated.
|
@retval Others Other error as indicated.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -632,10 +632,10 @@ HttpInitProtocol (
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
VOID *Interface;
|
VOID *Interface;
|
||||||
BOOLEAN UsingIpv6;
|
BOOLEAN UsingIpv6;
|
||||||
|
|
||||||
ASSERT (HttpInstance != NULL);
|
ASSERT (HttpInstance != NULL);
|
||||||
UsingIpv6 = IpVersion;
|
UsingIpv6 = IpVersion;
|
||||||
|
|
||||||
if (!UsingIpv6) {
|
if (!UsingIpv6) {
|
||||||
//
|
//
|
||||||
// Create TCP4 child.
|
// Create TCP4 child.
|
||||||
@ -659,7 +659,7 @@ HttpInitProtocol (
|
|||||||
HttpInstance->Service->ControllerHandle,
|
HttpInstance->Service->ControllerHandle,
|
||||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||||
);
|
);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
@ -710,7 +710,7 @@ HttpInitProtocol (
|
|||||||
HttpInstance->Service->ControllerHandle,
|
HttpInstance->Service->ControllerHandle,
|
||||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||||
);
|
);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
@ -723,10 +723,10 @@ HttpInitProtocol (
|
|||||||
HttpInstance->Handle,
|
HttpInstance->Handle,
|
||||||
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
||||||
);
|
);
|
||||||
|
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gBS->OpenProtocol (
|
Status = gBS->OpenProtocol (
|
||||||
HttpInstance->Service->Tcp6ChildHandle,
|
HttpInstance->Service->Tcp6ChildHandle,
|
||||||
@ -741,7 +741,7 @@ HttpInitProtocol (
|
|||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpInstance->Url = AllocateZeroPool (HTTP_URL_BUFFER_LEN);
|
HttpInstance->Url = AllocateZeroPool (HTTP_URL_BUFFER_LEN);
|
||||||
if (HttpInstance->Url == NULL) {
|
if (HttpInstance->Url == NULL) {
|
||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
@ -751,7 +751,7 @@ HttpInitProtocol (
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
ON_ERROR:
|
ON_ERROR:
|
||||||
|
|
||||||
if (HttpInstance->Tcp4ChildHandle != NULL) {
|
if (HttpInstance->Tcp4ChildHandle != NULL) {
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
HttpInstance->Tcp4ChildHandle,
|
HttpInstance->Tcp4ChildHandle,
|
||||||
@ -765,8 +765,8 @@ ON_ERROR:
|
|||||||
&gEfiTcp4ProtocolGuid,
|
&gEfiTcp4ProtocolGuid,
|
||||||
HttpInstance->Service->Ip4DriverBindingHandle,
|
HttpInstance->Service->Ip4DriverBindingHandle,
|
||||||
HttpInstance->Handle
|
HttpInstance->Handle
|
||||||
);
|
);
|
||||||
|
|
||||||
NetLibDestroyServiceChild (
|
NetLibDestroyServiceChild (
|
||||||
HttpInstance->Service->ControllerHandle,
|
HttpInstance->Service->ControllerHandle,
|
||||||
HttpInstance->Service->Ip4DriverBindingHandle,
|
HttpInstance->Service->Ip4DriverBindingHandle,
|
||||||
@ -774,7 +774,7 @@ ON_ERROR:
|
|||||||
HttpInstance->Tcp4ChildHandle
|
HttpInstance->Tcp4ChildHandle
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HttpInstance->Service->Tcp4ChildHandle != NULL) {
|
if (HttpInstance->Service->Tcp4ChildHandle != NULL) {
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
HttpInstance->Service->Tcp4ChildHandle,
|
HttpInstance->Service->Tcp4ChildHandle,
|
||||||
@ -783,7 +783,7 @@ ON_ERROR:
|
|||||||
HttpInstance->Handle
|
HttpInstance->Handle
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HttpInstance->Tcp6ChildHandle != NULL) {
|
if (HttpInstance->Tcp6ChildHandle != NULL) {
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
HttpInstance->Tcp6ChildHandle,
|
HttpInstance->Tcp6ChildHandle,
|
||||||
@ -798,7 +798,7 @@ ON_ERROR:
|
|||||||
HttpInstance->Service->Ip6DriverBindingHandle,
|
HttpInstance->Service->Ip6DriverBindingHandle,
|
||||||
HttpInstance->Handle
|
HttpInstance->Handle
|
||||||
);
|
);
|
||||||
|
|
||||||
NetLibDestroyServiceChild (
|
NetLibDestroyServiceChild (
|
||||||
HttpInstance->Service->ControllerHandle,
|
HttpInstance->Service->ControllerHandle,
|
||||||
HttpInstance->Service->Ip6DriverBindingHandle,
|
HttpInstance->Service->Ip6DriverBindingHandle,
|
||||||
@ -806,7 +806,7 @@ ON_ERROR:
|
|||||||
HttpInstance->Tcp6ChildHandle
|
HttpInstance->Tcp6ChildHandle
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HttpInstance->Service->Tcp6ChildHandle != NULL) {
|
if (HttpInstance->Service->Tcp6ChildHandle != NULL) {
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
HttpInstance->Service->Tcp6ChildHandle,
|
HttpInstance->Service->Tcp6ChildHandle,
|
||||||
@ -817,7 +817,7 @@ ON_ERROR:
|
|||||||
}
|
}
|
||||||
|
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -832,7 +832,7 @@ HttpCleanProtocol (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
HttpCloseConnection (HttpInstance);
|
HttpCloseConnection (HttpInstance);
|
||||||
|
|
||||||
HttpCloseTcpConnCloseEvent (HttpInstance);
|
HttpCloseTcpConnCloseEvent (HttpInstance);
|
||||||
|
|
||||||
if (HttpInstance->TimeoutEvent != NULL) {
|
if (HttpInstance->TimeoutEvent != NULL) {
|
||||||
@ -855,18 +855,18 @@ HttpCleanProtocol (
|
|||||||
HttpFreeMsgParser (HttpInstance->MsgParser);
|
HttpFreeMsgParser (HttpInstance->MsgParser);
|
||||||
HttpInstance->MsgParser = NULL;
|
HttpInstance->MsgParser = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HttpInstance->Url != NULL) {
|
if (HttpInstance->Url != NULL) {
|
||||||
FreePool (HttpInstance->Url);
|
FreePool (HttpInstance->Url);
|
||||||
HttpInstance->Url = NULL;
|
HttpInstance->Url = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
NetMapClean (&HttpInstance->TxTokens);
|
NetMapClean (&HttpInstance->TxTokens);
|
||||||
NetMapClean (&HttpInstance->RxTokens);
|
NetMapClean (&HttpInstance->RxTokens);
|
||||||
|
|
||||||
if (HttpInstance->TlsSb != NULL && HttpInstance->TlsChildHandle != NULL) {
|
if (HttpInstance->TlsSb != NULL && HttpInstance->TlsChildHandle != NULL) {
|
||||||
//
|
//
|
||||||
// Destroy the TLS instance.
|
// Destroy the TLS instance.
|
||||||
//
|
//
|
||||||
HttpInstance->TlsSb->DestroyChild (HttpInstance->TlsSb, HttpInstance->TlsChildHandle);
|
HttpInstance->TlsSb->DestroyChild (HttpInstance->TlsSb, HttpInstance->TlsChildHandle);
|
||||||
}
|
}
|
||||||
@ -885,7 +885,7 @@ HttpCleanProtocol (
|
|||||||
HttpInstance->Service->Ip4DriverBindingHandle,
|
HttpInstance->Service->Ip4DriverBindingHandle,
|
||||||
HttpInstance->Handle
|
HttpInstance->Handle
|
||||||
);
|
);
|
||||||
|
|
||||||
NetLibDestroyServiceChild (
|
NetLibDestroyServiceChild (
|
||||||
HttpInstance->Service->ControllerHandle,
|
HttpInstance->Service->ControllerHandle,
|
||||||
HttpInstance->Service->Ip4DriverBindingHandle,
|
HttpInstance->Service->Ip4DriverBindingHandle,
|
||||||
@ -901,7 +901,7 @@ HttpCleanProtocol (
|
|||||||
HttpInstance->Service->Ip4DriverBindingHandle,
|
HttpInstance->Service->Ip4DriverBindingHandle,
|
||||||
HttpInstance->Handle
|
HttpInstance->Handle
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HttpInstance->Tcp6ChildHandle != NULL) {
|
if (HttpInstance->Tcp6ChildHandle != NULL) {
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
@ -917,7 +917,7 @@ HttpCleanProtocol (
|
|||||||
HttpInstance->Service->Ip6DriverBindingHandle,
|
HttpInstance->Service->Ip6DriverBindingHandle,
|
||||||
HttpInstance->Handle
|
HttpInstance->Handle
|
||||||
);
|
);
|
||||||
|
|
||||||
NetLibDestroyServiceChild (
|
NetLibDestroyServiceChild (
|
||||||
HttpInstance->Service->ControllerHandle,
|
HttpInstance->Service->ControllerHandle,
|
||||||
HttpInstance->Service->Ip6DriverBindingHandle,
|
HttpInstance->Service->Ip6DriverBindingHandle,
|
||||||
@ -925,7 +925,7 @@ HttpCleanProtocol (
|
|||||||
HttpInstance->Tcp6ChildHandle
|
HttpInstance->Tcp6ChildHandle
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HttpInstance->Service->Tcp6ChildHandle != NULL) {
|
if (HttpInstance->Service->Tcp6ChildHandle != NULL) {
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
HttpInstance->Service->Tcp6ChildHandle,
|
HttpInstance->Service->Tcp6ChildHandle,
|
||||||
@ -935,7 +935,7 @@ HttpCleanProtocol (
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
TlsCloseTxRxEvent (HttpInstance);
|
TlsCloseTxRxEvent (HttpInstance);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -965,13 +965,13 @@ HttpCreateConnection (
|
|||||||
DEBUG ((EFI_D_ERROR, "HttpCreateConnection: Tcp4->Connect() = %r\n", Status));
|
DEBUG ((EFI_D_ERROR, "HttpCreateConnection: Tcp4->Connect() = %r\n", Status));
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!HttpInstance->IsTcp4ConnDone) {
|
while (!HttpInstance->IsTcp4ConnDone) {
|
||||||
HttpInstance->Tcp4->Poll (HttpInstance->Tcp4);
|
HttpInstance->Tcp4->Poll (HttpInstance->Tcp4);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = HttpInstance->Tcp4ConnToken.CompletionToken.Status;
|
Status = HttpInstance->Tcp4ConnToken.CompletionToken.Status;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
HttpInstance->IsTcp6ConnDone = FALSE;
|
HttpInstance->IsTcp6ConnDone = FALSE;
|
||||||
HttpInstance->Tcp6ConnToken.CompletionToken.Status = EFI_NOT_READY;
|
HttpInstance->Tcp6ConnToken.CompletionToken.Status = EFI_NOT_READY;
|
||||||
@ -985,9 +985,9 @@ HttpCreateConnection (
|
|||||||
HttpInstance->Tcp6->Poll (HttpInstance->Tcp6);
|
HttpInstance->Tcp6->Poll (HttpInstance->Tcp6);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = HttpInstance->Tcp6ConnToken.CompletionToken.Status;
|
Status = HttpInstance->Tcp6ConnToken.CompletionToken.Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
HttpInstance->State = HTTP_STATE_TCP_CONNECTED;
|
HttpInstance->State = HTTP_STATE_TCP_CONNECTED;
|
||||||
}
|
}
|
||||||
@ -1024,7 +1024,7 @@ HttpCloseConnection (
|
|||||||
while (!HttpInstance->IsTcp6CloseDone) {
|
while (!HttpInstance->IsTcp6CloseDone) {
|
||||||
HttpInstance->Tcp6->Poll (HttpInstance->Tcp6);
|
HttpInstance->Tcp6->Poll (HttpInstance->Tcp6);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
HttpInstance->Tcp4CloseToken.AbortOnClose = TRUE;
|
HttpInstance->Tcp4CloseToken.AbortOnClose = TRUE;
|
||||||
HttpInstance->IsTcp4CloseDone = FALSE;
|
HttpInstance->IsTcp4CloseDone = FALSE;
|
||||||
@ -1070,7 +1070,7 @@ HttpConfigureTcp4 (
|
|||||||
|
|
||||||
Tcp4CfgData = &HttpInstance->Tcp4CfgData;
|
Tcp4CfgData = &HttpInstance->Tcp4CfgData;
|
||||||
ZeroMem (Tcp4CfgData, sizeof (EFI_TCP4_CONFIG_DATA));
|
ZeroMem (Tcp4CfgData, sizeof (EFI_TCP4_CONFIG_DATA));
|
||||||
|
|
||||||
Tcp4CfgData->TypeOfService = HTTP_TOS_DEAULT;
|
Tcp4CfgData->TypeOfService = HTTP_TOS_DEAULT;
|
||||||
Tcp4CfgData->TimeToLive = HTTP_TTL_DEAULT;
|
Tcp4CfgData->TimeToLive = HTTP_TTL_DEAULT;
|
||||||
Tcp4CfgData->ControlOption = &HttpInstance->Tcp4Option;
|
Tcp4CfgData->ControlOption = &HttpInstance->Tcp4Option;
|
||||||
@ -1081,7 +1081,7 @@ HttpConfigureTcp4 (
|
|||||||
IP4_COPY_ADDRESS (&Tcp4AP->StationAddress, &HttpInstance->IPv4Node.LocalAddress);
|
IP4_COPY_ADDRESS (&Tcp4AP->StationAddress, &HttpInstance->IPv4Node.LocalAddress);
|
||||||
IP4_COPY_ADDRESS (&Tcp4AP->SubnetMask, &HttpInstance->IPv4Node.LocalSubnet);
|
IP4_COPY_ADDRESS (&Tcp4AP->SubnetMask, &HttpInstance->IPv4Node.LocalSubnet);
|
||||||
}
|
}
|
||||||
|
|
||||||
Tcp4AP->StationPort = HttpInstance->IPv4Node.LocalPort;
|
Tcp4AP->StationPort = HttpInstance->IPv4Node.LocalPort;
|
||||||
Tcp4AP->RemotePort = HttpInstance->RemotePort;
|
Tcp4AP->RemotePort = HttpInstance->RemotePort;
|
||||||
Tcp4AP->ActiveFlag = TRUE;
|
Tcp4AP->ActiveFlag = TRUE;
|
||||||
@ -1141,16 +1141,16 @@ HttpConfigureTcp6 (
|
|||||||
EFI_TCP6_CONFIG_DATA *Tcp6CfgData;
|
EFI_TCP6_CONFIG_DATA *Tcp6CfgData;
|
||||||
EFI_TCP6_ACCESS_POINT *Tcp6Ap;
|
EFI_TCP6_ACCESS_POINT *Tcp6Ap;
|
||||||
EFI_TCP6_OPTION *Tcp6Option;
|
EFI_TCP6_OPTION *Tcp6Option;
|
||||||
|
|
||||||
ASSERT (HttpInstance != NULL);
|
ASSERT (HttpInstance != NULL);
|
||||||
|
|
||||||
Tcp6CfgData = &HttpInstance->Tcp6CfgData;
|
Tcp6CfgData = &HttpInstance->Tcp6CfgData;
|
||||||
ZeroMem (Tcp6CfgData, sizeof (EFI_TCP6_CONFIG_DATA));
|
ZeroMem (Tcp6CfgData, sizeof (EFI_TCP6_CONFIG_DATA));
|
||||||
|
|
||||||
Tcp6CfgData->TrafficClass = 0;
|
Tcp6CfgData->TrafficClass = 0;
|
||||||
Tcp6CfgData->HopLimit = 255;
|
Tcp6CfgData->HopLimit = 255;
|
||||||
Tcp6CfgData->ControlOption = &HttpInstance->Tcp6Option;
|
Tcp6CfgData->ControlOption = &HttpInstance->Tcp6Option;
|
||||||
|
|
||||||
Tcp6Ap = &Tcp6CfgData->AccessPoint;
|
Tcp6Ap = &Tcp6CfgData->AccessPoint;
|
||||||
Tcp6Ap->ActiveFlag = TRUE;
|
Tcp6Ap->ActiveFlag = TRUE;
|
||||||
Tcp6Ap->StationPort = HttpInstance->Ipv6Node.LocalPort;
|
Tcp6Ap->StationPort = HttpInstance->Ipv6Node.LocalPort;
|
||||||
@ -1175,7 +1175,7 @@ HttpConfigureTcp6 (
|
|||||||
DEBUG ((EFI_D_ERROR, "HttpConfigureTcp6 - %r\n", Status));
|
DEBUG ((EFI_D_ERROR, "HttpConfigureTcp6 - %r\n", Status));
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = HttpCreateTcpConnCloseEvent (HttpInstance);
|
Status = HttpCreateTcpConnCloseEvent (HttpInstance);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
@ -1189,11 +1189,11 @@ HttpConfigureTcp6 (
|
|||||||
HttpInstance->State = HTTP_STATE_TCP_CONFIGED;
|
HttpInstance->State = HTTP_STATE_TCP_CONFIGED;
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Check existing TCP connection, if in error state, recover TCP4 connection. Then,
|
Check existing TCP connection, if in error state, recover TCP4 connection. Then,
|
||||||
connect one TLS session if required.
|
connect one TLS session if required.
|
||||||
|
|
||||||
@param[in] HttpInstance The HTTP instance private data.
|
@param[in] HttpInstance The HTTP instance private data.
|
||||||
@ -1217,8 +1217,8 @@ HttpConnectTcp4 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
Status = HttpInstance->Tcp4->GetModeData(
|
Status = HttpInstance->Tcp4->GetModeData(
|
||||||
HttpInstance->Tcp4,
|
HttpInstance->Tcp4,
|
||||||
&Tcp4State,
|
&Tcp4State,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
@ -1240,7 +1240,7 @@ HttpConnectTcp4 (
|
|||||||
DEBUG ((EFI_D_ERROR, "Tcp4 Connection fail - %x\n", Status));
|
DEBUG ((EFI_D_ERROR, "Tcp4 Connection fail - %x\n", Status));
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Tls session connection.
|
// Tls session connection.
|
||||||
//
|
//
|
||||||
@ -1270,11 +1270,11 @@ HttpConnectTcp4 (
|
|||||||
TlsCloseTxRxEvent (HttpInstance);
|
TlsCloseTxRxEvent (HttpInstance);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = TlsConnectSession (HttpInstance, HttpInstance->TimeoutEvent);
|
Status = TlsConnectSession (HttpInstance, HttpInstance->TimeoutEvent);
|
||||||
|
|
||||||
gBS->SetTimer (HttpInstance->TimeoutEvent, TimerCancel, 0);
|
gBS->SetTimer (HttpInstance->TimeoutEvent, TimerCancel, 0);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
TlsCloseTxRxEvent (HttpInstance);
|
TlsCloseTxRxEvent (HttpInstance);
|
||||||
return Status;
|
return Status;
|
||||||
@ -1285,7 +1285,7 @@ HttpConnectTcp4 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Check existing TCP connection, if in error state, recover TCP6 connection. Then,
|
Check existing TCP connection, if in error state, recover TCP6 connection. Then,
|
||||||
connect one TLS session if required.
|
connect one TLS session if required.
|
||||||
|
|
||||||
@param[in] HttpInstance The HTTP instance private data.
|
@param[in] HttpInstance The HTTP instance private data.
|
||||||
@ -1315,7 +1315,7 @@ HttpConnectTcp6 (
|
|||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
if (EFI_ERROR(Status)){
|
if (EFI_ERROR(Status)){
|
||||||
DEBUG ((EFI_D_ERROR, "Tcp6 GetModeData fail - %x\n", Status));
|
DEBUG ((EFI_D_ERROR, "Tcp6 GetModeData fail - %x\n", Status));
|
||||||
return Status;
|
return Status;
|
||||||
@ -1332,7 +1332,7 @@ HttpConnectTcp6 (
|
|||||||
DEBUG ((EFI_D_ERROR, "Tcp6 Connection fail - %x\n", Status));
|
DEBUG ((EFI_D_ERROR, "Tcp6 Connection fail - %x\n", Status));
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Tls session connection.
|
// Tls session connection.
|
||||||
//
|
//
|
||||||
@ -1362,11 +1362,11 @@ HttpConnectTcp6 (
|
|||||||
TlsCloseTxRxEvent (HttpInstance);
|
TlsCloseTxRxEvent (HttpInstance);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = TlsConnectSession (HttpInstance, HttpInstance->TimeoutEvent);
|
Status = TlsConnectSession (HttpInstance, HttpInstance->TimeoutEvent);
|
||||||
|
|
||||||
gBS->SetTimer (HttpInstance->TimeoutEvent, TimerCancel, 0);
|
gBS->SetTimer (HttpInstance->TimeoutEvent, TimerCancel, 0);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
TlsCloseTxRxEvent (HttpInstance);
|
TlsCloseTxRxEvent (HttpInstance);
|
||||||
return Status;
|
return Status;
|
||||||
@ -1384,7 +1384,7 @@ HttpConnectTcp6 (
|
|||||||
@param[in] Configure The Flag indicates whether need to initialize session.
|
@param[in] Configure The Flag indicates whether need to initialize session.
|
||||||
@param[in] TlsConfigure The Flag indicates whether it's the new Tls session.
|
@param[in] TlsConfigure The Flag indicates whether it's the new Tls session.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The initialization of session is done.
|
@retval EFI_SUCCESS The initialization of session is done.
|
||||||
@retval Others Other error as indicated.
|
@retval Others Other error as indicated.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -1446,9 +1446,9 @@ HttpInitSession (
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1476,7 +1476,7 @@ HttpTransmitTcp (
|
|||||||
EFI_TCP4_PROTOCOL *Tcp4;
|
EFI_TCP4_PROTOCOL *Tcp4;
|
||||||
EFI_TCP6_IO_TOKEN *Tx6Token;
|
EFI_TCP6_IO_TOKEN *Tx6Token;
|
||||||
EFI_TCP6_PROTOCOL *Tcp6;
|
EFI_TCP6_PROTOCOL *Tcp6;
|
||||||
UINT8 *TlsRecord;
|
UINT8 *TlsRecord;
|
||||||
UINT16 PayloadSize;
|
UINT16 PayloadSize;
|
||||||
NET_FRAGMENT TempFragment;
|
NET_FRAGMENT TempFragment;
|
||||||
NET_FRAGMENT Fragment;
|
NET_FRAGMENT Fragment;
|
||||||
@ -1522,19 +1522,19 @@ HttpTransmitTcp (
|
|||||||
RemainingLen = TxStringLen;
|
RemainingLen = TxStringLen;
|
||||||
while (RemainingLen != 0) {
|
while (RemainingLen != 0) {
|
||||||
PayloadSize = (UINT16) MIN (TLS_PLAINTEXT_RECORD_MAX_PAYLOAD_LENGTH, RemainingLen);
|
PayloadSize = (UINT16) MIN (TLS_PLAINTEXT_RECORD_MAX_PAYLOAD_LENGTH, RemainingLen);
|
||||||
|
|
||||||
((TLS_RECORD_HEADER *) TlsRecord)->ContentType = TlsContentTypeApplicationData;
|
((TLS_RECORD_HEADER *) TlsRecord)->ContentType = TlsContentTypeApplicationData;
|
||||||
((TLS_RECORD_HEADER *) TlsRecord)->Version.Major = HttpInstance->TlsConfigData.Version.Major;
|
((TLS_RECORD_HEADER *) TlsRecord)->Version.Major = HttpInstance->TlsConfigData.Version.Major;
|
||||||
((TLS_RECORD_HEADER *) TlsRecord)->Version.Minor = HttpInstance->TlsConfigData.Version.Minor;
|
((TLS_RECORD_HEADER *) TlsRecord)->Version.Minor = HttpInstance->TlsConfigData.Version.Minor;
|
||||||
((TLS_RECORD_HEADER *) TlsRecord)->Length = PayloadSize;
|
((TLS_RECORD_HEADER *) TlsRecord)->Length = PayloadSize;
|
||||||
|
|
||||||
CopyMem (TlsRecord + TLS_RECORD_HEADER_LENGTH, TxString + (TxStringLen - RemainingLen), PayloadSize);
|
CopyMem (TlsRecord + TLS_RECORD_HEADER_LENGTH, TxString + (TxStringLen - RemainingLen), PayloadSize);
|
||||||
|
|
||||||
Status = TlsProcessMessage (
|
Status = TlsProcessMessage (
|
||||||
HttpInstance,
|
HttpInstance,
|
||||||
TlsRecord,
|
TlsRecord,
|
||||||
TLS_RECORD_HEADER_LENGTH + PayloadSize,
|
TLS_RECORD_HEADER_LENGTH + PayloadSize,
|
||||||
EfiTlsEncrypt,
|
EfiTlsEncrypt,
|
||||||
&TempFragment
|
&TempFragment
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
@ -1542,7 +1542,7 @@ HttpTransmitTcp (
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Record the processed/encrypted Packet.
|
// Record the processed/encrypted Packet.
|
||||||
//
|
//
|
||||||
CopyMem (Fragment.Bulk + Fragment.Len, TempFragment.Bulk, TempFragment.Len);
|
CopyMem (Fragment.Bulk + Fragment.Len, TempFragment.Bulk, TempFragment.Len);
|
||||||
Fragment.Len += TempFragment.Len;
|
Fragment.Len += TempFragment.Len;
|
||||||
@ -1550,7 +1550,7 @@ HttpTransmitTcp (
|
|||||||
FreePool (TempFragment.Bulk);
|
FreePool (TempFragment.Bulk);
|
||||||
TempFragment.Len = 0;
|
TempFragment.Len = 0;
|
||||||
TempFragment.Bulk = NULL;
|
TempFragment.Bulk = NULL;
|
||||||
|
|
||||||
RemainingLen -= (UINTN) PayloadSize;
|
RemainingLen -= (UINTN) PayloadSize;
|
||||||
ZeroMem (TlsRecord, TLS_RECORD_HEADER_LENGTH + TLS_PLAINTEXT_RECORD_MAX_PAYLOAD_LENGTH);
|
ZeroMem (TlsRecord, TLS_RECORD_HEADER_LENGTH + TLS_PLAINTEXT_RECORD_MAX_PAYLOAD_LENGTH);
|
||||||
}
|
}
|
||||||
@ -1558,7 +1558,7 @@ HttpTransmitTcp (
|
|||||||
FreePool (TlsRecord);
|
FreePool (TlsRecord);
|
||||||
TlsRecord = NULL;
|
TlsRecord = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!HttpInstance->LocalAddressIsIPv6) {
|
if (!HttpInstance->LocalAddressIsIPv6) {
|
||||||
Tcp4 = HttpInstance->Tcp4;
|
Tcp4 = HttpInstance->Tcp4;
|
||||||
Tx4Token = &Wrap->TcpWrap.Tx4Token;
|
Tx4Token = &Wrap->TcpWrap.Tx4Token;
|
||||||
@ -1572,9 +1572,9 @@ HttpTransmitTcp (
|
|||||||
Tx4Token->Packet.TxData->FragmentTable[0].FragmentLength = (UINT32) TxStringLen;
|
Tx4Token->Packet.TxData->FragmentTable[0].FragmentLength = (UINT32) TxStringLen;
|
||||||
Tx4Token->Packet.TxData->FragmentTable[0].FragmentBuffer = (VOID *) TxString;
|
Tx4Token->Packet.TxData->FragmentTable[0].FragmentBuffer = (VOID *) TxString;
|
||||||
}
|
}
|
||||||
|
|
||||||
Tx4Token->CompletionToken.Status = EFI_NOT_READY;
|
Tx4Token->CompletionToken.Status = EFI_NOT_READY;
|
||||||
|
|
||||||
Wrap->TcpWrap.IsTxDone = FALSE;
|
Wrap->TcpWrap.IsTxDone = FALSE;
|
||||||
Status = Tcp4->Transmit (Tcp4, Tx4Token);
|
Status = Tcp4->Transmit (Tcp4, Tx4Token);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
@ -1585,7 +1585,7 @@ HttpTransmitTcp (
|
|||||||
} else {
|
} else {
|
||||||
Tcp6 = HttpInstance->Tcp6;
|
Tcp6 = HttpInstance->Tcp6;
|
||||||
Tx6Token = &Wrap->TcpWrap.Tx6Token;
|
Tx6Token = &Wrap->TcpWrap.Tx6Token;
|
||||||
|
|
||||||
if (HttpInstance->UseHttps) {
|
if (HttpInstance->UseHttps) {
|
||||||
Tx6Token->Packet.TxData->DataLength = Fragment.Len;
|
Tx6Token->Packet.TxData->DataLength = Fragment.Len;
|
||||||
Tx6Token->Packet.TxData->FragmentTable[0].FragmentLength = Fragment.Len;
|
Tx6Token->Packet.TxData->FragmentTable[0].FragmentLength = Fragment.Len;
|
||||||
@ -1595,7 +1595,7 @@ HttpTransmitTcp (
|
|||||||
Tx6Token->Packet.TxData->FragmentTable[0].FragmentLength = (UINT32) TxStringLen;
|
Tx6Token->Packet.TxData->FragmentTable[0].FragmentLength = (UINT32) TxStringLen;
|
||||||
Tx6Token->Packet.TxData->FragmentTable[0].FragmentBuffer = (VOID *) TxString;
|
Tx6Token->Packet.TxData->FragmentTable[0].FragmentBuffer = (VOID *) TxString;
|
||||||
}
|
}
|
||||||
|
|
||||||
Tx6Token->CompletionToken.Status = EFI_NOT_READY;
|
Tx6Token->CompletionToken.Status = EFI_NOT_READY;
|
||||||
|
|
||||||
Wrap->TcpWrap.IsTxDone = FALSE;
|
Wrap->TcpWrap.IsTxDone = FALSE;
|
||||||
@ -1605,17 +1605,17 @@ HttpTransmitTcp (
|
|||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
||||||
ON_ERROR:
|
ON_ERROR:
|
||||||
|
|
||||||
if (HttpInstance->UseHttps) {
|
if (HttpInstance->UseHttps) {
|
||||||
if (TlsRecord != NULL) {
|
if (TlsRecord != NULL) {
|
||||||
FreePool (TlsRecord);
|
FreePool (TlsRecord);
|
||||||
TlsRecord = NULL;
|
TlsRecord = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Fragment.Bulk != NULL) {
|
if (Fragment.Bulk != NULL) {
|
||||||
FreePool (Fragment.Bulk);
|
FreePool (Fragment.Bulk);
|
||||||
Fragment.Bulk = NULL;
|
Fragment.Bulk = NULL;
|
||||||
@ -1686,7 +1686,7 @@ HttpTcpNotReady (
|
|||||||
if (!ValueInItem->TcpWrap.IsTxDone) {
|
if (!ValueInItem->TcpWrap.IsTxDone) {
|
||||||
return EFI_NOT_READY;
|
return EFI_NOT_READY;
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1798,8 +1798,8 @@ HttpTcpReceive (
|
|||||||
@param[in, out] SizeofHeaders The HTTP header length.
|
@param[in, out] SizeofHeaders The HTTP header length.
|
||||||
@param[in, out] BufferSize The size of buffer to cacahe the header message.
|
@param[in, out] BufferSize The size of buffer to cacahe the header message.
|
||||||
@param[in] Timeout The time to wait for receiving the header packet.
|
@param[in] Timeout The time to wait for receiving the header packet.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The HTTP header is received.
|
@retval EFI_SUCCESS The HTTP header is received.
|
||||||
@retval Others Other errors as indicated.
|
@retval Others Other errors as indicated.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -1832,7 +1832,7 @@ HttpTcpReceiveHeader (
|
|||||||
Rx6Token = NULL;
|
Rx6Token = NULL;
|
||||||
Fragment.Len = 0;
|
Fragment.Len = 0;
|
||||||
Fragment.Bulk = NULL;
|
Fragment.Bulk = NULL;
|
||||||
|
|
||||||
if (HttpInstance->LocalAddressIsIPv6) {
|
if (HttpInstance->LocalAddressIsIPv6) {
|
||||||
ASSERT (Tcp6 != NULL);
|
ASSERT (Tcp6 != NULL);
|
||||||
} else {
|
} else {
|
||||||
@ -1855,7 +1855,7 @@ HttpTcpReceiveHeader (
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Receive the HTTP headers only when EFI_HTTP_RESPONSE_DATA is not NULL.
|
// Receive the HTTP headers only when EFI_HTTP_RESPONSE_DATA is not NULL.
|
||||||
//
|
//
|
||||||
@ -1887,7 +1887,7 @@ HttpTcpReceiveHeader (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
Fragment.Len = Rx4Token->Packet.RxData->FragmentTable[0].FragmentLength;
|
Fragment.Len = Rx4Token->Packet.RxData->FragmentTable[0].FragmentLength;
|
||||||
Fragment.Bulk = (UINT8 *) Rx4Token->Packet.RxData->FragmentTable[0].FragmentBuffer;
|
Fragment.Bulk = (UINT8 *) Rx4Token->Packet.RxData->FragmentTable[0].FragmentBuffer;
|
||||||
} else {
|
} else {
|
||||||
@ -1895,7 +1895,7 @@ HttpTcpReceiveHeader (
|
|||||||
FreePool (Fragment.Bulk);
|
FreePool (Fragment.Bulk);
|
||||||
Fragment.Bulk = NULL;
|
Fragment.Bulk = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = HttpsReceive (HttpInstance, &Fragment, Timeout);
|
Status = HttpsReceive (HttpInstance, &Fragment, Timeout);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((EFI_D_ERROR, "Tcp4 receive failed: %r\n", Status));
|
DEBUG ((EFI_D_ERROR, "Tcp4 receive failed: %r\n", Status));
|
||||||
@ -1931,7 +1931,7 @@ HttpTcpReceiveHeader (
|
|||||||
//
|
//
|
||||||
*EndofHeader = AsciiStrStr (*HttpHeaders, HTTP_END_OF_HDR_STR);
|
*EndofHeader = AsciiStrStr (*HttpHeaders, HTTP_END_OF_HDR_STR);
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Free the buffer.
|
// Free the buffer.
|
||||||
//
|
//
|
||||||
@ -1944,7 +1944,7 @@ HttpTcpReceiveHeader (
|
|||||||
if (Fragment.Bulk != NULL) {
|
if (Fragment.Bulk != NULL) {
|
||||||
FreePool (Fragment.Bulk);
|
FreePool (Fragment.Bulk);
|
||||||
Fragment.Bulk = NULL;
|
Fragment.Bulk = NULL;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!HttpInstance->UseHttps) {
|
if (!HttpInstance->UseHttps) {
|
||||||
Rx6Token = &HttpInstance->Rx6Token;
|
Rx6Token = &HttpInstance->Rx6Token;
|
||||||
@ -1954,7 +1954,7 @@ HttpTcpReceiveHeader (
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Receive the HTTP headers only when EFI_HTTP_RESPONSE_DATA is not NULL.
|
// Receive the HTTP headers only when EFI_HTTP_RESPONSE_DATA is not NULL.
|
||||||
//
|
//
|
||||||
@ -1986,7 +1986,7 @@ HttpTcpReceiveHeader (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
Fragment.Len = Rx6Token->Packet.RxData->FragmentTable[0].FragmentLength;
|
Fragment.Len = Rx6Token->Packet.RxData->FragmentTable[0].FragmentLength;
|
||||||
Fragment.Bulk = (UINT8 *) Rx6Token->Packet.RxData->FragmentTable[0].FragmentBuffer;
|
Fragment.Bulk = (UINT8 *) Rx6Token->Packet.RxData->FragmentTable[0].FragmentBuffer;
|
||||||
} else {
|
} else {
|
||||||
@ -1994,7 +1994,7 @@ HttpTcpReceiveHeader (
|
|||||||
FreePool (Fragment.Bulk);
|
FreePool (Fragment.Bulk);
|
||||||
Fragment.Bulk = NULL;
|
Fragment.Bulk = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = HttpsReceive (HttpInstance, &Fragment, Timeout);
|
Status = HttpsReceive (HttpInstance, &Fragment, Timeout);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((EFI_D_ERROR, "Tcp6 receive failed: %r\n", Status));
|
DEBUG ((EFI_D_ERROR, "Tcp6 receive failed: %r\n", Status));
|
||||||
@ -2028,7 +2028,7 @@ HttpTcpReceiveHeader (
|
|||||||
//
|
//
|
||||||
// Check whether we received end of HTTP headers.
|
// Check whether we received end of HTTP headers.
|
||||||
//
|
//
|
||||||
*EndofHeader = AsciiStrStr (*HttpHeaders, HTTP_END_OF_HDR_STR);
|
*EndofHeader = AsciiStrStr (*HttpHeaders, HTTP_END_OF_HDR_STR);
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -2044,7 +2044,7 @@ HttpTcpReceiveHeader (
|
|||||||
FreePool (Fragment.Bulk);
|
FreePool (Fragment.Bulk);
|
||||||
Fragment.Bulk = NULL;
|
Fragment.Bulk = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Skip the CRLF after the HTTP headers.
|
// Skip the CRLF after the HTTP headers.
|
||||||
@ -2062,7 +2062,7 @@ HttpTcpReceiveHeader (
|
|||||||
@param[in] Wrap The HTTP token's wrap data.
|
@param[in] Wrap The HTTP token's wrap data.
|
||||||
@param[in] HttpMsg The HTTP message data.
|
@param[in] HttpMsg The HTTP message data.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The HTTP body is received.
|
@retval EFI_SUCCESS The HTTP body is received.
|
||||||
@retval Others Other error as indicated.
|
@retval Others Other error as indicated.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -2078,19 +2078,19 @@ HttpTcpReceiveBody (
|
|||||||
EFI_TCP6_IO_TOKEN *Rx6Token;
|
EFI_TCP6_IO_TOKEN *Rx6Token;
|
||||||
EFI_TCP4_PROTOCOL *Tcp4;
|
EFI_TCP4_PROTOCOL *Tcp4;
|
||||||
EFI_TCP4_IO_TOKEN *Rx4Token;
|
EFI_TCP4_IO_TOKEN *Rx4Token;
|
||||||
|
|
||||||
HttpInstance = Wrap->HttpInstance;
|
HttpInstance = Wrap->HttpInstance;
|
||||||
Tcp4 = HttpInstance->Tcp4;
|
Tcp4 = HttpInstance->Tcp4;
|
||||||
Tcp6 = HttpInstance->Tcp6;
|
Tcp6 = HttpInstance->Tcp6;
|
||||||
Rx4Token = NULL;
|
Rx4Token = NULL;
|
||||||
Rx6Token = NULL;
|
Rx6Token = NULL;
|
||||||
|
|
||||||
if (HttpInstance->LocalAddressIsIPv6) {
|
if (HttpInstance->LocalAddressIsIPv6) {
|
||||||
ASSERT (Tcp6 != NULL);
|
ASSERT (Tcp6 != NULL);
|
||||||
} else {
|
} else {
|
||||||
ASSERT (Tcp4 != NULL);
|
ASSERT (Tcp4 != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HttpInstance->LocalAddressIsIPv6) {
|
if (HttpInstance->LocalAddressIsIPv6) {
|
||||||
Rx6Token = &Wrap->TcpWrap.Rx6Token;
|
Rx6Token = &Wrap->TcpWrap.Rx6Token;
|
||||||
Rx6Token ->Packet.RxData->DataLength = (UINT32) MIN (MAX_UINT32, HttpMsg->BodyLength);
|
Rx6Token ->Packet.RxData->DataLength = (UINT32) MIN (MAX_UINT32, HttpMsg->BodyLength);
|
||||||
@ -2108,7 +2108,7 @@ HttpTcpReceiveBody (
|
|||||||
Rx4Token->Packet.RxData->DataLength = (UINT32) MIN (MAX_UINT32, HttpMsg->BodyLength);
|
Rx4Token->Packet.RxData->DataLength = (UINT32) MIN (MAX_UINT32, HttpMsg->BodyLength);
|
||||||
Rx4Token->Packet.RxData->FragmentTable[0].FragmentLength = (UINT32) MIN (MAX_UINT32, HttpMsg->BodyLength);
|
Rx4Token->Packet.RxData->FragmentTable[0].FragmentLength = (UINT32) MIN (MAX_UINT32, HttpMsg->BodyLength);
|
||||||
Rx4Token->Packet.RxData->FragmentTable[0].FragmentBuffer = (VOID *) HttpMsg->Body;
|
Rx4Token->Packet.RxData->FragmentTable[0].FragmentBuffer = (VOID *) HttpMsg->Body;
|
||||||
|
|
||||||
Rx4Token->CompletionToken.Status = EFI_NOT_READY;
|
Rx4Token->CompletionToken.Status = EFI_NOT_READY;
|
||||||
Status = Tcp4->Receive (Tcp4, Rx4Token);
|
Status = Tcp4->Receive (Tcp4, Rx4Token);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
@ -2125,13 +2125,13 @@ HttpTcpReceiveBody (
|
|||||||
Clean up Tcp Tokens while the Tcp transmission error occurs.
|
Clean up Tcp Tokens while the Tcp transmission error occurs.
|
||||||
|
|
||||||
@param[in] Wrap Pointer to HTTP token's wrap data.
|
@param[in] Wrap Pointer to HTTP token's wrap data.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
HttpTcpTokenCleanup (
|
HttpTcpTokenCleanup (
|
||||||
IN HTTP_TOKEN_WRAP *Wrap
|
IN HTTP_TOKEN_WRAP *Wrap
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
HTTP_PROTOCOL *HttpInstance;
|
HTTP_PROTOCOL *HttpInstance;
|
||||||
EFI_TCP4_IO_TOKEN *Rx4Token;
|
EFI_TCP4_IO_TOKEN *Rx4Token;
|
||||||
EFI_TCP6_IO_TOKEN *Rx6Token;
|
EFI_TCP6_IO_TOKEN *Rx6Token;
|
||||||
@ -2140,10 +2140,10 @@ HttpTcpTokenCleanup (
|
|||||||
HttpInstance = Wrap->HttpInstance;
|
HttpInstance = Wrap->HttpInstance;
|
||||||
Rx4Token = NULL;
|
Rx4Token = NULL;
|
||||||
Rx6Token = NULL;
|
Rx6Token = NULL;
|
||||||
|
|
||||||
if (HttpInstance->LocalAddressIsIPv6) {
|
if (HttpInstance->LocalAddressIsIPv6) {
|
||||||
Rx6Token = &Wrap->TcpWrap.Rx6Token;
|
Rx6Token = &Wrap->TcpWrap.Rx6Token;
|
||||||
|
|
||||||
if (Rx6Token->CompletionToken.Event != NULL) {
|
if (Rx6Token->CompletionToken.Event != NULL) {
|
||||||
gBS->CloseEvent (Rx6Token->CompletionToken.Event);
|
gBS->CloseEvent (Rx6Token->CompletionToken.Event);
|
||||||
Rx6Token->CompletionToken.Event = NULL;
|
Rx6Token->CompletionToken.Event = NULL;
|
||||||
@ -2152,25 +2152,25 @@ HttpTcpTokenCleanup (
|
|||||||
FreePool (Wrap);
|
FreePool (Wrap);
|
||||||
|
|
||||||
Rx6Token = &HttpInstance->Rx6Token;
|
Rx6Token = &HttpInstance->Rx6Token;
|
||||||
|
|
||||||
if (Rx6Token->CompletionToken.Event != NULL) {
|
if (Rx6Token->CompletionToken.Event != NULL) {
|
||||||
gBS->CloseEvent (Rx6Token->CompletionToken.Event);
|
gBS->CloseEvent (Rx6Token->CompletionToken.Event);
|
||||||
Rx6Token->CompletionToken.Event = NULL;
|
Rx6Token->CompletionToken.Event = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Rx6Token->Packet.RxData->FragmentTable[0].FragmentBuffer != NULL) {
|
if (Rx6Token->Packet.RxData->FragmentTable[0].FragmentBuffer != NULL) {
|
||||||
FreePool (Rx6Token->Packet.RxData->FragmentTable[0].FragmentBuffer);
|
FreePool (Rx6Token->Packet.RxData->FragmentTable[0].FragmentBuffer);
|
||||||
Rx6Token->Packet.RxData->FragmentTable[0].FragmentBuffer = NULL;
|
Rx6Token->Packet.RxData->FragmentTable[0].FragmentBuffer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Rx4Token = &Wrap->TcpWrap.Rx4Token;
|
Rx4Token = &Wrap->TcpWrap.Rx4Token;
|
||||||
|
|
||||||
if (Rx4Token->CompletionToken.Event != NULL) {
|
if (Rx4Token->CompletionToken.Event != NULL) {
|
||||||
gBS->CloseEvent (Rx4Token->CompletionToken.Event);
|
gBS->CloseEvent (Rx4Token->CompletionToken.Event);
|
||||||
Rx4Token->CompletionToken.Event = NULL;
|
Rx4Token->CompletionToken.Event = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
FreePool (Wrap);
|
FreePool (Wrap);
|
||||||
|
|
||||||
Rx4Token = &HttpInstance->Rx4Token;
|
Rx4Token = &HttpInstance->Rx4Token;
|
||||||
@ -2179,8 +2179,8 @@ HttpTcpTokenCleanup (
|
|||||||
gBS->CloseEvent (Rx4Token->CompletionToken.Event);
|
gBS->CloseEvent (Rx4Token->CompletionToken.Event);
|
||||||
Rx4Token->CompletionToken.Event = NULL;
|
Rx4Token->CompletionToken.Event = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (Rx4Token->Packet.RxData->FragmentTable[0].FragmentBuffer != NULL) {
|
if (Rx4Token->Packet.RxData->FragmentTable[0].FragmentBuffer != NULL) {
|
||||||
FreePool (Rx4Token->Packet.RxData->FragmentTable[0].FragmentBuffer);
|
FreePool (Rx4Token->Packet.RxData->FragmentTable[0].FragmentBuffer);
|
||||||
Rx4Token->Packet.RxData->FragmentTable[0].FragmentBuffer = NULL;
|
Rx4Token->Packet.RxData->FragmentTable[0].FragmentBuffer = NULL;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The header files of miscellaneous routines for HttpDxe driver.
|
The header files of miscellaneous routines for HttpDxe driver.
|
||||||
|
|
||||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -117,18 +117,18 @@ typedef struct _HTTP_PROTOCOL {
|
|||||||
CHAR8 *RemoteHost;
|
CHAR8 *RemoteHost;
|
||||||
UINT16 RemotePort;
|
UINT16 RemotePort;
|
||||||
EFI_IPv4_ADDRESS RemoteAddr;
|
EFI_IPv4_ADDRESS RemoteAddr;
|
||||||
|
|
||||||
EFI_HANDLE Tcp6ChildHandle;
|
EFI_HANDLE Tcp6ChildHandle;
|
||||||
EFI_TCP6_PROTOCOL *Tcp6;
|
EFI_TCP6_PROTOCOL *Tcp6;
|
||||||
EFI_TCP6_CONFIG_DATA Tcp6CfgData;
|
EFI_TCP6_CONFIG_DATA Tcp6CfgData;
|
||||||
EFI_TCP6_OPTION Tcp6Option;
|
EFI_TCP6_OPTION Tcp6Option;
|
||||||
|
|
||||||
EFI_TCP6_CONNECTION_TOKEN Tcp6ConnToken;
|
EFI_TCP6_CONNECTION_TOKEN Tcp6ConnToken;
|
||||||
BOOLEAN IsTcp6ConnDone;
|
BOOLEAN IsTcp6ConnDone;
|
||||||
EFI_TCP6_CLOSE_TOKEN Tcp6CloseToken;
|
EFI_TCP6_CLOSE_TOKEN Tcp6CloseToken;
|
||||||
BOOLEAN IsTcp6CloseDone;
|
BOOLEAN IsTcp6CloseDone;
|
||||||
EFI_IPv6_ADDRESS RemoteIpv6Addr;
|
EFI_IPv6_ADDRESS RemoteIpv6Addr;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Rx4Token or Rx6Token used for receiving HTTP header.
|
// Rx4Token or Rx6Token used for receiving HTTP header.
|
||||||
//
|
//
|
||||||
@ -149,7 +149,7 @@ typedef struct _HTTP_PROTOCOL {
|
|||||||
// HTTP message-body parser.
|
// HTTP message-body parser.
|
||||||
//
|
//
|
||||||
VOID *MsgParser;
|
VOID *MsgParser;
|
||||||
|
|
||||||
EFI_HTTP_VERSION HttpVersion;
|
EFI_HTTP_VERSION HttpVersion;
|
||||||
UINT32 TimeOutMillisec;
|
UINT32 TimeOutMillisec;
|
||||||
BOOLEAN LocalAddressIsIPv6;
|
BOOLEAN LocalAddressIsIPv6;
|
||||||
@ -211,7 +211,7 @@ typedef struct {
|
|||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The common notify function used in HTTP driver.
|
The common notify function used in HTTP driver.
|
||||||
|
|
||||||
@param[in] Event The event signaled.
|
@param[in] Event The event signaled.
|
||||||
@param[in] Context The context.
|
@param[in] Context The context.
|
||||||
@ -288,14 +288,14 @@ HttpCreateTcpRxEventForHeader (
|
|||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
HttpCreateTcpRxEvent (
|
HttpCreateTcpRxEvent (
|
||||||
IN HTTP_TOKEN_WRAP *Wrap
|
IN HTTP_TOKEN_WRAP *Wrap
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Close Events for Tcp Receive Tokens for HTTP body and HTTP header.
|
Close Events for Tcp Receive Tokens for HTTP body and HTTP header.
|
||||||
|
|
||||||
@param[in] Wrap Pointer to HTTP token's wrap data.
|
@param[in] Wrap Pointer to HTTP token's wrap data.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
HttpCloseTcpRxEvent (
|
HttpCloseTcpRxEvent (
|
||||||
@ -308,7 +308,7 @@ HttpCloseTcpRxEvent (
|
|||||||
@param[in, out] HttpInstance Pointer to HTTP_PROTOCOL structure.
|
@param[in, out] HttpInstance Pointer to HTTP_PROTOCOL structure.
|
||||||
@param[in] IpVersion Indicate us TCP4 protocol or TCP6 protocol.
|
@param[in] IpVersion Indicate us TCP4 protocol or TCP6 protocol.
|
||||||
|
|
||||||
@retval EFI_SUCCESS HTTP_PROTOCOL structure is initialized successfully.
|
@retval EFI_SUCCESS HTTP_PROTOCOL structure is initialized successfully.
|
||||||
@retval Others Other error as indicated.
|
@retval Others Other error as indicated.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -390,7 +390,7 @@ HttpConfigureTcp6 (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Check existing TCP connection, if in error state, recover TCP4 connection. Then,
|
Check existing TCP connection, if in error state, recover TCP4 connection. Then,
|
||||||
connect one TLS session if required.
|
connect one TLS session if required.
|
||||||
|
|
||||||
@param[in] HttpInstance The HTTP instance private data.
|
@param[in] HttpInstance The HTTP instance private data.
|
||||||
@ -406,7 +406,7 @@ HttpConnectTcp4 (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Check existing TCP connection, if in error state, recover TCP6 connection. Then,
|
Check existing TCP connection, if in error state, recover TCP6 connection. Then,
|
||||||
connect one TLS session if required.
|
connect one TLS session if required.
|
||||||
|
|
||||||
@param[in] HttpInstance The HTTP instance private data.
|
@param[in] HttpInstance The HTTP instance private data.
|
||||||
@ -490,7 +490,7 @@ HttpTcpNotReady (
|
|||||||
@param[in] Configure The Flag indicates whether need to initialize session.
|
@param[in] Configure The Flag indicates whether need to initialize session.
|
||||||
@param[in] TlsConfigure The Flag indicates whether it's the new Tls session.
|
@param[in] TlsConfigure The Flag indicates whether it's the new Tls session.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The initialization of session is done.
|
@retval EFI_SUCCESS The initialization of session is done.
|
||||||
@retval Others Other error as indicated.
|
@retval Others Other error as indicated.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -550,7 +550,7 @@ HttpTcpReceive (
|
|||||||
@param[in, out] BufferSize The size of buffer to cacahe the header message.
|
@param[in, out] BufferSize The size of buffer to cacahe the header message.
|
||||||
@param[in] Timeout The time to wait for receiving the header packet.
|
@param[in] Timeout The time to wait for receiving the header packet.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The HTTP header is received.
|
@retval EFI_SUCCESS The HTTP header is received.
|
||||||
@retval Others Other errors as indicated.
|
@retval Others Other errors as indicated.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -568,7 +568,7 @@ HttpTcpReceiveHeader (
|
|||||||
@param[in] Wrap The HTTP token's wrap data.
|
@param[in] Wrap The HTTP token's wrap data.
|
||||||
@param[in] HttpMsg The HTTP message data.
|
@param[in] HttpMsg The HTTP message data.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The HTTP body is received.
|
@retval EFI_SUCCESS The HTTP body is received.
|
||||||
@retval Others Other error as indicated.
|
@retval Others Other error as indicated.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -582,7 +582,7 @@ HttpTcpReceiveBody (
|
|||||||
Clean up Tcp Tokens while the Tcp transmission error occurs.
|
Clean up Tcp Tokens while the Tcp transmission error occurs.
|
||||||
|
|
||||||
@param[in] Wrap Pointer to HTTP token's wrap data.
|
@param[in] Wrap Pointer to HTTP token's wrap data.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
HttpTcpTokenCleanup (
|
HttpTcpTokenCleanup (
|
||||||
|
@ -603,9 +603,9 @@ TlsConfigCipherList (
|
|||||||
CipherListSize
|
CipherListSize
|
||||||
);
|
);
|
||||||
|
|
||||||
ON_EXIT:
|
ON_EXIT:
|
||||||
FreePool (CipherList);
|
FreePool (CipherList);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1453,18 +1453,18 @@ TlsCloseSession (
|
|||||||
Process one message according to the CryptMode.
|
Process one message according to the CryptMode.
|
||||||
|
|
||||||
@param[in] HttpInstance Pointer to HTTP_PROTOCOL structure.
|
@param[in] HttpInstance Pointer to HTTP_PROTOCOL structure.
|
||||||
@param[in] Message Pointer to the message buffer needed to processed.
|
@param[in] Message Pointer to the message buffer needed to processed.
|
||||||
If ProcessMode is EfiTlsEncrypt, the message contain the TLS
|
If ProcessMode is EfiTlsEncrypt, the message contain the TLS
|
||||||
header and plain text TLS APP payload.
|
header and plain text TLS APP payload.
|
||||||
If ProcessMode is EfiTlsDecrypt, the message contain the TLS
|
If ProcessMode is EfiTlsDecrypt, the message contain the TLS
|
||||||
header and cipher text TLS APP payload.
|
header and cipher text TLS APP payload.
|
||||||
@param[in] MessageSize Pointer to the message buffer size.
|
@param[in] MessageSize Pointer to the message buffer size.
|
||||||
@param[in] ProcessMode Process mode.
|
@param[in] ProcessMode Process mode.
|
||||||
@param[in, out] Fragment Only one Fragment returned after the Message is
|
@param[in, out] Fragment Only one Fragment returned after the Message is
|
||||||
processed successfully.
|
processed successfully.
|
||||||
If ProcessMode is EfiTlsEncrypt, the fragment contain the TLS
|
If ProcessMode is EfiTlsEncrypt, the fragment contain the TLS
|
||||||
header and cipher text TLS APP payload.
|
header and cipher text TLS APP payload.
|
||||||
If ProcessMode is EfiTlsDecrypt, the fragment contain the TLS
|
If ProcessMode is EfiTlsDecrypt, the fragment contain the TLS
|
||||||
header and plain text TLS APP payload.
|
header and plain text TLS APP payload.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Message is processed successfully.
|
@retval EFI_SUCCESS Message is processed successfully.
|
||||||
|
@ -217,18 +217,18 @@ TlsCloseSession (
|
|||||||
Process one message according to the CryptMode.
|
Process one message according to the CryptMode.
|
||||||
|
|
||||||
@param[in] HttpInstance Pointer to HTTP_PROTOCOL structure.
|
@param[in] HttpInstance Pointer to HTTP_PROTOCOL structure.
|
||||||
@param[in] Message Pointer to the message buffer needed to processed.
|
@param[in] Message Pointer to the message buffer needed to processed.
|
||||||
If ProcessMode is EfiTlsEncrypt, the message contain the TLS
|
If ProcessMode is EfiTlsEncrypt, the message contain the TLS
|
||||||
header and plain text TLS APP payload.
|
header and plain text TLS APP payload.
|
||||||
If ProcessMode is EfiTlsDecrypt, the message contain the TLS
|
If ProcessMode is EfiTlsDecrypt, the message contain the TLS
|
||||||
header and cipher text TLS APP payload.
|
header and cipher text TLS APP payload.
|
||||||
@param[in] MessageSize Pointer to the message buffer size.
|
@param[in] MessageSize Pointer to the message buffer size.
|
||||||
@param[in] ProcessMode Process mode.
|
@param[in] ProcessMode Process mode.
|
||||||
@param[in, out] Fragment Only one Fragment returned after the Message is
|
@param[in, out] Fragment Only one Fragment returned after the Message is
|
||||||
processed successfully.
|
processed successfully.
|
||||||
If ProcessMode is EfiTlsEncrypt, the fragment contain the TLS
|
If ProcessMode is EfiTlsEncrypt, the fragment contain the TLS
|
||||||
header and cipher text TLS APP payload.
|
header and cipher text TLS APP payload.
|
||||||
If ProcessMode is EfiTlsDecrypt, the fragment contain the TLS
|
If ProcessMode is EfiTlsDecrypt, the fragment contain the TLS
|
||||||
header and plain text TLS APP payload.
|
header and plain text TLS APP payload.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Message is processed successfully.
|
@retval EFI_SUCCESS Message is processed successfully.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The DriverEntryPoint and Unload for HttpUtilities driver.
|
The DriverEntryPoint and Unload for HttpUtilities driver.
|
||||||
|
|
||||||
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -25,7 +25,7 @@
|
|||||||
@retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.
|
@retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
HttpUtilitiesDxeUnload (
|
HttpUtilitiesDxeUnload (
|
||||||
IN EFI_HANDLE ImageHandle
|
IN EFI_HANDLE ImageHandle
|
||||||
@ -59,11 +59,11 @@ HttpUtilitiesDxeUnload (
|
|||||||
// Firstly, find HttpUtilitiesProtocol interface
|
// Firstly, find HttpUtilitiesProtocol interface
|
||||||
//
|
//
|
||||||
Status = gBS->OpenProtocol (
|
Status = gBS->OpenProtocol (
|
||||||
HandleBuffer[Index],
|
HandleBuffer[Index],
|
||||||
&gEfiHttpUtilitiesProtocolGuid,
|
&gEfiHttpUtilitiesProtocolGuid,
|
||||||
(VOID **) &HttpUtilitiesProtocol,
|
(VOID **) &HttpUtilitiesProtocol,
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
NULL,
|
NULL,
|
||||||
EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL
|
EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
@ -72,7 +72,7 @@ HttpUtilitiesDxeUnload (
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Then, uninstall HttpUtilities interface
|
// Then, uninstall HttpUtilities interface
|
||||||
//
|
//
|
||||||
Status = gBS->UninstallMultipleProtocolInterfaces (
|
Status = gBS->UninstallMultipleProtocolInterfaces (
|
||||||
HandleBuffer[Index],
|
HandleBuffer[Index],
|
||||||
&gEfiHttpUtilitiesProtocolGuid, HttpUtilitiesProtocol,
|
&gEfiHttpUtilitiesProtocolGuid, HttpUtilitiesProtocol,
|
||||||
@ -120,7 +120,7 @@ HttpUtilitiesDxeDriverEntryPoint (
|
|||||||
&mHttpUtilitiesProtocol,
|
&mHttpUtilitiesProtocol,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,15 +2,15 @@
|
|||||||
// This module produces Http Utilities Protocol.
|
// This module produces Http Utilities Protocol.
|
||||||
//
|
//
|
||||||
// This module produces Http Utilities Protocol.
|
// This module produces Http Utilities Protocol.
|
||||||
//
|
|
||||||
//
|
//
|
||||||
// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
//
|
||||||
|
// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
//
|
//
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
// which accompanies this distribution. The full text of the license may be found at
|
// which accompanies this distribution. The full text of the license may be found at
|
||||||
// http://opensource.org/licenses/bsd-license.php.
|
// http://opensource.org/licenses/bsd-license.php.
|
||||||
//
|
//
|
||||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
//
|
//
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// /** @file
|
// /** @file
|
||||||
// HttpUtilitiesDxe Localized Strings and Content
|
// HttpUtilitiesDxe Localized Strings and Content
|
||||||
//
|
//
|
||||||
// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
//
|
//
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -13,8 +13,8 @@
|
|||||||
//
|
//
|
||||||
// **/
|
// **/
|
||||||
|
|
||||||
#string STR_PROPERTIES_MODULE_NAME
|
#string STR_PROPERTIES_MODULE_NAME
|
||||||
#language en-US
|
#language en-US
|
||||||
"UEFI HTTP UTILITIES DXE"
|
"UEFI HTTP UTILITIES DXE"
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Implementation of EFI_HTTP_PROTOCOL protocol interfaces.
|
Implementation of EFI_HTTP_PROTOCOL protocol interfaces.
|
||||||
|
|
||||||
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -91,17 +91,17 @@ HttpUtilitiesBuild (
|
|||||||
NewMessagePtr = NULL;
|
NewMessagePtr = NULL;
|
||||||
*NewMessageSize = 0;
|
*NewMessageSize = 0;
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
if (This == NULL) {
|
if (This == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SeedMessage != NULL) {
|
if (SeedMessage != NULL) {
|
||||||
Status = This->Parse (
|
Status = This->Parse (
|
||||||
This,
|
This,
|
||||||
SeedMessage,
|
SeedMessage,
|
||||||
SeedMessageSize,
|
SeedMessageSize,
|
||||||
&SeedHeaderFields,
|
&SeedHeaderFields,
|
||||||
&SeedFieldCount
|
&SeedFieldCount
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
@ -118,15 +118,15 @@ HttpUtilitiesBuild (
|
|||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Index = 0, TempFieldCount = 0; Index < SeedFieldCount; Index++) {
|
for (Index = 0, TempFieldCount = 0; Index < SeedFieldCount; Index++) {
|
||||||
//
|
//
|
||||||
// Check whether each SeedHeaderFields member is in DeleteList
|
// Check whether each SeedHeaderFields member is in DeleteList
|
||||||
//
|
//
|
||||||
if (HttpIsValidHttpHeader( DeleteList, DeleteCount, SeedHeaderFields[Index].FieldName)) {
|
if (HttpIsValidHttpHeader( DeleteList, DeleteCount, SeedHeaderFields[Index].FieldName)) {
|
||||||
Status = HttpSetFieldNameAndValue (
|
Status = HttpSetFieldNameAndValue (
|
||||||
&TempHeaderFields[TempFieldCount],
|
&TempHeaderFields[TempFieldCount],
|
||||||
SeedHeaderFields[Index].FieldName,
|
SeedHeaderFields[Index].FieldName,
|
||||||
SeedHeaderFields[Index].FieldValue
|
SeedHeaderFields[Index].FieldValue
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
@ -151,23 +151,23 @@ HttpUtilitiesBuild (
|
|||||||
|
|
||||||
for (Index = 0; Index < TempFieldCount; Index++) {
|
for (Index = 0; Index < TempFieldCount; Index++) {
|
||||||
Status = HttpSetFieldNameAndValue (
|
Status = HttpSetFieldNameAndValue (
|
||||||
&NewHeaderFields[Index],
|
&NewHeaderFields[Index],
|
||||||
TempHeaderFields[Index].FieldName,
|
TempHeaderFields[Index].FieldName,
|
||||||
TempHeaderFields[Index].FieldValue
|
TempHeaderFields[Index].FieldValue
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NewFieldCount = TempFieldCount;
|
NewFieldCount = TempFieldCount;
|
||||||
|
|
||||||
for (Index = 0; Index < AppendCount; Index++) {
|
for (Index = 0; Index < AppendCount; Index++) {
|
||||||
HttpHeader = HttpFindHeader (NewFieldCount, NewHeaderFields, AppendList[Index]->FieldName);
|
HttpHeader = HttpFindHeader (NewFieldCount, NewHeaderFields, AppendList[Index]->FieldName);
|
||||||
if (HttpHeader != NULL) {
|
if (HttpHeader != NULL) {
|
||||||
Status = HttpSetFieldNameAndValue (
|
Status = HttpSetFieldNameAndValue (
|
||||||
HttpHeader,
|
HttpHeader,
|
||||||
AppendList[Index]->FieldName,
|
AppendList[Index]->FieldName,
|
||||||
AppendList[Index]->FieldValue
|
AppendList[Index]->FieldValue
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
@ -175,8 +175,8 @@ HttpUtilitiesBuild (
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Status = HttpSetFieldNameAndValue (
|
Status = HttpSetFieldNameAndValue (
|
||||||
&NewHeaderFields[NewFieldCount],
|
&NewHeaderFields[NewFieldCount],
|
||||||
AppendList[Index]->FieldName,
|
AppendList[Index]->FieldName,
|
||||||
AppendList[Index]->FieldValue
|
AppendList[Index]->FieldValue
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
@ -241,13 +241,13 @@ HttpUtilitiesBuild (
|
|||||||
ASSERT (*NewMessageSize == (UINTN)NewMessagePtr - (UINTN)(*NewMessage));
|
ASSERT (*NewMessageSize == (UINTN)NewMessagePtr - (UINTN)(*NewMessage));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Free allocated buffer
|
// Free allocated buffer
|
||||||
//
|
//
|
||||||
ON_EXIT:
|
ON_EXIT:
|
||||||
if (SeedHeaderFields != NULL) {
|
if (SeedHeaderFields != NULL) {
|
||||||
HttpFreeHeaderFields(SeedHeaderFields, SeedFieldCount);
|
HttpFreeHeaderFields(SeedHeaderFields, SeedFieldCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TempHeaderFields != NULL) {
|
if (TempHeaderFields != NULL) {
|
||||||
HttpFreeHeaderFields(TempHeaderFields, TempFieldCount);
|
HttpFreeHeaderFields(TempHeaderFields, TempFieldCount);
|
||||||
}
|
}
|
||||||
@ -255,7 +255,7 @@ ON_EXIT:
|
|||||||
if (NewHeaderFields != NULL) {
|
if (NewHeaderFields != NULL) {
|
||||||
HttpFreeHeaderFields(NewHeaderFields, NewFieldCount);
|
HttpFreeHeaderFields(NewHeaderFields, NewFieldCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -298,7 +298,7 @@ HttpUtilitiesParse (
|
|||||||
CHAR8 *FieldName;
|
CHAR8 *FieldName;
|
||||||
CHAR8 *FieldValue;
|
CHAR8 *FieldValue;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
TempHttpMessage = NULL;
|
TempHttpMessage = NULL;
|
||||||
Token = NULL;
|
Token = NULL;
|
||||||
@ -306,18 +306,18 @@ HttpUtilitiesParse (
|
|||||||
FieldName = NULL;
|
FieldName = NULL;
|
||||||
FieldValue = NULL;
|
FieldValue = NULL;
|
||||||
Index = 0;
|
Index = 0;
|
||||||
|
|
||||||
if (This == NULL || HttpMessage == NULL || HeaderFields == NULL || FieldCount == NULL) {
|
if (This == NULL || HttpMessage == NULL || HeaderFields == NULL || FieldCount == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
TempHttpMessage = AllocateZeroPool (HttpMessageSize);
|
TempHttpMessage = AllocateZeroPool (HttpMessageSize);
|
||||||
if (TempHttpMessage == NULL) {
|
if (TempHttpMessage == NULL) {
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
CopyMem (TempHttpMessage, HttpMessage, HttpMessageSize);
|
CopyMem (TempHttpMessage, HttpMessage, HttpMessageSize);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get header number
|
// Get header number
|
||||||
//
|
//
|
||||||
@ -339,7 +339,7 @@ HttpUtilitiesParse (
|
|||||||
Status = EFI_INVALID_PARAMETER;
|
Status = EFI_INVALID_PARAMETER;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Allocate buffer for header
|
// Allocate buffer for header
|
||||||
//
|
//
|
||||||
@ -349,9 +349,9 @@ HttpUtilitiesParse (
|
|||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
CopyMem (TempHttpMessage, HttpMessage, HttpMessageSize);
|
CopyMem (TempHttpMessage, HttpMessage, HttpMessageSize);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set Field and Value to each header
|
// Set Field and Value to each header
|
||||||
//
|
//
|
||||||
@ -371,17 +371,17 @@ HttpUtilitiesParse (
|
|||||||
HttpFreeHeaderFields (*HeaderFields, Index);
|
HttpFreeHeaderFields (*HeaderFields, Index);
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
Index++;
|
Index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Free allocated buffer
|
// Free allocated buffer
|
||||||
//
|
//
|
||||||
ON_EXIT:
|
ON_EXIT:
|
||||||
if (TempHttpMessage != NULL) {
|
if (TempHttpMessage != NULL) {
|
||||||
FreePool (TempHttpMessage);
|
FreePool (TempHttpMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
UEFI Component Name(2) protocol implementation for iSCSI.
|
UEFI Component Name(2) protocol implementation for iSCSI.
|
||||||
|
|
||||||
Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -106,11 +106,11 @@ IScsiComponentNameGetDriverName (
|
|||||||
|
|
||||||
@param[in] IScsiExtScsiPassThru A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
|
@param[in] IScsiExtScsiPassThru A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
|
||||||
@param[in] Ipv6Flag TRUE if IP6 network stack is used.
|
@param[in] Ipv6Flag TRUE if IP6 network stack is used.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
|
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
|
||||||
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
|
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
|
||||||
@retval EFI_UNSUPPORTED Can't get the corresponding NIC info from the Controller handle.
|
@retval EFI_UNSUPPORTED Can't get the corresponding NIC info from the Controller handle.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
UpdateName (
|
UpdateName (
|
||||||
@ -126,10 +126,10 @@ UpdateName (
|
|||||||
if (IScsiExtScsiPassThru == NULL) {
|
if (IScsiExtScsiPassThru == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
Private = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (IScsiExtScsiPassThru);
|
Private = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (IScsiExtScsiPassThru);
|
||||||
NicIndex = Private->Session->ConfigData->NicIndex;
|
NicIndex = Private->Session->ConfigData->NicIndex;
|
||||||
|
|
||||||
UnicodeSPrint (
|
UnicodeSPrint (
|
||||||
HandleName,
|
HandleName,
|
||||||
sizeof (HandleName),
|
sizeof (HandleName),
|
||||||
@ -242,14 +242,14 @@ IScsiComponentNameGetControllerName (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
EFI_HANDLE IScsiController;
|
EFI_HANDLE IScsiController;
|
||||||
BOOLEAN Ipv6Flag;
|
BOOLEAN Ipv6Flag;
|
||||||
EFI_GUID *IScsiPrivateGuid;
|
EFI_GUID *IScsiPrivateGuid;
|
||||||
ISCSI_PRIVATE_PROTOCOL *IScsiIdentifier;
|
ISCSI_PRIVATE_PROTOCOL *IScsiIdentifier;
|
||||||
|
|
||||||
EFI_EXT_SCSI_PASS_THRU_PROTOCOL *IScsiExtScsiPassThru;
|
EFI_EXT_SCSI_PASS_THRU_PROTOCOL *IScsiExtScsiPassThru;
|
||||||
|
|
||||||
if (ControllerHandle == NULL) {
|
if (ControllerHandle == NULL) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
@ -309,7 +309,7 @@ IScsiComponentNameGetControllerName (
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Retrieve an instance of a produced protocol from ChildHandle
|
// Retrieve an instance of a produced protocol from ChildHandle
|
||||||
//
|
//
|
||||||
@ -324,7 +324,7 @@ IScsiComponentNameGetControllerName (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Update the component name for this child handle.
|
// Update the component name for this child handle.
|
||||||
//
|
//
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
This file is for Challenge-Handshake Authentication Protocol (CHAP) Configuration.
|
This file is for Challenge-Handshake Authentication Protocol (CHAP) Configuration.
|
||||||
|
|
||||||
Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -16,14 +16,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Initator calculates its own expected hash value.
|
Initator calculates its own expected hash value.
|
||||||
|
|
||||||
@param[in] ChapIdentifier iSCSI CHAP identifier sent by authenticator.
|
@param[in] ChapIdentifier iSCSI CHAP identifier sent by authenticator.
|
||||||
@param[in] ChapSecret iSCSI CHAP secret of the authenticator.
|
@param[in] ChapSecret iSCSI CHAP secret of the authenticator.
|
||||||
@param[in] SecretLength The length of iSCSI CHAP secret.
|
@param[in] SecretLength The length of iSCSI CHAP secret.
|
||||||
@param[in] ChapChallenge The challenge message sent by authenticator.
|
@param[in] ChapChallenge The challenge message sent by authenticator.
|
||||||
@param[in] ChallengeLength The length of iSCSI CHAP challenge message.
|
@param[in] ChallengeLength The length of iSCSI CHAP challenge message.
|
||||||
@param[out] ChapResponse The calculation of the expected hash value.
|
@param[out] ChapResponse The calculation of the expected hash value.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The expected hash value was calculatedly successfully.
|
@retval EFI_SUCCESS The expected hash value was calculatedly successfully.
|
||||||
@retval EFI_PROTOCOL_ERROR The length of the secret should be at least the
|
@retval EFI_PROTOCOL_ERROR The length of the secret should be at least the
|
||||||
length of the hash value for the hashing algorithm chosen.
|
length of the hash value for the hashing algorithm chosen.
|
||||||
@ -95,10 +95,10 @@ Exit:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
The initator checks the CHAP response replied by target against its own
|
The initator checks the CHAP response replied by target against its own
|
||||||
calculation of the expected hash value.
|
calculation of the expected hash value.
|
||||||
|
|
||||||
@param[in] AuthData iSCSI CHAP authentication data.
|
@param[in] AuthData iSCSI CHAP authentication data.
|
||||||
@param[in] TargetResponse The response from target.
|
@param[in] TargetResponse The response from target.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The response from target passed authentication.
|
@retval EFI_SUCCESS The response from target passed authentication.
|
||||||
@retval EFI_SECURITY_VIOLATION The response from target was not expected value.
|
@retval EFI_SECURITY_VIOLATION The response from target was not expected value.
|
||||||
@ -267,12 +267,12 @@ IScsiCHAPOnRspReceived (
|
|||||||
//
|
//
|
||||||
// Process the CHAP identifier and CHAP Challenge from Target.
|
// Process the CHAP identifier and CHAP Challenge from Target.
|
||||||
// Calculate Response value.
|
// Calculate Response value.
|
||||||
//
|
//
|
||||||
Result = IScsiNetNtoi (Identifier);
|
Result = IScsiNetNtoi (Identifier);
|
||||||
if (Result > 0xFF) {
|
if (Result > 0xFF) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
AuthData->InIdentifier = (UINT32) Result;
|
AuthData->InIdentifier = (UINT32) Result;
|
||||||
AuthData->InChallengeLength = ISCSI_CHAP_AUTH_MAX_LEN;
|
AuthData->InChallengeLength = ISCSI_CHAP_AUTH_MAX_LEN;
|
||||||
IScsiHexToBin ((UINT8 *) AuthData->InChallenge, &AuthData->InChallengeLength, Challenge);
|
IScsiHexToBin ((UINT8 *) AuthData->InChallenge, &AuthData->InChallengeLength, Challenge);
|
||||||
@ -331,7 +331,7 @@ ON_EXIT:
|
|||||||
|
|
||||||
if (KeyValueList != NULL) {
|
if (KeyValueList != NULL) {
|
||||||
IScsiFreeKeyValueList (KeyValueList);
|
IScsiFreeKeyValueList (KeyValueList);
|
||||||
}
|
}
|
||||||
|
|
||||||
FreePool (Data);
|
FreePool (Data);
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The header file of CHAP configuration.
|
The header file of CHAP configuration.
|
||||||
|
|
||||||
Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -29,7 +29,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
///
|
///
|
||||||
/// MD5_HASHSIZE
|
/// MD5_HASHSIZE
|
||||||
///
|
///
|
||||||
#define ISCSI_CHAP_RSP_LEN 16
|
#define ISCSI_CHAP_RSP_LEN 16
|
||||||
|
|
||||||
#define ISCSI_CHAP_STEP_ONE 1
|
#define ISCSI_CHAP_STEP_ONE 1
|
||||||
#define ISCSI_CHAP_STEP_TWO 2
|
#define ISCSI_CHAP_STEP_TWO 2
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Helper functions for configuring or getting the parameters relating to iSCSI.
|
Helper functions for configuring or getting the parameters relating to iSCSI.
|
||||||
|
|
||||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -34,7 +34,7 @@ HII_VENDOR_DEVICE_PATH mIScsiHiiVendorDevicePath = {
|
|||||||
{
|
{
|
||||||
END_DEVICE_PATH_TYPE,
|
END_DEVICE_PATH_TYPE,
|
||||||
END_ENTIRE_DEVICE_PATH_SUBTYPE,
|
END_ENTIRE_DEVICE_PATH_SUBTYPE,
|
||||||
{
|
{
|
||||||
(UINT8) (END_DEVICE_PATH_LENGTH),
|
(UINT8) (END_DEVICE_PATH_LENGTH),
|
||||||
(UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
|
(UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
|
||||||
}
|
}
|
||||||
@ -939,7 +939,7 @@ IScsiConvertIfrNvDataToAttemptConfigData (
|
|||||||
L"CHAP Name or CHAP Secret is invalid!",
|
L"CHAP Name or CHAP Secret is invalid!",
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -951,7 +951,7 @@ IScsiConvertIfrNvDataToAttemptConfigData (
|
|||||||
&Key,
|
&Key,
|
||||||
L"Reverse CHAP Name or Reverse CHAP Secret is invalid!",
|
L"Reverse CHAP Name or Reverse CHAP Secret is invalid!",
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -970,7 +970,7 @@ IScsiConvertIfrNvDataToAttemptConfigData (
|
|||||||
if (AttemptName2 == NULL) {
|
if (AttemptName2 == NULL) {
|
||||||
FreePool (AttemptName1);
|
FreePool (AttemptName1);
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
AsciiStrToUnicodeStrS (Attempt->AttemptName, AttemptName1, ATTEMPT_NAME_SIZE);
|
AsciiStrToUnicodeStrS (Attempt->AttemptName, AttemptName1, ATTEMPT_NAME_SIZE);
|
||||||
AsciiStrToUnicodeStrS (SameNicAttempt->AttemptName, AttemptName2, ATTEMPT_NAME_SIZE);
|
AsciiStrToUnicodeStrS (SameNicAttempt->AttemptName, AttemptName2, ATTEMPT_NAME_SIZE);
|
||||||
@ -988,7 +988,7 @@ IScsiConvertIfrNvDataToAttemptConfigData (
|
|||||||
&Key,
|
&Key,
|
||||||
mPrivate->PortString,
|
mPrivate->PortString,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
FreePool (AttemptName1);
|
FreePool (AttemptName1);
|
||||||
FreePool (AttemptName2);
|
FreePool (AttemptName2);
|
||||||
@ -2026,7 +2026,7 @@ IScsiConfigAddAttempt (
|
|||||||
PortTitleHelpToken = HiiSetString (mCallbackInfo->RegisteredHandle, 0, mPrivate->PortString, NULL);
|
PortTitleHelpToken = HiiSetString (mCallbackInfo->RegisteredHandle, 0, mPrivate->PortString, NULL);
|
||||||
if (PortTitleHelpToken == 0) {
|
if (PortTitleHelpToken == 0) {
|
||||||
Status = EFI_INVALID_PARAMETER;
|
Status = EFI_INVALID_PARAMETER;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
HiiCreateGotoOpCode (
|
HiiCreateGotoOpCode (
|
||||||
@ -2050,14 +2050,14 @@ IScsiConfigAddAttempt (
|
|||||||
Exit:
|
Exit:
|
||||||
HiiFreeOpCodeHandle (StartOpCodeHandle);
|
HiiFreeOpCodeHandle (StartOpCodeHandle);
|
||||||
HiiFreeOpCodeHandle (EndOpCodeHandle);
|
HiiFreeOpCodeHandle (EndOpCodeHandle);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Add the attempts by keyword 'iSCSIAddAttempts', you can use this keyword with
|
Add the attempts by keyword 'iSCSIAddAttempts', you can use this keyword with
|
||||||
value 'attempt:1 attempt:2' etc to add one or more attempts once. This is different
|
value 'attempt:1 attempt:2' etc to add one or more attempts once. This is different
|
||||||
with IScsiConfigAddAttempt function which is used to add attempt by UI configuration.
|
with IScsiConfigAddAttempt function which is used to add attempt by UI configuration.
|
||||||
|
|
||||||
@param[in] AttemptList The new attempt List will be added.
|
@param[in] AttemptList The new attempt List will be added.
|
||||||
|
|
||||||
@ -2505,7 +2505,7 @@ IScsiConfigDisplayDeleteAttempts (
|
|||||||
FORMID_DELETE_FORM, // Form ID
|
FORMID_DELETE_FORM, // Form ID
|
||||||
StartOpCodeHandle, // Label for where to insert opcodes
|
StartOpCodeHandle, // Label for where to insert opcodes
|
||||||
EndOpCodeHandle // Replace data
|
EndOpCodeHandle // Replace data
|
||||||
);
|
);
|
||||||
|
|
||||||
HiiFreeOpCodeHandle (StartOpCodeHandle);
|
HiiFreeOpCodeHandle (StartOpCodeHandle);
|
||||||
HiiFreeOpCodeHandle (EndOpCodeHandle);
|
HiiFreeOpCodeHandle (EndOpCodeHandle);
|
||||||
@ -2536,8 +2536,8 @@ IScsiConfigDisplayOrderAttempts (
|
|||||||
EFI_IFR_GUID_LABEL *StartLabel;
|
EFI_IFR_GUID_LABEL *StartLabel;
|
||||||
VOID *EndOpCodeHandle;
|
VOID *EndOpCodeHandle;
|
||||||
EFI_IFR_GUID_LABEL *EndLabel;
|
EFI_IFR_GUID_LABEL *EndLabel;
|
||||||
VOID *OptionsOpCodeHandle;
|
VOID *OptionsOpCodeHandle;
|
||||||
|
|
||||||
Status = IScsiCreateOpCode (
|
Status = IScsiCreateOpCode (
|
||||||
ORDER_ENTRY_LABEL,
|
ORDER_ENTRY_LABEL,
|
||||||
&StartOpCodeHandle,
|
&StartOpCodeHandle,
|
||||||
@ -2589,14 +2589,14 @@ IScsiConfigDisplayOrderAttempts (
|
|||||||
DYNAMIC_ORDERED_LIST_QUESTION_ID, // Question ID
|
DYNAMIC_ORDERED_LIST_QUESTION_ID, // Question ID
|
||||||
CONFIGURATION_VARSTORE_ID, // VarStore ID
|
CONFIGURATION_VARSTORE_ID, // VarStore ID
|
||||||
DYNAMIC_ORDERED_LIST_VAR_OFFSET, // Offset in Buffer Storage
|
DYNAMIC_ORDERED_LIST_VAR_OFFSET, // Offset in Buffer Storage
|
||||||
STRING_TOKEN (STR_ORDER_ATTEMPT_ENTRY), // Question prompt text
|
STRING_TOKEN (STR_ORDER_ATTEMPT_ENTRY), // Question prompt text
|
||||||
STRING_TOKEN (STR_ORDER_ATTEMPT_ENTRY), // Question help text
|
STRING_TOKEN (STR_ORDER_ATTEMPT_ENTRY), // Question help text
|
||||||
0, // Question flag
|
0, // Question flag
|
||||||
EFI_IFR_UNIQUE_SET, // Ordered list flag, e.g. EFI_IFR_UNIQUE_SET
|
EFI_IFR_UNIQUE_SET, // Ordered list flag, e.g. EFI_IFR_UNIQUE_SET
|
||||||
EFI_IFR_NUMERIC_SIZE_1, // Data type of Question value
|
EFI_IFR_NUMERIC_SIZE_1, // Data type of Question value
|
||||||
ISCSI_MAX_ATTEMPTS_NUM, // Maximum container
|
ISCSI_MAX_ATTEMPTS_NUM, // Maximum container
|
||||||
OptionsOpCodeHandle, // Option Opcode list
|
OptionsOpCodeHandle, // Option Opcode list
|
||||||
NULL // Default Opcode is NULL
|
NULL // Default Opcode is NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
Exit:
|
Exit:
|
||||||
@ -2606,11 +2606,11 @@ Exit:
|
|||||||
FORMID_ORDER_FORM, // Form ID
|
FORMID_ORDER_FORM, // Form ID
|
||||||
StartOpCodeHandle, // Label for where to insert opcodes
|
StartOpCodeHandle, // Label for where to insert opcodes
|
||||||
EndOpCodeHandle // Replace data
|
EndOpCodeHandle // Replace data
|
||||||
);
|
);
|
||||||
|
|
||||||
Error:
|
Error:
|
||||||
HiiFreeOpCodeHandle (StartOpCodeHandle);
|
HiiFreeOpCodeHandle (StartOpCodeHandle);
|
||||||
HiiFreeOpCodeHandle (EndOpCodeHandle);
|
HiiFreeOpCodeHandle (EndOpCodeHandle);
|
||||||
if (OptionsOpCodeHandle != NULL) {
|
if (OptionsOpCodeHandle != NULL) {
|
||||||
HiiFreeOpCodeHandle (OptionsOpCodeHandle);
|
HiiFreeOpCodeHandle (OptionsOpCodeHandle);
|
||||||
}
|
}
|
||||||
@ -2821,10 +2821,10 @@ IScsiConfigProcessDefault (
|
|||||||
if (AttemptConfigData == NULL || AttemptConfigData->Actived == ISCSI_ACTIVE_ENABLED) {
|
if (AttemptConfigData == NULL || AttemptConfigData->Actived == ISCSI_ACTIVE_ENABLED) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Index > PcdGet8 (PcdMaxIScsiAttemptNumber)) {
|
if (Index > PcdGet8 (PcdMaxIScsiAttemptNumber)) {
|
||||||
CreatePopUp (
|
CreatePopUp (
|
||||||
EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
|
EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
|
||||||
@ -2858,7 +2858,7 @@ IScsiConfigProcessDefault (
|
|||||||
// Generate OUI-format ISID based on MAC address.
|
// Generate OUI-format ISID based on MAC address.
|
||||||
//
|
//
|
||||||
CopyMem (AttemptConfigData->SessionConfigData.IsId, &NicInfo->PermanentAddress, 6);
|
CopyMem (AttemptConfigData->SessionConfigData.IsId, &NicInfo->PermanentAddress, 6);
|
||||||
AttemptConfigData->SessionConfigData.IsId[0] =
|
AttemptConfigData->SessionConfigData.IsId[0] =
|
||||||
(UINT8) (AttemptConfigData->SessionConfigData.IsId[0] & 0x3F);
|
(UINT8) (AttemptConfigData->SessionConfigData.IsId[0] & 0x3F);
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -2908,7 +2908,7 @@ IScsiConfigProcessDefault (
|
|||||||
ZeroMem (IfrNvData->ReverseCHAPName, sizeof (IfrNvData->ReverseCHAPName));
|
ZeroMem (IfrNvData->ReverseCHAPName, sizeof (IfrNvData->ReverseCHAPName));
|
||||||
ZeroMem (IfrNvData->ReverseCHAPSecret, sizeof (IfrNvData->ReverseCHAPSecret));
|
ZeroMem (IfrNvData->ReverseCHAPSecret, sizeof (IfrNvData->ReverseCHAPSecret));
|
||||||
}
|
}
|
||||||
|
|
||||||
IScsiConvertAttemptConfigDataToIfrNvData (AttemptConfigData, IfrNvData);
|
IScsiConvertAttemptConfigDataToIfrNvData (AttemptConfigData, IfrNvData);
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -2921,7 +2921,7 @@ IScsiConfigProcessDefault (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
This function allows the caller to request the current
|
This function allows the caller to request the current
|
||||||
configuration for one or more named elements. The resulting
|
configuration for one or more named elements. The resulting
|
||||||
string is in <ConfigAltResp> format. Also, any and all alternative
|
string is in <ConfigAltResp> format. Also, any and all alternative
|
||||||
@ -2950,7 +2950,7 @@ IScsiConfigProcessDefault (
|
|||||||
to the most recent "&" before the first
|
to the most recent "&" before the first
|
||||||
failing name / value pair (or the beginning
|
failing name / value pair (or the beginning
|
||||||
of the string if the failure is in the first
|
of the string if the failure is in the first
|
||||||
name / value pair) if the request was not successful.
|
name / value pair) if the request was not successful.
|
||||||
|
|
||||||
@param[out] Results A null-terminated Unicode string in
|
@param[out] Results A null-terminated Unicode string in
|
||||||
<ConfigAltResp> format which has all values
|
<ConfigAltResp> format which has all values
|
||||||
@ -2971,7 +2971,7 @@ IScsiConfigProcessDefault (
|
|||||||
would result in this type of
|
would result in this type of
|
||||||
error. In this case, the
|
error. In this case, the
|
||||||
Progress parameter would be
|
Progress parameter would be
|
||||||
set to NULL.
|
set to NULL.
|
||||||
|
|
||||||
@retval EFI_NOT_FOUND Routing data doesn't match any
|
@retval EFI_NOT_FOUND Routing data doesn't match any
|
||||||
known driver. Progress set to the
|
known driver. Progress set to the
|
||||||
@ -3046,7 +3046,7 @@ IScsiFormExtractConfig (
|
|||||||
FreePool (IfrNvData);
|
FreePool (IfrNvData);
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gIScsiInitiatorName.Get (&gIScsiInitiatorName, &BufferSize, InitiatorName);
|
Status = gIScsiInitiatorName.Get (&gIScsiInitiatorName, &BufferSize, InitiatorName);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
IfrNvData->InitiatorName[0] = L'\0';
|
IfrNvData->InitiatorName[0] = L'\0';
|
||||||
@ -3114,7 +3114,7 @@ IScsiFormExtractConfig (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
This function applies changes in a driver's configuration.
|
This function applies changes in a driver's configuration.
|
||||||
Input is a Configuration, which has the routing data for this
|
Input is a Configuration, which has the routing data for this
|
||||||
driver followed by name / value configuration pairs. The driver
|
driver followed by name / value configuration pairs. The driver
|
||||||
@ -3127,8 +3127,8 @@ IScsiFormExtractConfig (
|
|||||||
@param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
|
@param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
|
||||||
|
|
||||||
@param[in] Configuration A null-terminated Unicode string in
|
@param[in] Configuration A null-terminated Unicode string in
|
||||||
<ConfigString> format.
|
<ConfigString> format.
|
||||||
|
|
||||||
@param[out] Progress A pointer to a string filled in with the
|
@param[out] Progress A pointer to a string filled in with the
|
||||||
offset of the most recent '&' before the
|
offset of the most recent '&' before the
|
||||||
first failing name / value pair (or the
|
first failing name / value pair (or the
|
||||||
@ -3139,16 +3139,16 @@ IScsiFormExtractConfig (
|
|||||||
|
|
||||||
@retval EFI_SUCCESS The results have been distributed or are
|
@retval EFI_SUCCESS The results have been distributed or are
|
||||||
awaiting distribution.
|
awaiting distribution.
|
||||||
|
|
||||||
@retval EFI_OUT_OF_RESOURCES Not enough memory to store the
|
@retval EFI_OUT_OF_RESOURCES Not enough memory to store the
|
||||||
parts of the results that must be
|
parts of the results that must be
|
||||||
stored awaiting possible future
|
stored awaiting possible future
|
||||||
protocols.
|
protocols.
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETERS Passing in a NULL for the
|
@retval EFI_INVALID_PARAMETERS Passing in a NULL for the
|
||||||
Results parameter would result
|
Results parameter would result
|
||||||
in this type of error.
|
in this type of error.
|
||||||
|
|
||||||
@retval EFI_NOT_FOUND Target for the specified routing data
|
@retval EFI_NOT_FOUND Target for the specified routing data
|
||||||
was not found.
|
was not found.
|
||||||
|
|
||||||
@ -3374,7 +3374,7 @@ Exit:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
This function is called to provide results data to the driver.
|
This function is called to provide results data to the driver.
|
||||||
This data consists of a unique key that is used to identify
|
This data consists of a unique key that is used to identify
|
||||||
which data is either being passed back or being asked for.
|
which data is either being passed back or being asked for.
|
||||||
@ -3383,7 +3383,7 @@ Exit:
|
|||||||
@param[in] Action Specifies the type of action taken by the browser.
|
@param[in] Action Specifies the type of action taken by the browser.
|
||||||
@param[in] QuestionId A unique value which is sent to the original
|
@param[in] QuestionId A unique value which is sent to the original
|
||||||
exporting driver so that it can identify the type
|
exporting driver so that it can identify the type
|
||||||
of data to expect. The format of the data tends to
|
of data to expect. The format of the data tends to
|
||||||
vary based on the opcode that generated the callback.
|
vary based on the opcode that generated the callback.
|
||||||
@param[in] Type The type of value for the question.
|
@param[in] Type The type of value for the question.
|
||||||
@param[in, out] Value A pointer to the data being sent to the original
|
@param[in, out] Value A pointer to the data being sent to the original
|
||||||
@ -3445,29 +3445,29 @@ IScsiFormCallback (
|
|||||||
}
|
}
|
||||||
|
|
||||||
Private = ISCSI_FORM_CALLBACK_INFO_FROM_FORM_CALLBACK (This);
|
Private = ISCSI_FORM_CALLBACK_INFO_FROM_FORM_CALLBACK (This);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Retrieve uncommitted data from Browser
|
// Retrieve uncommitted data from Browser
|
||||||
//
|
//
|
||||||
|
|
||||||
BufferSize = sizeof (ISCSI_CONFIG_IFR_NVDATA);
|
BufferSize = sizeof (ISCSI_CONFIG_IFR_NVDATA);
|
||||||
IfrNvData = AllocateZeroPool (BufferSize);
|
IfrNvData = AllocateZeroPool (BufferSize);
|
||||||
if (IfrNvData == NULL) {
|
if (IfrNvData == NULL) {
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
IScsiName = (CHAR8 *) AllocateZeroPool (ISCSI_NAME_MAX_SIZE);
|
IScsiName = (CHAR8 *) AllocateZeroPool (ISCSI_NAME_MAX_SIZE);
|
||||||
if (IScsiName == NULL) {
|
if (IScsiName == NULL) {
|
||||||
FreePool (IfrNvData);
|
FreePool (IfrNvData);
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
ZeroMem (&OldIfrNvData, BufferSize);
|
ZeroMem (&OldIfrNvData, BufferSize);
|
||||||
|
|
||||||
HiiGetBrowserData (NULL, NULL, BufferSize, (UINT8 *) IfrNvData);
|
HiiGetBrowserData (NULL, NULL, BufferSize, (UINT8 *) IfrNvData);
|
||||||
|
|
||||||
CopyMem (&OldIfrNvData, IfrNvData, BufferSize);
|
CopyMem (&OldIfrNvData, IfrNvData, BufferSize);
|
||||||
|
|
||||||
if (Action == EFI_BROWSER_ACTION_CHANGING) {
|
if (Action == EFI_BROWSER_ACTION_CHANGING) {
|
||||||
@ -3488,10 +3488,10 @@ IScsiFormCallback (
|
|||||||
&Key,
|
&Key,
|
||||||
L"Error: please configure iSCSI initiator name first!",
|
L"Error: please configure iSCSI initiator name first!",
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = IScsiConfigAddAttempt ();
|
Status = IScsiConfigAddAttempt ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -3515,12 +3515,12 @@ IScsiFormCallback (
|
|||||||
);
|
);
|
||||||
IScsiConfigDisplayOrderAttempts ();
|
IScsiConfigDisplayOrderAttempts ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Status = IScsiConfigProcessDefault (QuestionId, IfrNvData);
|
Status = IScsiConfigProcessDefault (QuestionId, IfrNvData);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (Action == EFI_BROWSER_ACTION_CHANGED) {
|
} else if (Action == EFI_BROWSER_ACTION_CHANGED) {
|
||||||
switch (QuestionId) {
|
switch (QuestionId) {
|
||||||
case KEY_INITIATOR_NAME:
|
case KEY_INITIATOR_NAME:
|
||||||
UnicodeStrToAsciiStrS (IfrNvData->InitiatorName, IScsiName, ISCSI_NAME_MAX_SIZE);
|
UnicodeStrToAsciiStrS (IfrNvData->InitiatorName, IScsiName, ISCSI_NAME_MAX_SIZE);
|
||||||
@ -3533,12 +3533,12 @@ IScsiFormCallback (
|
|||||||
&Key,
|
&Key,
|
||||||
L"Invalid iSCSI Name!",
|
L"Invalid iSCSI Name!",
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
|
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KEY_SAVE_ATTEMPT_CONFIG:
|
case KEY_SAVE_ATTEMPT_CONFIG:
|
||||||
Status = IScsiConvertIfrNvDataToAttemptConfigData (IfrNvData, Private->Current);
|
Status = IScsiConvertIfrNvDataToAttemptConfigData (IfrNvData, Private->Current);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
@ -3595,17 +3595,17 @@ IScsiFormCallback (
|
|||||||
case KEY_IP_MODE:
|
case KEY_IP_MODE:
|
||||||
switch (Value->u8) {
|
switch (Value->u8) {
|
||||||
case IP_MODE_IP6:
|
case IP_MODE_IP6:
|
||||||
NicInfo = IScsiGetNicInfoByIndex (Private->Current->NicIndex);
|
NicInfo = IScsiGetNicInfoByIndex (Private->Current->NicIndex);
|
||||||
if(NicInfo == NULL) {
|
if(NicInfo == NULL) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!NicInfo->Ipv6Available) {
|
if(!NicInfo->Ipv6Available) {
|
||||||
//
|
//
|
||||||
// Current NIC doesn't Support IPv6, hence use IPv4.
|
// Current NIC doesn't Support IPv6, hence use IPv4.
|
||||||
//
|
//
|
||||||
IfrNvData->IpMode = IP_MODE_IP4;
|
IfrNvData->IpMode = IP_MODE_IP4;
|
||||||
|
|
||||||
CreatePopUp (
|
CreatePopUp (
|
||||||
EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
|
EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
|
||||||
&Key,
|
&Key,
|
||||||
@ -3613,7 +3613,7 @@ IScsiFormCallback (
|
|||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
case IP_MODE_IP4:
|
case IP_MODE_IP4:
|
||||||
ZeroMem (IfrNvData->LocalIp, sizeof (IfrNvData->LocalIp));
|
ZeroMem (IfrNvData->LocalIp, sizeof (IfrNvData->LocalIp));
|
||||||
ZeroMem (IfrNvData->SubnetMask, sizeof (IfrNvData->SubnetMask));
|
ZeroMem (IfrNvData->SubnetMask, sizeof (IfrNvData->SubnetMask));
|
||||||
@ -3624,7 +3624,7 @@ IScsiFormCallback (
|
|||||||
ZeroMem (&Private->Current->SessionConfigData.SubnetMask, sizeof (EFI_IPv4_ADDRESS));
|
ZeroMem (&Private->Current->SessionConfigData.SubnetMask, sizeof (EFI_IPv4_ADDRESS));
|
||||||
ZeroMem (&Private->Current->SessionConfigData.Gateway, sizeof (EFI_IP_ADDRESS));
|
ZeroMem (&Private->Current->SessionConfigData.Gateway, sizeof (EFI_IP_ADDRESS));
|
||||||
ZeroMem (&Private->Current->SessionConfigData.TargetIp, sizeof (EFI_IP_ADDRESS));
|
ZeroMem (&Private->Current->SessionConfigData.TargetIp, sizeof (EFI_IP_ADDRESS));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3632,16 +3632,16 @@ IScsiFormCallback (
|
|||||||
|
|
||||||
case KEY_LOCAL_IP:
|
case KEY_LOCAL_IP:
|
||||||
Status = NetLibStrToIp4 (IfrNvData->LocalIp, &HostIp.v4);
|
Status = NetLibStrToIp4 (IfrNvData->LocalIp, &HostIp.v4);
|
||||||
if (EFI_ERROR (Status) ||
|
if (EFI_ERROR (Status) ||
|
||||||
((Private->Current->SessionConfigData.SubnetMask.Addr[0] != 0) &&
|
((Private->Current->SessionConfigData.SubnetMask.Addr[0] != 0) &&
|
||||||
!NetIp4IsUnicast (NTOHL (HostIp.Addr[0]), NTOHL(*(UINT32*)Private->Current->SessionConfigData.SubnetMask.Addr)))) {
|
!NetIp4IsUnicast (NTOHL (HostIp.Addr[0]), NTOHL(*(UINT32*)Private->Current->SessionConfigData.SubnetMask.Addr)))) {
|
||||||
CreatePopUp (
|
CreatePopUp (
|
||||||
EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
|
EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
|
||||||
&Key,
|
&Key,
|
||||||
L"Invalid IP address!",
|
L"Invalid IP address!",
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
Status = EFI_INVALID_PARAMETER;
|
Status = EFI_INVALID_PARAMETER;
|
||||||
} else {
|
} else {
|
||||||
CopyMem (&Private->Current->SessionConfigData.LocalIp, &HostIp.v4, sizeof (HostIp.v4));
|
CopyMem (&Private->Current->SessionConfigData.LocalIp, &HostIp.v4, sizeof (HostIp.v4));
|
||||||
@ -3657,8 +3657,8 @@ IScsiFormCallback (
|
|||||||
&Key,
|
&Key,
|
||||||
L"Invalid Subnet Mask!",
|
L"Invalid Subnet Mask!",
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
Status = EFI_INVALID_PARAMETER;
|
Status = EFI_INVALID_PARAMETER;
|
||||||
} else {
|
} else {
|
||||||
CopyMem (&Private->Current->SessionConfigData.SubnetMask, &SubnetMask.v4, sizeof (SubnetMask.v4));
|
CopyMem (&Private->Current->SessionConfigData.SubnetMask, &SubnetMask.v4, sizeof (SubnetMask.v4));
|
||||||
@ -3668,16 +3668,16 @@ IScsiFormCallback (
|
|||||||
|
|
||||||
case KEY_GATE_WAY:
|
case KEY_GATE_WAY:
|
||||||
Status = NetLibStrToIp4 (IfrNvData->Gateway, &Gateway.v4);
|
Status = NetLibStrToIp4 (IfrNvData->Gateway, &Gateway.v4);
|
||||||
if (EFI_ERROR (Status) ||
|
if (EFI_ERROR (Status) ||
|
||||||
((Gateway.Addr[0] != 0) &&
|
((Gateway.Addr[0] != 0) &&
|
||||||
(Private->Current->SessionConfigData.SubnetMask.Addr[0] != 0) &&
|
(Private->Current->SessionConfigData.SubnetMask.Addr[0] != 0) &&
|
||||||
!NetIp4IsUnicast (NTOHL (Gateway.Addr[0]), NTOHL(*(UINT32*)Private->Current->SessionConfigData.SubnetMask.Addr)))) {
|
!NetIp4IsUnicast (NTOHL (Gateway.Addr[0]), NTOHL(*(UINT32*)Private->Current->SessionConfigData.SubnetMask.Addr)))) {
|
||||||
CreatePopUp (
|
CreatePopUp (
|
||||||
EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
|
EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
|
||||||
&Key,
|
&Key,
|
||||||
L"Invalid Gateway!",
|
L"Invalid Gateway!",
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
Status = EFI_INVALID_PARAMETER;
|
Status = EFI_INVALID_PARAMETER;
|
||||||
} else {
|
} else {
|
||||||
CopyMem (&Private->Current->SessionConfigData.Gateway, &Gateway.v4, sizeof (Gateway.v4));
|
CopyMem (&Private->Current->SessionConfigData.Gateway, &Gateway.v4, sizeof (Gateway.v4));
|
||||||
@ -3734,7 +3734,7 @@ IScsiFormCallback (
|
|||||||
&Key,
|
&Key,
|
||||||
L"Invalid LUN string!",
|
L"Invalid LUN string!",
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
CopyMem (Private->Current->SessionConfigData.BootLun, &Lun, sizeof (Lun));
|
CopyMem (Private->Current->SessionConfigData.BootLun, &Lun, sizeof (Lun));
|
||||||
}
|
}
|
||||||
@ -3851,7 +3851,7 @@ IScsiConfigFormInit (
|
|||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Publish our HII data.
|
// Publish our HII data.
|
||||||
//
|
//
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// *++
|
// *++
|
||||||
//
|
//
|
||||||
// Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
// which accompanies this distribution. The full text of the license may be found at
|
// which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -26,8 +26,8 @@
|
|||||||
#langdef en-US "English"
|
#langdef en-US "English"
|
||||||
#langdef x-UEFI-ns "UefiNameSpace"
|
#langdef x-UEFI-ns "UefiNameSpace"
|
||||||
|
|
||||||
#string STR_ISCSI_CONFIG_FORM_TITLE #language en-US "iSCSI Configuration"
|
#string STR_ISCSI_CONFIG_FORM_TITLE #language en-US "iSCSI Configuration"
|
||||||
#string STR_ISCSI_CONFIG_FORM_HELP #language en-US "Configure the iSCSI parameters."
|
#string STR_ISCSI_CONFIG_FORM_HELP #language en-US "Configure the iSCSI parameters."
|
||||||
#string STR_ISCSI_MAIN_FORM_TITLE #language en-US "iSCSI Configuration"
|
#string STR_ISCSI_MAIN_FORM_TITLE #language en-US "iSCSI Configuration"
|
||||||
#string STR_ISCSI_MAC_FORM_TITLE #language en-US "MAC Selection"
|
#string STR_ISCSI_MAC_FORM_TITLE #language en-US "MAC Selection"
|
||||||
#string STR_ISCSI_CONFIG_INIT_NAME #language en-US "iSCSI Initiator Name"
|
#string STR_ISCSI_CONFIG_INIT_NAME #language en-US "iSCSI Initiator Name"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
VFR file used by the iSCSI configuration component.
|
VFR file used by the iSCSI configuration component.
|
||||||
|
|
||||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -113,7 +113,7 @@ formset
|
|||||||
text = STRING_TOKEN (STR_NO_SAVE_AND_EXIT),
|
text = STRING_TOKEN (STR_NO_SAVE_AND_EXIT),
|
||||||
flags = INTERACTIVE,
|
flags = INTERACTIVE,
|
||||||
key = KEY_IGNORE_DELETE_ATTEMPT;
|
key = KEY_IGNORE_DELETE_ATTEMPT;
|
||||||
endform;
|
endform;
|
||||||
|
|
||||||
form formid = FORMID_ATTEMPT_FORM,
|
form formid = FORMID_ATTEMPT_FORM,
|
||||||
title = STRING_TOKEN(STR_ISCSI_ATTEMPT_FORM_TITLE);
|
title = STRING_TOKEN(STR_ISCSI_ATTEMPT_FORM_TITLE);
|
||||||
@ -157,8 +157,8 @@ formset
|
|||||||
minimum = CONNECT_MIN_RETRY,
|
minimum = CONNECT_MIN_RETRY,
|
||||||
maximum = CONNECT_MAX_RETRY,
|
maximum = CONNECT_MAX_RETRY,
|
||||||
step = 0,
|
step = 0,
|
||||||
endnumeric;
|
endnumeric;
|
||||||
|
|
||||||
numeric varid = ISCSI_CONFIG_IFR_NVDATA.ConnectTimeout,
|
numeric varid = ISCSI_CONFIG_IFR_NVDATA.ConnectTimeout,
|
||||||
prompt = STRING_TOKEN(STR_ISCSI_CONFIG_TIMEOUT),
|
prompt = STRING_TOKEN(STR_ISCSI_CONFIG_TIMEOUT),
|
||||||
help = STRING_TOKEN(STR_ISCSI_CONFIG_TIMEOUT_HELP),
|
help = STRING_TOKEN(STR_ISCSI_CONFIG_TIMEOUT_HELP),
|
||||||
@ -171,7 +171,7 @@ formset
|
|||||||
|
|
||||||
subtitle text = STRING_TOKEN(STR_NULL);
|
subtitle text = STRING_TOKEN(STR_NULL);
|
||||||
|
|
||||||
string varid = ISCSI_CONFIG_IFR_NVDATA.IsId,
|
string varid = ISCSI_CONFIG_IFR_NVDATA.IsId,
|
||||||
prompt = STRING_TOKEN(STR_ISCSI_CONFIG_ISID),
|
prompt = STRING_TOKEN(STR_ISCSI_CONFIG_ISID),
|
||||||
help = STRING_TOKEN(STR_ISCSI_CONFIG_ISID_HELP),
|
help = STRING_TOKEN(STR_ISCSI_CONFIG_ISID_HELP),
|
||||||
flags = INTERACTIVE,
|
flags = INTERACTIVE,
|
||||||
@ -191,9 +191,9 @@ formset
|
|||||||
endcheckbox;
|
endcheckbox;
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_IP6 OR
|
suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_IP6 OR
|
||||||
ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG;
|
ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG;
|
||||||
|
|
||||||
grayoutif ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x01;
|
grayoutif ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x01;
|
||||||
string varid = ISCSI_CONFIG_IFR_NVDATA.LocalIp,
|
string varid = ISCSI_CONFIG_IFR_NVDATA.LocalIp,
|
||||||
prompt = STRING_TOKEN(STR_ISCSI_LOCAL_IP_ADDRESS),
|
prompt = STRING_TOKEN(STR_ISCSI_LOCAL_IP_ADDRESS),
|
||||||
@ -222,12 +222,12 @@ formset
|
|||||||
maxsize = IP4_MAX_SIZE,
|
maxsize = IP4_MAX_SIZE,
|
||||||
endstring;
|
endstring;
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG;
|
suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG;
|
||||||
subtitle text = STRING_TOKEN(STR_NULL);
|
subtitle text = STRING_TOKEN(STR_NULL);
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG OR
|
suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG OR
|
||||||
ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x00;
|
ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x00;
|
||||||
@ -276,22 +276,22 @@ formset
|
|||||||
minsize = LUN_MIN_SIZE,
|
minsize = LUN_MIN_SIZE,
|
||||||
maxsize = LUN_MAX_SIZE,
|
maxsize = LUN_MAX_SIZE,
|
||||||
endstring;
|
endstring;
|
||||||
|
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG;
|
suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG;
|
||||||
subtitle text = STRING_TOKEN(STR_NULL);
|
subtitle text = STRING_TOKEN(STR_NULL);
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
oneof varid = ISCSI_CONFIG_IFR_NVDATA.AuthenticationType,
|
oneof varid = ISCSI_CONFIG_IFR_NVDATA.AuthenticationType,
|
||||||
questionid = KEY_AUTH_TYPE,
|
questionid = KEY_AUTH_TYPE,
|
||||||
prompt = STRING_TOKEN(STR_AUTHEN_TYPE_PROMPT),
|
prompt = STRING_TOKEN(STR_AUTHEN_TYPE_PROMPT),
|
||||||
help = STRING_TOKEN(STR_AUTHEN_TYPE_HELP),
|
help = STRING_TOKEN(STR_AUTHEN_TYPE_HELP),
|
||||||
option text = STRING_TOKEN(STR_AUTHEN_TYPE_CHAP), value = ISCSI_AUTH_TYPE_CHAP, flags = 0;
|
option text = STRING_TOKEN(STR_AUTHEN_TYPE_CHAP), value = ISCSI_AUTH_TYPE_CHAP, flags = 0;
|
||||||
option text = STRING_TOKEN(STR_AUTHEN_TYPE_NONE), value = ISCSI_AUTH_TYPE_NONE, flags = DEFAULT;
|
option text = STRING_TOKEN(STR_AUTHEN_TYPE_NONE), value = ISCSI_AUTH_TYPE_NONE, flags = DEFAULT;
|
||||||
endoneof;
|
endoneof;
|
||||||
|
|
||||||
suppressif NOT ideqval ISCSI_CONFIG_IFR_NVDATA.AuthenticationType == ISCSI_AUTH_TYPE_CHAP;
|
suppressif NOT ideqval ISCSI_CONFIG_IFR_NVDATA.AuthenticationType == ISCSI_AUTH_TYPE_CHAP;
|
||||||
oneof varid = ISCSI_CONFIG_IFR_NVDATA.CHAPType,
|
oneof varid = ISCSI_CONFIG_IFR_NVDATA.CHAPType,
|
||||||
prompt = STRING_TOKEN(STR_CHAP_TYPE_PROMPT),
|
prompt = STRING_TOKEN(STR_CHAP_TYPE_PROMPT),
|
||||||
help = STRING_TOKEN(STR_CHAP_TYPE_HELP),
|
help = STRING_TOKEN(STR_CHAP_TYPE_HELP),
|
||||||
@ -393,7 +393,7 @@ formset
|
|||||||
text = STRING_TOKEN (STR_SAVE_CHANGES),
|
text = STRING_TOKEN (STR_SAVE_CHANGES),
|
||||||
flags = INTERACTIVE,
|
flags = INTERACTIVE,
|
||||||
key = KEY_SAVE_ATTEMPT_CONFIG;
|
key = KEY_SAVE_ATTEMPT_CONFIG;
|
||||||
|
|
||||||
goto FORMID_MAIN_FORM,
|
goto FORMID_MAIN_FORM,
|
||||||
prompt = STRING_TOKEN (STR_RETURN_MAIN_FORM),
|
prompt = STRING_TOKEN (STR_RETURN_MAIN_FORM),
|
||||||
help = STRING_TOKEN (STR_RETURN_MAIN_FORM),
|
help = STRING_TOKEN (STR_RETURN_MAIN_FORM),
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
iSCSI DHCP4 related configuration routines.
|
iSCSI DHCP4 related configuration routines.
|
||||||
|
|
||||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -201,14 +201,14 @@ ON_EXIT:
|
|||||||
/**
|
/**
|
||||||
The callback function registerd to the DHCP4 instance that is used to select
|
The callback function registerd to the DHCP4 instance that is used to select
|
||||||
the qualified DHCP OFFER.
|
the qualified DHCP OFFER.
|
||||||
|
|
||||||
@param[in] This The DHCP4 protocol.
|
@param[in] This The DHCP4 protocol.
|
||||||
@param[in] Context The context set when configuring the DHCP4 protocol.
|
@param[in] Context The context set when configuring the DHCP4 protocol.
|
||||||
@param[in] CurrentState The current state of the DHCP4 protocol.
|
@param[in] CurrentState The current state of the DHCP4 protocol.
|
||||||
@param[in] Dhcp4Event The event occurs in the current state.
|
@param[in] Dhcp4Event The event occurs in the current state.
|
||||||
@param[in] Packet The DHCP packet that is to be sent or was already received.
|
@param[in] Packet The DHCP packet that is to be sent or was already received.
|
||||||
@param[out] NewPacket The packet used to replace the above Packet.
|
@param[out] NewPacket The packet used to replace the above Packet.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Either the DHCP OFFER is qualified or we're not intereseted
|
@retval EFI_SUCCESS Either the DHCP OFFER is qualified or we're not intereseted
|
||||||
in the Dhcp4Event.
|
in the Dhcp4Event.
|
||||||
@retval EFI_NOT_READY The DHCP OFFER packet doesn't match our requirements.
|
@retval EFI_NOT_READY The DHCP OFFER packet doesn't match our requirements.
|
||||||
@ -411,7 +411,7 @@ IScsiSetIp4Policy (
|
|||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
@ -462,10 +462,10 @@ IScsiDoDhcp (
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// DHCP4 service allows only one of its children to be configured in
|
// DHCP4 service allows only one of its children to be configured in
|
||||||
// the active state, If the DHCP4 D.O.R.A started by IP4 auto
|
// the active state, If the DHCP4 D.O.R.A started by IP4 auto
|
||||||
// configuration and has not been completed, the Dhcp4 state machine
|
// configuration and has not been completed, the Dhcp4 state machine
|
||||||
// will not be in the right state for the iSCSI to start a new round D.O.R.A.
|
// will not be in the right state for the iSCSI to start a new round D.O.R.A.
|
||||||
// So, we need to switch it's policy to static.
|
// So, we need to switch it's policy to static.
|
||||||
//
|
//
|
||||||
Status = gBS->HandleProtocol (Controller, &gEfiIp4Config2ProtocolGuid, (VOID **) &Ip4Config2);
|
Status = gBS->HandleProtocol (Controller, &gEfiIp4Config2ProtocolGuid, (VOID **) &Ip4Config2);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
iSCSI DHCP6 related configuration routines.
|
iSCSI DHCP6 related configuration routines.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -47,7 +47,7 @@ IScsiDhcp6ExtractRootPath (
|
|||||||
UINT8 Index;
|
UINT8 Index;
|
||||||
ISCSI_SESSION_CONFIG_NVDATA *ConfigNvData;
|
ISCSI_SESSION_CONFIG_NVDATA *ConfigNvData;
|
||||||
EFI_IP_ADDRESS Ip;
|
EFI_IP_ADDRESS Ip;
|
||||||
UINT8 IpMode;
|
UINT8 IpMode;
|
||||||
|
|
||||||
ConfigNvData = &ConfigData->SessionConfigData;
|
ConfigNvData = &ConfigData->SessionConfigData;
|
||||||
ConfigNvData->DnsMode = FALSE;
|
ConfigNvData->DnsMode = FALSE;
|
||||||
@ -156,7 +156,7 @@ IScsiDhcp6ExtractRootPath (
|
|||||||
//
|
//
|
||||||
// Get the IP address of the target.
|
// Get the IP address of the target.
|
||||||
//
|
//
|
||||||
Field = &Fields[RP_FIELD_IDX_SERVERNAME];
|
Field = &Fields[RP_FIELD_IDX_SERVERNAME];
|
||||||
if (ConfigNvData->IpMode < IP_MODE_AUTOCONFIG) {
|
if (ConfigNvData->IpMode < IP_MODE_AUTOCONFIG) {
|
||||||
IpMode = ConfigNvData->IpMode;
|
IpMode = ConfigNvData->IpMode;
|
||||||
} else {
|
} else {
|
||||||
@ -238,11 +238,11 @@ ON_EXIT:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
EFI_DHCP6_INFO_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol
|
EFI_DHCP6_INFO_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol
|
||||||
instance to intercept events that occurs in the DHCPv6 Information Request
|
instance to intercept events that occurs in the DHCPv6 Information Request
|
||||||
exchange process.
|
exchange process.
|
||||||
|
|
||||||
@param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance that
|
@param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance that
|
||||||
is used to configure this callback function.
|
is used to configure this callback function.
|
||||||
@param[in] Context Pointer to the context that is initialized in
|
@param[in] Context Pointer to the context that is initialized in
|
||||||
the EFI_DHCP6_PROTOCOL.InfoRequest().
|
the EFI_DHCP6_PROTOCOL.InfoRequest().
|
||||||
@ -276,10 +276,10 @@ IScsiDhcp6ParseReply (
|
|||||||
EFI_DHCP6_PACKET_OPTION **OptionList;
|
EFI_DHCP6_PACKET_OPTION **OptionList;
|
||||||
ISCSI_ATTEMPT_CONFIG_NVDATA *ConfigData;
|
ISCSI_ATTEMPT_CONFIG_NVDATA *ConfigData;
|
||||||
UINT16 ParaLen;
|
UINT16 ParaLen;
|
||||||
|
|
||||||
OptionCount = 0;
|
OptionCount = 0;
|
||||||
BootFileOpt = NULL;
|
BootFileOpt = NULL;
|
||||||
|
|
||||||
Status = This->Parse (This, Packet, &OptionCount, NULL);
|
Status = This->Parse (This, Packet, &OptionCount, NULL);
|
||||||
if (Status != EFI_BUFFER_TOO_SMALL) {
|
if (Status != EFI_BUFFER_TOO_SMALL) {
|
||||||
return EFI_NOT_READY;
|
return EFI_NOT_READY;
|
||||||
@ -353,7 +353,7 @@ IScsiDhcp6ParseReply (
|
|||||||
Status = EFI_UNSUPPORTED;
|
Status = EFI_UNSUPPORTED;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get iSCSI root path from Boot File Uniform Resource Locator (URL) Option
|
// Get iSCSI root path from Boot File Uniform Resource Locator (URL) Option
|
||||||
//
|
//
|
||||||
@ -524,7 +524,7 @@ ON_EXIT:
|
|||||||
|
|
||||||
if (Oro != NULL) {
|
if (Oro != NULL) {
|
||||||
FreePool (Oro);
|
FreePool (Oro);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Timer != NULL) {
|
if (Timer != NULL) {
|
||||||
gBS->CloseEvent (Timer);
|
gBS->CloseEvent (Timer);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
The header file of routines for IScsi driver to perform DNS
|
The header file of routines for IScsi driver to perform DNS
|
||||||
resolution based on UEFI DNS protocols.
|
resolution based on UEFI DNS protocols.
|
||||||
|
|
||||||
Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -56,4 +56,4 @@ IScsiDns6 (
|
|||||||
IN OUT ISCSI_SESSION_CONFIG_NVDATA *NvData
|
IN OUT ISCSI_SESSION_CONFIG_NVDATA *NvData
|
||||||
);
|
);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The entry point of IScsi driver.
|
The entry point of IScsi driver.
|
||||||
|
|
||||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
(C) Copyright 2017 Hewlett Packard Enterprise Development LP<BR>
|
(C) Copyright 2017 Hewlett Packard Enterprise Development LP<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
@ -39,14 +39,14 @@ EFI_GUID gIScsiV6PrivateGuid = ISCSI_V6_PRIVATE_GUID;
|
|||||||
ISCSI_PRIVATE_DATA *mPrivate = NULL;
|
ISCSI_PRIVATE_DATA *mPrivate = NULL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Tests to see if this driver supports the RemainingDevicePath.
|
Tests to see if this driver supports the RemainingDevicePath.
|
||||||
|
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For bus drivers, if this parameter is not NULL, then
|
drivers. For bus drivers, if this parameter is not NULL, then
|
||||||
the bus driver must determine if the bus controller specified
|
the bus driver must determine if the bus controller specified
|
||||||
by ControllerHandle and the child controller specified
|
by ControllerHandle and the child controller specified
|
||||||
by RemainingDevicePath are both supported by this
|
by RemainingDevicePath are both supported by this
|
||||||
bus driver.
|
bus driver.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The RemainingDevicePath is supported or NULL.
|
@retval EFI_SUCCESS The RemainingDevicePath is supported or NULL.
|
||||||
@ -222,15 +222,15 @@ Exit:
|
|||||||
IScsiIp4(6)DriverBindingSupported.
|
IScsiIp4(6)DriverBindingSupported.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For bus drivers, if this parameter is not NULL, then
|
drivers. For bus drivers, if this parameter is not NULL, then
|
||||||
the bus driver must determine if the bus controller specified
|
the bus driver must determine if the bus controller specified
|
||||||
by ControllerHandle and the child controller specified
|
by ControllerHandle and the child controller specified
|
||||||
by RemainingDevicePath are both supported by this
|
by RemainingDevicePath are both supported by this
|
||||||
bus driver.
|
bus driver.
|
||||||
@param[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
|
@param[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
|
||||||
|
|
||||||
@ -437,7 +437,7 @@ IScsiStart (
|
|||||||
return EFI_ABORTED;
|
return EFI_ABORTED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Record the incoming NIC info.
|
// Record the incoming NIC info.
|
||||||
//
|
//
|
||||||
@ -479,13 +479,13 @@ IScsiStart (
|
|||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||||
);
|
);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Always install private protocol no matter what happens later. We need to
|
// Always install private protocol no matter what happens later. We need to
|
||||||
// keep the relationship between ControllerHandle and ChildHandle.
|
// keep the relationship between ControllerHandle and ChildHandle.
|
||||||
//
|
//
|
||||||
Status = gBS->InstallProtocolInterface (
|
Status = gBS->InstallProtocolInterface (
|
||||||
@ -497,7 +497,7 @@ IScsiStart (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IpVersion == IP_VERSION_4) {
|
if (IpVersion == IP_VERSION_4) {
|
||||||
mPrivate->Ipv6Flag = FALSE;
|
mPrivate->Ipv6Flag = FALSE;
|
||||||
} else {
|
} else {
|
||||||
@ -900,8 +900,8 @@ IScsiStart (
|
|||||||
ExistPrivate->Controller,
|
ExistPrivate->Controller,
|
||||||
IScsiPrivateGuid,
|
IScsiPrivateGuid,
|
||||||
&ExistPrivate->IScsiIdentifier
|
&ExistPrivate->IScsiIdentifier
|
||||||
);
|
);
|
||||||
|
|
||||||
IScsiRemoveNic (ExistPrivate->Controller);
|
IScsiRemoveNic (ExistPrivate->Controller);
|
||||||
if (ExistPrivate->Session != NULL) {
|
if (ExistPrivate->Session != NULL) {
|
||||||
IScsiSessionAbort (ExistPrivate->Session);
|
IScsiSessionAbort (ExistPrivate->Session);
|
||||||
@ -973,7 +973,7 @@ IScsiStart (
|
|||||||
Image,
|
Image,
|
||||||
Private->ExtScsiPassThruHandle,
|
Private->ExtScsiPassThruHandle,
|
||||||
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
gBS->UninstallMultipleProtocolInterfaces (
|
gBS->UninstallMultipleProtocolInterfaces (
|
||||||
Private->ExtScsiPassThruHandle,
|
Private->ExtScsiPassThruHandle,
|
||||||
@ -983,7 +983,7 @@ IScsiStart (
|
|||||||
Private->DevicePath,
|
Private->DevicePath,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1010,16 +1010,16 @@ ON_ERROR:
|
|||||||
/**
|
/**
|
||||||
Stops a device controller or a bus controller. This is the worker function for
|
Stops a device controller or a bus controller. This is the worker function for
|
||||||
IScsiIp4(6)DriverBindingStop.
|
IScsiIp4(6)DriverBindingStop.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||||
support a bus specific I/O protocol for the driver
|
support a bus specific I/O protocol for the driver
|
||||||
to use to stop the device.
|
to use to stop the device.
|
||||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||||
if NumberOfChildren is 0.
|
if NumberOfChildren is 0.
|
||||||
@param[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
|
@param[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device was stopped.
|
@retval EFI_SUCCESS The device was stopped.
|
||||||
@retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.
|
@retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.
|
||||||
@retval EFI_INVALID_PARAMETER Child handle is NULL.
|
@retval EFI_INVALID_PARAMETER Child handle is NULL.
|
||||||
@ -1084,7 +1084,7 @@ IScsiStop (
|
|||||||
Private->Image,
|
Private->Image,
|
||||||
Private->ExtScsiPassThruHandle
|
Private->ExtScsiPassThruHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
Conn->TcpIo.Handle,
|
Conn->TcpIo.Handle,
|
||||||
ProtocolGuid,
|
ProtocolGuid,
|
||||||
@ -1094,7 +1094,7 @@ IScsiStop (
|
|||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get the handle of the controller we are controling.
|
// Get the handle of the controller we are controling.
|
||||||
//
|
//
|
||||||
@ -1134,7 +1134,7 @@ IScsiStop (
|
|||||||
This->DriverBindingHandle,
|
This->DriverBindingHandle,
|
||||||
IScsiController
|
IScsiController
|
||||||
);
|
);
|
||||||
|
|
||||||
ASSERT (!EFI_ERROR (Status));
|
ASSERT (!EFI_ERROR (Status));
|
||||||
|
|
||||||
Status = NetLibDestroyServiceChild (
|
Status = NetLibDestroyServiceChild (
|
||||||
@ -1151,7 +1151,7 @@ IScsiStop (
|
|||||||
IScsiController,
|
IScsiController,
|
||||||
ProtocolGuid,
|
ProtocolGuid,
|
||||||
&Private->IScsiIdentifier
|
&Private->IScsiIdentifier
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Remove this NIC.
|
// Remove this NIC.
|
||||||
@ -1177,33 +1177,33 @@ IScsiStop (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||||
it tests to see if this driver supports creating a handle for the specified child device.
|
it tests to see if this driver supports creating a handle for the specified child device.
|
||||||
|
|
||||||
This function checks to see if the driver specified by This supports the device specified by
|
This function checks to see if the driver specified by This supports the device specified by
|
||||||
ControllerHandle. Drivers typically use the device path attached to
|
ControllerHandle. Drivers typically use the device path attached to
|
||||||
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
||||||
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
||||||
may be called many times during platform initialization. In order to reduce boot times, the tests
|
may be called many times during platform initialization. In order to reduce boot times, the tests
|
||||||
performed by this function must be very small and take as little time as possible to execute. This
|
performed by this function must be very small and take as little time as possible to execute. This
|
||||||
function must not change the state of any hardware devices, and this function must be aware that the
|
function must not change the state of any hardware devices, and this function must be aware that the
|
||||||
device specified by ControllerHandle may already be managed by the same driver or a
|
device specified by ControllerHandle may already be managed by the same driver or a
|
||||||
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
||||||
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
||||||
Since ControllerHandle may have been previously started by the same driver, if a protocol is
|
Since ControllerHandle may have been previously started by the same driver, if a protocol is
|
||||||
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
||||||
to guarantee the state of ControllerHandle is not modified by this function.
|
to guarantee the state of ControllerHandle is not modified by this function.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For bus drivers, if this parameter is not NULL, then
|
drivers. For bus drivers, if this parameter is not NULL, then
|
||||||
the bus driver must determine if the bus controller specified
|
the bus driver must determine if the bus controller specified
|
||||||
by ControllerHandle and the child controller specified
|
by ControllerHandle and the child controller specified
|
||||||
by RemainingDevicePath are both supported by this
|
by RemainingDevicePath are both supported by this
|
||||||
bus driver.
|
bus driver.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
||||||
@ -1238,28 +1238,28 @@ IScsiIp4DriverBindingSupported (
|
|||||||
Starts a device controller or a bus controller.
|
Starts a device controller or a bus controller.
|
||||||
|
|
||||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||||
common boot service. It is legal to call Start() from other locations,
|
common boot service. It is legal to call Start() from other locations,
|
||||||
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||||
EFI_DEVICE_PATH_PROTOCOL.
|
EFI_DEVICE_PATH_PROTOCOL.
|
||||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For a bus driver, if this parameter is NULL, then handles
|
drivers. For a bus driver, if this parameter is NULL, then handles
|
||||||
for all the children of Controller are created by this driver.
|
for all the children of Controller are created by this driver.
|
||||||
If this parameter is not NULL and the first Device Path Node is
|
If this parameter is not NULL and the first Device Path Node is
|
||||||
not the End of Device Path Node, then only the handle for the
|
not the End of Device Path Node, then only the handle for the
|
||||||
child device specified by the first Device Path Node of
|
child device specified by the first Device Path Node of
|
||||||
RemainingDevicePath is created by this driver.
|
RemainingDevicePath is created by this driver.
|
||||||
If the first Device Path Node of RemainingDevicePath is
|
If the first Device Path Node of RemainingDevicePath is
|
||||||
the End of Device Path Node, no child handle is created by this
|
the End of Device Path Node, no child handle is created by this
|
||||||
driver.
|
driver.
|
||||||
|
|
||||||
@ -1289,10 +1289,10 @@ IScsiIp4DriverBindingStart (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Stops a device controller or a bus controller.
|
Stops a device controller or a bus controller.
|
||||||
|
|
||||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||||
into this common boot service. It is legal to call Stop() from other locations,
|
into this common boot service. It is legal to call Stop() from other locations,
|
||||||
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||||
same driver's Start() function.
|
same driver's Start() function.
|
||||||
@ -1300,13 +1300,13 @@ IScsiIp4DriverBindingStart (
|
|||||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||||
Start() function, and the Start() function must have called OpenProtocol() on
|
Start() function, and the Start() function must have called OpenProtocol() on
|
||||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||||
support a bus specific I/O protocol for the driver
|
support a bus specific I/O protocol for the driver
|
||||||
to use to stop the device.
|
to use to stop the device.
|
||||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||||
if NumberOfChildren is 0.
|
if NumberOfChildren is 0.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device was stopped.
|
@retval EFI_SUCCESS The device was stopped.
|
||||||
@ -1332,33 +1332,33 @@ IScsiIp4DriverBindingStop (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||||
it tests to see if this driver supports creating a handle for the specified child device.
|
it tests to see if this driver supports creating a handle for the specified child device.
|
||||||
|
|
||||||
This function checks to see if the driver specified by This supports the device specified by
|
This function checks to see if the driver specified by This supports the device specified by
|
||||||
ControllerHandle. Drivers typically use the device path attached to
|
ControllerHandle. Drivers typically use the device path attached to
|
||||||
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
||||||
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
||||||
may be called many times during platform initialization. In order to reduce boot times, the tests
|
may be called many times during platform initialization. In order to reduce boot times, the tests
|
||||||
performed by this function must be very small and take as little time as possible to execute. This
|
performed by this function must be very small and take as little time as possible to execute. This
|
||||||
function must not change the state of any hardware devices, and this function must be aware that the
|
function must not change the state of any hardware devices, and this function must be aware that the
|
||||||
device specified by ControllerHandle may already be managed by the same driver or a
|
device specified by ControllerHandle may already be managed by the same driver or a
|
||||||
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
||||||
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
||||||
Since ControllerHandle may have been previously started by the same driver, if a protocol is
|
Since ControllerHandle may have been previously started by the same driver, if a protocol is
|
||||||
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
||||||
to guarantee the state of ControllerHandle is not modified by this function.
|
to guarantee the state of ControllerHandle is not modified by this function.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For bus drivers, if this parameter is not NULL, then
|
drivers. For bus drivers, if this parameter is not NULL, then
|
||||||
the bus driver must determine if the bus controller specified
|
the bus driver must determine if the bus controller specified
|
||||||
by ControllerHandle and the child controller specified
|
by ControllerHandle and the child controller specified
|
||||||
by RemainingDevicePath are both supported by this
|
by RemainingDevicePath are both supported by this
|
||||||
bus driver.
|
bus driver.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
||||||
@ -1393,28 +1393,28 @@ IScsiIp6DriverBindingSupported (
|
|||||||
Starts a device controller or a bus controller.
|
Starts a device controller or a bus controller.
|
||||||
|
|
||||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||||
common boot service. It is legal to call Start() from other locations,
|
common boot service. It is legal to call Start() from other locations,
|
||||||
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||||
EFI_DEVICE_PATH_PROTOCOL.
|
EFI_DEVICE_PATH_PROTOCOL.
|
||||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For a bus driver, if this parameter is NULL, then handles
|
drivers. For a bus driver, if this parameter is NULL, then handles
|
||||||
for all the children of Controller are created by this driver.
|
for all the children of Controller are created by this driver.
|
||||||
If this parameter is not NULL and the first Device Path Node is
|
If this parameter is not NULL and the first Device Path Node is
|
||||||
not the End of Device Path Node, then only the handle for the
|
not the End of Device Path Node, then only the handle for the
|
||||||
child device specified by the first Device Path Node of
|
child device specified by the first Device Path Node of
|
||||||
RemainingDevicePath is created by this driver.
|
RemainingDevicePath is created by this driver.
|
||||||
If the first Device Path Node of RemainingDevicePath is
|
If the first Device Path Node of RemainingDevicePath is
|
||||||
the End of Device Path Node, no child handle is created by this
|
the End of Device Path Node, no child handle is created by this
|
||||||
driver.
|
driver.
|
||||||
|
|
||||||
@ -1444,10 +1444,10 @@ IScsiIp6DriverBindingStart (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Stops a device controller or a bus controller.
|
Stops a device controller or a bus controller.
|
||||||
|
|
||||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||||
into this common boot service. It is legal to call Stop() from other locations,
|
into this common boot service. It is legal to call Stop() from other locations,
|
||||||
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||||
same driver's Start() function.
|
same driver's Start() function.
|
||||||
@ -1455,13 +1455,13 @@ IScsiIp6DriverBindingStart (
|
|||||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||||
Start() function, and the Start() function must have called OpenProtocol() on
|
Start() function, and the Start() function must have called OpenProtocol() on
|
||||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||||
support a bus specific I/O protocol for the driver
|
support a bus specific I/O protocol for the driver
|
||||||
to use to stop the device.
|
to use to stop the device.
|
||||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||||
if NumberOfChildren is 0.
|
if NumberOfChildren is 0.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device was stopped.
|
@retval EFI_SUCCESS The device was stopped.
|
||||||
@ -1573,7 +1573,7 @@ IScsiUnload (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Uninstall the protocols installed by iSCSI driver.
|
// Uninstall the protocols installed by iSCSI driver.
|
||||||
//
|
//
|
||||||
@ -1586,7 +1586,7 @@ IScsiUnload (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gIScsiControllerNameTable!= NULL) {
|
if (gIScsiControllerNameTable!= NULL) {
|
||||||
Status = FreeUnicodeStringTable (gIScsiControllerNameTable);
|
Status = FreeUnicodeStringTable (gIScsiControllerNameTable);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
@ -1615,7 +1615,7 @@ IScsiUnload (
|
|||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gBS->HandleProtocol (
|
Status = gBS->HandleProtocol (
|
||||||
gIScsiIp4DriverBinding.DriverBindingHandle,
|
gIScsiIp4DriverBinding.DriverBindingHandle,
|
||||||
&gEfiComponentName2ProtocolGuid,
|
&gEfiComponentName2ProtocolGuid,
|
||||||
@ -1653,7 +1653,7 @@ IScsiUnload (
|
|||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gBS->HandleProtocol (
|
Status = gBS->HandleProtocol (
|
||||||
gIScsiIp6DriverBinding.DriverBindingHandle,
|
gIScsiIp6DriverBinding.DriverBindingHandle,
|
||||||
&gEfiComponentName2ProtocolGuid,
|
&gEfiComponentName2ProtocolGuid,
|
||||||
@ -1698,7 +1698,7 @@ ON_EXIT:
|
|||||||
if (DeviceHandleBuffer != NULL) {
|
if (DeviceHandleBuffer != NULL) {
|
||||||
FreePool (DeviceHandleBuffer);
|
FreePool (DeviceHandleBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1706,11 +1706,11 @@ ON_EXIT:
|
|||||||
This is the declaration of an EFI image entry point. This entry point is
|
This is the declaration of an EFI image entry point. This entry point is
|
||||||
the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including
|
the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including
|
||||||
both device drivers and bus drivers.
|
both device drivers and bus drivers.
|
||||||
|
|
||||||
The entry point for iSCSI driver which initializes the global variables and
|
The entry point for iSCSI driver which initializes the global variables and
|
||||||
installs the driver binding, component name protocol, iSCSI initiator name
|
installs the driver binding, component name protocol, iSCSI initiator name
|
||||||
protocol and Authentication Info protocol on its image.
|
protocol and Authentication Info protocol on its image.
|
||||||
|
|
||||||
@param[in] ImageHandle The firmware allocated handle for the UEFI image.
|
@param[in] ImageHandle The firmware allocated handle for the UEFI image.
|
||||||
@param[in] SystemTable A pointer to the EFI System Table.
|
@param[in] SystemTable A pointer to the EFI System Table.
|
||||||
|
|
||||||
@ -1767,7 +1767,7 @@ IScsiDriverEntryPoint (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Error1;
|
goto Error1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Install the iSCSI Initiator Name Protocol.
|
// Install the iSCSI Initiator Name Protocol.
|
||||||
//
|
//
|
||||||
@ -1779,7 +1779,7 @@ IScsiDriverEntryPoint (
|
|||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Error2;
|
goto Error2;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create the private data structures.
|
// Create the private data structures.
|
||||||
@ -1835,7 +1835,7 @@ IScsiDriverEntryPoint (
|
|||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Error6;
|
goto Error6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The header file of IScsiDriver.c.
|
The header file of IScsiDriver.c.
|
||||||
|
|
||||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
(C) Copyright 2017 Hewlett Packard Enterprise Development LP<BR>
|
(C) Copyright 2017 Hewlett Packard Enterprise Development LP<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
@ -93,33 +93,33 @@ typedef struct _ISCSI_PRIVATE_PROTOCOL {
|
|||||||
//
|
//
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||||
it tests to see if this driver supports creating a handle for the specified child device.
|
it tests to see if this driver supports creating a handle for the specified child device.
|
||||||
|
|
||||||
This function checks to see if the driver specified by This supports the device specified by
|
This function checks to see if the driver specified by This supports the device specified by
|
||||||
ControllerHandle. Drivers typically use the device path attached to
|
ControllerHandle. Drivers typically use the device path attached to
|
||||||
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
||||||
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
||||||
may be called many times during platform initialization. In order to reduce boot times, the tests
|
may be called many times during platform initialization. In order to reduce boot times, the tests
|
||||||
performed by this function must be very small and take as little time as possible to execute. This
|
performed by this function must be very small and take as little time as possible to execute. This
|
||||||
function must not change the state of any hardware devices, and this function must be aware that the
|
function must not change the state of any hardware devices, and this function must be aware that the
|
||||||
device specified by ControllerHandle may already be managed by the same driver or a
|
device specified by ControllerHandle may already be managed by the same driver or a
|
||||||
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
||||||
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
||||||
Since ControllerHandle may have been previously started by the same driver, if a protocol is
|
Since ControllerHandle may have been previously started by the same driver, if a protocol is
|
||||||
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
||||||
to guarantee the state of ControllerHandle is not modified by this function.
|
to guarantee the state of ControllerHandle is not modified by this function.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For bus drivers, if this parameter is not NULL, then
|
drivers. For bus drivers, if this parameter is not NULL, then
|
||||||
the bus driver must determine if the bus controller specified
|
the bus driver must determine if the bus controller specified
|
||||||
by ControllerHandle and the child controller specified
|
by ControllerHandle and the child controller specified
|
||||||
by RemainingDevicePath are both supported by this
|
by RemainingDevicePath are both supported by this
|
||||||
bus driver.
|
bus driver.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
||||||
@ -146,28 +146,28 @@ IScsiIp4DriverBindingSupported (
|
|||||||
Starts a device controller or a bus controller.
|
Starts a device controller or a bus controller.
|
||||||
|
|
||||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||||
common boot service. It is legal to call Start() from other locations,
|
common boot service. It is legal to call Start() from other locations,
|
||||||
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||||
EFI_DEVICE_PATH_PROTOCOL.
|
EFI_DEVICE_PATH_PROTOCOL.
|
||||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For a bus driver, if this parameter is NULL, then handles
|
drivers. For a bus driver, if this parameter is NULL, then handles
|
||||||
for all the children of Controller are created by this driver.
|
for all the children of Controller are created by this driver.
|
||||||
If this parameter is not NULL and the first Device Path Node is
|
If this parameter is not NULL and the first Device Path Node is
|
||||||
not the End of Device Path Node, then only the handle for the
|
not the End of Device Path Node, then only the handle for the
|
||||||
child device specified by the first Device Path Node of
|
child device specified by the first Device Path Node of
|
||||||
RemainingDevicePath is created by this driver.
|
RemainingDevicePath is created by this driver.
|
||||||
If the first Device Path Node of RemainingDevicePath is
|
If the first Device Path Node of RemainingDevicePath is
|
||||||
the End of Device Path Node, no child handle is created by this
|
the End of Device Path Node, no child handle is created by this
|
||||||
driver.
|
driver.
|
||||||
|
|
||||||
@ -187,10 +187,10 @@ IScsiIp4DriverBindingStart (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Stops a device controller or a bus controller.
|
Stops a device controller or a bus controller.
|
||||||
|
|
||||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||||
into this common boot service. It is legal to call Stop() from other locations,
|
into this common boot service. It is legal to call Stop() from other locations,
|
||||||
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||||
same driver's Start() function.
|
same driver's Start() function.
|
||||||
@ -198,13 +198,13 @@ IScsiIp4DriverBindingStart (
|
|||||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||||
Start() function, and the Start() function must have called OpenProtocol() on
|
Start() function, and the Start() function must have called OpenProtocol() on
|
||||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||||
support a bus specific I/O protocol for the driver
|
support a bus specific I/O protocol for the driver
|
||||||
to use to stop the device.
|
to use to stop the device.
|
||||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||||
if NumberOfChildren is 0.
|
if NumberOfChildren is 0.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device was stopped.
|
@retval EFI_SUCCESS The device was stopped.
|
||||||
@ -221,33 +221,33 @@ IScsiIp4DriverBindingStop (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||||
it tests to see if this driver supports creating a handle for the specified child device.
|
it tests to see if this driver supports creating a handle for the specified child device.
|
||||||
|
|
||||||
This function checks to see if the driver specified by This supports the device specified by
|
This function checks to see if the driver specified by This supports the device specified by
|
||||||
ControllerHandle. Drivers typically use the device path attached to
|
ControllerHandle. Drivers typically use the device path attached to
|
||||||
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
ControllerHandle and/or the services from the bus I/O abstraction attached to
|
||||||
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
ControllerHandle to determine if the driver supports ControllerHandle. This function
|
||||||
may be called many times during platform initialization. In order to reduce boot times, the tests
|
may be called many times during platform initialization. In order to reduce boot times, the tests
|
||||||
performed by this function must be very small and take as little time as possible to execute. This
|
performed by this function must be very small and take as little time as possible to execute. This
|
||||||
function must not change the state of any hardware devices, and this function must be aware that the
|
function must not change the state of any hardware devices, and this function must be aware that the
|
||||||
device specified by ControllerHandle may already be managed by the same driver or a
|
device specified by ControllerHandle may already be managed by the same driver or a
|
||||||
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
different driver. This function must match its calls to AllocatePages() with FreePages(),
|
||||||
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
|
||||||
Since ControllerHandle may have been previously started by the same driver, if a protocol is
|
Since ControllerHandle may have been previously started by the same driver, if a protocol is
|
||||||
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
already in the opened state, then it must not be closed with CloseProtocol(). This is required
|
||||||
to guarantee the state of ControllerHandle is not modified by this function.
|
to guarantee the state of ControllerHandle is not modified by this function.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For bus drivers, if this parameter is not NULL, then
|
drivers. For bus drivers, if this parameter is not NULL, then
|
||||||
the bus driver must determine if the bus controller specified
|
the bus driver must determine if the bus controller specified
|
||||||
by ControllerHandle and the child controller specified
|
by ControllerHandle and the child controller specified
|
||||||
by RemainingDevicePath are both supported by this
|
by RemainingDevicePath are both supported by this
|
||||||
bus driver.
|
bus driver.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
||||||
@ -274,28 +274,28 @@ IScsiIp6DriverBindingSupported (
|
|||||||
Starts a device controller or a bus controller.
|
Starts a device controller or a bus controller.
|
||||||
|
|
||||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||||
common boot service. It is legal to call Start() from other locations,
|
common boot service. It is legal to call Start() from other locations,
|
||||||
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||||
EFI_DEVICE_PATH_PROTOCOL.
|
EFI_DEVICE_PATH_PROTOCOL.
|
||||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||||
must support a protocol interface that supplies
|
must support a protocol interface that supplies
|
||||||
an I/O abstraction to the driver.
|
an I/O abstraction to the driver.
|
||||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||||
parameter is ignored by device drivers, and is optional for bus
|
parameter is ignored by device drivers, and is optional for bus
|
||||||
drivers. For a bus driver, if this parameter is NULL, then handles
|
drivers. For a bus driver, if this parameter is NULL, then handles
|
||||||
for all the children of Controller are created by this driver.
|
for all the children of Controller are created by this driver.
|
||||||
If this parameter is not NULL and the first Device Path Node is
|
If this parameter is not NULL and the first Device Path Node is
|
||||||
not the End of Device Path Node, then only the handle for the
|
not the End of Device Path Node, then only the handle for the
|
||||||
child device specified by the first Device Path Node of
|
child device specified by the first Device Path Node of
|
||||||
RemainingDevicePath is created by this driver.
|
RemainingDevicePath is created by this driver.
|
||||||
If the first Device Path Node of RemainingDevicePath is
|
If the first Device Path Node of RemainingDevicePath is
|
||||||
the End of Device Path Node, no child handle is created by this
|
the End of Device Path Node, no child handle is created by this
|
||||||
driver.
|
driver.
|
||||||
|
|
||||||
@ -315,10 +315,10 @@ IScsiIp6DriverBindingStart (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Stops a device controller or a bus controller.
|
Stops a device controller or a bus controller.
|
||||||
|
|
||||||
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
|
||||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||||
into this common boot service. It is legal to call Stop() from other locations,
|
into this common boot service. It is legal to call Stop() from other locations,
|
||||||
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
||||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||||
same driver's Start() function.
|
same driver's Start() function.
|
||||||
@ -326,13 +326,13 @@ IScsiIp6DriverBindingStart (
|
|||||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||||
Start() function, and the Start() function must have called OpenProtocol() on
|
Start() function, and the Start() function must have called OpenProtocol() on
|
||||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||||
support a bus specific I/O protocol for the driver
|
support a bus specific I/O protocol for the driver
|
||||||
to use to stop the device.
|
to use to stop the device.
|
||||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||||
if NumberOfChildren is 0.
|
if NumberOfChildren is 0.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The device was stopped.
|
@retval EFI_SUCCESS The device was stopped.
|
||||||
@ -434,11 +434,11 @@ IScsiComponentNameGetDriverName (
|
|||||||
language of the driver name that the caller is
|
language of the driver name that the caller is
|
||||||
requesting, and it must match one of the
|
requesting, and it must match one of the
|
||||||
languages specified in SupportedLanguages. The
|
languages specified in SupportedLanguages. The
|
||||||
number of languages supported by a driver is
|
number of languages supported by a driver is
|
||||||
determined by the driver writer. Language is
|
determined by the driver writer. Language is
|
||||||
specified inRFC 4646 or ISO 639-2 language code
|
specified inRFC 4646 or ISO 639-2 language code
|
||||||
format.
|
format.
|
||||||
|
|
||||||
@param[out] ControllerName A pointer to the Unicode string to return.
|
@param[out] ControllerName A pointer to the Unicode string to return.
|
||||||
This Unicode string is the name of the
|
This Unicode string is the name of the
|
||||||
controller specified by ControllerHandle and
|
controller specified by ControllerHandle and
|
||||||
@ -597,19 +597,19 @@ IScsiSetAuthenticationInfo (
|
|||||||
/**
|
/**
|
||||||
Sends a SCSI Request Packet to a SCSI device that is attached to the SCSI channel.
|
Sends a SCSI Request Packet to a SCSI device that is attached to the SCSI channel.
|
||||||
This function supports both blocking I/O and nonblocking I/O. The blocking I/O
|
This function supports both blocking I/O and nonblocking I/O. The blocking I/O
|
||||||
functionality is required, and the nonblocking I/O functionality is optional.
|
functionality is required, and the nonblocking I/O functionality is optional.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
|
||||||
@param[in] Target The Target is an array of size TARGET_MAX_BYTES and it
|
@param[in] Target The Target is an array of size TARGET_MAX_BYTES and it
|
||||||
represents the id of the SCSI device to send the SCSI
|
represents the id of the SCSI device to send the SCSI
|
||||||
Request Packet. Each transport driver may choose to
|
Request Packet. Each transport driver may choose to
|
||||||
utilize a subset of this size to suit the needs
|
utilize a subset of this size to suit the needs
|
||||||
of transport target representation. For example, a
|
of transport target representation. For example, a
|
||||||
Fibre Channel driver may use only 8 bytes (WWN)
|
Fibre Channel driver may use only 8 bytes (WWN)
|
||||||
to represent an FC target.
|
to represent an FC target.
|
||||||
@param[in] Lun The LUN of the SCSI device to send the SCSI Request Packet.
|
@param[in] Lun The LUN of the SCSI device to send the SCSI Request Packet.
|
||||||
@param[in, out] Packet A pointer to the SCSI Request Packet to send to the
|
@param[in, out] Packet A pointer to the SCSI Request Packet to send to the
|
||||||
SCSI device specified by Target and Lun.
|
SCSI device specified by Target and Lun.
|
||||||
@param[in] Event If nonblocking I/O is not supported then Event is ignored,
|
@param[in] Event If nonblocking I/O is not supported then Event is ignored,
|
||||||
and blocking I/O is performed. If Event is NULL, then
|
and blocking I/O is performed. If Event is NULL, then
|
||||||
blocking I/O is performed. If Event is not NULL and non
|
blocking I/O is performed. If Event is not NULL and non
|
||||||
@ -618,7 +618,7 @@ IScsiSetAuthenticationInfo (
|
|||||||
completes.
|
completes.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The SCSI Request Packet was sent by the host. For
|
@retval EFI_SUCCESS The SCSI Request Packet was sent by the host. For
|
||||||
bi-directional commands, InTransferLength bytes
|
bi-directional commands, InTransferLength bytes
|
||||||
were transferred from InDataBuffer.
|
were transferred from InDataBuffer.
|
||||||
For write and bi-directional commands, OutTransferLength
|
For write and bi-directional commands, OutTransferLength
|
||||||
bytes were transferred by OutDataBuffer.
|
bytes were transferred by OutDataBuffer.
|
||||||
@ -631,7 +631,7 @@ IScsiSetAuthenticationInfo (
|
|||||||
there are too many SCSI Request Packets already
|
there are too many SCSI Request Packets already
|
||||||
queued. The caller may retry later.
|
queued. The caller may retry later.
|
||||||
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send
|
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send
|
||||||
the SCSI Request Packet.
|
the SCSI Request Packet.
|
||||||
@retval EFI_INVALID_PARAMETER Target, Lun, or the contents of ScsiRequestPacket
|
@retval EFI_INVALID_PARAMETER Target, Lun, or the contents of ScsiRequestPacket
|
||||||
are invalid.
|
are invalid.
|
||||||
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
|
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
|
||||||
@ -658,9 +658,9 @@ IScsiExtScsiPassThruFunction (
|
|||||||
Used to retrieve the list of legal Target IDs and LUNs for SCSI devices on
|
Used to retrieve the list of legal Target IDs and LUNs for SCSI devices on
|
||||||
a SCSI channel. These can either be the list SCSI devices that are actually
|
a SCSI channel. These can either be the list SCSI devices that are actually
|
||||||
present on the SCSI channel, or the list of legal Target Ids and LUNs for the
|
present on the SCSI channel, or the list of legal Target Ids and LUNs for the
|
||||||
SCSI channel. Regardless, the caller of this function must probe the Target ID
|
SCSI channel. Regardless, the caller of this function must probe the Target ID
|
||||||
and LUN returned to see if a SCSI device is actually present at that location
|
and LUN returned to see if a SCSI device is actually present at that location
|
||||||
on the SCSI channel.
|
on the SCSI channel.
|
||||||
|
|
||||||
@param[in] This The EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
|
@param[in] This The EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
|
||||||
@param[in, out] Target On input, a pointer to the Target ID of a SCSI
|
@param[in, out] Target On input, a pointer to the Target ID of a SCSI
|
||||||
@ -790,7 +790,7 @@ IScsiExtScsiPassThruResetTargetLun (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Retrieve the list of legal Target IDs for SCSI devices on a SCSI channel.
|
Retrieve the list of legal Target IDs for SCSI devices on a SCSI channel.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL
|
@param[in] This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL
|
||||||
instance.
|
instance.
|
||||||
@ -800,7 +800,7 @@ IScsiExtScsiPassThruResetTargetLun (
|
|||||||
next SCSI device present on a SCSI channel.
|
next SCSI device present on a SCSI channel.
|
||||||
An input value of 0xF(all bytes in the array are 0xF)
|
An input value of 0xF(all bytes in the array are 0xF)
|
||||||
in the Target array retrieves the Target ID of the
|
in the Target array retrieves the Target ID of the
|
||||||
first SCSI device present on a SCSI channel.
|
first SCSI device present on a SCSI channel.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The Target ID of the next SCSI device on the SCSI
|
@retval EFI_SUCCESS The Target ID of the next SCSI device on the SCSI
|
||||||
channel was returned in Target.
|
channel was returned in Target.
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
#
|
#
|
||||||
# The iSCSI driver provides iSCSI service in the preboot environment and supports
|
# The iSCSI driver provides iSCSI service in the preboot environment and supports
|
||||||
# booting over iSCSI.
|
# booting over iSCSI.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -57,7 +57,7 @@
|
|||||||
IScsiExtScsiPassThru.c
|
IScsiExtScsiPassThru.c
|
||||||
IScsiIbft.c
|
IScsiIbft.c
|
||||||
IScsiIbft.h
|
IScsiIbft.h
|
||||||
IScsiInitiatorName.c
|
IScsiInitiatorName.c
|
||||||
IScsiImpl.h
|
IScsiImpl.h
|
||||||
IScsiMisc.c
|
IScsiMisc.c
|
||||||
IScsiMisc.h
|
IScsiMisc.h
|
||||||
@ -82,7 +82,7 @@
|
|||||||
PrintLib
|
PrintLib
|
||||||
UefiBootServicesTableLib
|
UefiBootServicesTableLib
|
||||||
UefiDriverEntryPoint
|
UefiDriverEntryPoint
|
||||||
UefiLib
|
UefiLib
|
||||||
UefiRuntimeServicesTableLib
|
UefiRuntimeServicesTableLib
|
||||||
UefiHiiServicesLib
|
UefiHiiServicesLib
|
||||||
BaseCryptLib
|
BaseCryptLib
|
||||||
@ -113,7 +113,7 @@
|
|||||||
## PRODUCES
|
## PRODUCES
|
||||||
## UNDEFINED # Variable
|
## UNDEFINED # Variable
|
||||||
gEfiIScsiInitiatorNameProtocolGuid
|
gEfiIScsiInitiatorNameProtocolGuid
|
||||||
## PRODUCES
|
## PRODUCES
|
||||||
gEfiAuthenticationInfoProtocolGuid
|
gEfiAuthenticationInfoProtocolGuid
|
||||||
## SOMETIMES_CONSUMES
|
## SOMETIMES_CONSUMES
|
||||||
gEfiAdapterInformationProtocolGuid
|
gEfiAdapterInformationProtocolGuid
|
||||||
@ -127,7 +127,7 @@
|
|||||||
gEfiAcpi20TableGuid ## SOMETIMES_CONSUMES ## SystemTable
|
gEfiAcpi20TableGuid ## SOMETIMES_CONSUMES ## SystemTable
|
||||||
gEfiAdapterInfoNetworkBootGuid ## SOMETIMES_CONSUMES ## UNDEFINED
|
gEfiAdapterInfoNetworkBootGuid ## SOMETIMES_CONSUMES ## UNDEFINED
|
||||||
gEfiAdapterInfoUndiIpv6SupportGuid ## SOMETIMES_CONSUMES ## GUID
|
gEfiAdapterInfoUndiIpv6SupportGuid ## SOMETIMES_CONSUMES ## GUID
|
||||||
|
|
||||||
## SOMETIMES_PRODUCES ## Variable:L"AttemptOrder"
|
## SOMETIMES_PRODUCES ## Variable:L"AttemptOrder"
|
||||||
## SOMETIMES_CONSUMES ## Variable:L"AttemptOrder"
|
## SOMETIMES_CONSUMES ## Variable:L"AttemptOrder"
|
||||||
## SOMETIMES_PRODUCES ## Variable:L"InitialAttemptOrder"
|
## SOMETIMES_PRODUCES ## Variable:L"InitialAttemptOrder"
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
// The iSCSI driver provides iSCSI service in the preboot environment and supports
|
// The iSCSI driver provides iSCSI service in the preboot environment and supports
|
||||||
// booting over iSCSI.
|
// booting over iSCSI.
|
||||||
//
|
//
|
||||||
// Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
|
// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
//
|
//
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
// which accompanies this distribution. The full text of the license may be found at
|
// which accompanies this distribution. The full text of the license may be found at
|
||||||
// http://opensource.org/licenses/bsd-license.php
|
// http://opensource.org/licenses/bsd-license.php
|
||||||
//
|
//
|
||||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
//
|
//
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// /** @file
|
// /** @file
|
||||||
// IScsiDxe Localized Strings and Content
|
// IScsiDxe Localized Strings and Content
|
||||||
//
|
//
|
||||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
//
|
//
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -14,7 +14,7 @@
|
|||||||
// **/
|
// **/
|
||||||
|
|
||||||
#string STR_PROPERTIES_MODULE_NAME
|
#string STR_PROPERTIES_MODULE_NAME
|
||||||
#language en-US
|
#language en-US
|
||||||
"iSCSI DXE"
|
"iSCSI DXE"
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The implementation of EFI_EXT_SCSI_PASS_THRU_PROTOCOL.
|
The implementation of EFI_EXT_SCSI_PASS_THRU_PROTOCOL.
|
||||||
|
|
||||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -29,19 +29,19 @@ EFI_EXT_SCSI_PASS_THRU_PROTOCOL gIScsiExtScsiPassThruProtocolTemplate = {
|
|||||||
/**
|
/**
|
||||||
Sends a SCSI Request Packet to a SCSI device that is attached to the SCSI channel.
|
Sends a SCSI Request Packet to a SCSI device that is attached to the SCSI channel.
|
||||||
This function supports both blocking I/O and nonblocking I/O. The blocking I/O
|
This function supports both blocking I/O and nonblocking I/O. The blocking I/O
|
||||||
functionality is required, and the nonblocking I/O functionality is optional.
|
functionality is required, and the nonblocking I/O functionality is optional.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
|
@param[in] This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
|
||||||
@param[in] Target The Target is an array of size TARGET_MAX_BYTES and it
|
@param[in] Target The Target is an array of size TARGET_MAX_BYTES and it
|
||||||
represents the id of the SCSI device to send the SCSI
|
represents the id of the SCSI device to send the SCSI
|
||||||
Request Packet. Each transport driver may choose to
|
Request Packet. Each transport driver may choose to
|
||||||
utilize a subset of this size to suit the needs
|
utilize a subset of this size to suit the needs
|
||||||
of transport target representation. For example, a
|
of transport target representation. For example, a
|
||||||
Fibre Channel driver may use only 8 bytes (WWN)
|
Fibre Channel driver may use only 8 bytes (WWN)
|
||||||
to represent an FC target.
|
to represent an FC target.
|
||||||
@param[in] Lun The LUN of the SCSI device to send the SCSI Request Packet.
|
@param[in] Lun The LUN of the SCSI device to send the SCSI Request Packet.
|
||||||
@param[in, out] Packet A pointer to the SCSI Request Packet to send to the
|
@param[in, out] Packet A pointer to the SCSI Request Packet to send to the
|
||||||
SCSI device specified by Target and Lun.
|
SCSI device specified by Target and Lun.
|
||||||
@param[in] Event If nonblocking I/O is not supported then Event is ignored,
|
@param[in] Event If nonblocking I/O is not supported then Event is ignored,
|
||||||
and blocking I/O is performed. If Event is NULL, then
|
and blocking I/O is performed. If Event is NULL, then
|
||||||
blocking I/O is performed. If Event is not NULL and non
|
blocking I/O is performed. If Event is not NULL and non
|
||||||
@ -50,7 +50,7 @@ EFI_EXT_SCSI_PASS_THRU_PROTOCOL gIScsiExtScsiPassThruProtocolTemplate = {
|
|||||||
completes.
|
completes.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The SCSI Request Packet was sent by the host. For
|
@retval EFI_SUCCESS The SCSI Request Packet was sent by the host. For
|
||||||
bi-directional commands, InTransferLength bytes
|
bi-directional commands, InTransferLength bytes
|
||||||
were transferred from InDataBuffer.
|
were transferred from InDataBuffer.
|
||||||
For write and bi-directional commands, OutTransferLength
|
For write and bi-directional commands, OutTransferLength
|
||||||
bytes were transferred by OutDataBuffer.
|
bytes were transferred by OutDataBuffer.
|
||||||
@ -63,7 +63,7 @@ EFI_EXT_SCSI_PASS_THRU_PROTOCOL gIScsiExtScsiPassThruProtocolTemplate = {
|
|||||||
there are too many SCSI Request Packets already
|
there are too many SCSI Request Packets already
|
||||||
queued. The caller may retry later.
|
queued. The caller may retry later.
|
||||||
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send
|
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send
|
||||||
the SCSI Request Packet.
|
the SCSI Request Packet.
|
||||||
@retval EFI_INVALID_PARAMETER Target, Lun, or the contents of ScsiRequestPacket,
|
@retval EFI_INVALID_PARAMETER Target, Lun, or the contents of ScsiRequestPacket,
|
||||||
are invalid.
|
are invalid.
|
||||||
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
|
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
|
||||||
@ -88,7 +88,7 @@ IScsiExtScsiPassThruFunction (
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
ISCSI_DRIVER_DATA *Private;
|
ISCSI_DRIVER_DATA *Private;
|
||||||
|
|
||||||
if (Target[0] != 0) {
|
if (Target[0] != 0) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
@ -118,9 +118,9 @@ IScsiExtScsiPassThruFunction (
|
|||||||
Used to retrieve the list of legal Target IDs and LUNs for SCSI devices on
|
Used to retrieve the list of legal Target IDs and LUNs for SCSI devices on
|
||||||
a SCSI channel. These can either be the list SCSI devices that are actually
|
a SCSI channel. These can either be the list SCSI devices that are actually
|
||||||
present on the SCSI channel, or the list of legal Target Ids and LUNs for the
|
present on the SCSI channel, or the list of legal Target Ids and LUNs for the
|
||||||
SCSI channel. Regardless, the caller of this function must probe the Target ID
|
SCSI channel. Regardless, the caller of this function must probe the Target ID
|
||||||
and LUN returned to see if a SCSI device is actually present at that location
|
and LUN returned to see if a SCSI device is actually present at that location
|
||||||
on the SCSI channel.
|
on the SCSI channel.
|
||||||
|
|
||||||
@param[in] This The EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
|
@param[in] This The EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
|
||||||
@param[in, out] Target On input, a pointer to the Target ID of a SCSI
|
@param[in, out] Target On input, a pointer to the Target ID of a SCSI
|
||||||
@ -298,7 +298,7 @@ IScsiExtScsiPassThruBuildDevicePath (
|
|||||||
@retval EFI_INVALID_PARAMETER DevicePath/Target/Lun is NULL.
|
@retval EFI_INVALID_PARAMETER DevicePath/Target/Lun is NULL.
|
||||||
@retval EFI_UNSUPPORTED This driver does not support the device path node
|
@retval EFI_UNSUPPORTED This driver does not support the device path node
|
||||||
type in DevicePath.
|
type in DevicePath.
|
||||||
@retval EFI_NOT_FOUND A valid translation does not exist from DevicePath
|
@retval EFI_NOT_FOUND A valid translation does not exist from DevicePath
|
||||||
to a TargetID and LUN.
|
to a TargetID and LUN.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -382,7 +382,7 @@ IScsiExtScsiPassThruResetTargetLun (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Retrieve the list of legal Target IDs for SCSI devices on a SCSI channel.
|
Retrieve the list of legal Target IDs for SCSI devices on a SCSI channel.
|
||||||
|
|
||||||
@param[in] This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL
|
@param[in] This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL
|
||||||
instance.
|
instance.
|
||||||
@ -392,7 +392,7 @@ IScsiExtScsiPassThruResetTargetLun (
|
|||||||
next SCSI device present on a SCSI channel.
|
next SCSI device present on a SCSI channel.
|
||||||
An input value of 0xF(all bytes in the array are 0xF)
|
An input value of 0xF(all bytes in the array are 0xF)
|
||||||
in the Target array retrieves the Target ID of the
|
in the Target array retrieves the Target ID of the
|
||||||
first SCSI device present on a SCSI channel.
|
first SCSI device present on a SCSI channel.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The Target ID of the next SCSI device on the SCSI
|
@retval EFI_SUCCESS The Target ID of the next SCSI device on the SCSI
|
||||||
channel was returned in Target.
|
channel was returned in Target.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Implementation for iSCSI Boot Firmware Table publication.
|
Implementation for iSCSI Boot Firmware Table publication.
|
||||||
|
|
||||||
Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -19,7 +19,7 @@ UINTN mTableKey;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Initialize the header of the iSCSI Boot Firmware Table.
|
Initialize the header of the iSCSI Boot Firmware Table.
|
||||||
|
|
||||||
@param[out] Header The header of the iSCSI Boot Firmware Table.
|
@param[out] Header The header of the iSCSI Boot Firmware Table.
|
||||||
@param[in] OemId The OEM ID.
|
@param[in] OemId The OEM ID.
|
||||||
@param[in] OemTableId The OEM table ID for the iBFT.
|
@param[in] OemTableId The OEM table ID for the iBFT.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Some extra definitions for iBFT.
|
Some extra definitions for iBFT.
|
||||||
|
|
||||||
Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -16,7 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#define _ISCSI_IBFT_H_
|
#define _ISCSI_IBFT_H_
|
||||||
|
|
||||||
#include <IndustryStandard/Acpi.h>
|
#include <IndustryStandard/Acpi.h>
|
||||||
#include <IndustryStandard/IScsiBootFirmwareTable.h>
|
#include <IndustryStandard/IScsiBootFirmwareTable.h>
|
||||||
#include <Protocol/AcpiTable.h>
|
#include <Protocol/AcpiTable.h>
|
||||||
#include <Protocol/PciIo.h>
|
#include <Protocol/PciIo.h>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The shared head file for iSCSI driver.
|
The shared head file for iSCSI driver.
|
||||||
|
|
||||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -201,7 +201,7 @@ struct _ISCSI_DRIVER_DATA {
|
|||||||
EFI_EXT_SCSI_PASS_THRU_MODE ExtScsiPassThruMode;
|
EFI_EXT_SCSI_PASS_THRU_MODE ExtScsiPassThruMode;
|
||||||
EFI_HANDLE ExtScsiPassThruHandle;
|
EFI_HANDLE ExtScsiPassThruHandle;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||||
EFI_HANDLE ChildHandle;
|
EFI_HANDLE ChildHandle;
|
||||||
ISCSI_SESSION *Session;
|
ISCSI_SESSION *Session;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 IScsiHexString[] = "0123456789ABCDEFa
|
|||||||
Removes (trims) specified leading and trailing characters from a string.
|
Removes (trims) specified leading and trailing characters from a string.
|
||||||
|
|
||||||
@param[in, out] Str Pointer to the null-terminated string to be trimmed.
|
@param[in, out] Str Pointer to the null-terminated string to be trimmed.
|
||||||
On return, Str will hold the trimmed string.
|
On return, Str will hold the trimmed string.
|
||||||
|
|
||||||
@param[in] CharC Character will be trimmed from str.
|
@param[in] CharC Character will be trimmed from str.
|
||||||
|
|
||||||
@ -33,18 +33,18 @@ IScsiStrTrim (
|
|||||||
{
|
{
|
||||||
CHAR16 *Pointer1;
|
CHAR16 *Pointer1;
|
||||||
CHAR16 *Pointer2;
|
CHAR16 *Pointer2;
|
||||||
|
|
||||||
if (*Str == 0) {
|
if (*Str == 0) {
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Trim off the leading and trailing characters c
|
// Trim off the leading and trailing characters c
|
||||||
//
|
//
|
||||||
for (Pointer1 = Str; (*Pointer1 != 0) && (*Pointer1 == CharC); Pointer1++) {
|
for (Pointer1 = Str; (*Pointer1 != 0) && (*Pointer1 == CharC); Pointer1++) {
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
Pointer2 = Str;
|
Pointer2 = Str;
|
||||||
if (Pointer2 == Pointer1) {
|
if (Pointer2 == Pointer1) {
|
||||||
while (*Pointer1 != 0) {
|
while (*Pointer1 != 0) {
|
||||||
@ -52,19 +52,19 @@ IScsiStrTrim (
|
|||||||
Pointer1++;
|
Pointer1++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
while (*Pointer1 != 0) {
|
while (*Pointer1 != 0) {
|
||||||
*Pointer2 = *Pointer1;
|
*Pointer2 = *Pointer1;
|
||||||
Pointer1++;
|
Pointer1++;
|
||||||
Pointer2++;
|
Pointer2++;
|
||||||
}
|
}
|
||||||
*Pointer2 = 0;
|
*Pointer2 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (Pointer1 = Str + StrLen(Str) - 1; Pointer1 >= Str && *Pointer1 == CharC; Pointer1--) {
|
for (Pointer1 = Str + StrLen(Str) - 1; Pointer1 >= Str && *Pointer1 == CharC; Pointer1--) {
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
if (Pointer1 != Str + StrLen(Str) - 1) {
|
if (Pointer1 != Str + StrLen(Str) - 1) {
|
||||||
*(Pointer1 + 1) = 0;
|
*(Pointer1 + 1) = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -131,11 +131,11 @@ IScsiAsciiStrToLun (
|
|||||||
CHAR8 TemStr[2];
|
CHAR8 TemStr[2];
|
||||||
UINT8 TemValue;
|
UINT8 TemValue;
|
||||||
UINT16 Value[4];
|
UINT16 Value[4];
|
||||||
|
|
||||||
ZeroMem (Lun, 8);
|
ZeroMem (Lun, 8);
|
||||||
ZeroMem (TemStr, 2);
|
ZeroMem (TemStr, 2);
|
||||||
ZeroMem ((UINT8 *) Value, sizeof (Value));
|
ZeroMem ((UINT8 *) Value, sizeof (Value));
|
||||||
SizeStr = AsciiStrLen (Str);
|
SizeStr = AsciiStrLen (Str);
|
||||||
IndexValue = 0;
|
IndexValue = 0;
|
||||||
IndexNum = 0;
|
IndexNum = 0;
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ IScsiAsciiStrToLun (
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((TemValue == 0) && (TemStr[0] == '-')) {
|
if ((TemValue == 0) && (TemStr[0] == '-')) {
|
||||||
//
|
//
|
||||||
// Next Lun value.
|
// Next Lun value.
|
||||||
@ -167,24 +167,24 @@ IScsiAsciiStrToLun (
|
|||||||
IndexNum = 0;
|
IndexNum = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (++IndexNum > 4) {
|
if (++IndexNum > 4) {
|
||||||
//
|
//
|
||||||
// Each Lun Str can't exceed size 4, because it will be as UINT16 value.
|
// Each Lun Str can't exceed size 4, because it will be as UINT16 value.
|
||||||
//
|
//
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Combine UINT16 value.
|
// Combine UINT16 value.
|
||||||
//
|
//
|
||||||
Value[IndexValue] = (UINT16) ((Value[IndexValue] << 4) + TemValue);
|
Value[IndexValue] = (UINT16) ((Value[IndexValue] << 4) + TemValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Index = 0; Index <= IndexValue; Index ++) {
|
for (Index = 0; Index <= IndexValue; Index ++) {
|
||||||
*((UINT16 *) &Lun[Index * 2]) = HTONS (Value[Index]);
|
*((UINT16 *) &Lun[Index * 2]) = HTONS (Value[Index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -319,7 +319,7 @@ IScsiMacAddrToStr (
|
|||||||
@param[in, out] HexStr Pointer to the string.
|
@param[in, out] HexStr Pointer to the string.
|
||||||
@param[in, out] HexLength The length of the string.
|
@param[in, out] HexLength The length of the string.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The binary data is converted to the hexadecimal string
|
@retval EFI_SUCCESS The binary data is converted to the hexadecimal string
|
||||||
and the length of the string is updated.
|
and the length of the string is updated.
|
||||||
@retval EFI_BUFFER_TOO_SMALL The string is too small.
|
@retval EFI_BUFFER_TOO_SMALL The string is too small.
|
||||||
@retval EFI_INVALID_PARAMETER The IP string is malformatted.
|
@retval EFI_INVALID_PARAMETER The IP string is malformatted.
|
||||||
@ -385,7 +385,7 @@ IScsiHexToBin (
|
|||||||
UINTN Length;
|
UINTN Length;
|
||||||
UINT8 Digit;
|
UINT8 Digit;
|
||||||
CHAR8 TemStr[2];
|
CHAR8 TemStr[2];
|
||||||
|
|
||||||
ZeroMem (TemStr, sizeof (TemStr));
|
ZeroMem (TemStr, sizeof (TemStr));
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -394,7 +394,7 @@ IScsiHexToBin (
|
|||||||
if ((HexStr[0] == '0') && ((HexStr[1] == 'x') || (HexStr[1] == 'X'))) {
|
if ((HexStr[0] == '0') && ((HexStr[1] == 'x') || (HexStr[1] == 'X'))) {
|
||||||
HexStr += 2;
|
HexStr += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
Length = AsciiStrLen (HexStr);
|
Length = AsciiStrLen (HexStr);
|
||||||
|
|
||||||
for (Index = 0; Index < Length; Index ++) {
|
for (Index = 0; Index < Length; Index ++) {
|
||||||
@ -412,7 +412,7 @@ IScsiHexToBin (
|
|||||||
BinBuffer [Index/2] = (UINT8) ((BinBuffer [Index/2] << 4) + Digit);
|
BinBuffer [Index/2] = (UINT8) ((BinBuffer [Index/2] << 4) + Digit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
*BinLength = (UINT32) ((Index + 1)/2);
|
*BinLength = (UINT32) ((Index + 1)/2);
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
@ -492,7 +492,7 @@ IScsiCheckIpv6Support (
|
|||||||
BOOLEAN Supported;
|
BOOLEAN Supported;
|
||||||
VOID *InfoBlock;
|
VOID *InfoBlock;
|
||||||
UINTN InfoBlockSize;
|
UINTN InfoBlockSize;
|
||||||
|
|
||||||
EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL *Nii;
|
EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL *Nii;
|
||||||
|
|
||||||
ASSERT (Ipv6Support != NULL);
|
ASSERT (Ipv6Support != NULL);
|
||||||
@ -515,7 +515,7 @@ IScsiCheckIpv6Support (
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Get the NIC handle by SNP protocol.
|
// Get the NIC handle by SNP protocol.
|
||||||
//
|
//
|
||||||
Handle = NetLibGetSnpHandle (ControllerHandle, NULL);
|
Handle = NetLibGetSnpHandle (ControllerHandle, NULL);
|
||||||
if (Handle == NULL) {
|
if (Handle == NULL) {
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
@ -561,11 +561,11 @@ IScsiCheckIpv6Support (
|
|||||||
if (EFI_ERROR (Status) || InfoBlock == NULL) {
|
if (EFI_ERROR (Status) || InfoBlock == NULL) {
|
||||||
FreePool (InfoBlock);
|
FreePool (InfoBlock);
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
*Ipv6Support = ((EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT *) InfoBlock)->Ipv6Support;
|
*Ipv6Support = ((EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT *) InfoBlock)->Ipv6Support;
|
||||||
FreePool (InfoBlock);
|
FreePool (InfoBlock);
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -615,19 +615,19 @@ IScsiAddNic (
|
|||||||
CompareMem (&NicInfo->PermanentAddress, MacAddr.Addr, HwAddressSize) == 0 &&
|
CompareMem (&NicInfo->PermanentAddress, MacAddr.Addr, HwAddressSize) == 0 &&
|
||||||
NicInfo->VlanId == VlanId) {
|
NicInfo->VlanId == VlanId) {
|
||||||
mPrivate->CurrentNic = NicInfo->NicIndex;
|
mPrivate->CurrentNic = NicInfo->NicIndex;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set IPv6 available flag.
|
// Set IPv6 available flag.
|
||||||
//
|
//
|
||||||
Status = IScsiCheckIpv6Support (Controller, Image, &NicInfo->Ipv6Available);
|
Status = IScsiCheckIpv6Support (Controller, Image, &NicInfo->Ipv6Available);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
//
|
//
|
||||||
// Fail to get the data whether UNDI supports IPv6.
|
// Fail to get the data whether UNDI supports IPv6.
|
||||||
// Set default value to TRUE.
|
// Set default value to TRUE.
|
||||||
//
|
//
|
||||||
NicInfo->Ipv6Available = TRUE;
|
NicInfo->Ipv6Available = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -649,19 +649,19 @@ IScsiAddNic (
|
|||||||
NicInfo->VlanId = VlanId;
|
NicInfo->VlanId = VlanId;
|
||||||
NicInfo->NicIndex = (UINT8) (mPrivate->MaxNic + 1);
|
NicInfo->NicIndex = (UINT8) (mPrivate->MaxNic + 1);
|
||||||
mPrivate->MaxNic = NicInfo->NicIndex;
|
mPrivate->MaxNic = NicInfo->NicIndex;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set IPv6 available flag.
|
// Set IPv6 available flag.
|
||||||
//
|
//
|
||||||
Status = IScsiCheckIpv6Support (Controller, Image, &NicInfo->Ipv6Available);
|
Status = IScsiCheckIpv6Support (Controller, Image, &NicInfo->Ipv6Available);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
//
|
//
|
||||||
// Fail to get the data whether UNDI supports IPv6.
|
// Fail to get the data whether UNDI supports IPv6.
|
||||||
// Set default value to TRUE.
|
// Set default value to TRUE.
|
||||||
//
|
//
|
||||||
NicInfo->Ipv6Available = TRUE;
|
NicInfo->Ipv6Available = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get the PCI location.
|
// Get the PCI location.
|
||||||
//
|
//
|
||||||
@ -1799,7 +1799,7 @@ IScsiCleanDriverData (
|
|||||||
|
|
||||||
EXIT:
|
EXIT:
|
||||||
if (Private->ExitBootServiceEvent != NULL) {
|
if (Private->ExitBootServiceEvent != NULL) {
|
||||||
gBS->CloseEvent (Private->ExitBootServiceEvent);
|
gBS->CloseEvent (Private->ExitBootServiceEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
mCallbackInfo->Current = NULL;
|
mCallbackInfo->Current = NULL;
|
||||||
@ -1813,10 +1813,10 @@ EXIT:
|
|||||||
|
|
||||||
@param[in] Controller The handle of the controller.
|
@param[in] Controller The handle of the controller.
|
||||||
@param[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
|
@param[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
|
||||||
|
|
||||||
@retval TRUE The handle of the controller need the Dhcp protocol.
|
@retval TRUE The handle of the controller need the Dhcp protocol.
|
||||||
@retval FALSE The handle of the controller does not need the Dhcp protocol.
|
@retval FALSE The handle of the controller does not need the Dhcp protocol.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
IScsiDhcpIsConfigured (
|
IScsiDhcpIsConfigured (
|
||||||
@ -1835,7 +1835,7 @@ IScsiDhcpIsConfigured (
|
|||||||
CHAR16 MacString[ISCSI_MAX_MAC_STRING_LEN];
|
CHAR16 MacString[ISCSI_MAX_MAC_STRING_LEN];
|
||||||
CHAR16 AttemptMacString[ISCSI_MAX_MAC_STRING_LEN];
|
CHAR16 AttemptMacString[ISCSI_MAX_MAC_STRING_LEN];
|
||||||
CHAR16 AttemptName[ISCSI_NAME_IFR_MAX_SIZE];
|
CHAR16 AttemptName[ISCSI_NAME_IFR_MAX_SIZE];
|
||||||
|
|
||||||
AttemptConfigOrder = IScsiGetVariableAndSize (
|
AttemptConfigOrder = IScsiGetVariableAndSize (
|
||||||
L"AttemptOrder",
|
L"AttemptOrder",
|
||||||
&gIScsiConfigGuid,
|
&gIScsiConfigGuid,
|
||||||
@ -1844,7 +1844,7 @@ IScsiDhcpIsConfigured (
|
|||||||
if (AttemptConfigOrder == NULL || AttemptConfigOrderSize == 0) {
|
if (AttemptConfigOrder == NULL || AttemptConfigOrderSize == 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get MAC address of this network device.
|
// Get MAC address of this network device.
|
||||||
//
|
//
|
||||||
@ -1857,7 +1857,7 @@ IScsiDhcpIsConfigured (
|
|||||||
//
|
//
|
||||||
VlanId = NetLibGetVlanId (Controller);
|
VlanId = NetLibGetVlanId (Controller);
|
||||||
IScsiMacAddrToStr (&MacAddr, (UINT32) HwAddressSize, VlanId, MacString);
|
IScsiMacAddrToStr (&MacAddr, (UINT32) HwAddressSize, VlanId, MacString);
|
||||||
|
|
||||||
for (Index = 0; Index < AttemptConfigOrderSize / sizeof (UINT8); Index++) {
|
for (Index = 0; Index < AttemptConfigOrderSize / sizeof (UINT8); Index++) {
|
||||||
UnicodeSPrint (
|
UnicodeSPrint (
|
||||||
AttemptName,
|
AttemptName,
|
||||||
@ -1874,7 +1874,7 @@ IScsiDhcpIsConfigured (
|
|||||||
if(AttemptTmp == NULL || EFI_ERROR (Status)) {
|
if(AttemptTmp == NULL || EFI_ERROR (Status)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT (AttemptConfigOrder[Index] == AttemptTmp->AttemptConfigIndex);
|
ASSERT (AttemptConfigOrder[Index] == AttemptTmp->AttemptConfigIndex);
|
||||||
|
|
||||||
if (AttemptTmp->SessionConfigData.Enabled == ISCSI_DISABLED) {
|
if (AttemptTmp->SessionConfigData.Enabled == ISCSI_DISABLED) {
|
||||||
@ -1882,7 +1882,7 @@ IScsiDhcpIsConfigured (
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AttemptTmp->SessionConfigData.IpMode != IP_MODE_AUTOCONFIG &&
|
if (AttemptTmp->SessionConfigData.IpMode != IP_MODE_AUTOCONFIG &&
|
||||||
AttemptTmp->SessionConfigData.IpMode != ((IpVersion == IP_VERSION_4) ? IP_MODE_IP4 : IP_MODE_IP6)) {
|
AttemptTmp->SessionConfigData.IpMode != ((IpVersion == IP_VERSION_4) ? IP_MODE_IP4 : IP_MODE_IP6)) {
|
||||||
FreePool (AttemptTmp);
|
FreePool (AttemptTmp);
|
||||||
continue;
|
continue;
|
||||||
@ -1896,7 +1896,7 @@ IScsiDhcpIsConfigured (
|
|||||||
|
|
||||||
if(AttemptTmp->SessionConfigData.IpMode == IP_MODE_AUTOCONFIG ||
|
if(AttemptTmp->SessionConfigData.IpMode == IP_MODE_AUTOCONFIG ||
|
||||||
AttemptTmp->SessionConfigData.InitiatorInfoFromDhcp == TRUE ||
|
AttemptTmp->SessionConfigData.InitiatorInfoFromDhcp == TRUE ||
|
||||||
AttemptTmp->SessionConfigData.TargetInfoFromDhcp == TRUE) {
|
AttemptTmp->SessionConfigData.TargetInfoFromDhcp == TRUE) {
|
||||||
FreePool (AttemptTmp);
|
FreePool (AttemptTmp);
|
||||||
FreePool (AttemptConfigOrder);
|
FreePool (AttemptConfigOrder);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1904,7 +1904,7 @@ IScsiDhcpIsConfigured (
|
|||||||
|
|
||||||
FreePool (AttemptTmp);
|
FreePool (AttemptTmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
FreePool (AttemptConfigOrder);
|
FreePool (AttemptConfigOrder);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -1913,10 +1913,10 @@ IScsiDhcpIsConfigured (
|
|||||||
Check whether the Controller handle is configured to use DNS protocol.
|
Check whether the Controller handle is configured to use DNS protocol.
|
||||||
|
|
||||||
@param[in] Controller The handle of the controller.
|
@param[in] Controller The handle of the controller.
|
||||||
|
|
||||||
@retval TRUE The handle of the controller need the Dns protocol.
|
@retval TRUE The handle of the controller need the Dns protocol.
|
||||||
@retval FALSE The handle of the controller does not need the Dns protocol.
|
@retval FALSE The handle of the controller does not need the Dns protocol.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
IScsiDnsIsConfigured (
|
IScsiDnsIsConfigured (
|
||||||
@ -1934,7 +1934,7 @@ IScsiDnsIsConfigured (
|
|||||||
CHAR16 AttemptMacString[ISCSI_MAX_MAC_STRING_LEN];
|
CHAR16 AttemptMacString[ISCSI_MAX_MAC_STRING_LEN];
|
||||||
CHAR16 MacString[ISCSI_MAX_MAC_STRING_LEN];
|
CHAR16 MacString[ISCSI_MAX_MAC_STRING_LEN];
|
||||||
CHAR16 AttemptName[ISCSI_NAME_IFR_MAX_SIZE];
|
CHAR16 AttemptName[ISCSI_NAME_IFR_MAX_SIZE];
|
||||||
|
|
||||||
AttemptConfigOrder = IScsiGetVariableAndSize (
|
AttemptConfigOrder = IScsiGetVariableAndSize (
|
||||||
L"AttemptOrder",
|
L"AttemptOrder",
|
||||||
&gIScsiConfigGuid,
|
&gIScsiConfigGuid,
|
||||||
@ -1943,7 +1943,7 @@ IScsiDnsIsConfigured (
|
|||||||
if (AttemptConfigOrder == NULL || AttemptConfigOrderSize == 0) {
|
if (AttemptConfigOrder == NULL || AttemptConfigOrderSize == 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get MAC address of this network device.
|
// Get MAC address of this network device.
|
||||||
//
|
//
|
||||||
@ -1956,7 +1956,7 @@ IScsiDnsIsConfigured (
|
|||||||
//
|
//
|
||||||
VlanId = NetLibGetVlanId (Controller);
|
VlanId = NetLibGetVlanId (Controller);
|
||||||
IScsiMacAddrToStr (&MacAddr, (UINT32) HwAddressSize, VlanId, MacString);
|
IScsiMacAddrToStr (&MacAddr, (UINT32) HwAddressSize, VlanId, MacString);
|
||||||
|
|
||||||
for (Index = 0; Index < AttemptConfigOrderSize / sizeof (UINT8); Index++) {
|
for (Index = 0; Index < AttemptConfigOrderSize / sizeof (UINT8); Index++) {
|
||||||
UnicodeSPrint (
|
UnicodeSPrint (
|
||||||
AttemptName,
|
AttemptName,
|
||||||
@ -1974,7 +1974,7 @@ IScsiDnsIsConfigured (
|
|||||||
if(AttemptTmp == NULL || EFI_ERROR (Status)) {
|
if(AttemptTmp == NULL || EFI_ERROR (Status)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT (AttemptConfigOrder[Index] == AttemptTmp->AttemptConfigIndex);
|
ASSERT (AttemptConfigOrder[Index] == AttemptTmp->AttemptConfigIndex);
|
||||||
|
|
||||||
AsciiStrToUnicodeStrS (AttemptTmp->MacString, AttemptMacString, sizeof (AttemptMacString) / sizeof (AttemptMacString[0]));
|
AsciiStrToUnicodeStrS (AttemptTmp->MacString, AttemptMacString, sizeof (AttemptMacString) / sizeof (AttemptMacString[0]));
|
||||||
@ -1983,7 +1983,7 @@ IScsiDnsIsConfigured (
|
|||||||
FreePool (AttemptTmp);
|
FreePool (AttemptTmp);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AttemptTmp->SessionConfigData.DnsMode || AttemptTmp->SessionConfigData.TargetInfoFromDhcp) {
|
if (AttemptTmp->SessionConfigData.DnsMode || AttemptTmp->SessionConfigData.TargetInfoFromDhcp) {
|
||||||
FreePool (AttemptTmp);
|
FreePool (AttemptTmp);
|
||||||
FreePool (AttemptConfigOrder);
|
FreePool (AttemptConfigOrder);
|
||||||
@ -2060,7 +2060,7 @@ IScsiGetConfigData (
|
|||||||
//
|
//
|
||||||
// Check whether the attempt exists in AttemptConfig.
|
// Check whether the attempt exists in AttemptConfig.
|
||||||
//
|
//
|
||||||
AttemptTmp = IScsiConfigGetAttemptByConfigIndex (AttemptConfigOrder[Index]);
|
AttemptTmp = IScsiConfigGetAttemptByConfigIndex (AttemptConfigOrder[Index]);
|
||||||
if (AttemptTmp != NULL && AttemptTmp->SessionConfigData.Enabled == ISCSI_DISABLED) {
|
if (AttemptTmp != NULL && AttemptTmp->SessionConfigData.Enabled == ISCSI_DISABLED) {
|
||||||
continue;
|
continue;
|
||||||
} else if (AttemptTmp != NULL && AttemptTmp->SessionConfigData.Enabled != ISCSI_DISABLED) {
|
} else if (AttemptTmp != NULL && AttemptTmp->SessionConfigData.Enabled != ISCSI_DISABLED) {
|
||||||
@ -2126,11 +2126,11 @@ IScsiGetConfigData (
|
|||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else if (AttemptTmp->SessionConfigData.InitiatorInfoFromDhcp &&
|
} else if (AttemptTmp->SessionConfigData.InitiatorInfoFromDhcp &&
|
||||||
!AttemptTmp->ValidPath &&
|
!AttemptTmp->ValidPath &&
|
||||||
AttemptTmp->NicIndex == mPrivate->CurrentNic) {
|
AttemptTmp->NicIndex == mPrivate->CurrentNic) {
|
||||||
//
|
//
|
||||||
// If the attempt associates with the current NIC, we can
|
// If the attempt associates with the current NIC, we can
|
||||||
// get DHCP information for already added, but failed, attempt.
|
// get DHCP information for already added, but failed, attempt.
|
||||||
//
|
//
|
||||||
AttemptTmp->DhcpSuccess = FALSE;
|
AttemptTmp->DhcpSuccess = FALSE;
|
||||||
@ -2213,7 +2213,7 @@ IScsiGetConfigData (
|
|||||||
(UINT8) (mPrivate->Ipv6Flag ? IP_MODE_AUTOCONFIG_IP6 : IP_MODE_AUTOCONFIG_IP4);
|
(UINT8) (mPrivate->Ipv6Flag ? IP_MODE_AUTOCONFIG_IP6 : IP_MODE_AUTOCONFIG_IP4);
|
||||||
AttemptConfigData->AutoConfigureSuccess = FALSE;
|
AttemptConfigData->AutoConfigureSuccess = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get some information from dhcp server.
|
// Get some information from dhcp server.
|
||||||
//
|
//
|
||||||
@ -2384,7 +2384,7 @@ IScsiGetTcpConnDevicePath (
|
|||||||
Conn->TcpIo.Handle,
|
Conn->TcpIo.Handle,
|
||||||
&gEfiDevicePathProtocolGuid,
|
&gEfiDevicePathProtocolGuid,
|
||||||
(VOID **) &DevicePath
|
(VOID **) &DevicePath
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -2403,7 +2403,7 @@ IScsiGetTcpConnDevicePath (
|
|||||||
if (!Conn->Ipv6Flag && DevicePathSubType (&DPathNode->DevPath) == MSG_IPv4_DP) {
|
if (!Conn->Ipv6Flag && DevicePathSubType (&DPathNode->DevPath) == MSG_IPv4_DP) {
|
||||||
DPathNode->Ipv4.LocalPort = 0;
|
DPathNode->Ipv4.LocalPort = 0;
|
||||||
|
|
||||||
DPathNode->Ipv4.StaticIpAddress =
|
DPathNode->Ipv4.StaticIpAddress =
|
||||||
(BOOLEAN) (!Session->ConfigData->SessionConfigData.InitiatorInfoFromDhcp);
|
(BOOLEAN) (!Session->ConfigData->SessionConfigData.InitiatorInfoFromDhcp);
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -2414,9 +2414,9 @@ IScsiGetTcpConnDevicePath (
|
|||||||
//
|
//
|
||||||
|
|
||||||
PathLen = DevicePathNodeLength (&DPathNode->Ipv4);
|
PathLen = DevicePathNodeLength (&DPathNode->Ipv4);
|
||||||
|
|
||||||
if (PathLen == IP4_NODE_LEN_NEW_VERSIONS) {
|
if (PathLen == IP4_NODE_LEN_NEW_VERSIONS) {
|
||||||
|
|
||||||
IP4_COPY_ADDRESS (
|
IP4_COPY_ADDRESS (
|
||||||
&DPathNode->Ipv4.GatewayIpAddress,
|
&DPathNode->Ipv4.GatewayIpAddress,
|
||||||
&Session->ConfigData->SessionConfigData.Gateway
|
&Session->ConfigData->SessionConfigData.Gateway
|
||||||
@ -2427,7 +2427,7 @@ IScsiGetTcpConnDevicePath (
|
|||||||
&Session->ConfigData->SessionConfigData.SubnetMask
|
&Session->ConfigData->SessionConfigData.SubnetMask
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
} else if (Conn->Ipv6Flag && DevicePathSubType (&DPathNode->DevPath) == MSG_IPv6_DP) {
|
} else if (Conn->Ipv6Flag && DevicePathSubType (&DPathNode->DevPath) == MSG_IPv6_DP) {
|
||||||
DPathNode->Ipv6.LocalPort = 0;
|
DPathNode->Ipv6.LocalPort = 0;
|
||||||
@ -2436,28 +2436,28 @@ IScsiGetTcpConnDevicePath (
|
|||||||
// Add a judgement here to support previous versions of IPv6_DEVICE_PATH.
|
// Add a judgement here to support previous versions of IPv6_DEVICE_PATH.
|
||||||
// In previous versions of IPv6_DEVICE_PATH, IpAddressOrigin, PrefixLength
|
// In previous versions of IPv6_DEVICE_PATH, IpAddressOrigin, PrefixLength
|
||||||
// and GatewayIpAddress do not exist.
|
// and GatewayIpAddress do not exist.
|
||||||
// In new version of IPv6_DEVICE_PATH, structure length is 60, while in
|
// In new version of IPv6_DEVICE_PATH, structure length is 60, while in
|
||||||
// old versions, the length is 43.
|
// old versions, the length is 43.
|
||||||
//
|
//
|
||||||
|
|
||||||
PathLen = DevicePathNodeLength (&DPathNode->Ipv6);
|
PathLen = DevicePathNodeLength (&DPathNode->Ipv6);
|
||||||
|
|
||||||
if (PathLen == IP6_NODE_LEN_NEW_VERSIONS ) {
|
if (PathLen == IP6_NODE_LEN_NEW_VERSIONS ) {
|
||||||
|
|
||||||
DPathNode->Ipv6.IpAddressOrigin = 0;
|
DPathNode->Ipv6.IpAddressOrigin = 0;
|
||||||
DPathNode->Ipv6.PrefixLength = IP6_PREFIX_LENGTH;
|
DPathNode->Ipv6.PrefixLength = IP6_PREFIX_LENGTH;
|
||||||
ZeroMem (&DPathNode->Ipv6.GatewayIpAddress, sizeof (EFI_IPv6_ADDRESS));
|
ZeroMem (&DPathNode->Ipv6.GatewayIpAddress, sizeof (EFI_IPv6_ADDRESS));
|
||||||
}
|
}
|
||||||
else if (PathLen == IP6_NODE_LEN_OLD_VERSIONS) {
|
else if (PathLen == IP6_NODE_LEN_OLD_VERSIONS) {
|
||||||
|
|
||||||
//
|
//
|
||||||
// StaticIPAddress is a field in old versions of IPv6_DEVICE_PATH, while ignored in new
|
// StaticIPAddress is a field in old versions of IPv6_DEVICE_PATH, while ignored in new
|
||||||
// version. Set StaticIPAddress through its' offset in old IPv6_DEVICE_PATH.
|
// version. Set StaticIPAddress through its' offset in old IPv6_DEVICE_PATH.
|
||||||
//
|
//
|
||||||
*((UINT8 *)(&DPathNode->Ipv6) + IP6_OLD_IPADDRESS_OFFSET) =
|
*((UINT8 *)(&DPathNode->Ipv6) + IP6_OLD_IPADDRESS_OFFSET) =
|
||||||
(BOOLEAN) (!Session->ConfigData->SessionConfigData.InitiatorInfoFromDhcp);
|
(BOOLEAN) (!Session->ConfigData->SessionConfigData.InitiatorInfoFromDhcp);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2486,10 +2486,10 @@ IScsiOnExitBootService (
|
|||||||
ISCSI_DRIVER_DATA *Private;
|
ISCSI_DRIVER_DATA *Private;
|
||||||
|
|
||||||
Private = (ISCSI_DRIVER_DATA *) Context;
|
Private = (ISCSI_DRIVER_DATA *) Context;
|
||||||
|
|
||||||
gBS->CloseEvent (Private->ExitBootServiceEvent);
|
gBS->CloseEvent (Private->ExitBootServiceEvent);
|
||||||
Private->ExitBootServiceEvent = NULL;
|
Private->ExitBootServiceEvent = NULL;
|
||||||
|
|
||||||
if (Private->Session != NULL) {
|
if (Private->Session != NULL) {
|
||||||
IScsiSessionAbort (Private->Session);
|
IScsiSessionAbort (Private->Session);
|
||||||
}
|
}
|
||||||
@ -2502,7 +2502,7 @@ IScsiOnExitBootService (
|
|||||||
currently managing the controller specified by ControllerHandle. This test
|
currently managing the controller specified by ControllerHandle. This test
|
||||||
is performed by evaluating if the the protocol specified by ProtocolGuid is
|
is performed by evaluating if the the protocol specified by ProtocolGuid is
|
||||||
present on ControllerHandle and is was opened by DriverBindingHandle and Nic
|
present on ControllerHandle and is was opened by DriverBindingHandle and Nic
|
||||||
Device handle with an attribute of EFI_OPEN_PROTOCOL_BY_DRIVER.
|
Device handle with an attribute of EFI_OPEN_PROTOCOL_BY_DRIVER.
|
||||||
If ProtocolGuid is NULL, then ASSERT().
|
If ProtocolGuid is NULL, then ASSERT().
|
||||||
|
|
||||||
@param ControllerHandle A handle for a controller to test.
|
@param ControllerHandle A handle for a controller to test.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Miscellaneous definitions for iSCSI driver.
|
Miscellaneous definitions for iSCSI driver.
|
||||||
|
|
||||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -62,7 +62,7 @@ typedef struct _ISCSI_SESSION_CONFIG_NVDATA {
|
|||||||
|
|
||||||
BOOLEAN DnsMode; // Flag indicate whether the Target address is expressed as URL format.
|
BOOLEAN DnsMode; // Flag indicate whether the Target address is expressed as URL format.
|
||||||
CHAR8 TargetUrl[ISCSI_TARGET_URI_MAX_SIZE];
|
CHAR8 TargetUrl[ISCSI_TARGET_URI_MAX_SIZE];
|
||||||
|
|
||||||
} ISCSI_SESSION_CONFIG_NVDATA;
|
} ISCSI_SESSION_CONFIG_NVDATA;
|
||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ IScsiGetSubnetMaskPrefixLength (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Convert the hexadecimal encoded LUN string into the 64-bit LUN.
|
Convert the hexadecimal encoded LUN string into the 64-bit LUN.
|
||||||
|
|
||||||
@param[in] Str The hexadecimal encoded LUN string.
|
@param[in] Str The hexadecimal encoded LUN string.
|
||||||
@param[out] Lun Storage to return the 64-bit LUN.
|
@param[out] Lun Storage to return the 64-bit LUN.
|
||||||
@ -153,7 +153,7 @@ IScsiAsciiStrToIp (
|
|||||||
@param[in, out] HexStr Pointer to the string.
|
@param[in, out] HexStr Pointer to the string.
|
||||||
@param[in, out] HexLength The length of the string.
|
@param[in, out] HexLength The length of the string.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The binary data is converted to the hexadecimal string
|
@retval EFI_SUCCESS The binary data is converted to the hexadecimal string
|
||||||
and the length of the string is updated.
|
and the length of the string is updated.
|
||||||
@retval EFI_BUFFER_TOO_SMALL The string is too small.
|
@retval EFI_BUFFER_TOO_SMALL The string is too small.
|
||||||
@retval EFI_INVALID_PARAMETER The IP string is malformatted.
|
@retval EFI_INVALID_PARAMETER The IP string is malformatted.
|
||||||
@ -372,10 +372,10 @@ IScsiCleanDriverData (
|
|||||||
|
|
||||||
@param[in] Controller The handle of the controller.
|
@param[in] Controller The handle of the controller.
|
||||||
@param[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
|
@param[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
|
||||||
|
|
||||||
@retval TRUE The handle of the controller need the Dhcp protocol.
|
@retval TRUE The handle of the controller need the Dhcp protocol.
|
||||||
@retval FALSE The handle of the controller does not need the Dhcp protocol.
|
@retval FALSE The handle of the controller does not need the Dhcp protocol.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
IScsiDhcpIsConfigured (
|
IScsiDhcpIsConfigured (
|
||||||
@ -387,10 +387,10 @@ IScsiDhcpIsConfigured (
|
|||||||
Check wheather the Controller handle is configured to use DNS protocol.
|
Check wheather the Controller handle is configured to use DNS protocol.
|
||||||
|
|
||||||
@param[in] Controller The handle of the controller.
|
@param[in] Controller The handle of the controller.
|
||||||
|
|
||||||
@retval TRUE The handle of the controller need the DNS protocol.
|
@retval TRUE The handle of the controller need the DNS protocol.
|
||||||
@retval FALSE The handle of the controller does not need the DNS protocol.
|
@retval FALSE The handle of the controller does not need the DNS protocol.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
IScsiDnsIsConfigured (
|
IScsiDnsIsConfigured (
|
||||||
@ -447,7 +447,7 @@ IScsiOnExitBootService (
|
|||||||
currently managing the controller specified by ControllerHandle. This test
|
currently managing the controller specified by ControllerHandle. This test
|
||||||
is performed by evaluating if the the protocol specified by ProtocolGuid is
|
is performed by evaluating if the the protocol specified by ProtocolGuid is
|
||||||
present on ControllerHandle and is was opened by DriverBindingHandle and Nic
|
present on ControllerHandle and is was opened by DriverBindingHandle and Nic
|
||||||
Device handle with an attribute of EFI_OPEN_PROTOCOL_BY_DRIVER.
|
Device handle with an attribute of EFI_OPEN_PROTOCOL_BY_DRIVER.
|
||||||
If ProtocolGuid is NULL, then ASSERT().
|
If ProtocolGuid is NULL, then ASSERT().
|
||||||
|
|
||||||
@param ControllerHandle A handle for a controller to test.
|
@param ControllerHandle A handle for a controller to test.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The implementation of iSCSI protocol based on RFC3720.
|
The implementation of iSCSI protocol based on RFC3720.
|
||||||
|
|
||||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -17,7 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
UINT32 mDataSegPad = 0;
|
UINT32 mDataSegPad = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Attach the iSCSI connection to the iSCSI session.
|
Attach the iSCSI connection to the iSCSI session.
|
||||||
|
|
||||||
@param[in, out] Session The iSCSI session.
|
@param[in, out] Session The iSCSI session.
|
||||||
@param[in, out] Conn The iSCSI connection.
|
@param[in, out] Conn The iSCSI connection.
|
||||||
@ -35,7 +35,7 @@ IScsiAttatchConnection (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Detach the iSCSI connection from the session it belongs to.
|
Detach the iSCSI connection from the session it belongs to.
|
||||||
|
|
||||||
@param[in, out] Conn The iSCSI connection.
|
@param[in, out] Conn The iSCSI connection.
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ IScsiDetatchConnection (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Check the sequence number according to RFC3720.
|
Check the sequence number according to RFC3720.
|
||||||
|
|
||||||
@param[in, out] ExpSN The currently expected sequence number.
|
@param[in, out] ExpSN The currently expected sequence number.
|
||||||
@param[in] NewSN The sequence number to check.
|
@param[in] NewSN The sequence number to check.
|
||||||
@ -124,7 +124,7 @@ IScsiUpdateCmdSN (
|
|||||||
|
|
||||||
@retval EFI_SUCCESS The iSCSI connection is logged into the iSCSI target.
|
@retval EFI_SUCCESS The iSCSI connection is logged into the iSCSI target.
|
||||||
@retval EFI_TIMEOUT Timeout occurred during the login procedure.
|
@retval EFI_TIMEOUT Timeout occurred during the login procedure.
|
||||||
@retval Others Other errors as indicated.
|
@retval Others Other errors as indicated.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -274,7 +274,7 @@ IScsiCreateConnection (
|
|||||||
|
|
||||||
if (!Conn->Ipv6Flag) {
|
if (!Conn->Ipv6Flag) {
|
||||||
Tcp4IoConfig = &TcpIoConfig.Tcp4IoConfigData;
|
Tcp4IoConfig = &TcpIoConfig.Tcp4IoConfigData;
|
||||||
|
|
||||||
CopyMem (&Tcp4IoConfig->LocalIp, &NvData->LocalIp, sizeof (EFI_IPv4_ADDRESS));
|
CopyMem (&Tcp4IoConfig->LocalIp, &NvData->LocalIp, sizeof (EFI_IPv4_ADDRESS));
|
||||||
CopyMem (&Tcp4IoConfig->SubnetMask, &NvData->SubnetMask, sizeof (EFI_IPv4_ADDRESS));
|
CopyMem (&Tcp4IoConfig->SubnetMask, &NvData->SubnetMask, sizeof (EFI_IPv4_ADDRESS));
|
||||||
CopyMem (&Tcp4IoConfig->Gateway, &NvData->Gateway, sizeof (EFI_IPv4_ADDRESS));
|
CopyMem (&Tcp4IoConfig->Gateway, &NvData->Gateway, sizeof (EFI_IPv4_ADDRESS));
|
||||||
@ -285,7 +285,7 @@ IScsiCreateConnection (
|
|||||||
Tcp4IoConfig->StationPort = 0;
|
Tcp4IoConfig->StationPort = 0;
|
||||||
} else {
|
} else {
|
||||||
Tcp6IoConfig = &TcpIoConfig.Tcp6IoConfigData;
|
Tcp6IoConfig = &TcpIoConfig.Tcp6IoConfigData;
|
||||||
|
|
||||||
CopyMem (&Tcp6IoConfig->RemoteIp, &NvData->TargetIp, sizeof (EFI_IPv6_ADDRESS));
|
CopyMem (&Tcp6IoConfig->RemoteIp, &NvData->TargetIp, sizeof (EFI_IPv6_ADDRESS));
|
||||||
Tcp6IoConfig->RemotePort = NvData->TargetPort;
|
Tcp6IoConfig->RemotePort = NvData->TargetPort;
|
||||||
Tcp6IoConfig->ActiveFlag = TRUE;
|
Tcp6IoConfig->ActiveFlag = TRUE;
|
||||||
@ -338,7 +338,7 @@ IScsiDestroyConnection (
|
|||||||
|
|
||||||
@retval EFI_SUCCESS Get the NIC information successfully.
|
@retval EFI_SUCCESS Get the NIC information successfully.
|
||||||
@retval Others Other errors as indicated.
|
@retval Others Other errors as indicated.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
IScsiGetIp6NicInfo (
|
IScsiGetIp6NicInfo (
|
||||||
@ -494,7 +494,7 @@ IScsiSessionLogin (
|
|||||||
Session->State = SESSION_STATE_LOGGED_IN;
|
Session->State = SESSION_STATE_LOGGED_IN;
|
||||||
|
|
||||||
if (!Conn->Ipv6Flag) {
|
if (!Conn->Ipv6Flag) {
|
||||||
ProtocolGuid = &gEfiTcp4ProtocolGuid;
|
ProtocolGuid = &gEfiTcp4ProtocolGuid;
|
||||||
} else {
|
} else {
|
||||||
ProtocolGuid = &gEfiTcp6ProtocolGuid;
|
ProtocolGuid = &gEfiTcp6ProtocolGuid;
|
||||||
}
|
}
|
||||||
@ -505,7 +505,7 @@ IScsiSessionLogin (
|
|||||||
(VOID **) &Tcp,
|
(VOID **) &Tcp,
|
||||||
Session->Private->Image,
|
Session->Private->Image,
|
||||||
Session->Private->ExtScsiPassThruHandle,
|
Session->Private->ExtScsiPassThruHandle,
|
||||||
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
||||||
);
|
);
|
||||||
|
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
@ -612,7 +612,7 @@ IScsiSendLoginReq (
|
|||||||
Receive and process the iSCSI login response.
|
Receive and process the iSCSI login response.
|
||||||
|
|
||||||
@param[in] Conn The connection in the iSCSI login phase.
|
@param[in] Conn The connection in the iSCSI login phase.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The iSCSI login response PDU is received and processed.
|
@retval EFI_SUCCESS The iSCSI login response PDU is received and processed.
|
||||||
@retval Others Other errors as indicated.
|
@retval Others Other errors as indicated.
|
||||||
|
|
||||||
@ -793,7 +793,7 @@ IScsiPrepareLoginReq (
|
|||||||
case ISCSI_SECURITY_NEGOTIATION:
|
case ISCSI_SECURITY_NEGOTIATION:
|
||||||
//
|
//
|
||||||
// Both none authentication and CHAP authentication share the CHAP path.
|
// Both none authentication and CHAP authentication share the CHAP path.
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
if (Session->AuthType != ISCSI_AUTH_TYPE_KRB) {
|
if (Session->AuthType != ISCSI_AUTH_TYPE_KRB) {
|
||||||
Status = IScsiCHAPToSendReq (Conn, Nbuf);
|
Status = IScsiCHAPToSendReq (Conn, Nbuf);
|
||||||
@ -808,7 +808,7 @@ IScsiPrepareLoginReq (
|
|||||||
if (!Conn->ParamNegotiated) {
|
if (!Conn->ParamNegotiated) {
|
||||||
IScsiFillOpParams (Conn, Nbuf);
|
IScsiFillOpParams (Conn, Nbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
ISCSI_SET_FLAG (LoginReq, ISCSI_LOGIN_REQ_PDU_FLAG_TRANSIT);
|
ISCSI_SET_FLAG (LoginReq, ISCSI_LOGIN_REQ_PDU_FLAG_TRANSIT);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -964,7 +964,7 @@ IScsiProcessLoginRsp (
|
|||||||
// the value presented in CmdSN as the target value for ExpCmdSN.
|
// the value presented in CmdSN as the target value for ExpCmdSN.
|
||||||
//
|
//
|
||||||
if ((Session->State == SESSION_STATE_FREE) && (Session->CmdSN != LoginRsp->ExpCmdSN)) {
|
if ((Session->State == SESSION_STATE_FREE) && (Session->CmdSN != LoginRsp->ExpCmdSN)) {
|
||||||
return EFI_PROTOCOL_ERROR;
|
return EFI_PROTOCOL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -1072,7 +1072,7 @@ IScsiProcessLoginRsp (
|
|||||||
@param[in] Data The data segment that should contain the
|
@param[in] Data The data segment that should contain the
|
||||||
TargetAddress key-value list.
|
TargetAddress key-value list.
|
||||||
@param[in] Len Length of the data.
|
@param[in] Len Length of the data.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The target address is updated.
|
@retval EFI_SUCCESS The target address is updated.
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||||
@retval EFI_NOT_FOUND The TargetAddress key is not found.
|
@retval EFI_NOT_FOUND The TargetAddress key is not found.
|
||||||
@ -1101,7 +1101,7 @@ IScsiUpdateTargetAddress (
|
|||||||
|
|
||||||
Status = EFI_NOT_FOUND;
|
Status = EFI_NOT_FOUND;
|
||||||
NvData = &Session->ConfigData->SessionConfigData;
|
NvData = &Session->ConfigData->SessionConfigData;
|
||||||
|
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
TargetAddress = IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_TARGET_ADDRESS);
|
TargetAddress = IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_TARGET_ADDRESS);
|
||||||
if (TargetAddress == NULL) {
|
if (TargetAddress == NULL) {
|
||||||
@ -1188,7 +1188,7 @@ IScsiUpdateTargetAddress (
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Save the origial user setting which specifies the proxy/virtual iSCSI target.
|
// Save the origial user setting which specifies the proxy/virtual iSCSI target.
|
||||||
//
|
//
|
||||||
CopyMem (&NvData->OriginalTargetIp, &NvData->TargetIp, sizeof (EFI_IP_ADDRESS));
|
CopyMem (&NvData->OriginalTargetIp, &NvData->TargetIp, sizeof (EFI_IP_ADDRESS));
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -1365,7 +1365,7 @@ IScsiReceivePdu (
|
|||||||
switch (ISCSI_GET_OPCODE (Header)) {
|
switch (ISCSI_GET_OPCODE (Header)) {
|
||||||
case ISCSI_OPCODE_SCSI_DATA_IN:
|
case ISCSI_OPCODE_SCSI_DATA_IN:
|
||||||
//
|
//
|
||||||
// To reduce memory copy overhead, try to use the buffer described by Context
|
// To reduce memory copy overhead, try to use the buffer described by Context
|
||||||
// if the PDU is an iSCSI SCSI data.
|
// if the PDU is an iSCSI SCSI data.
|
||||||
//
|
//
|
||||||
InDataOffset = ISCSI_GET_BUFFER_OFFSET (Header);
|
InDataOffset = ISCSI_GET_BUFFER_OFFSET (Header);
|
||||||
@ -1713,7 +1713,7 @@ IScsiCheckOpParams (
|
|||||||
IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_TARGET_ALIAS);
|
IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_TARGET_ALIAS);
|
||||||
IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_TARGET_PORTAL_GROUP_TAG);
|
IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_TARGET_PORTAL_GROUP_TAG);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Remove the key-value that may not needed for result function is OR.
|
// Remove the key-value that may not needed for result function is OR.
|
||||||
//
|
//
|
||||||
@ -2228,7 +2228,7 @@ IScsiNewScsiCmdPdu (
|
|||||||
if (ScsiCmd == NULL) {
|
if (ScsiCmd == NULL) {
|
||||||
NetbufFree (PduHeader);
|
NetbufFree (PduHeader);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
Header = (ISCSI_ADDITIONAL_HEADER *) (ScsiCmd + 1);
|
Header = (ISCSI_ADDITIONAL_HEADER *) (ScsiCmd + 1);
|
||||||
|
|
||||||
ZeroMem (ScsiCmd, Length);
|
ZeroMem (ScsiCmd, Length);
|
||||||
@ -2902,8 +2902,8 @@ IScsiOnNopInRcvd (
|
|||||||
@param[in] Lun The LUN.
|
@param[in] Lun The LUN.
|
||||||
@param[in, out] Packet The request packet containing IO request, SCSI command
|
@param[in, out] Packet The request packet containing IO request, SCSI command
|
||||||
buffer and buffers to read/write.
|
buffer and buffers to read/write.
|
||||||
|
|
||||||
@retval EFI_SUCCES The SCSI command is executed and the result is updated to
|
@retval EFI_SUCCES The SCSI command is executed and the result is updated to
|
||||||
the Packet.
|
the Packet.
|
||||||
@retval EFI_DEVICE_ERROR Session state was not as required.
|
@retval EFI_DEVICE_ERROR Session state was not as required.
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||||
@ -3197,7 +3197,7 @@ IScsiSessionAbort (
|
|||||||
if (!Conn->Ipv6Flag) {
|
if (!Conn->Ipv6Flag) {
|
||||||
ProtocolGuid = &gEfiTcp4ProtocolGuid;
|
ProtocolGuid = &gEfiTcp4ProtocolGuid;
|
||||||
} else {
|
} else {
|
||||||
ProtocolGuid = &gEfiTcp6ProtocolGuid;
|
ProtocolGuid = &gEfiTcp6ProtocolGuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The header file of iSCSI Protocol that defines many specific data structures.
|
The header file of iSCSI Protocol that defines many specific data structures.
|
||||||
|
|
||||||
Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -627,7 +627,7 @@ typedef struct _ISCSI_KEY_VALUE_PAIR {
|
|||||||
} ISCSI_KEY_VALUE_PAIR;
|
} ISCSI_KEY_VALUE_PAIR;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Attach the iSCSI connection to the iSCSI session.
|
Attach the iSCSI connection to the iSCSI session.
|
||||||
|
|
||||||
@param[in, out] Session The iSCSI session.
|
@param[in, out] Session The iSCSI session.
|
||||||
@param[in, out] Conn The iSCSI connection.
|
@param[in, out] Conn The iSCSI connection.
|
||||||
@ -640,7 +640,7 @@ IScsiAttatchConnection (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Detach the iSCSI connection from the session it belongs to.
|
Detach the iSCSI connection from the session it belongs to.
|
||||||
|
|
||||||
@param[in, out] Conn The iSCSI connection.
|
@param[in, out] Conn The iSCSI connection.
|
||||||
|
|
||||||
@ -658,7 +658,7 @@ IScsiDetatchConnection (
|
|||||||
|
|
||||||
@retval EFI_SUCCESS The iSCSI connection is logged into the iSCSI target.
|
@retval EFI_SUCCESS The iSCSI connection is logged into the iSCSI target.
|
||||||
@retval EFI_TIMEOUT Timeout occurred during the login procedure.
|
@retval EFI_TIMEOUT Timeout occurred during the login procedure.
|
||||||
@retval Others Other errors as indicated.
|
@retval Others Other errors as indicated.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -743,7 +743,7 @@ IScsiSendLoginReq (
|
|||||||
Receive and process the iSCSI login response.
|
Receive and process the iSCSI login response.
|
||||||
|
|
||||||
@param[in] Conn The connection in the iSCSI login phase.
|
@param[in] Conn The connection in the iSCSI login phase.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The iSCSI login response PDU is received and processed.
|
@retval EFI_SUCCESS The iSCSI login response PDU is received and processed.
|
||||||
@retval Others Other errors as indicated.
|
@retval Others Other errors as indicated.
|
||||||
|
|
||||||
@ -815,7 +815,7 @@ IScsiProcessLoginRsp (
|
|||||||
@param[in] Data The data segment which should contain the
|
@param[in] Data The data segment which should contain the
|
||||||
TargetAddress key-value list.
|
TargetAddress key-value list.
|
||||||
@param[in] Len Length of the data.
|
@param[in] Len Length of the data.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The target address is updated.
|
@retval EFI_SUCCESS The target address is updated.
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||||
@retval EFI_NOT_FOUND The TargetAddress key is not found.
|
@retval EFI_NOT_FOUND The TargetAddress key is not found.
|
||||||
@ -983,8 +983,8 @@ IScsiNormalizeName (
|
|||||||
@param[in] Lun The LUN.
|
@param[in] Lun The LUN.
|
||||||
@param[in, out] Packet The request packet containing IO request, SCSI command
|
@param[in, out] Packet The request packet containing IO request, SCSI command
|
||||||
buffer and buffers to read/write.
|
buffer and buffers to read/write.
|
||||||
|
|
||||||
@retval EFI_SUCCES The SCSI command is executed and the result is updated to
|
@retval EFI_SUCCES The SCSI command is executed and the result is updated to
|
||||||
the Packet.
|
the Packet.
|
||||||
@retval EFI_DEVICE_ERROR Session state was not as required.
|
@retval EFI_DEVICE_ERROR Session state was not as required.
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||||
@ -1026,7 +1026,7 @@ IScsiSessionInit (
|
|||||||
IN OUT ISCSI_SESSION *Session,
|
IN OUT ISCSI_SESSION *Session,
|
||||||
IN BOOLEAN Recovery
|
IN BOOLEAN Recovery
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Abort the iSCSI session, that is, reset all the connection and free the
|
Abort the iSCSI session, that is, reset all the connection and free the
|
||||||
resources.
|
resources.
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/** @file
|
/** @file
|
||||||
GUIDs used as HII FormSet and HII Package list GUID in HTTP boot driver.
|
GUIDs used as HII FormSet and HII Package list GUID in HTTP boot driver.
|
||||||
|
|
||||||
Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
|
|
||||||
This program and the accompanying materials are licensed and made available under
|
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
|
||||||
The full text of the license may be found at
|
|
||||||
http://opensource.org/licenses/bsd-license.php.
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
This program and the accompanying materials are licensed and made available under
|
||||||
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
|
The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php.
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
This file defines the HttpTlsCipherList variable for HTTPS to configure Tls Cipher List.
|
This file defines the HttpTlsCipherList variable for HTTPS to configure Tls Cipher List.
|
||||||
|
|
||||||
Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2018 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials are licensed and made available under
|
This program and the accompanying materials are licensed and made available under
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
The full text of the license may be found at
|
The full text of the license may be found at
|
||||||
@ -17,10 +17,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Private Variable for HTTPS to configure Tls Cipher List.
|
// Private Variable for HTTPS to configure Tls Cipher List.
|
||||||
// The valid contents of variable must follow the TLS CipherList format defined in RFC 5246.
|
// The valid contents of variable must follow the TLS CipherList format defined in RFC 5246.
|
||||||
// The valid length of variable must be an integral multiple of 2.
|
// The valid length of variable must be an integral multiple of 2.
|
||||||
// For example, if below cipher suites are preferred:
|
// For example, if below cipher suites are preferred:
|
||||||
// CipherSuite TLS_RSA_WITH_AES_128_CBC_SHA256 = {0x00,0x3C}
|
// CipherSuite TLS_RSA_WITH_AES_128_CBC_SHA256 = {0x00,0x3C}
|
||||||
// CipherSuite TLS_RSA_WITH_AES_256_CBC_SHA256 = {0x00,0x3D}
|
// CipherSuite TLS_RSA_WITH_AES_256_CBC_SHA256 = {0x00,0x3D}
|
||||||
// Then, the contents of variable should be:
|
// Then, the contents of variable should be:
|
||||||
// {0x00,0x3C,0x00,0x3D}
|
// {0x00,0x3C,0x00,0x3D}
|
||||||
@ -29,7 +29,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
{ \
|
{ \
|
||||||
0x46ddb415, 0x5244, 0x49c7, { 0x93, 0x74, 0xf0, 0xe2, 0x98, 0xe7, 0xd3, 0x86 } \
|
0x46ddb415, 0x5244, 0x49c7, { 0x93, 0x74, 0xf0, 0xe2, 0x98, 0xe7, 0xd3, 0x86 } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define EDKII_HTTP_TLS_CIPHER_LIST_VARIABLE L"HttpTlsCipherList"
|
#define EDKII_HTTP_TLS_CIPHER_LIST_VARIABLE L"HttpTlsCipherList"
|
||||||
|
|
||||||
extern EFI_GUID gEdkiiHttpTlsCipherListGuid;
|
extern EFI_GUID gEdkiiHttpTlsCipherListGuid;
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
/** @file
|
/** @file
|
||||||
GUIDs used as HII FormSet and HII Package list GUID in IScsiConfig driver
|
GUIDs used as HII FormSet and HII Package list GUID in IScsiConfig driver
|
||||||
that supports IP4 and IP6 both.
|
that supports IP4 and IP6 both.
|
||||||
|
|
||||||
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
|
|
||||||
This program and the accompanying materials are licensed and made available under
|
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
|
||||||
The full text of the license may be found at
|
|
||||||
http://opensource.org/licenses/bsd-license.php.
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
This program and the accompanying materials are licensed and made available under
|
||||||
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
|
The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php.
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/** @file
|
/** @file
|
||||||
GUIDs used as HII FormSet and HII Package list GUID in Ip6Config driver.
|
GUIDs used as HII FormSet and HII Package list GUID in Ip6Config driver.
|
||||||
|
|
||||||
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
|
|
||||||
This program and the accompanying materials are licensed and made available under
|
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
|
||||||
The full text of the license may be found at
|
|
||||||
http://opensource.org/licenses/bsd-license.php.
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
This program and the accompanying materials are licensed and made available under
|
||||||
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
|
The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php.
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Implementation of EFI_COMPONENT_NAME_PROTOCOL and
|
Implementation of EFI_COMPONENT_NAME_PROTOCOL and
|
||||||
EFI_COMPONENT_NAME2_PROTOCOL protocol.
|
EFI_COMPONENT_NAME2_PROTOCOL protocol.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -238,10 +238,10 @@ Ip6ComponentNameGetDriverName (
|
|||||||
|
|
||||||
@param Ip6[in] A pointer to the EFI_IP6_PROTOCOL.
|
@param Ip6[in] A pointer to the EFI_IP6_PROTOCOL.
|
||||||
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
|
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
|
||||||
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
|
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
UpdateName (
|
UpdateName (
|
||||||
@ -320,7 +320,7 @@ UpdateName (
|
|||||||
FreeUnicodeStringTable (gIp6ControllerNameTable);
|
FreeUnicodeStringTable (gIp6ControllerNameTable);
|
||||||
gIp6ControllerNameTable = NULL;
|
gIp6ControllerNameTable = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = AddUnicodeString2 (
|
Status = AddUnicodeString2 (
|
||||||
"eng",
|
"eng",
|
||||||
gIp6ComponentName.SupportedLanguages,
|
gIp6ComponentName.SupportedLanguages,
|
||||||
@ -331,7 +331,7 @@ UpdateName (
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
return AddUnicodeString2 (
|
return AddUnicodeString2 (
|
||||||
"en",
|
"en",
|
||||||
gIp6ComponentName2.SupportedLanguages,
|
gIp6ComponentName2.SupportedLanguages,
|
||||||
@ -421,7 +421,7 @@ Ip6ComponentNameGetControllerName (
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_IP6_PROTOCOL *Ip6;
|
EFI_IP6_PROTOCOL *Ip6;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Only provide names for child handles.
|
// Only provide names for child handles.
|
||||||
//
|
//
|
||||||
@ -430,7 +430,7 @@ Ip6ComponentNameGetControllerName (
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Make sure this driver produced ChildHandle
|
// Make sure this driver produced ChildHandle
|
||||||
//
|
//
|
||||||
Status = EfiTestChildHandle (
|
Status = EfiTestChildHandle (
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The implementation of common functions shared by IP6 driver.
|
The implementation of common functions shared by IP6 driver.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -330,7 +330,7 @@ Ip6AddAddr (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Callback function which provided by user to remove one node in NetDestroyLinkList process.
|
Callback function which provided by user to remove one node in NetDestroyLinkList process.
|
||||||
|
|
||||||
@param[in] Entry The entry to be removed.
|
@param[in] Entry The entry to be removed.
|
||||||
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
|
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
|
||||||
|
|
||||||
@ -348,7 +348,7 @@ Ip6DestroyChildEntryByAddr (
|
|||||||
IP6_PROTOCOL *Instance;
|
IP6_PROTOCOL *Instance;
|
||||||
EFI_SERVICE_BINDING_PROTOCOL *ServiceBinding;
|
EFI_SERVICE_BINDING_PROTOCOL *ServiceBinding;
|
||||||
EFI_IPv6_ADDRESS *Address;
|
EFI_IPv6_ADDRESS *Address;
|
||||||
|
|
||||||
Instance = NET_LIST_USER_STRUCT_S (Entry, IP6_PROTOCOL, Link, IP6_PROTOCOL_SIGNATURE);
|
Instance = NET_LIST_USER_STRUCT_S (Entry, IP6_PROTOCOL, Link, IP6_PROTOCOL_SIGNATURE);
|
||||||
ServiceBinding = ((IP6_DESTROY_CHILD_BY_ADDR_CALLBACK_CONTEXT*) Context)->ServiceBinding;
|
ServiceBinding = ((IP6_DESTROY_CHILD_BY_ADDR_CALLBACK_CONTEXT*) Context)->ServiceBinding;
|
||||||
Address = ((IP6_DESTROY_CHILD_BY_ADDR_CALLBACK_CONTEXT*) Context)->Address;
|
Address = ((IP6_DESTROY_CHILD_BY_ADDR_CALLBACK_CONTEXT*) Context)->Address;
|
||||||
@ -356,7 +356,7 @@ Ip6DestroyChildEntryByAddr (
|
|||||||
if ((Instance->State == IP6_STATE_CONFIGED) && EFI_IP6_EQUAL (&Instance->ConfigData.StationAddress, Address)) {
|
if ((Instance->State == IP6_STATE_CONFIGED) && EFI_IP6_EQUAL (&Instance->ConfigData.StationAddress, Address)) {
|
||||||
return ServiceBinding->DestroyChild (ServiceBinding, Instance->Handle);
|
return ServiceBinding->DestroyChild (ServiceBinding, Instance->Handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The implementation of EFI IPv6 Configuration Protocol.
|
The implementation of EFI IPv6 Configuration Protocol.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -58,7 +58,7 @@ Ip6ConfigOnPolicyChanged (
|
|||||||
BOOLEAN Recovery;
|
BOOLEAN Recovery;
|
||||||
|
|
||||||
Recovery = FALSE;
|
Recovery = FALSE;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Currently there are only two policies: Manual and Automatic. Regardless of
|
// Currently there are only two policies: Manual and Automatic. Regardless of
|
||||||
// what transition is going on, i.e., Manual -> Automatic and Automatic ->
|
// what transition is going on, i.e., Manual -> Automatic and Automatic ->
|
||||||
@ -86,14 +86,14 @@ Ip6ConfigOnPolicyChanged (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!IsListEmpty (&IpSb->DefaultInterface->AddressList) && IpSb->DefaultInterface->AddressCount > 0) {
|
if (!IsListEmpty (&IpSb->DefaultInterface->AddressList) && IpSb->DefaultInterface->AddressCount > 0) {
|
||||||
//
|
//
|
||||||
// If any IPv6 children (Instance) in configured state and use global unicast address, it will be
|
// If any IPv6 children (Instance) in configured state and use global unicast address, it will be
|
||||||
// destroyed in Ip6RemoveAddr() function later. Then, the upper layer driver's Stop() function will be
|
// destroyed in Ip6RemoveAddr() function later. Then, the upper layer driver's Stop() function will be
|
||||||
// called, which may break the upper layer network stacks. So, the driver should take the responsibility
|
// called, which may break the upper layer network stacks. So, the driver should take the responsibility
|
||||||
// for the recovery by using ConnectController() after Ip6RemoveAddr().
|
// for the recovery by using ConnectController() after Ip6RemoveAddr().
|
||||||
// Here, just check whether need to recover the upper layer network stacks later.
|
// Here, just check whether need to recover the upper layer network stacks later.
|
||||||
//
|
//
|
||||||
NET_LIST_FOR_EACH (Entry, &IpSb->DefaultInterface->AddressList) {
|
NET_LIST_FOR_EACH (Entry, &IpSb->DefaultInterface->AddressList) {
|
||||||
AddrInfo = NET_LIST_USER_STRUCT_S (Entry, IP6_ADDRESS_INFO, Link, IP6_ADDR_INFO_SIGNATURE);
|
AddrInfo = NET_LIST_USER_STRUCT_S (Entry, IP6_ADDRESS_INFO, Link, IP6_ADDR_INFO_SIGNATURE);
|
||||||
if (!IsListEmpty (&IpSb->Children)) {
|
if (!IsListEmpty (&IpSb->Children)) {
|
||||||
NET_LIST_FOR_EACH (Entry2, &IpSb->Children) {
|
NET_LIST_FOR_EACH (Entry2, &IpSb->Children) {
|
||||||
@ -105,7 +105,7 @@ Ip6ConfigOnPolicyChanged (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// All IPv6 children that use global unicast address as it's source address
|
// All IPv6 children that use global unicast address as it's source address
|
||||||
// should be destroyed now. The survivers are those use the link-local address
|
// should be destroyed now. The survivers are those use the link-local address
|
||||||
@ -118,7 +118,7 @@ Ip6ConfigOnPolicyChanged (
|
|||||||
NULL,
|
NULL,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
if (IpSb->Controller != NULL && Recovery) {
|
if (IpSb->Controller != NULL && Recovery) {
|
||||||
//
|
//
|
||||||
// ConnectController() to recover the upper layer network stacks.
|
// ConnectController() to recover the upper layer network stacks.
|
||||||
@ -726,7 +726,7 @@ Ip6ConfigSetPolicy (
|
|||||||
DataItem->DataSize = 0;
|
DataItem->DataSize = 0;
|
||||||
DataItem->Status = EFI_NOT_FOUND;
|
DataItem->Status = EFI_NOT_FOUND;
|
||||||
NetMapIterate (&DataItem->EventMap, Ip6ConfigSignalEvent, NULL);
|
NetMapIterate (&DataItem->EventMap, Ip6ConfigSignalEvent, NULL);
|
||||||
|
|
||||||
if (NewPolicy == Ip6ConfigPolicyManual) {
|
if (NewPolicy == Ip6ConfigPolicyManual) {
|
||||||
//
|
//
|
||||||
// The policy is changed from automatic to manual. Stop the DHCPv6 process
|
// The policy is changed from automatic to manual. Stop the DHCPv6 process
|
||||||
@ -1546,7 +1546,7 @@ Ip6ConfigSetDnsServer (
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// DataSize is 0 and Data is NULL, clean up the DnsServer address.
|
// DataSize is 0 and Data is NULL, clean up the DnsServer address.
|
||||||
//
|
//
|
||||||
if (Item->Data.Ptr != NULL) {
|
if (Item->Data.Ptr != NULL) {
|
||||||
FreePool (Item->Data.Ptr);
|
FreePool (Item->Data.Ptr);
|
||||||
@ -1965,7 +1965,7 @@ Ip6ConfigOnDhcp6SbInstalled (
|
|||||||
network stack was set successfully.
|
network stack was set successfully.
|
||||||
@retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
|
@retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
|
||||||
- This is NULL.
|
- This is NULL.
|
||||||
- One or more fields in Data and DataSizedo not match the
|
- One or more fields in Data and DataSizedo not match the
|
||||||
requirement of the data type indicated by DataType.
|
requirement of the data type indicated by DataType.
|
||||||
@retval EFI_WRITE_PROTECTED The specified configuration data is read-only or the specified
|
@retval EFI_WRITE_PROTECTED The specified configuration data is read-only or the specified
|
||||||
configuration data cannot be set under the current policy.
|
configuration data cannot be set under the current policy.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Definitions for EFI IPv6 Configuartion Protocol implementation.
|
Definitions for EFI IPv6 Configuartion Protocol implementation.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -70,7 +70,7 @@ typedef struct _IP6_CONFIG_INSTANCE IP6_CONFIG_INSTANCE;
|
|||||||
8 bytes.
|
8 bytes.
|
||||||
@retval EFI_SUCCESS The specified configuration data for the EFI IPv6
|
@retval EFI_SUCCESS The specified configuration data for the EFI IPv6
|
||||||
network stack was set successfully.
|
network stack was set successfully.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -87,14 +87,14 @@ EFI_STATUS
|
|||||||
@param[in, out] DataSize On input, in bytes, the size of Data. On output, in
|
@param[in, out] DataSize On input, in bytes, the size of Data. On output, in
|
||||||
bytes, the size of buffer required to store the specified
|
bytes, the size of buffer required to store the specified
|
||||||
configuration data.
|
configuration data.
|
||||||
@param[in] Data The data buffer in which the configuration data is returned.
|
@param[in] Data The data buffer in which the configuration data is returned.
|
||||||
Ignored if DataSize is ZERO.
|
Ignored if DataSize is ZERO.
|
||||||
|
|
||||||
@retval EFI_BUFFER_TOO_SMALL The size of Data is too small for the specified
|
@retval EFI_BUFFER_TOO_SMALL The size of Data is too small for the specified
|
||||||
configuration data, and the required size is
|
configuration data, and the required size is
|
||||||
returned in DataSize.
|
returned in DataSize.
|
||||||
@retval EFI_SUCCESS The specified configuration data was obtained successfully.
|
@retval EFI_SUCCESS The specified configuration data was obtained successfully.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -162,9 +162,9 @@ typedef struct {
|
|||||||
} IP6_ADDRESS_INFO_ENTRY;
|
} IP6_ADDRESS_INFO_ENTRY;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
EFI_IP6_CONFIG_POLICY Policy; ///< manual or automatic
|
EFI_IP6_CONFIG_POLICY Policy; ///< manual or automatic
|
||||||
EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS DadTransmitCount; ///< dad transmits count
|
EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS DadTransmitCount; ///< dad transmits count
|
||||||
EFI_IP6_CONFIG_INTERFACE_ID InterfaceId; ///< alternative interface id
|
EFI_IP6_CONFIG_INTERFACE_ID InterfaceId; ///< alternative interface id
|
||||||
LIST_ENTRY ManualAddress; ///< IP addresses
|
LIST_ENTRY ManualAddress; ///< IP addresses
|
||||||
UINT32 ManualAddressCount; ///< IP addresses count
|
UINT32 ManualAddressCount; ///< IP addresses count
|
||||||
LIST_ENTRY GatewayAddress; ///< Gateway address
|
LIST_ENTRY GatewayAddress; ///< Gateway address
|
||||||
@ -236,13 +236,13 @@ Ip6ConfigReadConfigData (
|
|||||||
/**
|
/**
|
||||||
The event process routine when the DHCPv6 server is answered with a reply packet
|
The event process routine when the DHCPv6 server is answered with a reply packet
|
||||||
for an information request.
|
for an information request.
|
||||||
|
|
||||||
@param[in] This Points to the EFI_DHCP6_PROTOCOL.
|
@param[in] This Points to the EFI_DHCP6_PROTOCOL.
|
||||||
@param[in] Context The pointer to the IP6 configuration instance data.
|
@param[in] Context The pointer to the IP6 configuration instance data.
|
||||||
@param[in] Packet The DHCPv6 reply packet.
|
@param[in] Packet The DHCPv6 reply packet.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The DNS server address was retrieved from the reply packet.
|
@retval EFI_SUCCESS The DNS server address was retrieved from the reply packet.
|
||||||
@retval EFI_NOT_READY The reply packet does not contain the DNS server option, or
|
@retval EFI_NOT_READY The reply packet does not contain the DNS server option, or
|
||||||
the DNS server address is not valid.
|
the DNS server address is not valid.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@ -256,7 +256,7 @@ Ip6ConfigOnDhcp6Reply (
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
The work function to trigger the DHCPv6 process to perform a stateful autoconfiguration.
|
The work function to trigger the DHCPv6 process to perform a stateful autoconfiguration.
|
||||||
|
|
||||||
@param[in] Instance Pointer to the IP6 config instance data.
|
@param[in] Instance Pointer to the IP6 config instance data.
|
||||||
@param[in] OtherInfoOnly If FALSE, get stateful address and other information
|
@param[in] OtherInfoOnly If FALSE, get stateful address and other information
|
||||||
via DHCPv6. Otherwise, only get the other information.
|
via DHCPv6. Otherwise, only get the other information.
|
||||||
@ -275,10 +275,10 @@ Ip6ConfigStartStatefulAutoConfig (
|
|||||||
Initialize an IP6_CONFIG_INSTANCE.
|
Initialize an IP6_CONFIG_INSTANCE.
|
||||||
|
|
||||||
@param[out] Instance The buffer of IP6_CONFIG_INSTANCE to be initialized.
|
@param[out] Instance The buffer of IP6_CONFIG_INSTANCE to be initialized.
|
||||||
|
|
||||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources to complete the operation.
|
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources to complete the operation.
|
||||||
@retval EFI_SUCCESS The IP6_CONFIG_INSTANCE initialized successfully.
|
@retval EFI_SUCCESS The IP6_CONFIG_INSTANCE initialized successfully.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
Ip6ConfigInitInstance (
|
Ip6ConfigInitInstance (
|
||||||
@ -289,7 +289,7 @@ Ip6ConfigInitInstance (
|
|||||||
Release an IP6_CONFIG_INSTANCE.
|
Release an IP6_CONFIG_INSTANCE.
|
||||||
|
|
||||||
@param[in, out] Instance The buffer of IP6_CONFIG_INSTANCE to be freed.
|
@param[in, out] Instance The buffer of IP6_CONFIG_INSTANCE to be freed.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
Ip6ConfigCleanInstance (
|
Ip6ConfigCleanInstance (
|
||||||
@ -303,7 +303,7 @@ Ip6ConfigCleanInstance (
|
|||||||
|
|
||||||
@retval EFI_SUCCESS The child was successfully destroyed.
|
@retval EFI_SUCCESS The child was successfully destroyed.
|
||||||
@retval Others Failed to destroy the child.
|
@retval Others Failed to destroy the child.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
Ip6ConfigDestroyDhcp6 (
|
Ip6ConfigDestroyDhcp6 (
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Helper functions for configuring or obtaining the parameters relating to IP6.
|
Helper functions for configuring or obtaining the parameters relating to IP6.
|
||||||
|
|
||||||
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -994,7 +994,7 @@ Exit:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Convert IFR data into IP6 configuration data. The policy, alternative interface
|
Convert IFR data into IP6 configuration data. The policy, alternative interface
|
||||||
ID, and DAD transmit counts, and will be saved.
|
ID, and DAD transmit counts, and will be saved.
|
||||||
|
|
||||||
@param[in] IfrNvData The IFR NV data.
|
@param[in] IfrNvData The IFR NV data.
|
||||||
@param[in, out] Instance The IP6 config instance data.
|
@param[in, out] Instance The IP6 config instance data.
|
||||||
@ -1541,7 +1541,7 @@ Ip6GetCurrentSetting (
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
CHAR16 PortString[ADDRESS_STR_MAX_SIZE];
|
CHAR16 PortString[ADDRESS_STR_MAX_SIZE];
|
||||||
EFI_IP6_CONFIG_INTERFACE_INFO *IfInfo;
|
EFI_IP6_CONFIG_INTERFACE_INFO *IfInfo;
|
||||||
|
|
||||||
|
|
||||||
Ip6Config = &Instance->Ip6Config;
|
Ip6Config = &Instance->Ip6Config;
|
||||||
HiiHandle = Instance->CallbackInfo.RegisteredHandle;
|
HiiHandle = Instance->CallbackInfo.RegisteredHandle;
|
||||||
@ -1794,7 +1794,7 @@ Ip6FormCallback (
|
|||||||
}
|
}
|
||||||
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT;
|
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KEY_INTERFACE_ID:
|
case KEY_INTERFACE_ID:
|
||||||
Status = Ip6ParseInterfaceIdFromString (IfrNvData->InterfaceId, &Ip6NvData->InterfaceId);
|
Status = Ip6ParseInterfaceIdFromString (IfrNvData->InterfaceId, &Ip6NvData->InterfaceId);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
@ -1805,9 +1805,9 @@ Ip6FormCallback (
|
|||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KEY_MANUAL_ADDRESS:
|
case KEY_MANUAL_ADDRESS:
|
||||||
Status = Ip6ParseAddressListFromString (
|
Status = Ip6ParseAddressListFromString (
|
||||||
IfrNvData->ManualAddress,
|
IfrNvData->ManualAddress,
|
||||||
@ -1822,9 +1822,9 @@ Ip6FormCallback (
|
|||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KEY_GATEWAY_ADDRESS:
|
case KEY_GATEWAY_ADDRESS:
|
||||||
Status = Ip6ParseAddressListFromString (
|
Status = Ip6ParseAddressListFromString (
|
||||||
IfrNvData->GatewayAddress,
|
IfrNvData->GatewayAddress,
|
||||||
@ -1839,9 +1839,9 @@ Ip6FormCallback (
|
|||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KEY_DNS_ADDRESS:
|
case KEY_DNS_ADDRESS:
|
||||||
Status = Ip6ParseAddressListFromString (
|
Status = Ip6ParseAddressListFromString (
|
||||||
IfrNvData->DnsAddress,
|
IfrNvData->DnsAddress,
|
||||||
@ -1856,7 +1856,7 @@ Ip6FormCallback (
|
|||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The driver binding and service binding protocol for IP6 driver.
|
The driver binding and service binding protocol for IP6 driver.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
@ -182,7 +182,7 @@ Ip6CleanService (
|
|||||||
Status = Ip6LeaveGroup (IpSb, &AllNodes);
|
Status = Ip6LeaveGroup (IpSb, &AllNodes);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IpSb->DefaultInterface != NULL) {
|
if (IpSb->DefaultInterface != NULL) {
|
||||||
@ -568,14 +568,14 @@ Ip6DriverBindingStart (
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Read the config data from NV variable again.
|
// Read the config data from NV variable again.
|
||||||
// The default data can be changed by other drivers.
|
// The default data can be changed by other drivers.
|
||||||
//
|
//
|
||||||
Status = Ip6ConfigReadConfigData (IpSb->MacString, &IpSb->Ip6ConfigInstance);
|
Status = Ip6ConfigReadConfigData (IpSb->MacString, &IpSb->Ip6ConfigInstance);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// If there is any default manual address, set it.
|
// If there is any default manual address, set it.
|
||||||
//
|
//
|
||||||
@ -638,7 +638,7 @@ Ip6DriverBindingStart (
|
|||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ON_ERROR;
|
goto ON_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Initialize the IP6 ID
|
// Initialize the IP6 ID
|
||||||
@ -655,7 +655,7 @@ ON_ERROR:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Callback function which provided by user to remove one node in NetDestroyLinkList process.
|
Callback function which provided by user to remove one node in NetDestroyLinkList process.
|
||||||
|
|
||||||
@param[in] Entry The entry to be removed.
|
@param[in] Entry The entry to be removed.
|
||||||
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
|
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
|
||||||
|
|
||||||
@ -786,7 +786,7 @@ Ip6DriverBindingStop (
|
|||||||
FreePool (IpSb);
|
FreePool (IpSb);
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
Exit:
|
Exit:
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
## @file
|
## @file
|
||||||
# Basic IPv6 packet I/O Service.
|
# Basic IPv6 packet I/O Service.
|
||||||
#
|
#
|
||||||
# This module provides basic network IPv6 packet I/O services which includes support for
|
# This module provides basic network IPv6 packet I/O services which includes support for
|
||||||
# Neighbor Discovery Protocol (ND), Multicast Listener Discovery Protocol (MLD),
|
# Neighbor Discovery Protocol (ND), Multicast Listener Discovery Protocol (MLD),
|
||||||
# and a subset of the Internet Control Message Protocol (ICMPv6). This driver
|
# and a subset of the Internet Control Message Protocol (ICMPv6). This driver
|
||||||
# also provides the mechanism to set and get various types of configurations for
|
# also provides the mechanism to set and get various types of configurations for
|
||||||
# the EFI IPv6 network stack.
|
# the EFI IPv6 network stack.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
@ -7,13 +7,13 @@
|
|||||||
// also provides the mechanism to set and get various types of configurations for
|
// also provides the mechanism to set and get various types of configurations for
|
||||||
// the EFI IPv6 network stack.
|
// the EFI IPv6 network stack.
|
||||||
//
|
//
|
||||||
// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
|
// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
//
|
//
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
// which accompanies this distribution. The full text of the license may be found at
|
// which accompanies this distribution. The full text of the license may be found at
|
||||||
// http://opensource.org/licenses/bsd-license.php.
|
// http://opensource.org/licenses/bsd-license.php.
|
||||||
//
|
//
|
||||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
//
|
//
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user