summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NetworkPkg/Application/IpsecConfig/Indexer.c4
-rw-r--r--NetworkPkg/Application/IpsecConfig/IpSecConfig.inf4
-rw-r--r--NetworkPkg/Application/IpsecConfig/IpSecConfig.uni4
-rw-r--r--NetworkPkg/Application/IpsecConfig/IpSecConfigExtra.uni6
-rw-r--r--NetworkPkg/Application/IpsecConfig/Match.h4
-rw-r--r--NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c4
-rw-r--r--NetworkPkg/Application/VConfig/VConfig.c4
-rw-r--r--NetworkPkg/Application/VConfig/VConfig.uni4
-rw-r--r--NetworkPkg/Application/VConfig/VConfigExtra.uni6
-rw-r--r--NetworkPkg/Dhcp6Dxe/ComponentName.c24
-rw-r--r--NetworkPkg/Dhcp6Dxe/Dhcp6Driver.c10
-rw-r--r--NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf8
-rw-r--r--NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.uni4
-rw-r--r--NetworkPkg/Dhcp6Dxe/Dhcp6DxeExtra.uni6
-rw-r--r--NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c8
-rw-r--r--NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h4
-rw-r--r--NetworkPkg/Dhcp6Dxe/Dhcp6Io.c24
-rw-r--r--NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c26
-rw-r--r--NetworkPkg/DnsDxe/ComponentName.c34
-rw-r--r--NetworkPkg/DnsDxe/DnsDhcp.c92
-rw-r--r--NetworkPkg/DnsDxe/DnsDhcp.h10
-rw-r--r--NetworkPkg/DnsDxe/DnsDriver.c286
-rw-r--r--NetworkPkg/DnsDxe/DnsDriver.h212
-rw-r--r--NetworkPkg/DnsDxe/DnsDxe.inf10
-rw-r--r--NetworkPkg/DnsDxe/DnsDxe.uni6
-rw-r--r--NetworkPkg/DnsDxe/DnsDxeExtra.uni6
-rw-r--r--NetworkPkg/DnsDxe/DnsImpl.c352
-rw-r--r--NetworkPkg/DnsDxe/DnsImpl.h120
-rw-r--r--NetworkPkg/DnsDxe/DnsProtocol.c316
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootClient.c82
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootClient.h14
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootComponentName.c22
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootComponentName.h14
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootConfig.c76
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootConfigVfr.vfr4
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootDhcp4.c106
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootDhcp4.h16
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootDhcp6.c120
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootDhcp6.h18
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootDxe.c258
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootDxe.h188
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootDxe.inf12
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootDxe.uni6
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootDxeExtra.uni6
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootImpl.c78
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootImpl.h16
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootSupport.c136
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootSupport.h60
-rw-r--r--NetworkPkg/HttpDxe/ComponentName.c8
-rw-r--r--NetworkPkg/HttpDxe/HttpDns.c46
-rw-r--r--NetworkPkg/HttpDxe/HttpDns.h12
-rw-r--r--NetworkPkg/HttpDxe/HttpDriver.c262
-rw-r--r--NetworkPkg/HttpDxe/HttpDriver.h168
-rw-r--r--NetworkPkg/HttpDxe/HttpDxe.inf2
-rw-r--r--NetworkPkg/HttpDxe/HttpDxe.uni6
-rw-r--r--NetworkPkg/HttpDxe/HttpDxeExtra.uni6
-rw-r--r--NetworkPkg/HttpDxe/HttpImpl.c150
-rw-r--r--NetworkPkg/HttpDxe/HttpImpl.h16
-rw-r--r--NetworkPkg/HttpDxe/HttpProto.c262
-rw-r--r--NetworkPkg/HttpDxe/HttpProto.h30
-rw-r--r--NetworkPkg/HttpDxe/HttpsSupport.c12
-rw-r--r--NetworkPkg/HttpDxe/HttpsSupport.h8
-rw-r--r--NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.c18
-rw-r--r--NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.uni6
-rw-r--r--NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxeExtra.uni6
-rw-r--r--NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c60
-rw-r--r--NetworkPkg/IScsiDxe/ComponentName.c20
-rw-r--r--NetworkPkg/IScsiDxe/IScsiCHAP.c22
-rw-r--r--NetworkPkg/IScsiDxe/IScsiCHAP.h4
-rw-r--r--NetworkPkg/IScsiDxe/IScsiConfig.c134
-rw-r--r--NetworkPkg/IScsiDxe/IScsiConfigStrings.uni6
-rw-r--r--NetworkPkg/IScsiDxe/IScsiConfigVfr.vfr30
-rw-r--r--NetworkPkg/IScsiDxe/IScsiDhcp.c18
-rw-r--r--NetworkPkg/IScsiDxe/IScsiDhcp6.c18
-rw-r--r--NetworkPkg/IScsiDxe/IScsiDns.h4
-rw-r--r--NetworkPkg/IScsiDxe/IScsiDriver.c256
-rw-r--r--NetworkPkg/IScsiDxe/IScsiDriver.h198
-rw-r--r--NetworkPkg/IScsiDxe/IScsiDxe.inf12
-rw-r--r--NetworkPkg/IScsiDxe/IScsiDxe.uni4
-rw-r--r--NetworkPkg/IScsiDxe/IScsiDxeExtra.uni4
-rw-r--r--NetworkPkg/IScsiDxe/IScsiExtScsiPassThru.c26
-rw-r--r--NetworkPkg/IScsiDxe/IScsiIbft.c4
-rw-r--r--NetworkPkg/IScsiDxe/IScsiIbft.h4
-rw-r--r--NetworkPkg/IScsiDxe/IScsiImpl.h4
-rw-r--r--NetworkPkg/IScsiDxe/IScsiMisc.c144
-rw-r--r--NetworkPkg/IScsiDxe/IScsiMisc.h18
-rw-r--r--NetworkPkg/IScsiDxe/IScsiProto.c46
-rw-r--r--NetworkPkg/IScsiDxe/IScsiProto.h18
-rw-r--r--NetworkPkg/Include/Guid/HttpBootConfigHii.h12
-rw-r--r--NetworkPkg/Include/Guid/HttpTlsCipherList.h8
-rw-r--r--NetworkPkg/Include/Guid/IScsiConfigHii.h16
-rw-r--r--NetworkPkg/Include/Guid/Ip6ConfigHii.h14
-rw-r--r--NetworkPkg/Ip6Dxe/ComponentName.c14
-rw-r--r--NetworkPkg/Ip6Dxe/Ip6Common.c8
-rw-r--r--NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c26
-rw-r--r--NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h30
-rw-r--r--NetworkPkg/Ip6Dxe/Ip6ConfigNv.c22
-rw-r--r--NetworkPkg/Ip6Dxe/Ip6Driver.c14
-rw-r--r--NetworkPkg/Ip6Dxe/Ip6Dxe.inf10
-rw-r--r--NetworkPkg/Ip6Dxe/Ip6Dxe.uni4
-rw-r--r--NetworkPkg/Ip6Dxe/Ip6DxeExtra.uni6
-rw-r--r--NetworkPkg/Ip6Dxe/Ip6Icmp.c4
-rw-r--r--NetworkPkg/Ip6Dxe/Ip6If.c4
-rw-r--r--NetworkPkg/Ip6Dxe/Ip6Input.c50
-rw-r--r--NetworkPkg/Ip6Dxe/Ip6Nd.c6
-rw-r--r--NetworkPkg/IpSecDxe/ComponentName.c4
-rw-r--r--NetworkPkg/IpSecDxe/IetfConstants.c4
-rw-r--r--NetworkPkg/IpSecDxe/Ike.h10
-rw-r--r--NetworkPkg/IpSecDxe/IkeCommon.c38
-rw-r--r--NetworkPkg/IpSecDxe/IkeCommon.h18
-rw-r--r--NetworkPkg/IpSecDxe/IkePacket.c26
-rw-r--r--NetworkPkg/IpSecDxe/IkePacket.h14
-rw-r--r--NetworkPkg/IpSecDxe/IkeService.c4
-rw-r--r--NetworkPkg/IpSecDxe/Ikev2/ChildSa.c50
-rw-r--r--NetworkPkg/IpSecDxe/Ikev2/Exchange.c6
-rw-r--r--NetworkPkg/IpSecDxe/Ikev2/Ikev2.h4
-rw-r--r--NetworkPkg/IpSecDxe/Ikev2/Info.c62
-rw-r--r--NetworkPkg/IpSecDxe/Ikev2/Payload.c42
-rw-r--r--NetworkPkg/IpSecDxe/Ikev2/Payload.h12
-rw-r--r--NetworkPkg/IpSecDxe/Ikev2/Sa.c184
-rw-r--r--NetworkPkg/IpSecDxe/Ikev2/Utility.c354
-rw-r--r--NetworkPkg/IpSecDxe/Ikev2/Utility.h236
-rw-r--r--NetworkPkg/IpSecDxe/IpSecConfigImpl.c358
-rw-r--r--NetworkPkg/IpSecDxe/IpSecConfigImpl.h8
-rw-r--r--NetworkPkg/IpSecDxe/IpSecCryptIo.c86
-rw-r--r--NetworkPkg/IpSecDxe/IpSecCryptIo.h26
-rw-r--r--NetworkPkg/IpSecDxe/IpSecDebug.c16
-rw-r--r--NetworkPkg/IpSecDxe/IpSecDebug.h6
-rw-r--r--NetworkPkg/IpSecDxe/IpSecDriver.c8
-rw-r--r--NetworkPkg/IpSecDxe/IpSecDxe.inf14
-rw-r--r--NetworkPkg/IpSecDxe/IpSecDxe.uni4
-rw-r--r--NetworkPkg/IpSecDxe/IpSecDxeExtra.uni6
-rw-r--r--NetworkPkg/IpSecDxe/IpSecImpl.c8
-rw-r--r--NetworkPkg/IpSecDxe/IpSecImpl.h10
-rw-r--r--NetworkPkg/IpSecDxe/IpSecMain.c30
-rw-r--r--NetworkPkg/Mtftp6Dxe/ComponentName.c24
-rw-r--r--NetworkPkg/Mtftp6Dxe/Mtftp6Driver.c6
-rw-r--r--NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.uni4
-rw-r--r--NetworkPkg/Mtftp6Dxe/Mtftp6Support.c10
-rw-r--r--NetworkPkg/NetworkPkg.dec2
-rw-r--r--NetworkPkg/NetworkPkg.dsc2
-rw-r--r--NetworkPkg/NetworkPkg.uni4
-rw-r--r--NetworkPkg/NetworkPkgExtra.uni6
-rw-r--r--NetworkPkg/TcpDxe/ComponentName.c18
-rw-r--r--NetworkPkg/TcpDxe/SockImpl.c24
-rw-r--r--NetworkPkg/TcpDxe/SockImpl.h10
-rw-r--r--NetworkPkg/TcpDxe/SockInterface.c10
-rw-r--r--NetworkPkg/TcpDxe/TcpDispatcher.c8
-rw-r--r--NetworkPkg/TcpDxe/TcpDriver.c10
-rw-r--r--NetworkPkg/TcpDxe/TcpDxe.inf4
-rw-r--r--NetworkPkg/TcpDxe/TcpDxe.uni4
-rw-r--r--NetworkPkg/TcpDxe/TcpDxeExtra.uni6
-rw-r--r--NetworkPkg/TcpDxe/TcpInput.c16
-rw-r--r--NetworkPkg/TcpDxe/TcpMain.c6
-rw-r--r--NetworkPkg/TcpDxe/TcpOutput.c10
-rw-r--r--NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.c4
-rw-r--r--NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c8
-rw-r--r--NetworkPkg/TlsDxe/TlsImpl.c2
-rw-r--r--NetworkPkg/Udp6Dxe/ComponentName.c6
-rw-r--r--NetworkPkg/Udp6Dxe/Udp6Driver.c6
-rw-r--r--NetworkPkg/Udp6Dxe/Udp6Dxe.inf6
-rw-r--r--NetworkPkg/Udp6Dxe/Udp6Dxe.uni4
-rw-r--r--NetworkPkg/Udp6Dxe/Udp6DxeExtra.uni6
-rw-r--r--NetworkPkg/Udp6Dxe/Udp6Impl.c10
-rw-r--r--NetworkPkg/Udp6Dxe/Udp6Impl.h6
-rw-r--r--NetworkPkg/Udp6Dxe/Udp6Main.c6
-rw-r--r--NetworkPkg/UefiPxeBcDxe/ComponentName.c4
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c14
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c24
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h6
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c78
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.h4
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c26
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c40
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcImpl.h4
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c12
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcSupport.h6
-rw-r--r--NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf6
-rw-r--r--NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.uni4
-rw-r--r--NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxeExtra.uni6
180 files changed, 3640 insertions, 3640 deletions
diff --git a/NetworkPkg/Application/IpsecConfig/Indexer.c b/NetworkPkg/Application/IpsecConfig/Indexer.c
index 353b22e06a..56d2bfe1e9 100644
--- a/NetworkPkg/Application/IpsecConfig/Indexer.c
+++ b/NetworkPkg/Application/IpsecConfig/Indexer.c
@@ -1,7 +1,7 @@
/** @file
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
are licensed and made available under the terms and conditions of the BSD License
@@ -50,7 +50,7 @@ ConstructSpdIndexer (
if (ValueStr == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
Value64 = StrToUInteger (ValueStr, &Status);
if (!EFI_ERROR (Status)) {
Indexer->Index = (UINTN) Value64;
diff --git a/NetworkPkg/Application/IpsecConfig/IpSecConfig.inf b/NetworkPkg/Application/IpsecConfig/IpSecConfig.inf
index 02371e535d..a9c9bb7eae 100644
--- a/NetworkPkg/Application/IpsecConfig/IpSecConfig.inf
+++ b/NetworkPkg/Application/IpsecConfig/IpSecConfig.inf
@@ -1,10 +1,10 @@
## @file
# Shell application IpSecConfig.
-#
+#
# This application is used to set and retrieve security and policy related information
# 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
# are licensed and made available under the terms and conditions of the BSD License
diff --git a/NetworkPkg/Application/IpsecConfig/IpSecConfig.uni b/NetworkPkg/Application/IpsecConfig/IpSecConfig.uni
index 3dab958699..92599ff221 100644
--- a/NetworkPkg/Application/IpsecConfig/IpSecConfig.uni
+++ b/NetworkPkg/Application/IpsecConfig/IpSecConfig.uni
@@ -4,13 +4,13 @@
// This application is used to set and retrieve security and policy related information
// 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
// 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
// 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.
//
diff --git a/NetworkPkg/Application/IpsecConfig/IpSecConfigExtra.uni b/NetworkPkg/Application/IpsecConfig/IpSecConfigExtra.uni
index 53008576c0..88e1d75854 100644
--- a/NetworkPkg/Application/IpsecConfig/IpSecConfigExtra.uni
+++ b/NetworkPkg/Application/IpsecConfig/IpSecConfigExtra.uni
@@ -1,7 +1,7 @@
// /** @file
// 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
// are licensed and made available under the terms and conditions of the BSD License
@@ -13,8 +13,8 @@
//
// **/
-#string STR_PROPERTIES_MODULE_NAME
-#language en-US
+#string STR_PROPERTIES_MODULE_NAME
+#language en-US
"IpSec Config App"
diff --git a/NetworkPkg/Application/IpsecConfig/Match.h b/NetworkPkg/Application/IpsecConfig/Match.h
index 1d73c5cfbc..a8cc1e9a29 100644
--- a/NetworkPkg/Application/IpsecConfig/Match.h
+++ b/NetworkPkg/Application/IpsecConfig/Match.h
@@ -1,8 +1,8 @@
/** @file
- The internal structure and function declaration of
+ The internal structure and function declaration of
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
are licensed and made available under the terms and conditions of the BSD License
diff --git a/NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c b/NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c
index 06eb30c091..7ecb8adc62 100644
--- a/NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c
+++ b/NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c
@@ -1,7 +1,7 @@
/** @file
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
are licensed and made available under the terms and conditions of the BSD License
@@ -1875,7 +1875,7 @@ EditOperatePolicyEntry (
Selector
);
ASSERT_EFI_ERROR (Status);
-
+
if (CreateNew) {
//
// Edit the entry to a new one. So, we need delete the old entry.
diff --git a/NetworkPkg/Application/VConfig/VConfig.c b/NetworkPkg/Application/VConfig/VConfig.c
index d00a041f49..ad2c43c3cf 100644
--- a/NetworkPkg/Application/VConfig/VConfig.c
+++ b/NetworkPkg/Application/VConfig/VConfig.c
@@ -1,7 +1,7 @@
/** @file
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
are licensed and made available under the terms and conditions of the BSD License
@@ -618,7 +618,7 @@ VlanConfigMain (
EFI_STATUS Status;
mImageHandle = ImageHandle;
-
+
//
// Retrieve HII package list from ImageHandle
//
diff --git a/NetworkPkg/Application/VConfig/VConfig.uni b/NetworkPkg/Application/VConfig/VConfig.uni
index 3647cace51..eba25a1889 100644
--- a/NetworkPkg/Application/VConfig/VConfig.uni
+++ b/NetworkPkg/Application/VConfig/VConfig.uni
@@ -3,13 +3,13 @@
//
// 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
// 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
// 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.
//
diff --git a/NetworkPkg/Application/VConfig/VConfigExtra.uni b/NetworkPkg/Application/VConfig/VConfigExtra.uni
index c5fed8bc2f..6179bae27a 100644
--- a/NetworkPkg/Application/VConfig/VConfigExtra.uni
+++ b/NetworkPkg/Application/VConfig/VConfigExtra.uni
@@ -1,7 +1,7 @@
// /** @file
// 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
// are licensed and made available under the terms and conditions of the BSD License
@@ -13,8 +13,8 @@
//
// **/
-#string STR_PROPERTIES_MODULE_NAME
-#language en-US
+#string STR_PROPERTIES_MODULE_NAME
+#language en-US
"Vlan Config App"
diff --git a/NetworkPkg/Dhcp6Dxe/ComponentName.c b/NetworkPkg/Dhcp6Dxe/ComponentName.c
index ba612156a0..9b834167f5 100644
--- a/NetworkPkg/Dhcp6Dxe/ComponentName.c
+++ b/NetworkPkg/Dhcp6Dxe/ComponentName.c
@@ -1,7 +1,7 @@
/** @file
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
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.
-
+
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
-
+
**/
EFI_STATUS
UpdateName (
@@ -272,12 +272,12 @@ UpdateName (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
if (gDhcp6ControllerNameTable != NULL) {
FreeUnicodeStringTable (gDhcp6ControllerNameTable);
gDhcp6ControllerNameTable = NULL;
}
-
+
if (Dhcp6ModeData.Ia == NULL) {
HandleName = L"DHCPv6 (No configured IA)";
} else {
@@ -304,7 +304,7 @@ UpdateName (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
return AddUnicodeString2 (
"en",
gDhcp6ComponentName2.SupportedLanguages,
@@ -401,13 +401,13 @@ Dhcp6ComponentNameGetControllerName (
if (ChildHandle == NULL) {
return EFI_UNSUPPORTED;
}
-
- //
- // Make sure this driver produced ChildHandle
- //
+
+ //
+ // Make sure this driver produced ChildHandle
+ //
Status = EfiTestChildHandle (
ControllerHandle,
- ChildHandle,
+ ChildHandle,
&gEfiUdp6ProtocolGuid
);
if (EFI_ERROR (Status)) {
@@ -420,7 +420,7 @@ Dhcp6ComponentNameGetControllerName (
Status = gBS->OpenProtocol (
ChildHandle,
&gEfiDhcp6ProtocolGuid,
- (VOID **)&Dhcp6,
+ (VOID **)&Dhcp6,
NULL,
NULL,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Driver.c b/NetworkPkg/Dhcp6Dxe/Dhcp6Driver.c
index de53a1a9b4..eaa18fcff3 100644
--- a/NetworkPkg/Dhcp6Dxe/Dhcp6Driver.c
+++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Driver.c
@@ -2,7 +2,7 @@
Driver Binding functions and Service Binding functions
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
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.
-
+
@param[in] Entry The entry to be removed.
@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);
ServiceBinding = (EFI_SERVICE_BINDING_PROTOCOL *) Context;
-
+
return ServiceBinding->DestroyChild (ServiceBinding, Instance->Handle);
}
@@ -558,7 +558,7 @@ Dhcp6DriverBindingStop (
if (!IsListEmpty (&Service->Child)) {
//
// Destroy all the children instances before destory the service.
- //
+ //
List = &Service->Child;
Status = NetDestroyLinkList (
List,
@@ -591,7 +591,7 @@ Dhcp6DriverBindingStop (
Dhcp6DestroyService (Service);
Status = EFI_SUCCESS;
}
-
+
ON_EXIT:
return Status;
}
diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf b/NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
index 40a6ee7889..03c2ca1ddf 100644
--- a/NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
+++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
@@ -1,11 +1,11 @@
## @file
# Client-side DHCPv6 services.
-#
+#
# This driver produces EFI DHCPv6 Protocol which is used to get IPv6 addresses
# and other configuration parameters from DHCPv6 servers.
#
# (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
# are licensed and made available under the terms and conditions of the BSD License
@@ -74,9 +74,9 @@
gEfiDhcp6ProtocolGuid ## BY_START
gEfiIp6ConfigProtocolGuid ## TO_START
-[Guids]
+[Guids]
gZeroGuid ## SOMETIMES_CONSUMES ## GUID
-
+
[Pcd]
gEfiNetworkPkgTokenSpaceGuid.PcdDhcp6UidType ## SOMETIMES_CONSUMES
diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.uni b/NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.uni
index 34ecd6c6ef..ff542838f0 100644
--- a/NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.uni
+++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.uni
@@ -4,13 +4,13 @@
// This driver produces EFI DHCPv6 Protocol which is used to get IPv6 addresses
// 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
// 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
// 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.
//
diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6DxeExtra.uni b/NetworkPkg/Dhcp6Dxe/Dhcp6DxeExtra.uni
index ca9fa0c22e..8eb8064600 100644
--- a/NetworkPkg/Dhcp6Dxe/Dhcp6DxeExtra.uni
+++ b/NetworkPkg/Dhcp6Dxe/Dhcp6DxeExtra.uni
@@ -1,7 +1,7 @@
// /** @file
// 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
// are licensed and made available under the terms and conditions of the BSD License
@@ -13,8 +13,8 @@
//
// **/
-#string STR_PROPERTIES_MODULE_NAME
-#language en-US
+#string STR_PROPERTIES_MODULE_NAME
+#language en-US
"DHCP6 DXE"
diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c b/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c
index b479421f83..9ace833b98 100644
--- a/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c
+++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c
@@ -1,7 +1,7 @@
/** @file
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
are licensed and made available under the terms and conditions of the BSD License
@@ -237,7 +237,7 @@ EfiDhcp6Stop (
}
Status = Instance->UdpSts;
}
-
+
ON_EXIT:
//
// Clean up the session data for the released Ia.
@@ -678,7 +678,7 @@ EfiDhcp6InfoRequest (
return Status;
}
- do {
+ do {
TimerStatus = gBS->CheckEvent (Timer);
if (!EFI_ERROR (TimerStatus)) {
Status = Dhcp6StartInfoRequest (
@@ -694,7 +694,7 @@ EfiDhcp6InfoRequest (
);
}
} while (TimerStatus == EFI_NOT_READY);
-
+
gBS->CloseEvent (Timer);
}
if (EFI_ERROR (Status)) {
diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h b/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h
index 7110bf88de..f21b79668a 100644
--- a/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h
+++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h
@@ -1,7 +1,7 @@
/** @file
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
are licensed and made available under the terms and conditions of the BSD License
@@ -132,7 +132,7 @@ struct _DHCP6_INSTANCE {
BOOLEAN MediaPresent;
//
// 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;
};
diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Io.c b/NetworkPkg/Dhcp6Dxe/Dhcp6Io.c
index 5cdeac6d5c..5ad2ac38bf 100644
--- a/NetworkPkg/Dhcp6Dxe/Dhcp6Io.c
+++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Io.c
@@ -2,7 +2,7 @@
Dhcp6 internal functions implementation.
(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
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 FALSE The control block is NOT in Instance's retry list.
-
+
**/
BOOLEAN
Dhcp6IsValidTxCb (
@@ -1767,12 +1767,12 @@ Dhcp6StartInfoRequest (
if (EFI_ERROR (Status) && (Status != EFI_ALREADY_STARTED)) {
goto ON_ERROR;
}
-
+
gBS->RestoreTPL (OldTpl);
return EFI_SUCCESS;
-
+
ON_ERROR:
- gBS->RestoreTPL (OldTpl);
+ gBS->RestoreTPL (OldTpl);
RemoveEntryList (&InfCb->Link);
FreePool (InfCb);
@@ -1896,7 +1896,7 @@ Dhcp6SendInfoRequestMsg (
//
Packet->Length += (UINT32) (Cursor - Packet->Dhcp6.Option);
ASSERT (Packet->Size > Packet->Length + 8);
-
+
//
// Clear initial time for current transaction.
//
@@ -2232,15 +2232,15 @@ Dhcp6HandleReplyMsg (
}
} 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.
// Return EFI_SUCCESS so we can continue to restart the Renew/Rebind process.
//
return EFI_SUCCESS;
}
-
+
goto ON_EXIT;
-
+
} else if (Option != NULL) {
//
// Any error status code option is found.
@@ -2289,7 +2289,7 @@ Dhcp6HandleReplyMsg (
case Dhcp6StsNoBinding:
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.
//
Status = Dhcp6SendRequestMsg(Instance);
@@ -2308,7 +2308,7 @@ Dhcp6HandleReplyMsg (
}
return EFI_SUCCESS;
-
+
ON_EXIT:
if (!EFI_ERROR(Status)) {
@@ -2318,7 +2318,7 @@ ON_EXIT:
FALSE
);
}
-
+
return Status;
}
diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c b/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c
index a65ed6d589..10a99a00d4 100644
--- a/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c
+++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c
@@ -2,7 +2,7 @@
Dhcp6 support functions implementation.
(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
are licensed and made available under the terms and conditions of the BSD License
@@ -68,7 +68,7 @@ Dhcp6GenerateClientId (
//
//
// 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
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// | DUID-Type (4) | UUID (128 bits) |
@@ -91,16 +91,16 @@ Dhcp6GenerateClientId (
// sizeof (Duid-type + UUID-size) = 18 bytes
//
Duid->Length = (UINT16) (18);
-
+
//
// Set the Duid-type and copy UUID.
//
WriteUnaligned16 ((UINT16 *) (Duid->Duid), HTONS (Dhcp6DuidTypeUuid));
-
+
CopyMem (Duid->Duid + 2, &Uuid, sizeof(EFI_GUID));
} else {
-
+
//
//
// The format of DUID-LLT:
@@ -135,12 +135,12 @@ Dhcp6GenerateClientId (
if (Duid == NULL) {
return NULL;
}
-
+
//
// sizeof (Duid-type + hardware-type + time) = 8 bytes
//
Duid->Length = (UINT16) (Mode->HwAddressSize + 8);
-
+
//
// Set the Duid-type, hardware-type, time and copy the hardware address.
//
@@ -687,7 +687,7 @@ Dhcp6AppendIaAddrOption (
// . IAaddr-options .
// . .
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
+
//
// 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.
@param[in] IaAddr The pointer to the IA Address to be checked.
@@ -1019,7 +1019,7 @@ Dhcp6AddrIsInCurrentIa (
UINT32 Index;
ASSERT (IaAddr != NULL && CurrentIa != NULL);
-
+
for (Index = 0; Index < CurrentIa->IaAddressCount; Index++) {
if (EFI_IP6_EQUAL(&IaAddr->IpAddress, &CurrentIa->IaAddress[Index].IpAddress)) {
return TRUE;
@@ -1303,7 +1303,7 @@ EFI_STATUS
Dhcp6GetMappingTimeOut (
IN EFI_IP6_CONFIG_PROTOCOL *Ip6Cfg,
OUT UINTN *TimeOut
- )
+ )
{
EFI_STATUS Status;
UINTN DataSize;
@@ -1323,8 +1323,8 @@ Dhcp6GetMappingTimeOut (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
*TimeOut = TICKS_PER_SECOND * DadXmits.DupAddrDetectTransmits + DHCP6_DAD_ADDITIONAL_DELAY;
-
+
return EFI_SUCCESS;
}
diff --git a/NetworkPkg/DnsDxe/ComponentName.c b/NetworkPkg/DnsDxe/ComponentName.c
index d976bc6849..cd4eea6a8b 100644
--- a/NetworkPkg/DnsDxe/ComponentName.c
+++ b/NetworkPkg/DnsDxe/ComponentName.c
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -101,7 +101,7 @@ DnsComponentNameGetControllerName (
///
/// Component Name Protocol instance
///
-GLOBAL_REMOVE_IF_UNREFERENCED
+GLOBAL_REMOVE_IF_UNREFERENCED
EFI_COMPONENT_NAME_PROTOCOL gDnsComponentName = {
DnsComponentNameGetDriverName,
DnsComponentNameGetControllerName,
@@ -111,7 +111,7 @@ EFI_COMPONENT_NAME_PROTOCOL gDnsComponentName = {
///
/// Component Name 2 Protocol instance
///
-GLOBAL_REMOVE_IF_UNREFERENCED
+GLOBAL_REMOVE_IF_UNREFERENCED
EFI_COMPONENT_NAME2_PROTOCOL gDnsComponentName2 = {
(EFI_COMPONENT_NAME2_GET_DRIVER_NAME) DnsComponentNameGetDriverName,
(EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) DnsComponentNameGetControllerName,
@@ -121,7 +121,7 @@ EFI_COMPONENT_NAME2_PROTOCOL gDnsComponentName2 = {
///
/// Table of driver names
///
-GLOBAL_REMOVE_IF_UNREFERENCED
+GLOBAL_REMOVE_IF_UNREFERENCED
EFI_UNICODE_STRING_TABLE mDnsDriverNameTable[] = {
{ "eng;en", (CHAR16 *)L"DNS Network Service Driver" },
{ NULL, NULL }
@@ -173,10 +173,10 @@ DnsComponentNameGetDriverName (
@param Dns4 A pointer to the EFI_DNS4_PROTOCOL.
-
+
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
-
+
**/
EFI_STATUS
UpdateDns4Name (
@@ -190,7 +190,7 @@ UpdateDns4Name (
if (Dns4 == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
//
// Format the child name into the string buffer as:
// DNSv4 (StationIp=?, LocalPort=?)
@@ -199,7 +199,7 @@ UpdateDns4Name (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
UnicodeSPrint (
HandleName,
sizeof (HandleName),
@@ -222,7 +222,7 @@ UpdateDns4Name (
FreeUnicodeStringTable (gDnsControllerNameTable);
gDnsControllerNameTable = NULL;
}
-
+
Status = AddUnicodeString2 (
"eng",
gDnsComponentName.SupportedLanguages,
@@ -233,7 +233,7 @@ UpdateDns4Name (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
return AddUnicodeString2 (
"en",
gDnsComponentName2.SupportedLanguages,
@@ -248,10 +248,10 @@ UpdateDns4Name (
@param Dns6 A pointer to the EFI_DNS6_PROTOCOL.
-
+
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
-
+
**/
EFI_STATUS
UpdateDns6Name (
@@ -266,7 +266,7 @@ UpdateDns6Name (
if (Dns6 == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
//
// Format the child name into the string buffer as:
// DNSv6 (StationIp=?, LocalPort=?)
@@ -282,7 +282,7 @@ UpdateDns6Name (
}
UnicodeSPrint (
HandleName,
- sizeof (HandleName),
+ sizeof (HandleName),
L"DNSv6 (StationIp=%s, LocalPort=%d)",
Address,
ModeData.DnsConfigData.LocalPort
@@ -299,7 +299,7 @@ UpdateDns6Name (
FreeUnicodeStringTable (gDnsControllerNameTable);
gDnsControllerNameTable = NULL;
}
-
+
Status = AddUnicodeString2 (
"eng",
gDnsComponentName.SupportedLanguages,
@@ -310,7 +310,7 @@ UpdateDns6Name (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
return AddUnicodeString2 (
"en",
gDnsComponentName2.SupportedLanguages,
@@ -373,7 +373,7 @@ DnsComponentNameGetControllerName (
EFI_STATUS Status;
EFI_DNS4_PROTOCOL *Dns4;
EFI_DNS6_PROTOCOL *Dns6;
-
+
//
// ChildHandle must be NULL for a Device Driver
//
diff --git a/NetworkPkg/DnsDxe/DnsDhcp.c b/NetworkPkg/DnsDxe/DnsDhcp.c
index 951477b78c..df8f615911 100644
--- a/NetworkPkg/DnsDxe/DnsDhcp.c
+++ b/NetworkPkg/DnsDxe/DnsDhcp.c
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -48,7 +48,7 @@ DnsInitSeedPacket (
}
/**
- The common notify function.
+ The common notify function.
@param[in] Event The event signaled.
@param[in] Context The context.
@@ -149,16 +149,16 @@ ParseDhcp4Ack (
}
gBS->FreePool (OptionList);
-
+
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
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.
@param Context Pointer to the context that is initialized in
the EFI_DHCP6_PROTOCOL.InfoRequest().
@@ -186,11 +186,11 @@ ParseDhcp6Ack (
EFI_IPv6_ADDRESS *ServerList;
UINT32 Index;
UINT32 Count;
-
+
OptionCount = 0;
ServerCount = 0;
ServerList = NULL;
-
+
Status = This->Parse (This, Packet, &OptionCount, NULL);
if (Status != EFI_BUFFER_TOO_SMALL) {
return EFI_DEVICE_ERROR;
@@ -206,7 +206,7 @@ ParseDhcp6Ack (
gBS->FreePool (OptionList);
return EFI_DEVICE_ERROR;
}
-
+
DnsServerInfor = (DNS6_SERVER_INFOR *) Context;
for (Index = 0; Index < OptionCount; Index++) {
@@ -223,7 +223,7 @@ ParseDhcp6Ack (
gBS->FreePool (OptionList);
return Status;
}
-
+
ServerCount = OptionList[Index]->OpLen/16;
ServerList = AllocatePool (ServerCount * sizeof (EFI_IPv6_ADDRESS));
if (ServerList == NULL) {
@@ -241,7 +241,7 @@ ParseDhcp6Ack (
}
gBS->FreePool (OptionList);
-
+
return Status;
}
@@ -270,10 +270,10 @@ GetDns4ServerFromDhcp4 (
EFI_HANDLE Image;
EFI_HANDLE Controller;
EFI_STATUS MediaStatus;
- EFI_HANDLE MnpChildHandle;
+ EFI_HANDLE MnpChildHandle;
EFI_MANAGED_NETWORK_PROTOCOL *Mnp;
EFI_MANAGED_NETWORK_CONFIG_DATA MnpConfigData;
- EFI_HANDLE Dhcp4Handle;
+ EFI_HANDLE Dhcp4Handle;
EFI_DHCP4_PROTOCOL *Dhcp4;
EFI_IP4_CONFIG2_PROTOCOL *Ip4Config2;
UINTN DataSize;
@@ -286,13 +286,13 @@ GetDns4ServerFromDhcp4 (
EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN Token;
BOOLEAN IsDone;
UINTN Index;
-
+
Image = Instance->Service->ImageHandle;
Controller = Instance->Service->ControllerHandle;
MnpChildHandle = NULL;
Mnp = NULL;
-
+
Dhcp4Handle = NULL;
Dhcp4 = NULL;
@@ -304,11 +304,11 @@ GetDns4ServerFromDhcp4 (
ZeroMem ((UINT8 *) ParaList, sizeof (ParaList));
ZeroMem (&MnpConfigData, sizeof (EFI_MANAGED_NETWORK_CONFIG_DATA));
-
+
ZeroMem (&DnsServerInfor, sizeof (DNS4_SERVER_INFOR));
-
+
ZeroMem (&Token, sizeof (EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN));
-
+
DnsServerInfor.ServerCount = DnsServerCount;
IsDone = FALSE;
@@ -346,7 +346,7 @@ GetDns4ServerFromDhcp4 (
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
-
+
MnpConfigData.ReceivedQueueTimeoutValue = 0;
MnpConfigData.TransmitQueueTimeoutValue = 0;
MnpConfigData.ProtocolTypeFilter = IP4_ETHER_PROTO;
@@ -362,7 +362,7 @@ GetDns4ServerFromDhcp4 (
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
-
+
//
// Create a DHCP4 child instance and get the protocol.
//
@@ -395,7 +395,7 @@ GetDns4ServerFromDhcp4 (
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
-
+
Status = Ip4Config2->GetData (Ip4Config2, Ip4Config2DataTypeInterfaceInfo, &DataSize, Data);
if (EFI_ERROR (Status) && Status != EFI_BUFFER_TOO_SMALL) {
goto ON_EXIT;
@@ -413,7 +413,7 @@ GetDns4ServerFromDhcp4 (
}
InterfaceInfo = (EFI_IP4_CONFIG2_INTERFACE_INFO *)Data;
-
+
//
// Build required Token.
//
@@ -427,13 +427,13 @@ GetDns4ServerFromDhcp4 (
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
-
+
SetMem (&Token.RemoteAddress, sizeof (EFI_IPv4_ADDRESS), 0xff);
-
+
Token.RemotePort = 67;
Token.ListenPointCount = 1;
-
+
Token.ListenPoints = AllocateZeroPool (Token.ListenPointCount * sizeof (EFI_DHCP4_LISTEN_POINT));
if (Token.ListenPoints == NULL) {
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].SubnetMask), &(Instance->Dns4CfgData.SubnetMask), sizeof (EFI_IPv4_ADDRESS));
}
-
+
Token.ListenPoints[0].ListenPort = 68;
-
+
Token.TimeoutValue = DNS_TIME_TO_GETMAP;
DnsInitSeedPacket (&SeedPacket, InterfaceInfo);
@@ -459,35 +459,35 @@ GetDns4ServerFromDhcp4 (
Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
}
-
+
ParaList[0]->OpCode = DHCP4_TAG_TYPE;
ParaList[0]->Length = 1;
ParaList[0]->Data[0] = DHCP4_MSG_REQUEST;
-
+
ParaList[1] = AllocateZeroPool (sizeof (EFI_DHCP4_PACKET_OPTION));
if (ParaList[1] == NULL) {
Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
}
-
+
ParaList[1]->OpCode = DHCP4_TAG_PARA_LIST;
ParaList[1]->Length = 1;
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.Reserved = HTONS ((UINT16)0x8000);
-
+
if (Instance->Dns4CfgData.UseDefaultSetting) {
CopyMem (&(Token.Packet->Dhcp4.Header.ClientAddr), &(InterfaceInfo->StationAddress), sizeof (EFI_IPv4_ADDRESS));
} else {
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);
//
@@ -504,7 +504,7 @@ GetDns4ServerFromDhcp4 (
do {
Status = Mnp->Poll (Mnp);
} while (!IsDone);
-
+
//
// Parse the ACK to get required information if received done.
//
@@ -520,7 +520,7 @@ GetDns4ServerFromDhcp4 (
} else {
Status = Token.Status;
}
-
+
ON_EXIT:
if (Data != NULL) {
@@ -540,15 +540,15 @@ ON_EXIT:
if (Token.Packet) {
FreePool (Token.Packet);
}
-
+
if (Token.ResponseList != NULL) {
FreePool (Token.ResponseList);
}
-
+
if (Token.CompletionEvent != NULL) {
gBS->CloseEvent (Token.CompletionEvent);
}
-
+
if (Dhcp4 != NULL) {
Dhcp4->Stop (Dhcp4);
Dhcp4->Configure (Dhcp4, NULL);
@@ -560,7 +560,7 @@ ON_EXIT:
Controller
);
}
-
+
if (Dhcp4Handle != NULL) {
NetLibDestroyServiceChild (
Controller,
@@ -580,14 +580,14 @@ ON_EXIT:
Controller
);
}
-
+
NetLibDestroyServiceChild (
Controller,
Image,
&gEfiManagedNetworkServiceBindingProtocolGuid,
MnpChildHandle
);
-
+
return Status;
}
@@ -729,14 +729,14 @@ GetDns6ServerFromDhcp6 (
}
} while (TimerStatus == EFI_NOT_READY);
}
-
+
*DnsServerList = DnsServerInfor.ServerList;
ON_EXIT:
if (Oro != NULL) {
FreePool (Oro);
- }
+ }
if (Timer != NULL) {
gBS->CloseEvent (Timer);
@@ -759,6 +759,6 @@ ON_EXIT:
);
return Status;
-
+
}
diff --git a/NetworkPkg/DnsDxe/DnsDhcp.h b/NetworkPkg/DnsDxe/DnsDhcp.h
index 9c61f84c5c..29683b00a2 100644
--- a/NetworkPkg/DnsDxe/DnsDhcp.h
+++ b/NetworkPkg/DnsDxe/DnsDhcp.h
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -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
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.
@param Context Pointer to the context that is initialized in
the EFI_DHCP6_PROTOCOL.InfoRequest().
@@ -143,5 +143,5 @@ GetDns6ServerFromDhcp6 (
OUT UINT32 *DnsServerCount,
OUT EFI_IPv6_ADDRESS **DnsServerList
);
-
-#endif \ No newline at end of file
+
+#endif
diff --git a/NetworkPkg/DnsDxe/DnsDriver.c b/NetworkPkg/DnsDxe/DnsDriver.c
index 5dc9afe448..1f9b924c0b 100644
--- a/NetworkPkg/DnsDxe/DnsDriver.c
+++ b/NetworkPkg/DnsDxe/DnsDriver.c
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -56,9 +56,9 @@ DnsDestroyInstance (
)
{
ZeroMem (&Instance->Dns4CfgData, sizeof (EFI_DNS4_CONFIG_DATA));
-
+
ZeroMem (&Instance->Dns6CfgData, sizeof (EFI_DNS6_CONFIG_DATA));
-
+
if (!NetMapIsEmpty (&Instance->Dns4TxTokens)) {
Dns4InstanceCancelToken (Instance, NULL);
}
@@ -66,11 +66,11 @@ DnsDestroyInstance (
if (!NetMapIsEmpty (&Instance->Dns6TxTokens)) {
Dns6InstanceCancelToken (Instance, NULL);
}
-
+
if (Instance->UdpIo!= NULL) {
UdpIoFreeIo (Instance->UdpIo);
}
-
+
FreePool (Instance);
}
@@ -93,7 +93,7 @@ DnsCreateInstance (
DNS_INSTANCE *DnsIns;
*Instance = NULL;
-
+
DnsIns = AllocateZeroPool (sizeof (DNS_INSTANCE));
if (DnsIns == NULL) {
return EFI_OUT_OF_RESOURCES;
@@ -104,7 +104,7 @@ DnsCreateInstance (
DnsIns->State = DNS_STATE_UNCONFIGED;
DnsIns->InDestroy = FALSE;
DnsIns->Service = Service;
-
+
if (Service->IpVersion == IP_VERSION_4) {
CopyMem (&DnsIns->Dns4, &mDns4Protocol, sizeof (DnsIns->Dns4));
NetMapInit (&DnsIns->Dns4TxTokens);
@@ -124,7 +124,7 @@ DnsCreateInstance (
FreePool (DnsIns);
return EFI_OUT_OF_RESOURCES;
}
-
+
*Instance = DnsIns;
return EFI_SUCCESS;
@@ -132,7 +132,7 @@ DnsCreateInstance (
/**
Callback function which provided by user to remove one node in NetDestroyLinkList process.
-
+
@param[in] Entry The entry to be removed.
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
@@ -202,7 +202,7 @@ DnsDestroyService (
)
{
UdpIoFreeIo (DnsSb->ConnectUdp);
-
+
if (DnsSb->TimerToGetMap != NULL){
gBS->CloseEvent (DnsSb->TimerToGetMap);
}
@@ -241,7 +241,7 @@ DnsCreateService (
{
EFI_STATUS Status;
DNS_SERVICE *DnsSb;
-
+
Status = EFI_SUCCESS;
DnsSb = NULL;
@@ -259,7 +259,7 @@ DnsCreateService (
} else {
DnsSb->ServiceBinding = mDns6ServiceBinding;
}
-
+
DnsSb->Dns4ChildrenNum = 0;
InitializeListHead (&DnsSb->Dns4ChildrenList);
@@ -270,9 +270,9 @@ DnsCreateService (
DnsSb->ImageHandle = Image;
DnsSb->TimerToGetMap = NULL;
-
+
DnsSb->Timer = NULL;
-
+
DnsSb->IpVersion = IpVersion;
//
@@ -290,7 +290,7 @@ DnsCreateService (
FreePool (DnsSb);
return Status;
}
-
+
//
// Create the timer to retransmit packets.
//
@@ -308,7 +308,7 @@ DnsCreateService (
FreePool (DnsSb);
return Status;
}
-
+
DnsSb->ConnectUdp = NULL;
DnsSb->ConnectUdp = UdpIoCreateIo (
Controller,
@@ -339,7 +339,7 @@ DnsCreateService (
@retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.
**/
-EFI_STATUS
+EFI_STATUS
EFIAPI
DnsUnload (
IN EFI_HANDLE ImageHandle
@@ -357,7 +357,7 @@ DnsUnload (
ItemServerIp4 = NULL;
ItemCache6 = NULL;
ItemServerIp6 = NULL;
-
+
//
// Disconnect the driver specified by ImageHandle
//
@@ -373,7 +373,7 @@ DnsUnload (
if (mDriverData->Timer != NULL) {
gBS->CloseEvent (mDriverData->Timer);
}
-
+
while (!IsListEmpty (&mDriverData->Dns4CacheList)) {
Entry = NetListRemoveHead (&mDriverData->Dns4CacheList);
ItemCache4 = NET_LIST_USER_STRUCT (Entry, DNS4_CACHE, AllCacheLink);
@@ -409,10 +409,10 @@ DnsUnload (
ItemServerIp6 = NET_LIST_USER_STRUCT (Entry, DNS6_SERVER_IP, AllServerLink);
FreePool (ItemServerIp6);
}
-
+
FreePool (mDriverData);
}
-
+
return Status;
}
@@ -490,7 +490,7 @@ DnsDriverEntryPoint (
if (EFI_ERROR (Status)) {
goto Error3;
}
-
+
Status = gBS->SetTimer (mDriverData->Timer, TimerPeriodic, TICKS_PER_SECOND);
if (EFI_ERROR (Status)) {
goto Error4;
@@ -500,7 +500,7 @@ DnsDriverEntryPoint (
InitializeListHead (&mDriverData->Dns4ServerList);
InitializeListHead (&mDriverData->Dns6CacheList);
InitializeListHead (&mDriverData->Dns6ServerList);
-
+
return Status;
Error4:
@@ -508,18 +508,18 @@ DnsDriverEntryPoint (
Error3:
FreePool (mDriverData);
-
- Error2:
+
+ Error2:
gBS->UninstallMultipleProtocolInterfaces (
gDns6DriverBinding.DriverBindingHandle,
&gEfiDriverBindingProtocolGuid,
- &gDns6DriverBinding,
+ &gDns6DriverBinding,
&gEfiComponentName2ProtocolGuid,
&gDnsComponentName2,
&gEfiComponentNameProtocolGuid,
&gDnsComponentName,
NULL
- );
+ );
Error1:
gBS->UninstallMultipleProtocolInterfaces (
@@ -532,38 +532,38 @@ DnsDriverEntryPoint (
&gDnsComponentName,
NULL
);
-
+
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.
- 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 and/or the services from the bus I/O abstraction attached to
- 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
- 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
- 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(),
- AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
- 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
+ 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 and/or the services from the bus I/O abstraction attached to
+ 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
+ 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
+ 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(),
+ AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
+ 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
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] ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by 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
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@@ -622,28 +622,28 @@ Dns4DriverBindingSupported (
Starts a device controller or a bus controller.
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
- common boot service. It is legal to call Start() from other locations,
+ 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,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
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] ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For a bus driver, if this parameter is NULL, then handles
- for all the children of Controller are created by this driver.
- 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
- child device specified by the first Device Path Node of
+ @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
+ drivers. For a bus driver, if this parameter is NULL, then handles
+ for all the children of Controller are created by this driver.
+ 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
+ child device specified by the first Device Path Node of
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
driver.
@@ -668,14 +668,14 @@ Dns4DriverBindingStart (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
ASSERT (DnsSb != NULL);
-
+
Status = gBS->SetTimer (DnsSb->Timer, TimerPeriodic, TICKS_PER_SECOND);
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
//
// Install the Dns4ServiceBinding Protocol onto ControllerHandle.
//
@@ -699,10 +699,10 @@ ON_ERROR:
/**
Stops a device controller or a bus controller.
-
- 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
- into this common boot service. It is legal to call Stop() from other locations,
+
+ 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
+ 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.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
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
Start() function, and the Start() function must have called OpenProtocol() on
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] ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@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.
@retval EFI_SUCCESS The device was stopped.
@@ -788,7 +788,7 @@ Dns4DriverBindingStop (
);
DnsDestroyService (DnsSb);
-
+
if (gDnsControllerNameTable != NULL) {
FreeUnicodeStringTable (gDnsControllerNameTable);
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.
- 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 and/or the services from the bus I/O abstraction attached to
- 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
- 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
- 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(),
- AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
- 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
+ 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 and/or the services from the bus I/O abstraction attached to
+ 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
+ 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
+ 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(),
+ AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
+ 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
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] ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by 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
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@@ -886,28 +886,28 @@ Dns6DriverBindingSupported (
Starts a device controller or a bus controller.
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
- common boot service. It is legal to call Start() from other locations,
+ 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,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
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] ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For a bus driver, if this parameter is NULL, then handles
- for all the children of Controller are created by this driver.
- 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
- child device specified by the first Device Path Node of
+ @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
+ drivers. For a bus driver, if this parameter is NULL, then handles
+ for all the children of Controller are created by this driver.
+ 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
+ child device specified by the first Device Path Node of
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
driver.
@@ -932,14 +932,14 @@ Dns6DriverBindingStart (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
ASSERT (DnsSb != NULL);
-
+
Status = gBS->SetTimer (DnsSb->Timer, TimerPeriodic, TICKS_PER_SECOND);
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
//
// Install the Dns6ServiceBinding Protocol onto ControllerHandle
//
@@ -964,10 +964,10 @@ ON_ERROR:
/**
Stops a device controller or a bus controller.
-
- 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
- into this common boot service. It is legal to call Stop() from other locations,
+
+ 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
+ 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.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
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
Start() function, and the Start() function must have called OpenProtocol() on
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] ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@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.
@retval EFI_SUCCESS The device was stopped.
@@ -1053,12 +1053,12 @@ Dns6DriverBindingStop (
);
DnsDestroyService (DnsSb);
-
+
if (gDnsControllerNameTable != NULL) {
FreeUnicodeStringTable (gDnsControllerNameTable);
gDnsControllerNameTable = NULL;
}
-
+
Status = EFI_SUCCESS;
}
@@ -1067,14 +1067,14 @@ Dns6DriverBindingStop (
/**
Creates a child handle and installs a protocol.
-
- 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.
+
+ 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 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] 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.
@retval EFI_SUCCES The protocol was added to ChildHandle.
@@ -1142,7 +1142,7 @@ Dns4ServiceBindingCreateChild (
&Instance->Dns4,
NULL
);
-
+
goto ON_ERROR;
}
@@ -1167,14 +1167,14 @@ Dns4ServiceBindingCreateChild (
gDns4DriverBinding.DriverBindingHandle,
ChildHandle
);
-
+
gBS->UninstallMultipleProtocolInterfaces (
Instance->ChildHandle,
&gEfiDns4ProtocolGuid,
&Instance->Dns4,
NULL
);
-
+
goto ON_ERROR;
}
@@ -1198,9 +1198,9 @@ ON_ERROR:
/**
Destroys a child handle with a protocol installed on it.
-
- 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
+
+ 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
last protocol on ChildHandle, then ChildHandle is destroyed.
@param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
@@ -1260,7 +1260,7 @@ Dns4ServiceBindingDestroyChild (
}
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
-
+
Instance->InDestroy = TRUE;
//
@@ -1292,7 +1292,7 @@ Dns4ServiceBindingDestroyChild (
);
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
-
+
if (EFI_ERROR (Status)) {
Instance->InDestroy = FALSE;
gBS->RestoreTPL (OldTpl);
@@ -1310,14 +1310,14 @@ Dns4ServiceBindingDestroyChild (
/**
Creates a child handle and installs a protocol.
-
- 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.
+
+ 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 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] 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.
@retval EFI_SUCCES The protocol was added to ChildHandle.
@@ -1385,7 +1385,7 @@ Dns6ServiceBindingCreateChild (
&Instance->Dns6,
NULL
);
-
+
goto ON_ERROR;
}
@@ -1410,14 +1410,14 @@ Dns6ServiceBindingCreateChild (
gDns6DriverBinding.DriverBindingHandle,
ChildHandle
);
-
+
gBS->UninstallMultipleProtocolInterfaces (
Instance->ChildHandle,
&gEfiDns6ProtocolGuid,
&Instance->Dns6,
NULL
);
-
+
goto ON_ERROR;
}
@@ -1441,9 +1441,9 @@ ON_ERROR:
/**
Destroys a child handle with a protocol installed on it.
-
- 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
+
+ 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
last protocol on ChildHandle, then ChildHandle is destroyed.
@param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
diff --git a/NetworkPkg/DnsDxe/DnsDriver.h b/NetworkPkg/DnsDxe/DnsDriver.h
index 49f6a1d8a3..23b27913a1 100644
--- a/NetworkPkg/DnsDxe/DnsDriver.h
+++ b/NetworkPkg/DnsDxe/DnsDriver.h
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -35,11 +35,11 @@ typedef struct _DNS_INSTANCE DNS_INSTANCE;
#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 {
EFI_EVENT Timer; /// Ticking timer for DNS cache update.
-
+
LIST_ENTRY Dns4CacheList;
LIST_ENTRY Dns4ServerList;
@@ -59,7 +59,7 @@ struct _DNS_SERVICE {
EFI_HANDLE ControllerHandle;
EFI_HANDLE ImageHandle;
-
+
EFI_EVENT TimerToGetMap;
EFI_EVENT Timer; /// Ticking timer for packet retransmission.
@@ -71,10 +71,10 @@ struct _DNS_SERVICE {
struct _DNS_INSTANCE {
UINT32 Signature;
LIST_ENTRY Link;
-
+
EFI_DNS4_PROTOCOL Dns4;
EFI_DNS6_PROTOCOL Dns6;
-
+
INTN State;
BOOLEAN InDestroy;
@@ -139,7 +139,7 @@ DnsCreateInstance (
/**
Callback function which provided by user to remove one node in NetDestroyLinkList process.
-
+
@param[in] Entry The entry to be removed.
@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.
**/
-EFI_STATUS
+EFI_STATUS
EFIAPI
DnsUnload (
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.
- 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 and/or the services from the bus I/O abstraction attached to
- 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
- 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
- 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(),
- AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
- 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
+ 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 and/or the services from the bus I/O abstraction attached to
+ 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
+ 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
+ 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(),
+ AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
+ 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
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] ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by 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
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@@ -296,28 +296,28 @@ Dns4DriverBindingSupported (
Starts a device controller or a bus controller.
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
- common boot service. It is legal to call Start() from other locations,
+ 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,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
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] ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For a bus driver, if this parameter is NULL, then handles
- for all the children of Controller are created by this driver.
- 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
- child device specified by the first Device Path Node of
+ @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
+ drivers. For a bus driver, if this parameter is NULL, then handles
+ for all the children of Controller are created by this driver.
+ 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
+ child device specified by the first Device Path Node of
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
driver.
@@ -337,10 +337,10 @@ Dns4DriverBindingStart (
/**
Stops a device controller or a bus controller.
-
- 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
- into this common boot service. It is legal to call Stop() from other locations,
+
+ 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
+ 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.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
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
Start() function, and the Start() function must have called OpenProtocol() on
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] ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@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.
@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.
- 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 and/or the services from the bus I/O abstraction attached to
- 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
- 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
- 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(),
- AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
- 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
+ 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 and/or the services from the bus I/O abstraction attached to
+ 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
+ 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
+ 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(),
+ AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
+ 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
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] ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by 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
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@@ -424,28 +424,28 @@ Dns6DriverBindingSupported (
Starts a device controller or a bus controller.
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
- common boot service. It is legal to call Start() from other locations,
+ 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,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
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] ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For a bus driver, if this parameter is NULL, then handles
- for all the children of Controller are created by this driver.
- 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
- child device specified by the first Device Path Node of
+ @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
+ drivers. For a bus driver, if this parameter is NULL, then handles
+ for all the children of Controller are created by this driver.
+ 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
+ child device specified by the first Device Path Node of
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
driver.
@@ -465,10 +465,10 @@ Dns6DriverBindingStart (
/**
Stops a device controller or a bus controller.
-
- 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
- into this common boot service. It is legal to call Stop() from other locations,
+
+ 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
+ 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.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
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
Start() function, and the Start() function must have called OpenProtocol() on
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] ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@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.
@retval EFI_SUCCESS The device was stopped.
@@ -500,14 +500,14 @@ Dns6DriverBindingStop (
/**
Creates a child handle and installs a protocol.
-
- 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.
+
+ 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 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] 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.
@retval EFI_SUCCES The protocol was added to ChildHandle.
@@ -526,9 +526,9 @@ Dns4ServiceBindingCreateChild (
/**
Destroys a child handle with a protocol installed on it.
-
- 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
+
+ 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
last protocol on ChildHandle, then ChildHandle is destroyed.
@param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
@@ -551,14 +551,14 @@ Dns4ServiceBindingDestroyChild (
/**
Creates a child handle and installs a protocol.
-
- 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.
+
+ 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 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] 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.
@retval EFI_SUCCES The protocol was added to ChildHandle.
@@ -577,9 +577,9 @@ Dns6ServiceBindingCreateChild (
/**
Destroys a child handle with a protocol installed on it.
-
- 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
+
+ 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
last protocol on ChildHandle, then ChildHandle is destroyed.
@param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
diff --git a/NetworkPkg/DnsDxe/DnsDxe.inf b/NetworkPkg/DnsDxe/DnsDxe.inf
index 01d44a6f1d..c2b50ddabd 100644
--- a/NetworkPkg/DnsDxe/DnsDxe.inf
+++ b/NetworkPkg/DnsDxe/DnsDxe.inf
@@ -1,7 +1,7 @@
## @file
# 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
# are licensed and made available under the terms and conditions of the BSD License
@@ -37,8 +37,8 @@
DnsProtocol.c
DnsDhcp.h
DnsDhcp.c
-
-
+
+
[LibraryClasses]
BaseLib
UefiLib
@@ -52,7 +52,7 @@
DpcLib
PrintLib
UdpIoLib
-
+
[Protocols]
gEfiDns4ServiceBindingProtocolGuid ## BY_START
@@ -64,7 +64,7 @@
gEfiIp4Config2ProtocolGuid ## SOMETIMES_CONSUMES
gEfiManagedNetworkServiceBindingProtocolGuid ## SOMETIMES_CONSUMES
gEfiManagedNetworkProtocolGuid ## SOMETIMES_CONSUMES
-
+
gEfiDns6ServiceBindingProtocolGuid ## BY_START
gEfiDns6ProtocolGuid ## BY_START
gEfiUdp6ServiceBindingProtocolGuid ## TO_START
diff --git a/NetworkPkg/DnsDxe/DnsDxe.uni b/NetworkPkg/DnsDxe/DnsDxe.uni
index fc1116aaa5..051f4a5b72 100644
--- a/NetworkPkg/DnsDxe/DnsDxe.uni
+++ b/NetworkPkg/DnsDxe/DnsDxe.uni
@@ -2,15 +2,15 @@
// UEFI DNS DXE Driver.
//
// 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
// 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
// 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.
//
diff --git a/NetworkPkg/DnsDxe/DnsDxeExtra.uni b/NetworkPkg/DnsDxe/DnsDxeExtra.uni
index ab262d609c..8d95570097 100644
--- a/NetworkPkg/DnsDxe/DnsDxeExtra.uni
+++ b/NetworkPkg/DnsDxe/DnsDxeExtra.uni
@@ -1,7 +1,7 @@
// /** @file
// 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
// are licensed and made available under the terms and conditions of the BSD License
@@ -13,8 +13,8 @@
//
// **/
-#string STR_PROPERTIES_MODULE_NAME
-#language en-US
+#string STR_PROPERTIES_MODULE_NAME
+#language en-US
"UEFI DNS DXE"
diff --git a/NetworkPkg/DnsDxe/DnsImpl.c b/NetworkPkg/DnsDxe/DnsImpl.c
index 7057bfbbec..89ea755cb2 100644
--- a/NetworkPkg/DnsDxe/DnsImpl.c
+++ b/NetworkPkg/DnsDxe/DnsImpl.c
@@ -1,7 +1,7 @@
/** @file
DnsDxe support functions implementation.
-
-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
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
@@ -45,7 +45,7 @@ Dns4RemoveTokenEntry (
return EFI_SUCCESS;
}
-
+
return EFI_NOT_FOUND;
}
@@ -57,7 +57,7 @@ Dns4RemoveTokenEntry (
@retval EFI_SUCCESS Remove TokenEntry from TokenMap sucessfully.
@retval EFI_NOT_FOUND TokenEntry is not found in TokenMap.
-
+
**/
EFI_STATUS
Dns6RemoveTokenEntry (
@@ -80,7 +80,7 @@ Dns6RemoveTokenEntry (
return EFI_SUCCESS;
}
-
+
return EFI_NOT_FOUND;
}
@@ -219,24 +219,24 @@ EFI_STATUS
EFIAPI
GetDns4TokenEntry (
IN NET_MAP *TokensMap,
- IN EFI_DNS4_COMPLETION_TOKEN *Token,
+ IN EFI_DNS4_COMPLETION_TOKEN *Token,
OUT DNS4_TOKEN_ENTRY **TokenEntry
)
{
LIST_ENTRY *Entry;
-
+
NET_MAP_ITEM *Item;
-
+
NET_LIST_FOR_EACH (Entry, &TokensMap->Used) {
Item = NET_LIST_USER_STRUCT (Entry, NET_MAP_ITEM, Link);
- *TokenEntry = (DNS4_TOKEN_ENTRY *) (Item->Key);
+ *TokenEntry = (DNS4_TOKEN_ENTRY *) (Item->Key);
if ((*TokenEntry)->Token == Token) {
return EFI_SUCCESS;
}
}
-
+
*TokenEntry = NULL;
-
+
return EFI_NOT_FOUND;
}
@@ -255,24 +255,24 @@ EFI_STATUS
EFIAPI
GetDns6TokenEntry (
IN NET_MAP *TokensMap,
- IN EFI_DNS6_COMPLETION_TOKEN *Token,
+ IN EFI_DNS6_COMPLETION_TOKEN *Token,
OUT DNS6_TOKEN_ENTRY **TokenEntry
)
{
LIST_ENTRY *Entry;
-
+
NET_MAP_ITEM *Item;
-
+
NET_LIST_FOR_EACH (Entry, &TokensMap->Used) {
Item = NET_LIST_USER_STRUCT (Entry, NET_MAP_ITEM, Link);
- *TokenEntry = (DNS6_TOKEN_ENTRY *) (Item->Key);
+ *TokenEntry = (DNS6_TOKEN_ENTRY *) (Item->Key);
if ((*TokenEntry)->Token == Token) {
return EFI_SUCCESS;
}
}
-
+
*TokenEntry =NULL;
-
+
return EFI_NOT_FOUND;
}
@@ -325,7 +325,7 @@ Dns4InstanceCancelToken (
}
ASSERT ((TokenEntry != NULL) || (0 == NetMapGetCount (&Instance->Dns4TxTokens)));
-
+
if (NetMapIsEmpty (&Instance->Dns4TxTokens)) {
Instance->UdpIo->Protocol.Udp4->Cancel (Instance->UdpIo->Protocol.Udp4, &Instance->UdpIo->RecvRequest->Token.Udp4);
}
@@ -382,7 +382,7 @@ Dns6InstanceCancelToken (
}
ASSERT ((TokenEntry != NULL) || (0 == NetMapGetCount (&Instance->Dns6TxTokens)));
-
+
if (NetMapIsEmpty (&Instance->Dns6TxTokens)) {
Instance->UdpIo->Protocol.Udp6->Cancel (Instance->UdpIo->Protocol.Udp6, &Instance->UdpIo->RecvRequest->Token.Udp6);
}
@@ -526,9 +526,9 @@ DnsDummyExtFree (
/**
Poll the UDP to get the IP4 default address, which may be retrieved
- by DHCP.
-
- The default time out value is 5 seconds. If IP has retrieved the default address,
+ by DHCP.
+
+ The default time out value is 5 seconds. If IP has retrieved the default address,
the UDP is reconfigured.
@param Instance The DNS instance
@@ -657,10 +657,10 @@ Dns6GetMapping (
/**
Configure the UDP.
-
+
@param Instance The DNS session
@param UdpIo The UDP_IO instance
-
+
@retval EFI_SUCCESS The UDP is successfully configured for the
session.
@@ -699,13 +699,13 @@ Dns4ConfigUdp (
if ((Status == EFI_NO_MAPPING) && Dns4GetMapping (Instance, UdpIo, &UdpConfig)) {
return EFI_SUCCESS;
}
-
+
return Status;
}
/**
Configure the UDP.
-
+
@param Instance The DNS session
@param UdpIo The UDP_IO instance
@@ -742,24 +742,24 @@ Dns6ConfigUdp (
if ((Status == EFI_NO_MAPPING) && Dns6GetMapping (Instance, UdpIo, &UdpConfig)) {
return EFI_SUCCESS;
}
-
+
return Status;
}
/**
Update Dns4 cache to shared list of caches of all DNSv4 instances.
-
+
@param Dns4CacheList All Dns4 cache list.
- @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.
- @param Override If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter.
+ @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.
+ @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.
@param DnsCacheEntry Entry Pointer to DNS Cache entry.
@retval EFI_SUCCESS Update Dns4 cache successfully.
- @retval Others Failed to update Dns4 cache.
-
-**/
+ @retval Others Failed to update Dns4 cache.
+
+**/
EFI_STATUS
EFIAPI
UpdateDns4Cache (
@@ -769,14 +769,14 @@ UpdateDns4Cache (
IN EFI_DNS4_CACHE_ENTRY DnsCacheEntry
)
{
- DNS4_CACHE *NewDnsCache;
+ DNS4_CACHE *NewDnsCache;
DNS4_CACHE *Item;
LIST_ENTRY *Entry;
LIST_ENTRY *Next;
NewDnsCache = NULL;
Item = NULL;
-
+
//
// Search the database for the matching EFI_DNS_CACHE_ENTRY
//
@@ -796,14 +796,14 @@ UpdateDns4Cache (
FreePool (Item->DnsCache.HostName);
FreePool (Item->DnsCache.IpAddress);
FreePool (Item);
-
+
return EFI_SUCCESS;
} else if (Override) {
//
// Update this one
//
Item->DnsCache.Timeout = DnsCacheEntry.Timeout;
-
+
return EFI_SUCCESS;
}else {
return EFI_ACCESS_DENIED;
@@ -815,18 +815,18 @@ UpdateDns4Cache (
// Add new one
//
NewDnsCache = AllocatePool (sizeof (DNS4_CACHE));
- if (NewDnsCache == NULL) {
+ if (NewDnsCache == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
InitializeListHead (&NewDnsCache->AllCacheLink);
-
+
NewDnsCache->DnsCache.HostName = AllocatePool (StrSize (DnsCacheEntry.HostName));
- if (NewDnsCache->DnsCache.HostName == NULL) {
+ if (NewDnsCache->DnsCache.HostName == NULL) {
FreePool (NewDnsCache);
return EFI_OUT_OF_RESOURCES;
}
-
+
CopyMem (NewDnsCache->DnsCache.HostName, DnsCacheEntry.HostName, StrSize (DnsCacheEntry.HostName));
NewDnsCache->DnsCache.IpAddress = AllocatePool (sizeof (EFI_IPv4_ADDRESS));
@@ -839,25 +839,25 @@ UpdateDns4Cache (
CopyMem (NewDnsCache->DnsCache.IpAddress, DnsCacheEntry.IpAddress, sizeof (EFI_IPv4_ADDRESS));
NewDnsCache->DnsCache.Timeout = DnsCacheEntry.Timeout;
-
+
InsertTailList (Dns4CacheList, &NewDnsCache->AllCacheLink);
-
+
return EFI_SUCCESS;
}
/**
- 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 DeleteFlag If FALSE, this function is to add one entry to the DNS Cache.
- 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 DeleteFlag If FALSE, this function is to add one entry to the DNS Cache.
+ 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.
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.
-
+
@retval EFI_SUCCESS Update Dns6 cache successfully.
@retval Others Failed to update Dns6 cache.
-**/
+**/
EFI_STATUS
EFIAPI
UpdateDns6Cache (
@@ -867,14 +867,14 @@ UpdateDns6Cache (
IN EFI_DNS6_CACHE_ENTRY DnsCacheEntry
)
{
- DNS6_CACHE *NewDnsCache;
+ DNS6_CACHE *NewDnsCache;
DNS6_CACHE *Item;
LIST_ENTRY *Entry;
LIST_ENTRY *Next;
NewDnsCache = NULL;
Item = NULL;
-
+
//
// Search the database for the matching EFI_DNS_CACHE_ENTRY
//
@@ -890,18 +890,18 @@ UpdateDns6Cache (
// Delete matching DNS Cache entry
//
RemoveEntryList (&Item->AllCacheLink);
-
+
FreePool (Item->DnsCache.HostName);
FreePool (Item->DnsCache.IpAddress);
FreePool (Item);
-
+
return EFI_SUCCESS;
} else if (Override) {
//
// Update this one
//
Item->DnsCache.Timeout = DnsCacheEntry.Timeout;
-
+
return EFI_SUCCESS;
}else {
return EFI_ACCESS_DENIED;
@@ -913,18 +913,18 @@ UpdateDns6Cache (
// Add new one
//
NewDnsCache = AllocatePool (sizeof (DNS6_CACHE));
- if (NewDnsCache == NULL) {
+ if (NewDnsCache == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
InitializeListHead (&NewDnsCache->AllCacheLink);
-
+
NewDnsCache->DnsCache.HostName = AllocatePool (StrSize (DnsCacheEntry.HostName));
- if (NewDnsCache->DnsCache.HostName == NULL) {
+ if (NewDnsCache->DnsCache.HostName == NULL) {
FreePool (NewDnsCache);
return EFI_OUT_OF_RESOURCES;
}
-
+
CopyMem (NewDnsCache->DnsCache.HostName, DnsCacheEntry.HostName, StrSize (DnsCacheEntry.HostName));
NewDnsCache->DnsCache.IpAddress = AllocatePool (sizeof (EFI_IPv6_ADDRESS));
@@ -933,26 +933,26 @@ UpdateDns6Cache (
FreePool (NewDnsCache);
return EFI_OUT_OF_RESOURCES;
}
-
+
CopyMem (NewDnsCache->DnsCache.IpAddress, DnsCacheEntry.IpAddress, sizeof (EFI_IPv6_ADDRESS));
NewDnsCache->DnsCache.Timeout = DnsCacheEntry.Timeout;
-
+
InsertTailList (Dns6CacheList, &NewDnsCache->AllCacheLink);
-
+
return EFI_SUCCESS;
}
/**
- 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 ServerIp DNS server Ip.
+ @param Dns4ServerList Common list of addresses of all configured DNSv4 server.
+ @param ServerIp DNS server Ip.
@retval EFI_SUCCESS Add Dns4 ServerIp to common list successfully.
@retval Others Failed to add Dns4 ServerIp to common list.
-
-**/
+
+**/
EFI_STATUS
EFIAPI
AddDns4ServerIp (
@@ -960,14 +960,14 @@ AddDns4ServerIp (
IN EFI_IPv4_ADDRESS ServerIp
)
{
- DNS4_SERVER_IP *NewServerIp;
+ DNS4_SERVER_IP *NewServerIp;
DNS4_SERVER_IP *Item;
LIST_ENTRY *Entry;
LIST_ENTRY *Next;
NewServerIp = NULL;
Item = NULL;
-
+
//
// Search the database for the matching ServerIp
//
@@ -976,7 +976,7 @@ AddDns4ServerIp (
if (CompareMem (&Item->Dns4ServerIp, &ServerIp, sizeof (EFI_IPv4_ADDRESS)) == 0) {
//
// Already done.
- //
+ //
return EFI_SUCCESS;
}
}
@@ -985,29 +985,29 @@ AddDns4ServerIp (
// Add new one
//
NewServerIp = AllocatePool (sizeof (DNS4_SERVER_IP));
- if (NewServerIp == NULL) {
+ if (NewServerIp == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
InitializeListHead (&NewServerIp->AllServerLink);
-
+
CopyMem (&NewServerIp->Dns4ServerIp, &ServerIp, sizeof (EFI_IPv4_ADDRESS));
-
+
InsertTailList (Dns4ServerList, &NewServerIp->AllServerLink);
-
+
return EFI_SUCCESS;
}
/**
- 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 ServerIp DNS server Ip.
+ @param Dns6ServerList Common list of addresses of all configured DNSv6 server.
+ @param ServerIp DNS server Ip.
@retval EFI_SUCCESS Add Dns6 ServerIp to common list successfully.
@retval Others Failed to add Dns6 ServerIp to common list.
-
-**/
+
+**/
EFI_STATUS
EFIAPI
AddDns6ServerIp (
@@ -1015,14 +1015,14 @@ AddDns6ServerIp (
IN EFI_IPv6_ADDRESS ServerIp
)
{
- DNS6_SERVER_IP *NewServerIp;
+ DNS6_SERVER_IP *NewServerIp;
DNS6_SERVER_IP *Item;
LIST_ENTRY *Entry;
LIST_ENTRY *Next;
NewServerIp = NULL;
Item = NULL;
-
+
//
// Search the database for the matching ServerIp
//
@@ -1031,7 +1031,7 @@ AddDns6ServerIp (
if (CompareMem (&Item->Dns6ServerIp, &ServerIp, sizeof (EFI_IPv6_ADDRESS)) == 0) {
//
// Already done.
- //
+ //
return EFI_SUCCESS;
}
}
@@ -1040,32 +1040,32 @@ AddDns6ServerIp (
// Add new one
//
NewServerIp = AllocatePool (sizeof (DNS6_SERVER_IP));
- if (NewServerIp == NULL) {
+ if (NewServerIp == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
InitializeListHead (&NewServerIp->AllServerLink);
-
+
CopyMem (&NewServerIp->Dns6ServerIp, &ServerIp, sizeof (EFI_IPv6_ADDRESS));
-
+
InsertTailList (Dns6ServerList, &NewServerIp->AllServerLink);
-
+
return EFI_SUCCESS;
}
/**
Find out whether the response is valid or invalid.
- @param TokensMap All DNS transmittal Tokens entry.
- @param Identification Identification for queried packet.
+ @param TokensMap All DNS transmittal Tokens entry.
+ @param Identification Identification for queried packet.
@param Type Type for queried packet.
@param Class Class for queried packet.
@param Item Return corresponding Token entry.
@retval TRUE The response is valid.
@retval FALSE The response is invalid.
-
-**/
+
+**/
BOOLEAN
IsValidDnsResponse (
IN NET_MAP *TokensMap,
@@ -1087,7 +1087,7 @@ IsValidDnsResponse (
*Item = NET_LIST_USER_STRUCT (Entry, NET_MAP_ITEM, Link);
Packet = (NET_BUF *) ((*Item)->Value);
if (Packet == NULL){
-
+
continue;
} else {
TxString = NetbufGetByte (Packet, 0, NULL);
@@ -1095,17 +1095,17 @@ IsValidDnsResponse (
DnsHeader = (DNS_HEADER *) TxString;
QueryName = (CHAR8 *) (TxString + sizeof (*DnsHeader));
QuerySection = (DNS_QUERY_SECTION *) (QueryName + AsciiStrLen (QueryName) + 1);
-
+
if (NTOHS (DnsHeader->Identification) == Identification &&
- NTOHS (QuerySection->Type) == Type &&
+ NTOHS (QuerySection->Type) == Type &&
NTOHS (QuerySection->Class) == Class) {
return TRUE;
}
- }
+ }
}
-
+
*Item = NULL;
-
+
return FALSE;
}
@@ -1114,12 +1114,12 @@ IsValidDnsResponse (
@param Instance The DNS instance
@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 Others Failed to parse Dns Response.
-
-**/
+
+**/
EFI_STATUS
ParseDnsResponse (
IN OUT DNS_INSTANCE *Instance,
@@ -1128,10 +1128,10 @@ ParseDnsResponse (
)
{
DNS_HEADER *DnsHeader;
-
+
CHAR8 *QueryName;
DNS_QUERY_SECTION *QuerySection;
-
+
CHAR8 *AnswerName;
DNS_ANSWER_SECTION *AnswerSection;
UINT8 *AnswerData;
@@ -1139,12 +1139,12 @@ ParseDnsResponse (
NET_MAP_ITEM *Item;
DNS4_TOKEN_ENTRY *Dns4TokenEntry;
DNS6_TOKEN_ENTRY *Dns6TokenEntry;
-
+
UINT32 IpCount;
UINT32 RRCount;
UINT32 AnswerSectionNum;
UINT32 CNameTtl;
-
+
EFI_IPv4_ADDRESS *HostAddr4;
EFI_IPv6_ADDRESS *HostAddr6;
@@ -1157,33 +1157,33 @@ ParseDnsResponse (
EFI_STATUS Status;
EFI_TPL OldTpl;
-
+
Item = NULL;
Dns4TokenEntry = NULL;
Dns6TokenEntry = NULL;
-
+
IpCount = 0;
RRCount = 0;
AnswerSectionNum = 0;
CNameTtl = 0;
-
+
HostAddr4 = NULL;
HostAddr6 = NULL;
-
+
Dns4CacheEntry = NULL;
Dns6CacheEntry = NULL;
-
+
Dns4RR = NULL;
Dns6RR = NULL;
*Completed = TRUE;
Status = EFI_SUCCESS;
-
+
//
// Get header
//
DnsHeader = (DNS_HEADER *) RxString;
-
+
DnsHeader->Identification = NTOHS (DnsHeader->Identification);
DnsHeader->Flags.Uint16 = NTOHS (DnsHeader->Flags.Uint16);
DnsHeader->QuestionsNum = NTOHS (DnsHeader->QuestionsNum);
@@ -1215,8 +1215,8 @@ ParseDnsResponse (
//
if (Instance->Service->IpVersion == IP_VERSION_4) {
if (!IsValidDnsResponse (
- &Instance->Dns4TxTokens,
- DnsHeader->Identification,
+ &Instance->Dns4TxTokens,
+ DnsHeader->Identification,
QuerySection->Type,
QuerySection->Class,
&Item
@@ -1229,8 +1229,8 @@ ParseDnsResponse (
Dns4TokenEntry = (DNS4_TOKEN_ENTRY *) (Item->Key);
} else {
if (!IsValidDnsResponse (
- &Instance->Dns6TxTokens,
- DnsHeader->Identification,
+ &Instance->Dns6TxTokens,
+ DnsHeader->Identification,
QuerySection->Type,
QuerySection->Class,
&Item
@@ -1242,7 +1242,7 @@ ParseDnsResponse (
ASSERT (Item != NULL);
Dns6TokenEntry = (DNS6_TOKEN_ENTRY *) (Item->Key);
}
-
+
//
// Continue Check Some Errors.
//
@@ -1252,14 +1252,14 @@ ParseDnsResponse (
// The domain name referenced in the query does not exist.
//
if (DnsHeader->Flags.Bits.RCode == DNS_FLAGS_RCODE_NAME_ERROR) {
- Status = EFI_NOT_FOUND;
+ Status = EFI_NOT_FOUND;
} else {
Status = EFI_DEVICE_ERROR;
}
-
+
goto ON_COMPLETE;
}
-
+
//
// Do some buffer allocations.
//
@@ -1352,7 +1352,7 @@ ParseDnsResponse (
Status = EFI_UNSUPPORTED;
goto ON_EXIT;
}
-
+
//
// Get Answer section.
//
@@ -1388,7 +1388,7 @@ ParseDnsResponse (
goto ON_EXIT;
}
CopyMem (Dns4RR[RRCount].RData, AnswerData, Dns4RR[RRCount].DataLength);
-
+
RRCount ++;
Status = EFI_SUCCESS;
} else if (Instance->Service->IpVersion == IP_VERSION_6 && Dns6TokenEntry->GeneralLookUp) {
@@ -1414,12 +1414,12 @@ ParseDnsResponse (
goto ON_EXIT;
}
CopyMem (Dns6RR[RRCount].RData, AnswerData, Dns6RR[RRCount].DataLength);
-
+
RRCount ++;
Status = EFI_SUCCESS;
} else {
//
- // It's not the GeneralLookUp querying.
+ // It's not the GeneralLookUp querying.
// Check the Query type, parse the response packet.
//
switch (AnswerSection->Type) {
@@ -1433,12 +1433,12 @@ ParseDnsResponse (
Status = EFI_ABORTED;
goto ON_EXIT;
}
-
+
HostAddr4 = Dns4TokenEntry->Token->RspData.H2AData->IpList;
AnswerData = (UINT8 *) AnswerSection + sizeof (*AnswerSection);
CopyMem (&HostAddr4[IpCount], AnswerData, sizeof (EFI_IPv4_ADDRESS));
- //
+ //
// Allocate new CacheEntry pool to update DNS cache dynamically.
//
Dns4CacheEntry = AllocateZeroPool (sizeof (EFI_DNS4_CACHE_ENTRY));
@@ -1464,15 +1464,15 @@ ParseDnsResponse (
} else {
Dns4CacheEntry->Timeout = MAX (CNameTtl, AnswerSection->Ttl);
}
-
+
UpdateDns4Cache (&mDriverData->Dns4CacheList, FALSE, TRUE, *Dns4CacheEntry);
- //
+ //
// Free allocated CacheEntry pool.
//
FreePool (Dns4CacheEntry->HostName);
Dns4CacheEntry->HostName = NULL;
-
+
FreePool (Dns4CacheEntry->IpAddress);
Dns4CacheEntry->IpAddress = NULL;
@@ -1492,12 +1492,12 @@ ParseDnsResponse (
Status = EFI_ABORTED;
goto ON_EXIT;
}
-
+
HostAddr6 = Dns6TokenEntry->Token->RspData.H2AData->IpList;
AnswerData = (UINT8 *) AnswerSection + sizeof (*AnswerSection);
CopyMem (&HostAddr6[IpCount], AnswerData, sizeof (EFI_IPv6_ADDRESS));
- //
+ //
// Allocate new CacheEntry pool to update DNS cache dynamically.
//
Dns6CacheEntry = AllocateZeroPool (sizeof (EFI_DNS6_CACHE_ENTRY));
@@ -1523,28 +1523,28 @@ ParseDnsResponse (
} else {
Dns6CacheEntry->Timeout = MAX (CNameTtl, AnswerSection->Ttl);
}
-
+
UpdateDns6Cache (&mDriverData->Dns6CacheList, FALSE, TRUE, *Dns6CacheEntry);
- //
+ //
// Free allocated CacheEntry pool.
//
FreePool (Dns6CacheEntry->HostName);
Dns6CacheEntry->HostName = NULL;
-
+
FreePool (Dns6CacheEntry->IpAddress);
Dns6CacheEntry->IpAddress = NULL;
FreePool (Dns6CacheEntry);
Dns6CacheEntry = NULL;
-
+
IpCount ++;
Status = EFI_SUCCESS;
break;
case DNS_TYPE_CNAME:
//
- // According RFC 1034 - 3.6.2, if the query name is an alias, the name server will include the CNAME
- // record in the response and restart the query at the domain name specified in the data field of the
+ // According RFC 1034 - 3.6.2, if the query name is an alias, the name server will include the CNAME
+ // record in the response and restart the query at the domain name specified in the data field of the
// CNAME record. So, just record the TTL value of the CNAME, then skip to parse the next record.
//
CNameTtl = AnswerSection->Ttl;
@@ -1554,7 +1554,7 @@ ParseDnsResponse (
goto ON_EXIT;
}
}
-
+
//
// Find next one
//
@@ -1564,7 +1564,7 @@ ParseDnsResponse (
if (Instance->Service->IpVersion == IP_VERSION_4) {
ASSERT (Dns4TokenEntry != NULL);
-
+
if (Dns4TokenEntry->GeneralLookUp) {
Dns4TokenEntry->Token->RspData.GLookupData->RRCount = RRCount;
} else {
@@ -1589,7 +1589,7 @@ ParseDnsResponse (
}
}
}
-
+
ON_COMPLETE:
//
// Parsing is complete, free the sending packet and signal Event here.
@@ -1597,7 +1597,7 @@ ON_COMPLETE:
if (Item != NULL && Item->Value != NULL) {
NetbufFree ((NET_BUF *) (Item->Value));
}
-
+
if (Instance->Service->IpVersion == IP_VERSION_4) {
ASSERT (Dns4TokenEntry != NULL);
Dns4RemoveTokenEntry (&Instance->Dns4TxTokens, Dns4TokenEntry);
@@ -1635,10 +1635,10 @@ ON_EXIT:
FreePool (Dns4TokenEntry->Token->RspData.GLookupData->RRList[RRCount].RData);
}
}
-
+
FreePool (Dns4TokenEntry->Token->RspData.GLookupData->RRList);
}
-
+
FreePool (Dns4TokenEntry->Token->RspData.GLookupData);
}
} else {
@@ -1646,7 +1646,7 @@ ON_EXIT:
if (Dns4TokenEntry->Token->RspData.H2AData->IpList != NULL) {
FreePool (Dns4TokenEntry->Token->RspData.H2AData->IpList);
}
-
+
FreePool (Dns4TokenEntry->Token->RspData.H2AData);
}
}
@@ -1666,10 +1666,10 @@ ON_EXIT:
FreePool (Dns6TokenEntry->Token->RspData.GLookupData->RRList[RRCount].RData);
}
}
-
+
FreePool (Dns6TokenEntry->Token->RspData.GLookupData->RRList);
}
-
+
FreePool (Dns6TokenEntry->Token->RspData.GLookupData);
}
} else {
@@ -1677,7 +1677,7 @@ ON_EXIT:
if (Dns6TokenEntry->Token->RspData.H2AData->IpList != NULL) {
FreePool (Dns6TokenEntry->Token->RspData.H2AData->IpList);
}
-
+
FreePool (Dns6TokenEntry->Token->RspData.H2AData);
}
}
@@ -1705,9 +1705,9 @@ ON_EXIT:
}
FreePool (Dns6CacheEntry);
- }
+ }
}
-
+
gBS->RestoreTPL (OldTpl);
return Status;
}
@@ -1720,7 +1720,7 @@ ON_EXIT:
@param IoStatus The status of the UDP receive
@param Context The opaque parameter to the function.
-**/
+**/
VOID
EFIAPI
DnsOnPacketReceived (
@@ -1735,7 +1735,7 @@ DnsOnPacketReceived (
UINT8 *RcvString;
BOOLEAN Completed;
-
+
Instance = (DNS_INSTANCE *) Context;
NET_CHECK_SIGNATURE (Instance, DNS_INSTANCE_SIGNATURE);
@@ -1751,10 +1751,10 @@ DnsOnPacketReceived (
if (Packet->TotalSize <= sizeof (DNS_HEADER)) {
goto ON_EXIT;
}
-
+
RcvString = NetbufGetByte (Packet, 0, NULL);
ASSERT (RcvString != NULL);
-
+
//
// Parse Dns Response
//
@@ -1820,7 +1820,7 @@ DnsOnPacketSent (
}
}
}
-
+
NetbufFree (Packet);
}
@@ -1851,14 +1851,14 @@ DoDnsQuery (
return Status;
}
}
-
+
//
// Transmit the DNS packet.
//
NET_GET_REF (Packet);
Status = UdpIoSendDatagram (Instance->UdpIo, Packet, NULL, NULL, DnsOnPacketSent, Instance);
-
+
return Status;
}
@@ -1866,9 +1866,9 @@ DoDnsQuery (
Construct the Packet according query section.
@param Instance The DNS instance
- @param QueryName Queried Name
- @param Type Queried Type
- @param Class Queried Class
+ @param QueryName Queried Name
+ @param Type Queried Type
+ @param Class Queried Class
@param Packet The packet for query
@retval EFI_SUCCESS The packet is constructed.
@@ -1900,7 +1900,7 @@ ConstructDNSQuery (
//
// Fill header
//
- DnsHeader = (DNS_HEADER *) Frag.Bulk;
+ DnsHeader = (DNS_HEADER *) Frag.Bulk;
DnsHeader->Identification = (UINT16)NET_RANDOM (NetRandomInitSeed());
DnsHeader->Flags.Uint16 = 0x0000;
DnsHeader->Flags.Bits.RD = 1;
@@ -1927,7 +1927,7 @@ ConstructDNSQuery (
Frag.Len = (UINT32) (Frag.Len + AsciiStrLen (QueryName));
*(Frag.Bulk + Frag.Len) = 0;
Frag.Len ++;
-
+
//
// Rest query section
//
@@ -1946,7 +1946,7 @@ ConstructDNSQuery (
FreePool (Frag.Bulk);
return EFI_OUT_OF_RESOURCES;
}
-
+
//
// Store the UdpIo in ProtoData.
//
@@ -1959,7 +1959,7 @@ ConstructDNSQuery (
Retransmit the packet.
@param Instance The DNS instance
- @param Packet Retransmit the packet
+ @param Packet Retransmit the packet
@retval EFI_SUCCESS The packet is retransmitted.
@retval Others Failed to retransmit.
@@ -1972,7 +1972,7 @@ DnsRetransmit (
)
{
EFI_STATUS Status;
-
+
UINT8 *Buffer;
ASSERT (Packet != NULL);
@@ -2064,7 +2064,7 @@ DnsOnTimerRetransmit (
Dns4TokenEntry->Token->Status = EFI_TIMEOUT;
gBS->SignalEvent (Dns4TokenEntry->Token->Event);
DispatchDpc ();
-
+
//
// Free the sending packet.
//
@@ -2075,7 +2075,7 @@ DnsOnTimerRetransmit (
EntryNetMap = Instance->Dns4TxTokens.Used.ForwardLink;
}
}
- }
+ }
}else {
//
// Iterate through all the children of the DNS service instance. Time
@@ -2083,7 +2083,7 @@ DnsOnTimerRetransmit (
//
NET_LIST_FOR_EACH_SAFE (Entry, Next, &Service->Dns6ChildrenList) {
Instance = NET_LIST_USER_STRUCT (Entry, DNS_INSTANCE, Link);
-
+
EntryNetMap = Instance->Dns6TxTokens.Used.ForwardLink;
while (EntryNetMap != &Instance->Dns6TxTokens.Used) {
ItemNetMap = NET_LIST_USER_STRUCT (EntryNetMap, NET_MAP_ITEM, Link);
@@ -2108,7 +2108,7 @@ DnsOnTimerRetransmit (
Dns6TokenEntry->Token->Status = EFI_TIMEOUT;
gBS->SignalEvent (Dns6TokenEntry->Token->Event);
DispatchDpc ();
-
+
//
// Free the sending packet.
//
@@ -2117,10 +2117,10 @@ DnsOnTimerRetransmit (
}
EntryNetMap = Instance->Dns6TxTokens.Used.ForwardLink;
- }
+ }
}
}
- }
+ }
}
/**
@@ -2152,7 +2152,7 @@ DnsOnTimerUpdate (
Item4 = NET_LIST_USER_STRUCT (Entry, DNS4_CACHE, AllCacheLink);
Item4->DnsCache.Timeout--;
}
-
+
Entry = mDriverData->Dns4CacheList.ForwardLink;
while (Entry != &mDriverData->Dns4CacheList) {
Item4 = NET_LIST_USER_STRUCT (Entry, DNS4_CACHE, AllCacheLink);
@@ -2166,7 +2166,7 @@ DnsOnTimerUpdate (
Entry = Entry->ForwardLink;
}
}
-
+
//
// Iterate through all the DNS6 cache list.
//
@@ -2174,7 +2174,7 @@ DnsOnTimerUpdate (
Item6 = NET_LIST_USER_STRUCT (Entry, DNS6_CACHE, AllCacheLink);
Item6->DnsCache.Timeout--;
}
-
+
Entry = mDriverData->Dns6CacheList.ForwardLink;
while (Entry != &mDriverData->Dns6CacheList) {
Item6 = NET_LIST_USER_STRUCT (Entry, DNS6_CACHE, AllCacheLink);
diff --git a/NetworkPkg/DnsDxe/DnsImpl.h b/NetworkPkg/DnsDxe/DnsImpl.h
index 3c6296cb65..90dc054903 100644
--- a/NetworkPkg/DnsDxe/DnsImpl.h
+++ b/NetworkPkg/DnsDxe/DnsImpl.h
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -95,22 +95,22 @@ typedef union _DNS_FLAGS DNS_FLAGS;
typedef struct {
LIST_ENTRY AllCacheLink;
- EFI_DNS4_CACHE_ENTRY DnsCache;
+ EFI_DNS4_CACHE_ENTRY DnsCache;
} DNS4_CACHE;
typedef struct {
LIST_ENTRY AllCacheLink;
- EFI_DNS6_CACHE_ENTRY DnsCache;
+ EFI_DNS6_CACHE_ENTRY DnsCache;
} DNS6_CACHE;
typedef struct {
LIST_ENTRY AllServerLink;
- EFI_IPv4_ADDRESS Dns4ServerIp;
+ EFI_IPv4_ADDRESS Dns4ServerIp;
} DNS4_SERVER_IP;
typedef struct {
LIST_ENTRY AllServerLink;
- EFI_IPv6_ADDRESS Dns6ServerIp;
+ EFI_IPv6_ADDRESS Dns6ServerIp;
} DNS6_SERVER_IP;
typedef struct {
@@ -206,7 +206,7 @@ Dns4RemoveTokenEntry (
@retval EFI_SUCCESS Remove TokenEntry from TokenMap sucessfully.
@retval EFI_NOT_FOUND TokenEntry is not found in TokenMap.
-
+
**/
EFI_STATUS
Dns6RemoveTokenEntry (
@@ -277,7 +277,7 @@ EFI_STATUS
EFIAPI
GetDns4TokenEntry (
IN NET_MAP *TokensMap,
- IN EFI_DNS4_COMPLETION_TOKEN *Token,
+ IN EFI_DNS4_COMPLETION_TOKEN *Token,
OUT DNS4_TOKEN_ENTRY **TokenEntry
);
@@ -296,7 +296,7 @@ EFI_STATUS
EFIAPI
GetDns6TokenEntry (
IN NET_MAP *TokensMap,
- IN EFI_DNS6_COMPLETION_TOKEN *Token,
+ IN EFI_DNS6_COMPLETION_TOKEN *Token,
OUT DNS6_TOKEN_ENTRY **TokenEntry
);
@@ -406,9 +406,9 @@ DnsDummyExtFree (
/**
Poll the UDP to get the IP4 default address, which may be retrieved
- by DHCP.
-
- The default time out value is 5 seconds. If IP has retrieved the default address,
+ by DHCP.
+
+ The default time out value is 5 seconds. If IP has retrieved the default address,
the UDP is reconfigured.
@param Instance The DNS instance
@@ -447,10 +447,10 @@ Dns6GetMapping (
/**
Configure the UDP.
-
+
@param Instance The DNS session
@param UdpIo The UDP_IO instance
-
+
@retval EFI_SUCCESS The UDP is successfully configured for the
session.
@@ -463,7 +463,7 @@ Dns4ConfigUdp (
/**
Configure the UDP.
-
+
@param Instance The DNS session
@param UdpIo The UDP_IO instance
@@ -479,17 +479,17 @@ Dns6ConfigUdp (
/**
Update Dns4 cache to shared list of caches of all DNSv4 instances.
-
+
@param Dns4CacheList All Dns4 cache list.
- @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.
- @param Override If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter.
+ @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.
+ @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.
@param DnsCacheEntry Entry Pointer to DNS Cache entry.
@retval EFI_SUCCESS Update Dns4 cache successfully.
- @retval Others Failed to update Dns4 cache.
-
+ @retval Others Failed to update Dns4 cache.
+
**/
EFI_STATUS
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 DeleteFlag If FALSE, this function is to add one entry to the DNS Cache.
- 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 DeleteFlag If FALSE, this function is to add one entry to the DNS Cache.
+ 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.
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.
-
+
@retval EFI_SUCCESS Update Dns6 cache successfully.
@retval Others Failed to update Dns6 cache.
-**/
+**/
EFI_STATUS
EFIAPI
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 ServerIp DNS server Ip.
+ @param Dns4ServerList Common list of addresses of all configured DNSv4 server.
+ @param ServerIp DNS server Ip.
@retval EFI_SUCCESS Add Dns4 ServerIp to common list successfully.
@retval Others Failed to add Dns4 ServerIp to common list.
-
+
**/
EFI_STATUS
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 ServerIp DNS server Ip.
+ @param Dns6ServerList Common list of addresses of all configured DNSv6 server.
+ @param ServerIp DNS server Ip.
@retval EFI_SUCCESS Add Dns6 ServerIp to common list successfully.
@retval Others Failed to add Dns6 ServerIp to common list.
-
-**/
+
+**/
EFI_STATUS
EFIAPI
AddDns6ServerIp (
@@ -559,16 +559,16 @@ AddDns6ServerIp (
/**
Find out whether the response is valid or invalid.
- @param TokensMap All DNS transmittal Tokens entry.
- @param Identification Identification for queried packet.
+ @param TokensMap All DNS transmittal Tokens entry.
+ @param Identification Identification for queried packet.
@param Type Type for queried packet.
@param Class Class for queried packet.
@param Item Return corresponding Token entry.
@retval TRUE The response is valid.
@retval FALSE The response is invalid.
-
-**/
+
+**/
BOOLEAN
IsValidDnsResponse (
IN NET_MAP *TokensMap,
@@ -583,12 +583,12 @@ IsValidDnsResponse (
@param Instance The DNS instance
@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 Others Failed to parse Dns Response.
-
-**/
+
+**/
EFI_STATUS
ParseDnsResponse (
IN OUT DNS_INSTANCE *Instance,
@@ -604,7 +604,7 @@ ParseDnsResponse (
@param IoStatus The status of the UDP receive
@param Context The opaque parameter to the function.
-**/
+**/
VOID
EFIAPI
DnsOnPacketReceived (
@@ -652,9 +652,9 @@ DoDnsQuery (
Construct the Packet according query section.
@param Instance The DNS instance
- @param QueryName Queried Name
- @param Type Queried Type
- @param Class Queried Class
+ @param QueryName Queried Name
+ @param Type Queried Type
+ @param Class Queried Class
@param Packet The packet for query
@retval EFI_SUCCESS The packet is constructed.
@@ -674,7 +674,7 @@ ConstructDNSQuery (
Retransmit the packet.
@param Instance The DNS instance
- @param Packet Retransmit the packet
+ @param Packet Retransmit the packet
@retval EFI_SUCCESS The packet is retransmitted.
@retval Others Failed to retransmit.
@@ -748,7 +748,7 @@ Dns4GetModeData (
@retval EFI_SUCCESS The operation completed successfully.
@retval EFI_UNSUPPORTED The designated protocol is not supported.
@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.
DnsServerList is NULL while DnsServerListCount
is not ZERO.
@@ -758,8 +758,8 @@ Dns4GetModeData (
allocated.
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The
EFI DNSv4 Protocol instance is not configured.
- @retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To
- reconfigure the instance the caller must call Configure()
+ @retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To
+ reconfigure the instance the caller must call Configure()
with NULL first to return driver to unconfigured state.
**/
EFI_STATUS
@@ -800,7 +800,7 @@ Dns4HostNameToIp (
/**
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.
@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
supplies a QNAME, QTYPE, and QCLASS, and all of the matching RRs are returned. All
@@ -859,7 +859,7 @@ EFIAPI
Dns4GeneralLookUp (
IN EFI_DNS4_PROTOCOL *This,
IN CHAR8 *QName,
- IN UINT16 QType,
+ IN UINT16 QType,
IN UINT16 QClass,
IN EFI_DNS4_COMPLETION_TOKEN *Token
);
@@ -965,7 +965,7 @@ Dns4Cancel (
This function is used to retrieve DNS mode data for this DNS 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.
@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.
@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.
@retval EFI_SUCCESS The operation completed successfully.
@@ -1001,8 +1001,8 @@ Dns6GetModeData (
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The
EFI DNSv6 Protocol instance is not configured.
@retval EFI_UNSUPPORTED The designated protocol is not supported.
- @retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To
- reconfigure the instance the caller must call Configure() with
+ @retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To
+ reconfigure the instance the caller must call Configure() with
NULL first to return driver to unconfigured state.
**/
EFI_STATUS
@@ -1107,7 +1107,7 @@ EFIAPI
Dns6GeneralLookUp (
IN EFI_DNS6_PROTOCOL *This,
IN CHAR8 *QName,
- IN UINT16 QType,
+ IN UINT16 QType,
IN UINT16 QClass,
IN EFI_DNS6_COMPLETION_TOKEN *Token
);
diff --git a/NetworkPkg/DnsDxe/DnsProtocol.c b/NetworkPkg/DnsDxe/DnsProtocol.c
index 1fcaabdf95..b8d0749982 100644
--- a/NetworkPkg/DnsDxe/DnsProtocol.c
+++ b/NetworkPkg/DnsDxe/DnsProtocol.c
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -59,14 +59,14 @@ Dns4GetModeData (
)
{
DNS_INSTANCE *Instance;
-
+
EFI_TPL OldTpl;
UINTN Index;
-
+
LIST_ENTRY *Entry;
LIST_ENTRY *Next;
-
+
DNS4_SERVER_IP *ServerItem;
EFI_IPv4_ADDRESS *ServerList;
DNS4_CACHE *CacheItem;
@@ -78,24 +78,24 @@ Dns4GetModeData (
CacheItem = NULL;
CacheList = NULL;
Status = EFI_SUCCESS;
-
-
+
+
if ((This == NULL) || (DnsModeData == NULL)) {
return EFI_INVALID_PARAMETER;
}
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
-
+
Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL4 (This);
if (Instance->State == DNS_STATE_UNCONFIGED) {
Status = EFI_NOT_STARTED;
goto ON_EXIT;
}
-
+
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);
if (EFI_ERROR (Status)) {
@@ -116,7 +116,7 @@ Dns4GetModeData (
Dns4CleanConfigure (&DnsModeData->DnsConfigData);
goto ON_EXIT;
}
-
+
Index = 0;
NET_LIST_FOR_EACH_SAFE (Entry, Next, &mDriverData->Dns4ServerList) {
ServerItem = NET_LIST_USER_STRUCT (Entry, DNS4_SERVER_IP, AllServerLink);
@@ -140,7 +140,7 @@ Dns4GetModeData (
FreePool (ServerList);
goto ON_EXIT;
}
-
+
Index =0;
NET_LIST_FOR_EACH_SAFE (Entry, Next, &mDriverData->Dns4CacheList) {
CacheItem = NET_LIST_USER_STRUCT (Entry, DNS4_CACHE, AllCacheLink);
@@ -165,7 +165,7 @@ ON_EXIT:
@retval EFI_SUCCESS The operation completed successfully.
@retval EFI_UNSUPPORTED The designated protocol is not supported.
@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.
DnsServerList is NULL while DnsServerListCount
is not ZERO.
@@ -175,8 +175,8 @@ ON_EXIT:
allocated.
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The
EFI DNSv4 Protocol instance is not configured.
- @retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To
- reconfigure the instance the caller must call Configure()
+ @retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To
+ reconfigure the instance the caller must call Configure()
with NULL first to return driver to unconfigured state.
**/
EFI_STATUS
@@ -188,19 +188,19 @@ Dns4Configure (
{
EFI_STATUS Status;
DNS_INSTANCE *Instance;
-
+
EFI_TPL OldTpl;
IP4_ADDR Ip;
IP4_ADDR Netmask;
UINT32 ServerListCount;
- EFI_IPv4_ADDRESS *ServerList;
+ EFI_IPv4_ADDRESS *ServerList;
Status = EFI_SUCCESS;
ServerList = NULL;
-
- if (This == NULL ||
- (DnsConfigData != NULL && ((DnsConfigData->DnsServerListCount != 0 && DnsConfigData->DnsServerList == NULL) ||
+
+ if (This == NULL ||
+ (DnsConfigData != NULL && ((DnsConfigData->DnsServerListCount != 0 && DnsConfigData->DnsServerList == NULL) ||
(DnsConfigData->DnsServerListCount == 0 && DnsConfigData->DnsServerList != NULL)))) {
return EFI_INVALID_PARAMETER;
}
@@ -215,7 +215,7 @@ Dns4Configure (
if (DnsConfigData == NULL) {
ZeroMem (&Instance->SessionDnsServer, sizeof (EFI_IP_ADDRESS));
-
+
//
// Reset the Instance if ConfigData is NULL
//
@@ -226,12 +226,12 @@ Dns4Configure (
if (Instance->UdpIo != NULL){
UdpIoCleanIo (Instance->UdpIo);
}
-
+
if (Instance->Dns4CfgData.DnsServerList != NULL) {
FreePool (Instance->Dns4CfgData.DnsServerList);
}
ZeroMem (&Instance->Dns4CfgData, sizeof (EFI_DNS4_CONFIG_DATA));
-
+
Instance->State = DNS_STATE_UNCONFIGED;
} else {
//
@@ -255,14 +255,14 @@ Dns4Configure (
}
if (DnsConfigData->DnsServerListCount == 0) {
- gBS->RestoreTPL (OldTpl);
-
+ gBS->RestoreTPL (OldTpl);
+
//
// The DNS instance will retrieve DNS server from DHCP Server
//
Status = GetDns4ServerFromDhcp4 (
Instance,
- &ServerListCount,
+ &ServerListCount,
&ServerList
);
if (EFI_ERROR (Status)) {
@@ -270,7 +270,7 @@ Dns4Configure (
}
ASSERT(ServerList != NULL);
-
+
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
CopyMem (&Instance->SessionDnsServer.v4, &ServerList[0], sizeof (EFI_IPv4_ADDRESS));
@@ -301,7 +301,7 @@ Dns4Configure (
}
goto ON_EXIT;
}
-
+
Instance->State = DNS_STATE_CONFIGED;
}
@@ -339,42 +339,42 @@ Dns4HostNameToIp (
)
{
EFI_STATUS Status;
-
+
DNS_INSTANCE *Instance;
-
+
EFI_DNS4_CONFIG_DATA *ConfigData;
-
+
UINTN Index;
DNS4_CACHE *Item;
LIST_ENTRY *Entry;
LIST_ENTRY *Next;
-
+
CHAR8 *QueryName;
-
+
DNS4_TOKEN_ENTRY *TokenEntry;
NET_BUF *Packet;
-
+
EFI_TPL OldTpl;
-
+
Status = EFI_SUCCESS;
Item = NULL;
QueryName = NULL;
TokenEntry = NULL;
Packet = NULL;
-
+
//
// Validate the parameters
//
if ((This == NULL) || (HostName == NULL) || Token == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
-
+
Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL4 (This);
-
+
ConfigData = &(Instance->Dns4CfgData);
-
+
if (Instance->State != DNS_STATE_CONFIGED) {
Status = EFI_NOT_STARTED;
goto ON_EXIT;
@@ -395,9 +395,9 @@ Dns4HostNameToIp (
if (Token->RetryInterval == 0) {
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) {
Token->RetryInterval = DNS_DEFAULT_TIMEOUT;
@@ -428,7 +428,7 @@ Dns4HostNameToIp (
if (Token->RspData.H2AData != NULL) {
FreePool (Token->RspData.H2AData);
}
-
+
Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
}
@@ -438,12 +438,12 @@ Dns4HostNameToIp (
Item = NET_LIST_USER_STRUCT (Entry, DNS4_CACHE, AllCacheLink);
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));
- Index++;
+ Index++;
}
}
-
+
Token->Status = EFI_SUCCESS;
-
+
if (Token->Event != NULL) {
gBS->SignalEvent (Token->Event);
DispatchDpc ();
@@ -451,7 +451,7 @@ Dns4HostNameToIp (
Status = Token->Status;
goto ON_EXIT;
- }
+ }
}
//
@@ -462,7 +462,7 @@ Dns4HostNameToIp (
Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
}
-
+
TokenEntry->PacketToLive = Token->RetryInterval;
TokenEntry->Token = Token;
TokenEntry->QueryHostName = AllocateZeroPool (StrSize (HostName));
@@ -470,9 +470,9 @@ Dns4HostNameToIp (
Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
}
-
+
CopyMem (TokenEntry->QueryHostName, HostName, StrSize (HostName));
-
+
//
// Construct QName.
//
@@ -481,12 +481,12 @@ Dns4HostNameToIp (
Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
}
-
+
//
// Construct DNS Query Packet.
//
Status = ConstructDNSQuery (Instance, QueryName, DNS_TYPE_A, DNS_CLASS_INET, &Packet);
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
@@ -499,7 +499,7 @@ Dns4HostNameToIp (
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
-
+
//
// Dns Query Ip
//
@@ -507,7 +507,7 @@ Dns4HostNameToIp (
if (EFI_ERROR (Status)) {
Dns4RemoveTokenEntry (&Instance->Dns4TxTokens, TokenEntry);
}
-
+
ON_EXIT:
if (EFI_ERROR (Status)) {
@@ -515,19 +515,19 @@ ON_EXIT:
if (TokenEntry->QueryHostName != NULL) {
FreePool (TokenEntry->QueryHostName);
}
-
+
FreePool (TokenEntry);
}
-
+
if (Packet != NULL) {
NetbufFree (Packet);
}
}
-
+
if (QueryName != NULL) {
FreePool (QueryName);
}
-
+
gBS->RestoreTPL (OldTpl);
return Status;
}
@@ -535,7 +535,7 @@ ON_EXIT:
/**
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.
@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
supplies a QNAME, QTYPE, and QCLASS, and all of the matching RRs are returned. All
@@ -597,37 +597,37 @@ EFIAPI
Dns4GeneralLookUp (
IN EFI_DNS4_PROTOCOL *This,
IN CHAR8 *QName,
- IN UINT16 QType,
+ IN UINT16 QType,
IN UINT16 QClass,
IN EFI_DNS4_COMPLETION_TOKEN *Token
)
{
EFI_STATUS Status;
-
+
DNS_INSTANCE *Instance;
-
+
EFI_DNS4_CONFIG_DATA *ConfigData;
-
+
DNS4_TOKEN_ENTRY *TokenEntry;
NET_BUF *Packet;
-
+
EFI_TPL OldTpl;
-
+
Status = EFI_SUCCESS;
TokenEntry = NULL;
Packet = NULL;
-
+
//
// Validate the parameters
//
if ((This == NULL) || (QName == NULL) || Token == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
-
+
Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL4 (This);
-
+
ConfigData = &(Instance->Dns4CfgData);
if (Instance->State != DNS_STATE_CONFIGED) {
@@ -636,14 +636,14 @@ Dns4GeneralLookUp (
}
Token->Status = EFI_NOT_READY;
-
+
//
// If zero, use the parameter configured through Dns.Configure() interface.
//
if (Token->RetryCount == 0) {
Token->RetryCount = ConfigData->RetryCount;
}
-
+
//
// 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) {
Token->RetryInterval = DNS_DEFAULT_TIMEOUT;
@@ -666,7 +666,7 @@ Dns4GeneralLookUp (
Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
}
-
+
TokenEntry->PacketToLive = Token->RetryInterval;
TokenEntry->GeneralLookUp = TRUE;
TokenEntry->Token = Token;
@@ -679,7 +679,7 @@ Dns4GeneralLookUp (
if (TokenEntry != NULL) {
FreePool (TokenEntry);
}
-
+
goto ON_EXIT;
}
@@ -693,12 +693,12 @@ Dns4GeneralLookUp (
if (TokenEntry != NULL) {
FreePool (TokenEntry);
}
-
+
NetbufFree (Packet);
-
+
goto ON_EXIT;
}
-
+
//
// Dns Query Ip
//
@@ -709,10 +709,10 @@ Dns4GeneralLookUp (
if (TokenEntry != NULL) {
FreePool (TokenEntry);
}
-
+
NetbufFree (Packet);
}
-
+
ON_EXIT:
gBS->RestoreTPL (OldTpl);
return Status;
@@ -753,15 +753,15 @@ Dns4UpdateDnsCache (
IN EFI_DNS4_CACHE_ENTRY DnsCacheEntry
)
{
- EFI_STATUS Status;
+ EFI_STATUS Status;
EFI_TPL OldTpl;
Status = EFI_SUCCESS;
-
+
if (DnsCacheEntry.HostName == NULL || DnsCacheEntry.IpAddress == NULL || DnsCacheEntry.Timeout == 0) {
- return EFI_INVALID_PARAMETER;
+ return EFI_INVALID_PARAMETER;
}
-
+
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
//
@@ -770,7 +770,7 @@ Dns4UpdateDnsCache (
Status = UpdateDns4Cache (&mDriverData->Dns4CacheList, DeleteFlag, Override, DnsCacheEntry);
gBS->RestoreTPL (OldTpl);
-
+
return Status;
}
@@ -817,7 +817,7 @@ Dns4Poll (
}
Udp = Instance->UdpIo->Protocol.Udp4;
-
+
return Udp->Poll (Udp);
}
@@ -890,7 +890,7 @@ Dns4Cancel (
This function is used to retrieve DNS mode data for this DNS 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.
@retval EFI_SUCCESS The operation completed successfully.
@@ -908,11 +908,11 @@ Dns6GetModeData (
)
{
DNS_INSTANCE *Instance;
-
+
EFI_TPL OldTpl;
UINTN Index;
-
+
LIST_ENTRY *Entry;
LIST_ENTRY *Next;
@@ -933,7 +933,7 @@ Dns6GetModeData (
}
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
-
+
Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL6 (This);
if (Instance->State == DNS_STATE_UNCONFIGED) {
Status = EFI_NOT_STARTED;
@@ -943,13 +943,13 @@ Dns6GetModeData (
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);
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
-
+
//
// Get the DnsServerCount and DnsServerList
//
@@ -964,7 +964,7 @@ Dns6GetModeData (
Dns6CleanConfigure (&DnsModeData->DnsConfigData);
goto ON_EXIT;
}
-
+
Index = 0;
NET_LIST_FOR_EACH_SAFE (Entry, Next, &mDriverData->Dns6ServerList) {
ServerItem = NET_LIST_USER_STRUCT (Entry, DNS6_SERVER_IP, AllServerLink);
@@ -988,7 +988,7 @@ Dns6GetModeData (
FreePool (ServerList);
goto ON_EXIT;
}
-
+
Index =0;
NET_LIST_FOR_EACH_SAFE (Entry, Next, &mDriverData->Dns6CacheList) {
CacheItem = NET_LIST_USER_STRUCT (Entry, DNS6_CACHE, AllCacheLink);
@@ -996,7 +996,7 @@ Dns6GetModeData (
Index++;
}
DnsModeData->DnsCacheList = CacheList;
-
+
ON_EXIT:
gBS->RestoreTPL (OldTpl);
return Status;
@@ -1009,7 +1009,7 @@ ON_EXIT:
EFI DNSv6 Protocol driver instance. Reset the DNS instance if DnsConfigData is NULL.
@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.
@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
EFI DNSv6 Protocol instance is not configured.
@retval EFI_UNSUPPORTED The designated protocol is not supported.
- @retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To
- reconfigure the instance the caller must call Configure() with
+ @retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To
+ reconfigure the instance the caller must call Configure() with
NULL first to return driver to unconfigured state.
**/
EFI_STATUS
@@ -1034,17 +1034,17 @@ Dns6Configure (
{
EFI_STATUS Status;
DNS_INSTANCE *Instance;
-
+
EFI_TPL OldTpl;
UINT32 ServerListCount;
- EFI_IPv6_ADDRESS *ServerList;
+ EFI_IPv6_ADDRESS *ServerList;
Status = EFI_SUCCESS;
ServerList = NULL;
- if (This == NULL ||
- (DnsConfigData != NULL && ((DnsConfigData->DnsServerCount != 0 && DnsConfigData->DnsServerList == NULL) ||
+ if (This == NULL ||
+ (DnsConfigData != NULL && ((DnsConfigData->DnsServerCount != 0 && DnsConfigData->DnsServerList == NULL) ||
(DnsConfigData->DnsServerCount == 0 && DnsConfigData->DnsServerList != NULL)))) {
return EFI_INVALID_PARAMETER;
}
@@ -1075,7 +1075,7 @@ Dns6Configure (
FreePool (Instance->Dns6CfgData.DnsServerList);
}
ZeroMem (&Instance->Dns6CfgData, sizeof (EFI_DNS6_CONFIG_DATA));
-
+
Instance->State = DNS_STATE_UNCONFIGED;
} else {
//
@@ -1099,14 +1099,14 @@ Dns6Configure (
//
Status = GetDns6ServerFromDhcp6 (
Instance->Service->ImageHandle,
- Instance->Service->ControllerHandle,
- &ServerListCount,
+ Instance->Service->ControllerHandle,
+ &ServerListCount,
&ServerList
);
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
-
+
ASSERT(ServerList != NULL);
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
@@ -1141,7 +1141,7 @@ Dns6Configure (
}
goto ON_EXIT;
}
-
+
Instance->State = DNS_STATE_CONFIGED;
}
@@ -1181,23 +1181,23 @@ Dns6HostNameToIp (
)
{
EFI_STATUS Status;
-
+
DNS_INSTANCE *Instance;
EFI_DNS6_CONFIG_DATA *ConfigData;
-
- UINTN Index;
+
+ UINTN Index;
DNS6_CACHE *Item;
LIST_ENTRY *Entry;
LIST_ENTRY *Next;
-
+
CHAR8 *QueryName;
-
+
DNS6_TOKEN_ENTRY *TokenEntry;
NET_BUF *Packet;
-
+
EFI_TPL OldTpl;
-
+
Status = EFI_SUCCESS;
Item = NULL;
QueryName = NULL;
@@ -1212,9 +1212,9 @@ Dns6HostNameToIp (
}
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
-
+
Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL6 (This);
-
+
ConfigData = &(Instance->Dns6CfgData);
if (Instance->State != DNS_STATE_CONFIGED) {
@@ -1237,9 +1237,9 @@ Dns6HostNameToIp (
if (Token->RetryInterval == 0) {
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) {
Token->RetryInterval = DNS_DEFAULT_TIMEOUT;
@@ -1270,7 +1270,7 @@ Dns6HostNameToIp (
if (Token->RspData.H2AData != NULL) {
FreePool (Token->RspData.H2AData);
}
-
+
Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
}
@@ -1283,17 +1283,17 @@ Dns6HostNameToIp (
Index++;
}
}
-
+
Token->Status = EFI_SUCCESS;
-
+
if (Token->Event != NULL) {
gBS->SignalEvent (Token->Event);
DispatchDpc ();
}
-
+
Status = Token->Status;
goto ON_EXIT;
- }
+ }
}
//
@@ -1304,7 +1304,7 @@ Dns6HostNameToIp (
Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
}
-
+
TokenEntry->PacketToLive = Token->RetryInterval;
TokenEntry->Token = Token;
TokenEntry->QueryHostName = AllocateZeroPool (StrSize (HostName));
@@ -1312,7 +1312,7 @@ Dns6HostNameToIp (
Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
}
-
+
CopyMem (TokenEntry->QueryHostName, HostName, StrSize (HostName));
//
@@ -1323,7 +1323,7 @@ Dns6HostNameToIp (
Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
}
-
+
//
// Construct DNS Query Packet.
//
@@ -1341,7 +1341,7 @@ Dns6HostNameToIp (
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
-
+
//
// Dns Query Ip
//
@@ -1349,7 +1349,7 @@ Dns6HostNameToIp (
if (EFI_ERROR (Status)) {
Dns6RemoveTokenEntry (&Instance->Dns6TxTokens, TokenEntry);
}
-
+
ON_EXIT:
if (EFI_ERROR (Status)) {
@@ -1357,19 +1357,19 @@ ON_EXIT:
if (TokenEntry->QueryHostName != NULL) {
FreePool (TokenEntry->QueryHostName);
}
-
+
FreePool (TokenEntry);
}
-
+
if (Packet != NULL) {
NetbufFree (Packet);
}
}
-
+
if (QueryName != NULL) {
FreePool (QueryName);
}
-
+
gBS->RestoreTPL (OldTpl);
return Status;
}
@@ -1442,37 +1442,37 @@ EFIAPI
Dns6GeneralLookUp (
IN EFI_DNS6_PROTOCOL *This,
IN CHAR8 *QName,
- IN UINT16 QType,
+ IN UINT16 QType,
IN UINT16 QClass,
IN EFI_DNS6_COMPLETION_TOKEN *Token
)
{
EFI_STATUS Status;
-
+
DNS_INSTANCE *Instance;
-
+
EFI_DNS6_CONFIG_DATA *ConfigData;
-
+
DNS6_TOKEN_ENTRY *TokenEntry;
NET_BUF *Packet;
-
+
EFI_TPL OldTpl;
-
+
Status = EFI_SUCCESS;
TokenEntry = NULL;
Packet = NULL;
-
+
//
// Validate the parameters
//
if ((This == NULL) || (QName == NULL) || Token == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
-
+
Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL6 (This);
-
+
ConfigData = &(Instance->Dns6CfgData);
if (Instance->State != DNS_STATE_CONFIGED) {
@@ -1481,14 +1481,14 @@ Dns6GeneralLookUp (
}
Token->Status = EFI_NOT_READY;
-
+
//
// If zero, use the parameter configured through Dns.Configure() interface.
//
if (Token->RetryCount == 0) {
Token->RetryCount = ConfigData->RetryCount;
}
-
+
//
// 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) {
Token->RetryInterval = DNS_DEFAULT_TIMEOUT;
@@ -1511,7 +1511,7 @@ Dns6GeneralLookUp (
Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
}
-
+
TokenEntry->PacketToLive = Token->RetryInterval;
TokenEntry->GeneralLookUp = TRUE;
TokenEntry->Token = Token;
@@ -1524,7 +1524,7 @@ Dns6GeneralLookUp (
if (TokenEntry != NULL) {
FreePool (TokenEntry);
}
-
+
goto ON_EXIT;
}
@@ -1538,12 +1538,12 @@ Dns6GeneralLookUp (
if (TokenEntry != NULL) {
FreePool (TokenEntry);
}
-
+
NetbufFree (Packet);
-
+
goto ON_EXIT;
}
-
+
//
// Dns Query Ip
//
@@ -1554,10 +1554,10 @@ Dns6GeneralLookUp (
if (TokenEntry != NULL) {
FreePool (TokenEntry);
}
-
+
NetbufFree (Packet);
}
-
+
ON_EXIT:
gBS->RestoreTPL (OldTpl);
return Status;
@@ -1599,24 +1599,24 @@ Dns6UpdateDnsCache (
IN EFI_DNS6_CACHE_ENTRY DnsCacheEntry
)
{
- EFI_STATUS Status;
+ EFI_STATUS Status;
EFI_TPL OldTpl;
Status = EFI_SUCCESS;
-
+
if (DnsCacheEntry.HostName == NULL || DnsCacheEntry.IpAddress == NULL || DnsCacheEntry.Timeout == 0) {
- return EFI_INVALID_PARAMETER;
+ return EFI_INVALID_PARAMETER;
}
-
+
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
//
// Update Dns6Cache here.
//
Status = UpdateDns6Cache (&mDriverData->Dns6CacheList, DeleteFlag, Override, DnsCacheEntry);
-
+
gBS->RestoreTPL (OldTpl);
-
+
return Status;
}
@@ -1665,7 +1665,7 @@ Dns6Poll (
}
Udp = Instance->UdpIo->Protocol.Udp6;
-
+
return Udp->Poll (Udp);
}
diff --git a/NetworkPkg/HttpBootDxe/HttpBootClient.c b/NetworkPkg/HttpBootDxe/HttpBootClient.c
index 1d1e47008d..90a6acb0d4 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootClient.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootClient.c
@@ -3,12 +3,12 @@
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<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.
+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,
+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.
**/
@@ -23,7 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@retval EFI_SUCCESS Device patch successfully updated.
@retval EFI_OUT_OF_RESOURCES Could not allocate needed resources.
@retval Others Unexpected error happened.
-
+
**/
EFI_STATUS
HttpBootUpdateDevicePath (
@@ -39,7 +39,7 @@ HttpBootUpdateDevicePath (
TmpIpDevicePath = NULL;
TmpDnsDevicePath = NULL;
-
+
//
// Update the IP node with DHCP assigned information.
//
@@ -67,13 +67,13 @@ HttpBootUpdateDevicePath (
SetDevicePathNodeLength (Node, sizeof (IPv6_DEVICE_PATH));
Node->Ipv6.PrefixLength = IP6_PREFIX_LENGTH;
Node->Ipv6.RemotePort = Private->Port;
- Node->Ipv6.Protocol = EFI_IP_PROTO_TCP;
+ Node->Ipv6.Protocol = EFI_IP_PROTO_TCP;
Node->Ipv6.IpAddressOrigin = 0;
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.GatewayIpAddress, &Private->GatewayIp.v6, sizeof (EFI_IPv6_ADDRESS));
}
-
+
TmpIpDevicePath = AppendDevicePathNode (Private->ParentDevicePath, (EFI_DEVICE_PATH_PROTOCOL*) Node);
FreePool (Node);
if (TmpIpDevicePath == NULL) {
@@ -95,7 +95,7 @@ HttpBootUpdateDevicePath (
SetDevicePathNodeLength (Node, Length);
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));
-
+
TmpDnsDevicePath = AppendDevicePathNode (TmpIpDevicePath, (EFI_DEVICE_PATH_PROTOCOL*) Node);
FreePool (Node);
FreePool (TmpIpDevicePath);
@@ -150,7 +150,7 @@ HttpBootUpdateDevicePath (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
FreePool (Private->Ip4Nic->DevicePath);
Private->Ip4Nic->DevicePath = NewDevicePath;
} else {
@@ -169,7 +169,7 @@ HttpBootUpdateDevicePath (
FreePool (Private->Ip6Nic->DevicePath);
Private->Ip6Nic->DevicePath = NewDevicePath;
}
-
+
return EFI_SUCCESS;
}
@@ -201,7 +201,7 @@ HttpBootDhcp4ExtractUriInfo (
ASSERT (SelectIndex < HTTP_BOOT_OFFER_MAX_NUM);
DnsServerIndex = 0;
-
+
Status = EFI_SUCCESS;
//
@@ -213,7 +213,7 @@ HttpBootDhcp4ExtractUriInfo (
//
// In Corporate environment, we need a HttpOffer.
//
- if ((SelectOffer->OfferType == HttpOfferTypeDhcpIpUri) ||
+ if ((SelectOffer->OfferType == HttpOfferTypeDhcpIpUri) ||
(SelectOffer->OfferType == HttpOfferTypeDhcpIpUriDns) ||
(SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns)) {
HttpOffer = SelectOffer;
@@ -246,7 +246,7 @@ HttpBootDhcp4ExtractUriInfo (
return Status;
}
- if ((SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns) ||
+ if ((SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns) ||
(SelectOffer->OfferType == HttpOfferTypeDhcpDns) ||
(SelectOffer->OfferType == HttpOfferTypeDhcpIpUriDns)) {
Option = SelectOffer->OptList[HTTP_BOOT_DHCP4_TAG_INDEX_DNS_SERVER];
@@ -265,10 +265,10 @@ HttpBootDhcp4ExtractUriInfo (
for (DnsServerIndex = 0; DnsServerIndex < Private->DnsServerCount; DnsServerIndex++) {
CopyMem (&(Private->DnsServerIp[DnsServerIndex].v4), &(((EFI_IPv4_ADDRESS *) Option->Data)[DnsServerIndex]), sizeof (EFI_IPv4_ADDRESS));
}
-
+
//
// Configure the default DNS server if server assigned.
- //
+ //
Status = HttpBootRegisterIp4Dns (
Private,
Option->Length,
@@ -292,7 +292,7 @@ HttpBootDhcp4ExtractUriInfo (
if (EFI_ERROR (Status) || Private->Port == 0) {
Private->Port = 80;
}
-
+
//
// All boot informations are valid here.
//
@@ -402,7 +402,7 @@ HttpBootDhcp6ExtractUriInfo (
return Status;
}
- if ((SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns) ||
+ if ((SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns) ||
(SelectOffer->OfferType == HttpOfferTypeDhcpDns) ||
(SelectOffer->OfferType == HttpOfferTypeDhcpIpUriDns)) {
Option = SelectOffer->OptList[HTTP_BOOT_DHCP6_IDX_DNS_SERVER];
@@ -434,9 +434,9 @@ HttpBootDhcp6ExtractUriInfo (
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.
//
Status = HttpUrlGetIp6 (
@@ -444,7 +444,7 @@ HttpBootDhcp6ExtractUriInfo (
Private->BootFileUriParser,
&IpAddr
);
-
+
if (EFI_ERROR (Status)) {
//
// The Http server address is expressed by Name Ip, so perform DNS resolution
@@ -464,23 +464,23 @@ HttpBootDhcp6ExtractUriInfo (
Status = EFI_OUT_OF_RESOURCES;
goto Error;
}
-
+
AsciiStrToUnicodeStrS (HostName, HostNameStr, HostNameSize);
if (HostName != NULL) {
FreePool (HostName);
}
-
+
Status = HttpBootDns (Private, HostNameStr, &IpAddr);
FreePool (HostNameStr);
if (EFI_ERROR (Status)) {
AsciiPrint ("\n Error: Could not retrieve the host address from DNS server.\n");
goto Error;
- }
- }
-
+ }
+ }
+
CopyMem (&Private->ServerIp.v6, &IpAddr, sizeof (EFI_IPv6_ADDRESS));
-
+
//
// 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) {
Private->Port = 80;
}
-
+
//
// All boot informations are valid here.
//
@@ -504,7 +504,7 @@ HttpBootDhcp6ExtractUriInfo (
if (EFI_ERROR (Status)) {
goto Error;
}
-
+
return Status;
Error:
@@ -512,7 +512,7 @@ Error:
FreePool (Private->DnsServerIp);
Private->DnsServerIp = NULL;
}
-
+
return Status;
}
@@ -532,7 +532,7 @@ HttpBootDiscoverBootInfo (
)
{
EFI_STATUS Status;
-
+
//
// Start D.O.R.A/S.A.R.R exchange to acquire station ip address and
// other Http boot information.
@@ -557,7 +557,7 @@ HttpBootDiscoverBootInfo (
@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] Context The Callback Context pointer.
-
+
@retval EFI_SUCCESS Tells the HttpIo to continue the HTTP process.
@retval Others Tells the HttpIo to abort the current HTTP process.
**/
@@ -706,7 +706,7 @@ HttpBootFreeCacheList (
LIST_ENTRY *Entry;
LIST_ENTRY *NextEntry;
HTTP_BOOT_CACHE_CONTENT *Cache;
-
+
NET_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Private->CacheList) {
Cache = NET_LIST_USER_STRUCT (Entry, HTTP_BOOT_CACHE_CONTENT, Link);
RemoveEntryList (&Cache->Link);
@@ -746,7 +746,7 @@ HttpBootGetFileFromCache (
HTTP_BOOT_CACHE_CONTENT *Cache;
HTTP_BOOT_ENTITY_DATA *EntityData;
UINTN CopyedSize;
-
+
if (Uri == NULL || BufferSize == NULL || Buffer == NULL || ImageType == NULL) {
return EFI_INVALID_PARAMETER;
}
@@ -808,7 +808,7 @@ HttpBootGetFileFromCache (
@retval EFI_SUCCESS Continue to parser the message body.
@retval Others Abort the parse.
-
+
**/
EFI_STATUS
EFIAPI
@@ -878,7 +878,7 @@ HttpBootGetBootFileCallback (
/**
This function download the boot file by using UEFI HTTP protocol.
-
+
@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
the caller only want to know the size of the requested file.
@@ -926,7 +926,7 @@ HttpBootGetBootFile (
CHAR16 *Url;
BOOLEAN IdentityMode;
UINTN ReceivedSize;
-
+
ASSERT (Private != NULL);
ASSERT (Private->HttpCreated);
@@ -1116,7 +1116,7 @@ HttpBootGetBootFile (
Cache->ResponseData = ResponseData;
Cache->ImageType = *ImageType;
}
-
+
//
// 3.3 Init a message-body parser from the header information.
//
@@ -1278,7 +1278,7 @@ HttpBootGetBootFile (
}
return Status;
-
+
ERROR_6:
if (Parser != NULL) {
HttpFreeMsgParser (Parser);
@@ -1287,7 +1287,7 @@ ERROR_6:
FreePool (Context.Block);
}
HttpBootFreeCache (Cache);
-
+
ERROR_5:
if (ResponseData != NULL) {
FreePool (ResponseData);
diff --git a/NetworkPkg/HttpBootDxe/HttpBootClient.h b/NetworkPkg/HttpBootDxe/HttpBootClient.h
index dd58719b40..f8d0db7847 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootClient.h
+++ b/NetworkPkg/HttpBootDxe/HttpBootClient.h
@@ -1,14 +1,14 @@
/** @file
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>
-This program and the accompanying materials are licensed and made available under
-the terms and conditions of the BSD License that accompanies this distribution.
+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,
+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.
**/
@@ -98,7 +98,7 @@ HttpBootCreateHttpIo (
/**
This function download the boot file by using UEFI HTTP protocol.
-
+
@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
the caller only want to know the size of the requested file.
diff --git a/NetworkPkg/HttpBootDxe/HttpBootComponentName.c b/NetworkPkg/HttpBootDxe/HttpBootComponentName.c
index 2c39089da3..d8988a3521 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootComponentName.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootComponentName.c
@@ -1,13 +1,13 @@
/** @file
Implementation of EFI_COMPONENT_NAME_PROTOCOL and EFI_COMPONENT_NAME2_PROTOCOL protocol.
-Copyright (c) 2015, 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.
+Copyright (c) 2015 - 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,
+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.
**/
@@ -17,7 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
///
/// Component Name Protocol instance
///
-GLOBAL_REMOVE_IF_UNREFERENCED
+GLOBAL_REMOVE_IF_UNREFERENCED
EFI_COMPONENT_NAME_PROTOCOL gHttpBootDxeComponentName = {
(EFI_COMPONENT_NAME_GET_DRIVER_NAME) HttpBootDxeComponentNameGetDriverName,
(EFI_COMPONENT_NAME_GET_CONTROLLER_NAME)HttpBootDxeComponentNameGetControllerName,
@@ -27,7 +27,7 @@ EFI_COMPONENT_NAME_PROTOCOL gHttpBootDxeComponentName = {
///
/// Component Name 2 Protocol instance
///
-GLOBAL_REMOVE_IF_UNREFERENCED
+GLOBAL_REMOVE_IF_UNREFERENCED
EFI_COMPONENT_NAME2_PROTOCOL gHttpBootDxeComponentName2 = {
HttpBootDxeComponentNameGetDriverName,
HttpBootDxeComponentNameGetControllerName,
@@ -37,7 +37,7 @@ EFI_COMPONENT_NAME2_PROTOCOL gHttpBootDxeComponentName2 = {
///
/// Table of driver names
///
-GLOBAL_REMOVE_IF_UNREFERENCED
+GLOBAL_REMOVE_IF_UNREFERENCED
EFI_UNICODE_STRING_TABLE mHttpBootDxeDriverNameTable[] = {
{ "eng;en", (CHAR16 *)L"UEFI HTTP Boot Driver" },
{ NULL, NULL }
@@ -46,7 +46,7 @@ EFI_UNICODE_STRING_TABLE mHttpBootDxeDriverNameTable[] = {
///
/// Table of controller names
///
-GLOBAL_REMOVE_IF_UNREFERENCED
+GLOBAL_REMOVE_IF_UNREFERENCED
EFI_UNICODE_STRING_TABLE mHttpBootDxeControllerNameTable[] = {
{ "eng;en", (CHAR16 *)L"UEFI Http Boot Controller" },
{ NULL, NULL }
@@ -148,7 +148,7 @@ HttpBootDxeComponentNameGetControllerName (
if (ControllerHandle == NULL || ChildHandle != NULL) {
return EFI_UNSUPPORTED;
}
-
+
NicHandle = HttpBootGetNicByIp4Children (ControllerHandle);
if (NicHandle == NULL) {
NicHandle = HttpBootGetNicByIp6Children(ControllerHandle);
diff --git a/NetworkPkg/HttpBootDxe/HttpBootComponentName.h b/NetworkPkg/HttpBootDxe/HttpBootComponentName.h
index 3fce9b75ab..1baf3fa693 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootComponentName.h
+++ b/NetworkPkg/HttpBootDxe/HttpBootComponentName.h
@@ -1,14 +1,14 @@
/** @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.
-Copyright (c) 2015, 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.
+Copyright (c) 2015 - 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,
+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.
**/
diff --git a/NetworkPkg/HttpBootDxe/HttpBootConfig.c b/NetworkPkg/HttpBootDxe/HttpBootConfig.c
index 81fceb2fd6..b95abc624b 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootConfig.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootConfig.c
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -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] Description The description text of the boot option.
@param[in] Uri The URI string of the boot file.
-
+
@retval EFI_SUCCESS The boot option is created successfully.
@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)) {
return EFI_INVALID_PARAMETER;
}
-
+
//
// Create a new device path by appending the IP node and URI node to
// the driver's parent device path
@@ -154,7 +154,7 @@ ON_EXIT:
}
/**
-
+
This function allows the caller to request the current
configuration for one or more named elements. The resulting
string is in <ConfigAltResp> format. Also, any and all alternative
@@ -183,7 +183,7 @@ ON_EXIT:
to the most recent "&" before the first
failing name / value pair (or the beginning
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
<ConfigAltResp> format which has all values
@@ -204,7 +204,7 @@ ON_EXIT:
would result in this type of
error. In this case, the
Progress parameter would be
- set to NULL.
+ set to NULL.
@retval EFI_NOT_FOUND Routing data doesn't match any
known driver. Progress set to the
@@ -249,7 +249,7 @@ HttpBootFormExtractConfig (
if ((Request != NULL) && !HiiIsConfigHdrMatch (Request, &gHttpBootConfigGuid, mHttpBootConfigStorageName)) {
return EFI_NOT_FOUND;
}
-
+
ConfigRequestHdr = NULL;
ConfigRequest = NULL;
AllocatedRequest = FALSE;
@@ -289,7 +289,7 @@ HttpBootFormExtractConfig (
Results,
Progress
);
-
+
//
// Free the allocated config request string.
//
@@ -310,7 +310,7 @@ HttpBootFormExtractConfig (
}
/**
-
+
This function applies changes in a driver's configuration.
Input is a Configuration, which has the routing data for this
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] Configuration A null-terminated Unicode string in
- <ConfigString> format.
-
+ <ConfigString> format.
+
@param[out] Progress A pointer to a string filled in with the
offset of the most recent '&' before the
first failing name / value pair (or the
@@ -335,16 +335,16 @@ HttpBootFormExtractConfig (
@retval EFI_SUCCESS The results have been distributed or are
awaiting distribution.
-
+
@retval EFI_OUT_OF_RESOURCES Not enough memory to store the
parts of the results that must be
stored awaiting possible future
protocols.
-
+
@retval EFI_INVALID_PARAMETERS Passing in a NULL for the
Results parameter would result
in this type of error.
-
+
@retval EFI_NOT_FOUND Target for the specified routing data
was not found.
@@ -381,7 +381,7 @@ HttpBootFormRouteConfig (
CallbackInfo = HTTP_BOOT_FORM_CALLBACK_INFO_FROM_CONFIG_ACCESS (This);
Private = HTTP_BOOT_PRIVATE_DATA_FROM_CALLBACK_INFO (CallbackInfo);
-
+
BufferSize = sizeof (HTTP_BOOT_CONFIG_IFR_NVDATA);
ZeroMem (&CallbackInfo->HttpBootNvData, BufferSize);
@@ -405,12 +405,12 @@ HttpBootFormRouteConfig (
CallbackInfo->HttpBootNvData.Description,
CallbackInfo->HttpBootNvData.Uri
);
-
+
return EFI_SUCCESS;
}
/**
-
+
This function is called to provide results data to the driver.
This data consists of a unique key that is used to identify
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] QuestionId A unique value which is sent to the original
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.
@param[in] Type The type of value for the question.
@param[in, out] Value A pointer to the data being sent to the original
@@ -456,17 +456,17 @@ HttpBootFormCallback (
UriLen = 0;
AsciiUri = NULL;
Status = EFI_SUCCESS;
-
+
if (This == NULL || Value == NULL) {
return EFI_INVALID_PARAMETER;
}
CallbackInfo = HTTP_BOOT_FORM_CALLBACK_INFO_FROM_CONFIG_ACCESS (This);
-
+
if (Action != EFI_BROWSER_ACTION_CHANGING) {
return EFI_UNSUPPORTED;
}
-
+
switch (QuestionId) {
case KEY_INITIATOR_URI:
//
@@ -474,8 +474,8 @@ HttpBootFormCallback (
//
Uri = HiiGetString (CallbackInfo->RegisteredHandle, Value->string, 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.
@@ -492,7 +492,7 @@ HttpBootFormCallback (
UnicodeStrToAsciiStrS (Uri, AsciiUri, UriLen);
Status = HttpBootCheckUriScheme (AsciiUri);
-
+
if (Status == EFI_INVALID_PARAMETER) {
DEBUG ((EFI_D_ERROR, "HttpBootFormCallback: %r.\n", Status));
@@ -503,11 +503,11 @@ HttpBootFormCallback (
L"ERROR: Unsupported URI!",
L"Only supports HTTP and HTTPS",
NULL
- );
+ );
} else if (Status == EFI_ACCESS_DENIED) {
-
+
DEBUG ((EFI_D_ERROR, "HttpBootFormCallback: %r.\n", Status));
-
+
CreatePopUp (
EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
&Key,
@@ -524,8 +524,8 @@ HttpBootFormCallback (
if (AsciiUri != NULL) {
FreePool (AsciiUri);
- }
-
+ }
+
break;
default:
@@ -561,7 +561,7 @@ HttpBootConfigFormInit (
if (CallbackInfo->Initilized) {
return EFI_SUCCESS;
}
-
+
CallbackInfo->Signature = HTTP_BOOT_FORM_CALLBACK_INFO_SIGNATURE;
//
@@ -586,7 +586,7 @@ HttpBootConfigFormInit (
CallbackInfo->ConfigAccess.ExtractConfig = HttpBootFormExtractConfig;
CallbackInfo->ConfigAccess.RouteConfig = HttpBootFormRouteConfig;
CallbackInfo->ConfigAccess.Callback = HttpBootFormCallback;
-
+
//
// Install Device Path Protocol and Config Access protocol to driver handle.
//
@@ -623,25 +623,25 @@ HttpBootConfigFormInit (
Status = NetLibGetMacString (Private->Controller, NULL, &MacString);
if (!EFI_ERROR (Status)) {
OldMenuString = HiiGetString (
- CallbackInfo->RegisteredHandle,
- STRING_TOKEN (STR_HTTP_BOOT_CONFIG_FORM_HELP),
+ CallbackInfo->RegisteredHandle,
+ STRING_TOKEN (STR_HTTP_BOOT_CONFIG_FORM_HELP),
NULL
);
UnicodeSPrint (MenuString, 128, L"%s (MAC:%s)", OldMenuString, MacString);
HiiSetString (
- CallbackInfo->RegisteredHandle,
- STRING_TOKEN (STR_HTTP_BOOT_CONFIG_FORM_HELP),
- MenuString,
+ CallbackInfo->RegisteredHandle,
+ STRING_TOKEN (STR_HTTP_BOOT_CONFIG_FORM_HELP),
+ MenuString,
NULL
);
-
+
FreePool (MacString);
FreePool (OldMenuString);
CallbackInfo->Initilized = TRUE;
return EFI_SUCCESS;
}
-
+
Error:
HttpBootConfigFormUnload (Private);
diff --git a/NetworkPkg/HttpBootDxe/HttpBootConfigVfr.vfr b/NetworkPkg/HttpBootDxe/HttpBootConfigVfr.vfr
index 7e8ddae33d..9c65d64d93 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootConfigVfr.vfr
+++ b/NetworkPkg/HttpBootDxe/HttpBootConfigVfr.vfr
@@ -1,7 +1,7 @@
/** @file
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
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,
name = HTTP_BOOT_CONFIG_IFR_NVDATA,
guid = HTTP_BOOT_CONFIG_GUID;
-
+
form formid = FORMID_MAIN_FORM,
title = STRING_TOKEN(STR_HTTP_BOOT_CONFIG_FORM_TITLE);
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDhcp4.c b/NetworkPkg/HttpBootDxe/HttpBootDhcp4.c
index 229e6cb0ec..78d161ae95 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDhcp4.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootDhcp4.c
@@ -1,13 +1,13 @@
/** @file
Functions implementation related with DHCPv4 for HTTP boot driver.
-Copyright (c) 2015 - 2017, 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.
+Copyright (c) 2015 - 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,
+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.
**/
@@ -267,7 +267,7 @@ HttpBootParseDhcp4Packet (
HTTP_BOOT_OFFER_TYPE OfferType;
EFI_IPv4_ADDRESS IpAddr;
BOOLEAN FileFieldOverloaded;
-
+
IsDnsOffer = FALSE;
IpExpressedUri = 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.
//
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) {
Status = HttpParseUrl (
@@ -428,7 +428,7 @@ HttpBootParseDhcp4Packet (
return EFI_DEVICE_ERROR;
}
}
-
+
Cache4->OfferType = OfferType;
return EFI_SUCCESS;
}
@@ -506,70 +506,70 @@ HttpBootSelectDhcpOffer (
// The offer with DNS server address takes priority here.
//
if (Private->OfferCount[HttpOfferTypeDhcpDns] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpDns][0] + 1;
-
+
} else if (Private->OfferCount[HttpOfferTypeDhcpIpUriDns] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpIpUriDns][0] + 1;
-
+
} else if (Private->OfferCount[HttpOfferTypeDhcpNameUriDns] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpNameUriDns][0] + 1;
-
+
} else if (Private->OfferCount[HttpOfferTypeDhcpOnly] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpOnly][0] + 1;
-
+
} else if (Private->OfferCount[HttpOfferTypeDhcpIpUri] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpIpUri][0] + 1;
}
-
+
} else {
//
// We are in corporate environment.
//
// Priority1: HttpOfferTypeDhcpIpUri or HttpOfferTypeDhcpIpUriDns
- // Priority2: HttpOfferTypeDhcpNameUriDns
- // Priority3: HttpOfferTypeDhcpOnly + HttpOfferTypeProxyIpUri
- // Priority4: HttpOfferTypeDhcpDns + HttpOfferTypeProxyIpUri
+ // Priority2: HttpOfferTypeDhcpNameUriDns
+ // Priority3: HttpOfferTypeDhcpOnly + HttpOfferTypeProxyIpUri
+ // Priority4: HttpOfferTypeDhcpDns + HttpOfferTypeProxyIpUri
// Priority5: HttpOfferTypeDhcpDns + HttpOfferTypeProxyNameUri
- // Priority6: HttpOfferTypeDhcpDns + HttpOfferTypeDhcpNameUri
- //
+ // Priority6: HttpOfferTypeDhcpDns + HttpOfferTypeDhcpNameUri
+ //
if (Private->OfferCount[HttpOfferTypeDhcpIpUri] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpIpUri][0] + 1;
-
+
} else if (Private->OfferCount[HttpOfferTypeDhcpIpUriDns] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpIpUriDns][0] + 1;
-
+
}else if (Private->OfferCount[HttpOfferTypeDhcpNameUriDns] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpNameUriDns][0] + 1;
-
+
} else if (Private->OfferCount[HttpOfferTypeDhcpOnly] > 0 &&
Private->OfferCount[HttpOfferTypeProxyIpUri] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpOnly][0] + 1;
Private->SelectProxyType = HttpOfferTypeProxyIpUri;
-
+
} else if (Private->OfferCount[HttpOfferTypeDhcpDns] > 0 &&
Private->OfferCount[HttpOfferTypeProxyIpUri] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpDns][0] + 1;
Private->SelectProxyType = HttpOfferTypeProxyIpUri;
-
+
} else if (Private->OfferCount[HttpOfferTypeDhcpDns] > 0 &&
Private->OfferCount[HttpOfferTypeProxyNameUri] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpDns][0] + 1;
Private->SelectProxyType = HttpOfferTypeProxyNameUri;
-
+
} else if (Private->OfferCount[HttpOfferTypeDhcpDns] > 0 &&
Private->OfferCount[HttpOfferTypeDhcpNameUri] > 0) {
-
+
Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpDns][0] + 1;
Private->SelectProxyType = HttpOfferTypeDhcpNameUri;
}
@@ -614,14 +614,14 @@ HttpBootDhcp4CallBack (
EFI_STATUS Status;
BOOLEAN Received;
- if ((Dhcp4Event != Dhcp4SendDiscover) &&
- (Dhcp4Event != Dhcp4RcvdOffer) &&
- (Dhcp4Event != Dhcp4SendRequest) &&
- (Dhcp4Event != Dhcp4RcvdAck) &&
+ if ((Dhcp4Event != Dhcp4SendDiscover) &&
+ (Dhcp4Event != Dhcp4RcvdOffer) &&
+ (Dhcp4Event != Dhcp4SendRequest) &&
+ (Dhcp4Event != Dhcp4RcvdAck) &&
(Dhcp4Event != Dhcp4SelectOffer)) {
return EFI_SUCCESS;
}
-
+
Private = (HTTP_BOOT_PRIVATE_DATA *) Context;
//
@@ -636,14 +636,14 @@ HttpBootDhcp4CallBack (
Value = HTONS (HTTP_BOOT_DHCP4_PACKET_MAX_SIZE);
CopyMem (MaxMsgSize->Data, &Value, sizeof (Value));
}
-
+
//
// Callback to user if any packets sent or received.
//
if (Private->HttpBootCallback != NULL && Dhcp4Event != Dhcp4SelectOffer) {
Received = (BOOLEAN) (Dhcp4Event == Dhcp4RcvdOffer || Dhcp4Event == Dhcp4RcvdAck);
Status = Private->HttpBootCallback->Callback (
- Private->HttpBootCallback,
+ Private->HttpBootCallback,
HttpBootDhcp4,
Received,
Packet->Length,
@@ -676,7 +676,7 @@ HttpBootDhcp4CallBack (
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.
//
HttpBootSelectDhcpOffer (Private);
@@ -687,7 +687,7 @@ HttpBootDhcp4CallBack (
*NewPacket = &Private->OfferBuffer[Private->SelectIndex - 1].Dhcp4.Packet.Offer;
}
break;
-
+
default:
break;
}
@@ -697,7 +697,7 @@ HttpBootDhcp4CallBack (
/**
This function will register the IPv4 gateway address to the network device.
-
+
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
@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.
-
+
@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] DnsServerData Point a list of DNS server address in an array
@@ -754,11 +754,11 @@ HttpBootRegisterIp4Dns (
)
{
EFI_IP4_CONFIG2_PROTOCOL *Ip4Config2;
-
+
ASSERT (!Private->UsingIpv6);
Ip4Config2 = Private->Ip4Config2;
-
+
return Ip4Config2->SetData (
Ip4Config2,
Ip4Config2DataTypeDnsServer,
@@ -810,7 +810,7 @@ HttpBootSetIp4Policy (
);
if (EFI_ERROR (Status)) {
return Status;
- }
+ }
}
return EFI_SUCCESS;
@@ -837,7 +837,7 @@ HttpBootDhcp4Dora (
EFI_DHCP4_CONFIG_DATA Config;
EFI_STATUS Status;
EFI_DHCP4_MODE_DATA Mode;
-
+
Dhcp4 = Private->Dhcp4;
ASSERT (Dhcp4 != NULL);
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDhcp4.h b/NetworkPkg/HttpBootDxe/HttpBootDhcp4.h
index 0b2cafbf50..4eb3f94af7 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDhcp4.h
+++ b/NetworkPkg/HttpBootDxe/HttpBootDhcp4.h
@@ -1,13 +1,13 @@
/** @file
Functions declaration related with DHCPv4 for HTTP boot driver.
-Copyright (c) 2015 - 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.
+Copyright (c) 2015 - 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,
+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.
**/
@@ -28,7 +28,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#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.
/// These identifiers are defined by IETF:
/// 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.
-
+
@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] DnsServerData Point a list of DNS server address in an array
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDhcp6.c b/NetworkPkg/HttpBootDxe/HttpBootDhcp6.c
index 4eea895368..fd2c648b84 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDhcp6.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootDhcp6.c
@@ -1,13 +1,13 @@
/** @file
Functions implementation related with DHCPv6 for HTTP boot driver.
-Copyright (c) 2015 - 2017, 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.
+Copyright (c) 2015 - 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,
+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.
**/
@@ -192,14 +192,14 @@ HttpBootParseDhcp6Packet (
EFI_STATUS Status;
UINT32 Offset;
UINT32 Length;
-
+
IsDnsOffer = FALSE;
IpExpressedUri = FALSE;
IsProxyOffer = TRUE;
IsHttpOffer = FALSE;
Offer = &Cache6->Packet.Offer;
Options = Cache6->OptList;
-
+
ZeroMem (Cache6->OptList, sizeof (Cache6->OptList));
Option = (EFI_DHCP6_PACKET_OPTION *) (Offer->Dhcp6.Option);
@@ -270,9 +270,9 @@ HttpBootParseDhcp6Packet (
if (IsHttpOffer && Options[HTTP_BOOT_DHCP6_IDX_BOOT_FILE_URL] == NULL) {
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) {
Status = HttpParseUrl (
@@ -318,7 +318,7 @@ HttpBootParseDhcp6Packet (
return EFI_DEVICE_ERROR;
}
}
-
+
Cache6->OfferType = OfferType;
return EFI_SUCCESS;
}
@@ -345,7 +345,7 @@ HttpBootCacheDhcp6Packet (
CopyMem (&Dst->Dhcp6, &Src->Dhcp6, Src->Length);
Dst->Length = Src->Length;
-
+
return EFI_SUCCESS;
}
@@ -397,7 +397,7 @@ HttpBootCacheDhcp6Offer (
Private->OfferIndex[OfferType][Private->OfferCount[OfferType]] = Private->OfferNum;
Private->OfferCount[OfferType]++;
Private->OfferNum++;
-
+
return EFI_SUCCESS;
}
@@ -435,7 +435,7 @@ HttpBootDhcp6CallBack (
EFI_DHCP6_PACKET *SelectAd;
EFI_STATUS Status;
BOOLEAN Received;
-
+
if ((Dhcp6Event != Dhcp6SendSolicit) &&
(Dhcp6Event != Dhcp6RcvdAdvertise) &&
(Dhcp6Event != Dhcp6SendRequest) &&
@@ -445,13 +445,13 @@ HttpBootDhcp6CallBack (
}
ASSERT (Packet != NULL);
-
+
Private = (HTTP_BOOT_PRIVATE_DATA *) Context;
Status = EFI_SUCCESS;
if (Private->HttpBootCallback != NULL && Dhcp6Event != Dhcp6SelectAdvertise) {
Received = (BOOLEAN) (Dhcp6Event == Dhcp6RcvdAdvertise || Dhcp6Event == Dhcp6RcvdReply);
Status = Private->HttpBootCallback->Callback (
- Private->HttpBootCallback,
+ Private->HttpBootCallback,
HttpBootDhcp6,
Received,
Packet->Length,
@@ -462,7 +462,7 @@ HttpBootDhcp6CallBack (
}
}
switch (Dhcp6Event) {
-
+
case Dhcp6RcvdAdvertise:
Status = EFI_NOT_READY;
if (Packet->Length > HTTP_BOOT_DHCP6_PACKET_MAX_SIZE) {
@@ -500,17 +500,17 @@ HttpBootDhcp6CallBack (
CopyMem (*NewPacket, SelectAd, SelectAd->Size);
}
break;
-
+
default:
break;
}
- return Status;
+ return Status;
}
/**
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
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_TIMEOUT The operation is time out.
@retval Other Unexpect error happened.
-
+
**/
EFI_STATUS
HttpBootCheckRouteTable (
@@ -553,7 +553,7 @@ HttpBootCheckRouteTable (
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
-
+
//
// Find out the gateway address which can route the message which send to ServerIp.
//
@@ -583,13 +583,13 @@ HttpBootCheckRouteTable (
if (Ip6ModeData.IcmpTypeList != NULL) {
FreePool (Ip6ModeData.IcmpTypeList);
}
-
+
if (GatewayIsFound || RetryCount == TimeOutInSecond) {
break;
}
-
+
RetryCount++;
-
+
//
// Delay 1 second then recheck it again.
//
@@ -614,19 +614,19 @@ HttpBootCheckRouteTable (
Ip6->Poll (Ip6);
}
}
-
+
ON_EXIT:
if (TimeOutEvt != NULL) {
gBS->CloseEvent (TimeOutEvt);
}
-
+
if (GatewayIsFound) {
Status = EFI_SUCCESS;
} else if (RetryCount == TimeOutInSecond) {
Status = EFI_TIMEOUT;
}
- return Status;
+ return Status;
}
/**
@@ -650,7 +650,7 @@ HttpBootSetIp6Policy (
Ip6Config = Private->Ip6Config;
DataSize = sizeof (EFI_IP6_CONFIG_POLICY);
-
+
//
// 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.
-
+
@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] DnsServerData Point a list of DNS server address in an array
@@ -699,11 +699,11 @@ HttpBootSetIp6Dns (
)
{
EFI_IP6_CONFIG_PROTOCOL *Ip6Config;
-
+
ASSERT (Private->UsingIpv6);
Ip6Config = Private->Ip6Config;
-
+
return Ip6Config->SetData (
Ip6Config,
Ip6ConfigDataTypeDnsServer,
@@ -714,7 +714,7 @@ HttpBootSetIp6Dns (
/**
This function will register the IPv6 gateway address to the network device.
-
+
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
@retval EFI_SUCCESS The new IP configuration has been configured successfully.
@@ -731,9 +731,9 @@ HttpBootSetIp6Gateway (
ASSERT (Private->UsingIpv6);
Ip6Config = Private->Ip6Config;
-
+
//
- // Set the default gateway address.
+ // Set the default gateway address.
//
if (!Private->NoGateway && !NetIp6IsUnspecifiedAddr (&Private->GatewayIp.v6)) {
Status = Ip6Config->SetData (
@@ -752,7 +752,7 @@ HttpBootSetIp6Gateway (
/**
This function will register the station IP address.
-
+
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
@retval EFI_SUCCESS The new IP address has been configured successfully.
@@ -772,29 +772,29 @@ HttpBootSetIp6Address (
EFI_IPv6_ADDRESS *Ip6Addr;
EFI_IPv6_ADDRESS GatewayAddr;
EFI_IP6_CONFIG_DATA Ip6CfgData;
- EFI_EVENT MappedEvt;
+ EFI_EVENT MappedEvt;
UINTN DataSize;
BOOLEAN IsAddressOk;
UINTN Index;
ASSERT (Private->UsingIpv6);
-
+
MappedEvt = NULL;
IsAddressOk = FALSE;
Ip6Addr = NULL;
Ip6Cfg = Private->Ip6Config;
Ip6 = Private->Ip6;
-
+
ZeroMem (&CfgAddr, sizeof (EFI_IP6_CONFIG_MANUAL_ADDRESS));
CopyMem (&CfgAddr, &Private->StationIp.v6, sizeof (EFI_IPv6_ADDRESS));
ZeroMem (&Ip6CfgData, sizeof (EFI_IP6_CONFIG_DATA));
-
+
Ip6CfgData.AcceptIcmpErrors = TRUE;
Ip6CfgData.DefaultProtocol = IP6_ICMP;
Ip6CfgData.HopLimit = HTTP_BOOT_DEFAULT_HOPLIMIT;
Ip6CfgData.ReceiveTimeout = HTTP_BOOT_DEFAULT_LIFETIME;
Ip6CfgData.TransmitTimeout = HTTP_BOOT_DEFAULT_LIFETIME;
-
+
Status = Ip6->Configure (Ip6, &Ip6CfgData);
if (EFI_ERROR (Status)) {
goto ON_EXIT;
@@ -823,7 +823,7 @@ HttpBootSetIp6Address (
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
-
+
//
// Create a notify event to set address flag when DAD if IP6 driver succeeded.
//
@@ -837,7 +837,7 @@ HttpBootSetIp6Address (
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
-
+
//
// Set static host ip6 address. This is a asynchronous process.
//
@@ -855,7 +855,7 @@ HttpBootSetIp6Address (
Ip6ConfigDataTypeManualAddress,
sizeof (EFI_IP6_CONFIG_MANUAL_ADDRESS),
&CfgAddr
- );
+ );
if (EFI_ERROR (Status) && Status != EFI_NOT_READY) {
goto ON_EXIT;
} else if (Status == EFI_NOT_READY) {
@@ -879,7 +879,7 @@ HttpBootSetIp6Address (
Status = EFI_DEVICE_ERROR;
goto ON_EXIT;
}
-
+
Ip6Addr = AllocatePool (DataSize);
if (Ip6Addr == NULL) {
return EFI_OUT_OF_RESOURCES;
@@ -903,9 +903,9 @@ HttpBootSetIp6Address (
if (Index == DataSize / sizeof (EFI_IPv6_ADDRESS)) {
Status = EFI_ABORTED;
goto ON_EXIT;
- }
+ }
}
-
+
ON_EXIT:
if (MappedEvt != NULL) {
Ip6Cfg->UnregisterDataNotify (
@@ -919,8 +919,8 @@ ON_EXIT:
if (Ip6Addr != NULL) {
FreePool (Ip6Addr);
}
-
- return Status;
+
+ return Status;
}
/**
@@ -954,15 +954,15 @@ HttpBootDhcp6Sarr (
//
OptCount = HttpBootBuildDhcp6Options (Private, OptList, Buffer);
ASSERT (OptCount >0);
-
+
Retransmit = AllocateZeroPool (sizeof (EFI_DHCP6_RETRANSMISSION));
if (Retransmit == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
ZeroMem (&Mode, sizeof (EFI_DHCP6_MODE_DATA));
ZeroMem (&Config, sizeof (EFI_DHCP6_CONFIG_DATA));
-
+
Config.OptionCount = OptCount;
Config.OptionList = OptList;
Config.Dhcp6Callback = HttpBootDhcp6CallBack;
@@ -977,7 +977,7 @@ HttpBootDhcp6Sarr (
Retransmit->Mrc = 4;
Retransmit->Mrt = 32;
Retransmit->Mrd = 60;
-
+
//
// Configure the DHCPv6 instance for HTTP boot.
//
@@ -993,7 +993,7 @@ HttpBootDhcp6Sarr (
Private->SelectIndex = 0;
ZeroMem (Private->OfferCount, sizeof (Private->OfferCount));
ZeroMem (Private->OfferIndex, sizeof (Private->OfferIndex));
-
+
//
// Start DHCPv6 S.A.R.R. process to acquire IPv6 address.
//
@@ -1001,7 +1001,7 @@ HttpBootDhcp6Sarr (
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
-
+
//
// Get the acquired IPv6 address and store them.
//
@@ -1009,14 +1009,14 @@ HttpBootDhcp6Sarr (
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
-
+
ASSERT (Mode.Ia->State == Dhcp6Bound);
CopyMem (&Private->StationIp.v6, &Mode.Ia->IaAddress[0].IpAddress, sizeof (EFI_IPv6_ADDRESS));
-
+
AsciiPrint ("\n Station IPv6 address is ");
HttpBootShowIp6Addr (&Private->StationIp.v6);
AsciiPrint ("\n");
-
+
ON_EXIT:
if (EFI_ERROR (Status)) {
Dhcp6->Stop (Dhcp6);
@@ -1032,7 +1032,7 @@ ON_EXIT:
}
}
- return Status;
-
+ return Status;
+
}
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDhcp6.h b/NetworkPkg/HttpBootDxe/HttpBootDhcp6.h
index 9f2989831e..d775a60304 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDhcp6.h
+++ b/NetworkPkg/HttpBootDxe/HttpBootDhcp6.h
@@ -1,13 +1,13 @@
/** @file
Functions declaration related with DHCPv6 for HTTP boot driver.
-Copyright (c) 2015 - 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.
+Copyright (c) 2015 - 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,
+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.
**/
@@ -127,7 +127,7 @@ HttpBootSetIp6Policy (
/**
This function will register the default DNS addresses to the network device.
-
+
@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] 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.
-
+
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
@retval EFI_SUCCESS The new IP configuration has been configured successfully.
@@ -160,7 +160,7 @@ HttpBootSetIp6Gateway (
/**
This function will register the station IP address.
-
+
@param[in] Private The pointer to HTTP_BOOT_PRIVATE_DATA.
@retval EFI_SUCCESS The new IP address has been configured successfully.
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxe.c b/NetworkPkg/HttpBootDxe/HttpBootDxe.c
index 8a61f51cc8..7ec06f960d 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDxe.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootDxe.c
@@ -1,14 +1,14 @@
/** @file
Driver Binding functions implementation for UEFI HTTP boot.
-Copyright (c) 2015 - 2017, 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.
+Copyright (c) 2015 - 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.
+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.
**/
@@ -75,7 +75,7 @@ HttpBootCheckIpv6Support (
//
// Get the NIC handle by SNP protocol.
- //
+ //
Handle = NetLibGetSnpHandle (Private->Controller, NULL);
if (Handle == NULL) {
return EFI_NOT_FOUND;
@@ -121,11 +121,11 @@ HttpBootCheckIpv6Support (
if (EFI_ERROR (Status) || InfoBlock == NULL) {
FreePool (InfoBlock);
return EFI_NOT_FOUND;
- }
+ }
*Ipv6Support = ((EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT *) InfoBlock)->Ipv6Support;
FreePool (InfoBlock);
-
+
return EFI_SUCCESS;
}
@@ -167,14 +167,14 @@ HttpBootDestroyIp4Children (
}
if (Private->Ip4Nic != NULL) {
-
+
gBS->CloseProtocol (
Private->Controller,
&gEfiCallerIdGuid,
This->DriverBindingHandle,
Private->Ip4Nic->Controller
);
-
+
gBS->UninstallMultipleProtocolInterfaces (
Private->Ip4Nic->Controller,
&gEfiLoadFileProtocolGuid,
@@ -204,7 +204,7 @@ HttpBootDestroyIp6Children (
{
ASSERT (This != NULL);
ASSERT (Private != NULL);
-
+
if (Private->Ip6Child != NULL) {
gBS->CloseProtocol (
Private->Ip6Child,
@@ -241,16 +241,16 @@ HttpBootDestroyIp6Children (
HttpIoDestroyIo(&Private->HttpIo);
Private->HttpCreated = FALSE;
}
-
+
if (Private->Ip6Nic != NULL) {
-
+
gBS->CloseProtocol (
Private->Controller,
&gEfiCallerIdGuid,
This->DriverBindingHandle,
Private->Ip6Nic->Controller
);
-
+
gBS->UninstallMultipleProtocolInterfaces (
Private->Ip6Nic->Controller,
&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.
- 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 and/or the services from the bus I/O abstraction attached to
- 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
- 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
- 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(),
- AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
- 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
+ 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 and/or the services from the bus I/O abstraction attached to
+ 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
+ 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
+ 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(),
+ AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
+ 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
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] ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by 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
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@@ -315,7 +315,7 @@ HttpBootIp4DxeDriverBindingSupported (
)
{
EFI_STATUS Status;
-
+
//
// Try to open the DHCP4, HTTP4 and Device Path protocol.
//
@@ -360,28 +360,28 @@ HttpBootIp4DxeDriverBindingSupported (
Starts a device controller or a bus controller.
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
- common boot service. It is legal to call Start() from other locations,
+ 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,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
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] ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For a bus driver, if this parameter is NULL, then handles
- for all the children of Controller are created by this driver.
- 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
- child device specified by the first Device Path Node of
+ @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
+ drivers. For a bus driver, if this parameter is NULL, then handles
+ for all the children of Controller are created by this driver.
+ 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
+ child device specified by the first Device Path Node of
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
driver.
@@ -421,7 +421,7 @@ HttpBootIp4DxeDriverBindingStart (
Private = HTTP_BOOT_PRIVATE_DATA_FROM_ID(Id);
} else {
FirstStart = TRUE;
-
+
//
// Initialize the private data structure.
//
@@ -483,16 +483,16 @@ HttpBootIp4DxeDriverBindingStart (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
}
-
+
if (Private->Ip4Nic != NULL) {
//
// Already created before
//
return EFI_SUCCESS;
}
-
+
Private->Ip4Nic = AllocateZeroPool (sizeof (HTTP_BOOT_VIRTUAL_NIC));
if (Private->Ip4Nic == NULL) {
Status = EFI_OUT_OF_RESOURCES;
@@ -501,7 +501,7 @@ HttpBootIp4DxeDriverBindingStart (
Private->Ip4Nic->Private = Private;
Private->Ip4Nic->ImageHandle = This->DriverBindingHandle;
Private->Ip4Nic->Signature = HTTP_BOOT_VIRTUAL_NIC_SIGNATURE;
-
+
//
// Create DHCP4 child instance.
//
@@ -514,7 +514,7 @@ HttpBootIp4DxeDriverBindingStart (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
Status = gBS->OpenProtocol (
Private->Dhcp4Child,
&gEfiDhcp4ProtocolGuid,
@@ -526,7 +526,7 @@ HttpBootIp4DxeDriverBindingStart (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
//
// Get the Ip4Config2 protocol, it's required to configure the default gateway address.
//
@@ -541,7 +541,7 @@ HttpBootIp4DxeDriverBindingStart (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
//
// Append IPv4 device path node.
//
@@ -560,7 +560,7 @@ HttpBootIp4DxeDriverBindingStart (
Status = EFI_OUT_OF_RESOURCES;
goto ON_ERROR;
}
-
+
//
// Append URI device path node.
//
@@ -579,7 +579,7 @@ HttpBootIp4DxeDriverBindingStart (
Status = EFI_OUT_OF_RESOURCES;
goto ON_ERROR;
}
-
+
//
// 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)) {
goto ON_ERROR;
}
-
+
//
// Open the Caller Id child to setup a parent-child relationship between
// real NIC handle and the HTTP boot Ipv4 NIC handle.
@@ -611,9 +611,9 @@ HttpBootIp4DxeDriverBindingStart (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
return EFI_SUCCESS;
-
+
ON_ERROR:
if (Private != NULL) {
if (FirstStart) {
@@ -623,7 +623,7 @@ ON_ERROR:
&Private->Id
);
}
-
+
HttpBootDestroyIp4Children (This, Private);
HttpBootConfigFormUnload (Private);
@@ -638,10 +638,10 @@ ON_ERROR:
/**
Stops a device controller or a bus controller.
-
- 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
- into this common boot service. It is legal to call Stop() from other locations,
+
+ 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
+ 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.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
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
Start() function, and the Start() function must have called OpenProtocol() on
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] ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@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.
@retval EFI_SUCCESS The device was stopped.
@@ -729,7 +729,7 @@ HttpBootIp4DxeDriverBindingStop (
// Destory all child instance and uninstall protocol interface.
//
HttpBootDestroyIp4Children (This, Private);
-
+
if (Private->Ip4Nic == NULL && Private->Ip6Nic == NULL) {
//
// Release the cached data.
@@ -740,7 +740,7 @@ HttpBootIp4DxeDriverBindingStop (
// Unload the config form.
//
HttpBootConfigFormUnload (Private);
-
+
gBS->UninstallProtocolInterface (
NicHandle,
&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.
- 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 and/or the services from the bus I/O abstraction attached to
- 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
- 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
- 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(),
- AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
- 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
+ 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 and/or the services from the bus I/O abstraction attached to
+ 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
+ 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
+ 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(),
+ AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
+ 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
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] ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by 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
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@@ -804,7 +804,7 @@ HttpBootIp6DxeDriverBindingSupported (
)
{
EFI_STATUS Status;
-
+
//
// Try to open the DHCP6, HTTP and Device Path protocol.
//
@@ -849,28 +849,28 @@ HttpBootIp6DxeDriverBindingSupported (
Starts a device controller or a bus controller.
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
- common boot service. It is legal to call Start() from other locations,
+ 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,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
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] ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For a bus driver, if this parameter is NULL, then handles
- for all the children of Controller are created by this driver.
- 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
- child device specified by the first Device Path Node of
+ @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
+ drivers. For a bus driver, if this parameter is NULL, then handles
+ for all the children of Controller are created by this driver.
+ 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
+ child device specified by the first Device Path Node of
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
driver.
@@ -897,7 +897,7 @@ HttpBootIp6DxeDriverBindingStart (
BOOLEAN FirstStart;
FirstStart = FALSE;
-
+
Status = gBS->OpenProtocol (
ControllerHandle,
&gEfiCallerIdGuid,
@@ -906,12 +906,12 @@ HttpBootIp6DxeDriverBindingStart (
ControllerHandle,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
);
-
+
if (!EFI_ERROR (Status)) {
Private = HTTP_BOOT_PRIVATE_DATA_FROM_ID(Id);
} else {
FirstStart = TRUE;
-
+
//
// Initialize the private data structure.
//
@@ -973,16 +973,16 @@ HttpBootIp6DxeDriverBindingStart (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
}
//
// Set IPv6 available flag.
- //
+ //
Status = HttpBootCheckIpv6Support (Private, &Ipv6Available);
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.
//
Ipv6Available = TRUE;
@@ -992,14 +992,14 @@ HttpBootIp6DxeDriverBindingStart (
Status = EFI_UNSUPPORTED;
goto ON_ERROR;
}
-
+
if (Private->Ip6Nic != NULL) {
//
// Already created before
//
return EFI_SUCCESS;
}
-
+
Private->Ip6Nic = AllocateZeroPool (sizeof (HTTP_BOOT_VIRTUAL_NIC));
if (Private->Ip6Nic == NULL) {
Status = EFI_OUT_OF_RESOURCES;
@@ -1008,7 +1008,7 @@ HttpBootIp6DxeDriverBindingStart (
Private->Ip6Nic->Private = Private;
Private->Ip6Nic->ImageHandle = This->DriverBindingHandle;
Private->Ip6Nic->Signature = HTTP_BOOT_VIRTUAL_NIC_SIGNATURE;
-
+
//
// Create Dhcp6 child and open Dhcp6 protocol
Status = NetLibCreateServiceChild (
@@ -1144,7 +1144,7 @@ HttpBootIp6DxeDriverBindingStart (
}
return EFI_SUCCESS;
-
+
ON_ERROR:
if (Private != NULL) {
if (FirstStart) {
@@ -1168,10 +1168,10 @@ ON_ERROR:
/**
Stops a device controller or a bus controller.
-
- 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
- into this common boot service. It is legal to call Stop() from other locations,
+
+ 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
+ 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.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
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
Start() function, and the Start() function must have called OpenProtocol() on
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] ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@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.
@retval EFI_SUCCESS The device was stopped.
@@ -1317,7 +1317,7 @@ HttpBootDxeDriverEntryPoint (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
Status = EfiLibInstallDriverBindingComponentName2 (
ImageHandle,
SystemTable,
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxe.h b/NetworkPkg/HttpBootDxe/HttpBootDxe.h
index 166bc458f1..316e143152 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDxe.h
+++ b/NetworkPkg/HttpBootDxe/HttpBootDxe.h
@@ -1,15 +1,15 @@
/** @file
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>
-This program and the accompanying materials are licensed and made available under
-the terms and conditions of the BSD License that accompanies this distribution.
+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.
+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.
**/
@@ -77,7 +77,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define HTTP_BOOT_DXE_VERSION 0xa
//
-// Standard Media Types defined in
+// Standard Media Types defined in
// http://www.iana.org/assignments/media-types
//
#define HTTP_CONTENT_TYPE_APP_EFI "application/efi"
@@ -136,7 +136,7 @@ struct _HTTP_BOOT_VIRTUAL_NIC {
CallbackInfo, \
HTTP_BOOT_PRIVATE_DATA_SIGNATURE \
)
-
+
#define HTTP_BOOT_PRIVATE_DATA_FROM_CALLBACK_PROTOCOL(CallbackProtocol) \
CR ( \
CallbackProtocol, \
@@ -172,7 +172,7 @@ struct _HTTP_BOOT_PRIVATE_DATA {
EFI_DHCP6_PROTOCOL *Dhcp6;
EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
-
+
//
// Produced protocol
//
@@ -273,33 +273,33 @@ struct _HTTP_BOOT_PRIVATE_DATA {
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.
- 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 and/or the services from the bus I/O abstraction attached to
- 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
- 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
- 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(),
- AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
- 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
+ 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 and/or the services from the bus I/O abstraction attached to
+ 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
+ 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
+ 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(),
+ AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
+ 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
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] ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by 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
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@@ -326,28 +326,28 @@ HttpBootIp4DxeDriverBindingSupported (
Starts a device controller or a bus controller.
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
- common boot service. It is legal to call Start() from other locations,
+ 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,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
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] ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For a bus driver, if this parameter is NULL, then handles
- for all the children of Controller are created by this driver.
- 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
- child device specified by the first Device Path Node of
+ @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
+ drivers. For a bus driver, if this parameter is NULL, then handles
+ for all the children of Controller are created by this driver.
+ 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
+ child device specified by the first Device Path Node of
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
driver.
@@ -367,10 +367,10 @@ HttpBootIp4DxeDriverBindingStart (
/**
Stops a device controller or a bus controller.
-
- 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
- into this common boot service. It is legal to call Stop() from other locations,
+
+ 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
+ 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.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
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
Start() function, and the Start() function must have called OpenProtocol() on
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] ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@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.
@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.
- 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 and/or the services from the bus I/O abstraction attached to
- 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
- 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
- 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(),
- AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
- 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
+ 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 and/or the services from the bus I/O abstraction attached to
+ 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
+ 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
+ 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(),
+ AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
+ 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
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] ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by 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
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@@ -454,28 +454,28 @@ HttpBootIp6DxeDriverBindingSupported (
Starts a device controller or a bus controller.
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
- common boot service. It is legal to call Start() from other locations,
+ 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,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
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] ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For a bus driver, if this parameter is NULL, then handles
- for all the children of Controller are created by this driver.
- 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
- child device specified by the first Device Path Node of
+ @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
+ drivers. For a bus driver, if this parameter is NULL, then handles
+ for all the children of Controller are created by this driver.
+ 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
+ child device specified by the first Device Path Node of
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
driver.
@@ -495,10 +495,10 @@ HttpBootIp6DxeDriverBindingStart (
/**
Stops a device controller or a bus controller.
-
- 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
- into this common boot service. It is legal to call Stop() from other locations,
+
+ 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
+ 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.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
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
Start() function, and the Start() function must have called OpenProtocol() on
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] ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@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.
@retval EFI_SUCCESS The device was stopped.
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxe.inf b/NetworkPkg/HttpBootDxe/HttpBootDxe.inf
index 6d2a772206..f0e3fad68e 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDxe.inf
+++ b/NetworkPkg/HttpBootDxe/HttpBootDxe.inf
@@ -1,15 +1,15 @@
## @file
# 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
# 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
# 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.
-#
+#
##
[Defines]
@@ -68,7 +68,7 @@
## TO_START
## BY_START
gEfiDevicePathProtocolGuid
-
+
gEfiLoadFileProtocolGuid ## BY_START
gEfiHttpServiceBindingProtocolGuid ## CONSUMES
gEfiHttpProtocolGuid ## CONSUMES
@@ -99,7 +99,7 @@
gEfiAdapterInfoUndiIpv6SupportGuid ## SOMETIMES_CONSUMES ## GUID
[Pcd]
- gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections ## CONSUMES
+ gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections ## CONSUMES
[UserExtensions.TianoCore."ExtraFiles"]
HttpBootDxeExtra.uni
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxe.uni b/NetworkPkg/HttpBootDxe/HttpBootDxe.uni
index 370f115347..6abd2c5f37 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDxe.uni
+++ b/NetworkPkg/HttpBootDxe/HttpBootDxe.uni
@@ -3,15 +3,15 @@
//
// 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.
-//
//
-// 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 the terms and conditions of the BSD License
// which 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.
//
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxeExtra.uni b/NetworkPkg/HttpBootDxe/HttpBootDxeExtra.uni
index d6a0f0cef6..593538b2ac 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDxeExtra.uni
+++ b/NetworkPkg/HttpBootDxe/HttpBootDxeExtra.uni
@@ -1,7 +1,7 @@
// /** @file
// 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
// are licensed and made available under the terms and conditions of the BSD License
@@ -13,8 +13,8 @@
//
// **/
-#string STR_PROPERTIES_MODULE_NAME
-#language en-US
+#string STR_PROPERTIES_MODULE_NAME
+#language en-US
"UEFI HTTP BOOT DXE"
diff --git a/NetworkPkg/HttpBootDxe/HttpBootImpl.c b/NetworkPkg/HttpBootDxe/HttpBootImpl.c
index a0fd934ec4..0f222adefd 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootImpl.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootImpl.c
@@ -3,12 +3,12 @@
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<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.
+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,
+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.
**/
@@ -96,7 +96,7 @@ HttpBootUninstallCallback (
/**
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.
@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_ALREADY_STARTED The driver is already in started state.
@retval EFI_OUT_OF_RESOURCES There are not enough resources.
-
+
**/
EFI_STATUS
HttpBootStart (
@@ -124,20 +124,20 @@ HttpBootStart (
CHAR8 *Uri;
Uri = NULL;
-
+
if (Private == NULL || FilePath == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
//
// 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);
if (EFI_ERROR (Status)) {
return EFI_INVALID_PARAMETER;
}
-
+
//
// 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
// recorded before.
//
- if ((UsingIpv6 != Private->UsingIpv6) ||
+ if ((UsingIpv6 != Private->UsingIpv6) ||
((Uri != NULL) && (AsciiStrCmp (Private->BootFileUri, Uri) != 0))) {
//
// Restart is required, first stop then continue this start function.
@@ -201,7 +201,7 @@ HttpBootStart (
return Status;
}
}
-
+
//
// 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_DEVICE_ERROR An unexpected network error occurred.
@retval Others Other errors as indicated.
-
+
**/
EFI_STATUS
HttpBootDhcp (
@@ -253,7 +253,7 @@ HttpBootDhcp (
if (Private == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
if (!Private->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 *BufferSize is not zero, and Buffer is NULL.
@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.
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
@retval Others Other errors as indicated.
-
+
**/
EFI_STATUS
HttpBootLoadFile (
@@ -315,7 +315,7 @@ HttpBootLoadFile (
if (*BufferSize != 0 && Buffer == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
if (!Private->Started) {
return EFI_NOT_STARTED;
}
@@ -397,10 +397,10 @@ HttpBootLoadFile (
Buffer,
ImageType
);
-
+
ON_EXIT:
HttpBootUninstallCallback (Private);
-
+
if (EFI_ERROR (Status)) {
if (Status == EFI_ACCESS_DENIED) {
AsciiPrint ("\n Error: Could not establish connection with HTTP server.\n");
@@ -418,7 +418,7 @@ ON_EXIT:
AsciiPrint ("\n Error: Unexpected network error.\n");
}
}
-
+
return Status;
}
@@ -431,7 +431,7 @@ ON_EXIT:
@retval EFI_NOT_STARTED The driver is already in stopped state.
@retval EFI_INVALID_PARAMETER Private is NULL.
@retval Others Unexpected error when stop the function.
-
+
**/
EFI_STATUS
HttpBootStop (
@@ -443,16 +443,16 @@ HttpBootStop (
if (Private == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
if (!Private->Started) {
return EFI_NOT_STARTED;
}
-
+
if (Private->HttpCreated) {
HttpIoDestroyIo (&Private->HttpIo);
Private->HttpCreated = FALSE;
}
-
+
Private->Started = FALSE;
ZeroMem (&Private->StationIp, sizeof (EFI_IP_ADDRESS));
ZeroMem (&Private->SubnetMask, sizeof (EFI_IP_ADDRESS));
@@ -462,7 +462,7 @@ HttpBootStop (
Private->BootFileUriParser = NULL;
Private->BootFileSize = 0;
Private->SelectIndex = 0;
- Private->SelectProxyType = HttpOfferTypeMax;
+ Private->SelectProxyType = HttpOfferTypeMax;
if (!Private->UsingIpv6) {
//
@@ -482,7 +482,7 @@ HttpBootStop (
//
Private->Dhcp6->Stop (Private->Dhcp6);
Private->Dhcp6->Configure (Private->Dhcp6, NULL);
-
+
for (Index = 0; Index < HTTP_BOOT_OFFER_MAX_NUM; Index++) {
if (Private->OfferBuffer[Index].Dhcp6.UriParser) {
HttpUrlFreeParser (Private->OfferBuffer[Index].Dhcp6.UriParser);
@@ -501,14 +501,14 @@ HttpBootStop (
Private->FilePathUri = NULL;
Private->FilePathUriParser = NULL;
}
-
+
ZeroMem (Private->OfferBuffer, sizeof (Private->OfferBuffer));
Private->OfferNum = 0;
ZeroMem (Private->OfferCount, sizeof (Private->OfferCount));
ZeroMem (Private->OfferIndex, sizeof (Private->OfferIndex));
-
+
HttpBootFreeCacheList (Private);
-
+
return EFI_SUCCESS;
}
@@ -573,7 +573,7 @@ HttpBootDxeLoadFile (
VirtualNic = HTTP_BOOT_VIRTUAL_NIC_FROM_LOADFILE (This);
Private = VirtualNic->Private;
-
+
//
// Check media status before HTTP boot start
//
@@ -583,7 +583,7 @@ HttpBootDxeLoadFile (
AsciiPrint ("\n Error: Could not detect network connection.\n");
return EFI_NO_MEDIA;
}
-
+
//
// Check whether the virtual nic is using IPv6 or not.
//
@@ -599,7 +599,7 @@ HttpBootDxeLoadFile (
if (Status != EFI_SUCCESS && Status != EFI_ALREADY_STARTED) {
return Status;
}
-
+
//
// Load the boot file.
//
@@ -636,7 +636,7 @@ HttpBootDxeLoadFile (
///
/// Load File Protocol instance
///
-GLOBAL_REMOVE_IF_UNREFERENCED
+GLOBAL_REMOVE_IF_UNREFERENCED
EFI_LOAD_FILE_PROTOCOL gHttpBootDxeLoadFile = {
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] Data A pointer to the buffer of data, the data type is specified by
DataType.
-
+
@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.
**/
@@ -698,7 +698,7 @@ HttpBootCallback (
case HttpBootHttpResponse:
if (Data != NULL) {
HttpMessage = (EFI_HTTP_MESSAGE *) Data;
-
+
if (HttpMessage->Data.Response != NULL) {
if (HttpBootIsHttpRedirectStatusCode (HttpMessage->Data.Response->StatusCode)) {
//
@@ -714,10 +714,10 @@ HttpBootCallback (
if (HttpHeader != NULL) {
Print (L"\n HTTP ERROR: Resource Redirected.\n New Location: %a\n", HttpHeader->FieldValue);
}
- break;
+ break;
}
}
-
+
HttpHeader = HttpFindHeader (
HttpMessage->HeaderCount,
HttpMessage->Headers,
@@ -767,7 +767,7 @@ HttpBootCallback (
///
/// HTTP Boot Callback Protocol instance
///
-GLOBAL_REMOVE_IF_UNREFERENCED
+GLOBAL_REMOVE_IF_UNREFERENCED
EFI_HTTP_BOOT_CALLBACK_PROTOCOL gHttpBootDxeHttpBootCallback = {
HttpBootCallback
};
diff --git a/NetworkPkg/HttpBootDxe/HttpBootImpl.h b/NetworkPkg/HttpBootDxe/HttpBootImpl.h
index 53160359f3..82224ad2f3 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootImpl.h
+++ b/NetworkPkg/HttpBootDxe/HttpBootImpl.h
@@ -1,13 +1,13 @@
/** @file
The declaration of UEFI HTTP boot function.
-Copyright (c) 2015, 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.
+Copyright (c) 2015 - 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,
+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.
**/
@@ -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_DEVICE_ERROR An unexpected network error occurred.
@retval Others Other errors as indicated.
-
+
**/
EFI_STATUS
HttpBootDhcp (
@@ -42,7 +42,7 @@ HttpBootDhcp (
@retval EFI_NOT_STARTED The driver is already in stopped state.
@retval EFI_INVALID_PARAMETER Private is NULL.
@retval Others Unexpected error when stop the function.
-
+
**/
EFI_STATUS
HttpBootStop (
diff --git a/NetworkPkg/HttpBootDxe/HttpBootSupport.c b/NetworkPkg/HttpBootDxe/HttpBootSupport.c
index d508e2c1a9..b5974a5148 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootSupport.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootSupport.c
@@ -1,14 +1,14 @@
/** @file
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>
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,
+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.
**/
@@ -162,27 +162,27 @@ HttpBootPrintErrorMessage (
switch (StatusCode) {
case HTTP_STATUS_300_MULTIPLE_CHOICES:
AsciiPrint ("\n Redirection: 300 Multiple Choices");
- break;
-
+ break;
+
case HTTP_STATUS_301_MOVED_PERMANENTLY:
AsciiPrint ("\n Redirection: 301 Moved Permanently");
- break;
-
+ break;
+
case HTTP_STATUS_302_FOUND:
AsciiPrint ("\n Redirection: 302 Found");
- break;
-
+ break;
+
case HTTP_STATUS_303_SEE_OTHER:
AsciiPrint ("\n Redirection: 303 See Other");
- break;
+ break;
case HTTP_STATUS_304_NOT_MODIFIED:
AsciiPrint ("\n Redirection: 304 Not Modified");
- break;
+ break;
case HTTP_STATUS_305_USE_PROXY:
AsciiPrint ("\n Redirection: 305 Use Proxy");
- break;
+ break;
case HTTP_STATUS_307_TEMPORARY_REDIRECT:
AsciiPrint ("\n Redirection: 307 Temporary Redirect");
@@ -190,16 +190,16 @@ HttpBootPrintErrorMessage (
case HTTP_STATUS_308_PERMANENT_REDIRECT:
AsciiPrint ("\n Redirection: 308 Permanent Redirect");
- break;
+ break;
case HTTP_STATUS_400_BAD_REQUEST:
AsciiPrint ("\n Client Error: 400 Bad Request");
break;
-
+
case HTTP_STATUS_401_UNAUTHORIZED:
AsciiPrint ("\n Client Error: 401 Unauthorized");
break;
-
+
case HTTP_STATUS_402_PAYMENT_REQUIRED:
AsciiPrint ("\n Client Error: 402 Payment Required");
break;
@@ -289,7 +289,7 @@ HttpBootPrintErrorMessage (
break;
default: ;
-
+
}
}
@@ -319,13 +319,13 @@ HttpBootCommonNotify (
@retval EFI_SUCCESS Operation succeeded.
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
- @retval Others Other errors as indicated.
+ @retval Others Other errors as indicated.
**/
EFI_STATUS
HttpBootDns (
IN HTTP_BOOT_PRIVATE_DATA *Private,
IN CHAR16 *HostName,
- OUT EFI_IPv6_ADDRESS *IpAddress
+ OUT EFI_IPv6_ADDRESS *IpAddress
)
{
EFI_STATUS Status;
@@ -337,14 +337,14 @@ HttpBootDns (
EFI_IPv6_ADDRESS *DnsServerList;
UINTN DnsServerListCount;
UINTN DataSize;
- BOOLEAN IsDone;
-
+ BOOLEAN IsDone;
+
DnsServerList = NULL;
DnsServerListCount = 0;
Dns6 = NULL;
Dns6Handle = NULL;
ZeroMem (&Token, sizeof (EFI_DNS6_COMPLETION_TOKEN));
-
+
//
// Get DNS server list from EFI IPv6 Configuration protocol.
//
@@ -359,7 +359,7 @@ HttpBootDns (
DnsServerList = AllocatePool (DataSize);
if (DnsServerList == NULL) {
return EFI_OUT_OF_RESOURCES;
- }
+ }
Status = Ip6Config->GetData (Ip6Config, Ip6ConfigDataTypeDnsServer, &DataSize, DnsServerList);
if (EFI_ERROR (Status)) {
@@ -381,8 +381,8 @@ HttpBootDns (
);
if (EFI_ERROR (Status)) {
goto Exit;
- }
-
+ }
+
Status = gBS->OpenProtocol (
Dns6Handle,
&gEfiDns6ProtocolGuid,
@@ -411,7 +411,7 @@ HttpBootDns (
if (EFI_ERROR (Status)) {
goto Exit;
}
-
+
Token.Status = EFI_NOT_READY;
IsDone = FALSE;
//
@@ -439,11 +439,11 @@ HttpBootDns (
while (!IsDone) {
Dns6->Poll (Dns6);
}
-
+
//
// Name resolution is done, check result.
//
- Status = Token.Status;
+ Status = Token.Status;
if (!EFI_ERROR (Status)) {
if (Token.RspData.H2AData == NULL) {
Status = EFI_DEVICE_ERROR;
@@ -473,7 +473,7 @@ Exit:
if (Dns6 != NULL) {
Dns6->Configure (Dns6, NULL);
-
+
gBS->CloseProtocol (
Dns6Handle,
&gEfiDns6ProtocolGuid,
@@ -494,8 +494,8 @@ Exit:
if (DnsServerList != NULL) {
FreePool (DnsServerList);
}
-
- return Status;
+
+ return Status;
}
/**
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.
@return A pointer of the HTTP header holder or NULL if failed.
-
+
**/
HTTP_IO_HEADER *
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.
@@ -539,7 +539,7 @@ HttpBootFreeHeader (
)
{
UINTN Index;
-
+
if (HttpIoHeader != NULL) {
if (HttpIoHeader->HeaderCount != 0) {
for (Index = 0; Index < HttpIoHeader->HeaderCount; Index++) {
@@ -562,7 +562,7 @@ HttpBootFreeHeader (
@retval EFI_INVALID_PARAMETER Any input parameter is invalid.
@retval EFI_OUT_OF_RESOURCES Insufficient resource to complete the operation.
@retval Other Unexpected error happened.
-
+
**/
EFI_STATUS
HttpBootSetHeader (
@@ -574,7 +574,7 @@ HttpBootSetHeader (
EFI_HTTP_HEADER *Header;
UINTN StrSize;
CHAR8 *NewFieldValue;
-
+
if (HttpIoHeader == NULL || FieldName == NULL || FieldValue == NULL) {
return EFI_INVALID_PARAMETER;
}
@@ -618,7 +618,7 @@ HttpBootSetHeader (
}
CopyMem (NewFieldValue, FieldValue, StrSize);
NewFieldValue[StrSize -1] = '\0';
-
+
if (Header->FieldValue != NULL) {
FreePool (Header->FieldValue);
}
@@ -675,7 +675,7 @@ HttpIoNotify (
HTTP_IO_CALLBACK_EVENT happened.
@param[in] Context The Context data which will be passed to the Callback function.
@param[out] HttpIo The HTTP_IO.
-
+
@retval EFI_SUCCESS The HTTP_IO is created and configured.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_UNSUPPORTED One or more of the control options are not
@@ -701,7 +701,7 @@ HttpIoCreateIo (
EFI_HTTPv6_ACCESS_POINT Http6AccessPoint;
EFI_HTTP_PROTOCOL *Http;
EFI_EVENT Event;
-
+
if ((Image == NULL) || (Controller == NULL) || (ConfigData == NULL) || (HttpIo == NULL)) {
return EFI_INVALID_PARAMETER;
}
@@ -711,10 +711,10 @@ HttpIoCreateIo (
}
ZeroMem (HttpIo, sizeof (HTTP_IO));
-
+
//
// Create the HTTP child instance and get the HTTP protocol.
- //
+ //
Status = NetLibCreateServiceChild (
Controller,
Image,
@@ -752,19 +752,19 @@ HttpIoCreateIo (
HttpConfigData.TimeOutMillisec = ConfigData->Config4.RequestTimeOut;
if (HttpIo->IpVersion == IP_VERSION_4) {
HttpConfigData.LocalAddressIsIPv6 = FALSE;
-
+
Http4AccessPoint.UseDefaultAddress = ConfigData->Config4.UseDefaultAddress;
Http4AccessPoint.LocalPort = ConfigData->Config4.LocalPort;
IP4_COPY_ADDRESS (&Http4AccessPoint.LocalAddress, &ConfigData->Config4.LocalIp);
IP4_COPY_ADDRESS (&Http4AccessPoint.LocalSubnet, &ConfigData->Config4.SubnetMask);
- HttpConfigData.AccessPoint.IPv4Node = &Http4AccessPoint;
+ HttpConfigData.AccessPoint.IPv4Node = &Http4AccessPoint;
} else {
HttpConfigData.LocalAddressIsIPv6 = TRUE;
Http6AccessPoint.LocalPort = ConfigData->Config6.LocalPort;
IP6_COPY_ADDRESS (&Http6AccessPoint.LocalAddress, &ConfigData->Config6.LocalIp);
HttpConfigData.AccessPoint.IPv6Node = &Http6AccessPoint;
}
-
+
Status = Http->Configure (Http, &HttpConfigData);
if (EFI_ERROR (Status)) {
goto ON_ERROR;
@@ -815,7 +815,7 @@ HttpIoCreateIo (
HttpIo->TimeoutEvent = Event;
return EFI_SUCCESS;
-
+
ON_ERROR:
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.
@@ -854,7 +854,7 @@ HttpIoDestroyIo (
if (Event != NULL) {
gBS->CloseEvent (Event);
}
-
+
Http = HttpIo->Http;
if (Http != NULL) {
Http->Configure (Http, NULL);
@@ -876,14 +876,14 @@ HttpIoDestroyIo (
/**
Synchronously send a HTTP REQUEST message to the server.
-
+
@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] 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] 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_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@@ -951,12 +951,12 @@ HttpIoSendRequest (
/**
Synchronously receive a HTTP RESPONSE message from the server.
-
+
@param[in] HttpIo The HttpIo wrapping the HTTP service.
@param[in] RecvMsgHeader TRUE to receive a new HTTP response (from message header).
FALSE to continue receive the previous response message.
@param[out] ResponseData Point to a wrapper of the received response data.
-
+
@retval EFI_SUCCESS The HTTP response is received.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@@ -1006,7 +1006,7 @@ HttpIoRecvResponse (
Http,
&HttpIo->RspToken
);
-
+
if (EFI_ERROR (Status)) {
gBS->SetTimer (HttpIo->TimeoutEvent, TimerCancel, 0);
return Status;
@@ -1026,15 +1026,15 @@ HttpIoRecvResponse (
// Timeout occurs, cancel the response token.
//
Http->Cancel (Http, &HttpIo->RspToken);
-
+
Status = EFI_TIMEOUT;
-
+
return Status;
} else {
HttpIo->IsRxDone = FALSE;
}
- if ((HttpIo->Callback != NULL) &&
+ if ((HttpIo->Callback != NULL) &&
(HttpIo->RspToken.Status == EFI_SUCCESS || HttpIo->RspToken.Status == EFI_HTTP_ERROR)) {
Status = HttpIo->Callback (
HttpIoResponse,
@@ -1061,7 +1061,7 @@ HttpIoRecvResponse (
This function checks the HTTP(S) URI scheme.
@param[in] Uri The pointer to the URI string.
-
+
@retval EFI_SUCCESS The URI scheme is valid.
@retval EFI_INVALID_PARAMETER The URI scheme is not HTTP or HTTPS.
@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"));
return EFI_INVALID_PARAMETER;
}
-
+
//
// 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.
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[out] UriAddress The URI address string extract from the device path.
-
+
@retval EFI_SUCCESS The URI string is returned.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@@ -1176,11 +1176,11 @@ HttpBootParseFilePath (
and also the image's URI info.
@param[in] Uri The pointer to the image's URI string.
- @param[in] UriParser URI Parse result returned by NetHttpParseUrl().
- @param[in] HeaderCount Number of HTTP header structures in Headers list.
+ @param[in] UriParser URI Parse result returned by NetHttpParseUrl().
+ @param[in] HeaderCount Number of HTTP header structures in Headers list.
@param[in] Headers Array containing list of HTTP headers.
@param[out] ImageType The image type of the downloaded file.
-
+
@retval EFI_SUCCESS The image type is returned in ImageType.
@retval EFI_INVALID_PARAMETER ImageType, Uri or UriParser 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.
-
+
@param[in] Private The pointer to the driver's private data.
@param[in] BufferSize The size of Buffer in bytes.
@param[in] Buffer The base address of the RAM disk.
@@ -1287,7 +1287,7 @@ HttpBootRegisterRamDisk (
EFI_STATUS Status;
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
EFI_GUID *RamDiskType;
-
+
ASSERT (Private != NULL);
ASSERT (Buffer != NULL);
ASSERT (BufferSize != 0);
@@ -1305,7 +1305,7 @@ HttpBootRegisterRamDisk (
} else {
return EFI_UNSUPPORTED;
}
-
+
Status = RamDisk->Register (
(UINTN)Buffer,
(UINT64)BufferSize,
@@ -1322,7 +1322,7 @@ HttpBootRegisterRamDisk (
/**
Indicate if the HTTP status code indicates a redirection.
-
+
@param[in] StatusCode HTTP status code from server.
@return TRUE if it's redirection.
diff --git a/NetworkPkg/HttpBootDxe/HttpBootSupport.h b/NetworkPkg/HttpBootDxe/HttpBootSupport.h
index 9b7acd9e1b..72a2f1f25a 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootSupport.h
+++ b/NetworkPkg/HttpBootDxe/HttpBootSupport.h
@@ -1,13 +1,13 @@
/** @file
Support functions declaration for UEFI HTTP boot driver.
-Copyright (c) 2015 - 2017, 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.
+Copyright (c) 2015 - 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,
+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.
**/
@@ -107,7 +107,7 @@ typedef struct {
@param[in] MaxHeaderCount The maximun number of HTTP header in this holder.
@return A pointer of the HTTP header holder or NULL if failed.
-
+
**/
HTTP_IO_HEADER *
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.
@@ -129,14 +129,14 @@ HttpBootFreeHeader (
Set or update a HTTP header with the field name and corresponding value.
@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.
@retval EFI_SUCCESS The HTTP header has been set or updated.
@retval EFI_INVALID_PARAMETER Any input parameter is invalid.
@retval EFI_OUT_OF_RESOURCES Insufficient resource to complete the operation.
@retval Other Unexpected error happened.
-
+
**/
EFI_STATUS
HttpBootSetHeader (
@@ -159,7 +159,7 @@ typedef enum {
@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] Context The Callback Context pointer.
-
+
@retval EFI_SUCCESS Tells the HttpIo to continue the HTTP process.
@retval Others Tells the HttpIo to abort the current HTTP process.
**/
@@ -212,7 +212,7 @@ typedef struct {
EFI_HANDLE Image;
EFI_HANDLE Controller;
EFI_HANDLE Handle;
-
+
EFI_HTTP_PROTOCOL *Http;
HTTP_IO_CALLBACK Callback;
@@ -250,13 +250,13 @@ typedef struct {
@retval EFI_SUCCESS Operation succeeded.
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
- @retval Others Other errors as indicated.
+ @retval Others Other errors as indicated.
**/
EFI_STATUS
HttpBootDns (
IN HTTP_BOOT_PRIVATE_DATA *Private,
IN CHAR16 *HostName,
- OUT EFI_IPv6_ADDRESS *IpAddress
+ OUT EFI_IPv6_ADDRESS *IpAddress
);
/**
@@ -285,7 +285,7 @@ HttpBootCommonNotify (
HTTP_IO_CALLBACK_EVENT happened.
@param[in] Context The Context data which will be passed to the Callback function.
@param[out] HttpIo The HTTP_IO.
-
+
@retval EFI_SUCCESS The HTTP_IO is created and configured.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@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.
@@ -318,14 +318,14 @@ HttpIoDestroyIo (
/**
Synchronously send a HTTP REQUEST message to the server.
-
+
@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] 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] 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_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@@ -345,12 +345,12 @@ HttpIoSendRequest (
/**
Synchronously receive a HTTP RESPONSE message from the server.
-
+
@param[in] HttpIo The HttpIo wrapping the HTTP service.
@param[in] RecvMsgHeader TRUE to receive a new HTTP response (from message header).
FALSE to continue receive the previous response message.
@param[out] ResponseData Point to a wrapper of the received response data.
-
+
@retval EFI_SUCCESS The HTTP response is received.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@@ -369,7 +369,7 @@ HttpIoRecvResponse (
This function checks the HTTP(S) URI scheme.
@param[in] Uri The pointer to the URI string.
-
+
@retval EFI_SUCCESS The URI scheme is valid.
@retval EFI_INVALID_PARAMETER The URI scheme is not HTTP or HTTPS.
@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.
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[out] UriAddress The URI address string extract from the device path.
-
+
@retval EFI_SUCCESS The URI string is returned.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@@ -403,11 +403,11 @@ HttpBootParseFilePath (
and also the image's URI info.
@param[in] Uri The pointer to the image's URI string.
- @param[in] UriParser URI Parse result returned by NetHttpParseUrl().
- @param[in] HeaderCount Number of HTTP header structures in Headers list.
+ @param[in] UriParser URI Parse result returned by NetHttpParseUrl().
+ @param[in] HeaderCount Number of HTTP header structures in Headers list.
@param[in] Headers Array containing list of HTTP headers.
@param[out] ImageType The image type of the downloaded file.
-
+
@retval EFI_SUCCESS The image type is returned in ImageType.
@retval EFI_INVALID_PARAMETER ImageType, Uri or UriParser 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.
-
+
@param[in] Private The pointer to the driver's private data.
@param[in] BufferSize The size of Buffer in bytes.
@param[in] Buffer The base address of the RAM disk.
@@ -448,7 +448,7 @@ HttpBootRegisterRamDisk (
/**
Indicate if the HTTP status code indicates a redirection.
-
+
@param[in] StatusCode HTTP status code from server.
@return TRUE if it's redirection.
diff --git a/NetworkPkg/HttpDxe/ComponentName.c b/NetworkPkg/HttpDxe/ComponentName.c
index fdd2e7f344..fb3c5a3a8b 100644
--- a/NetworkPkg/HttpDxe/ComponentName.c
+++ b/NetworkPkg/HttpDxe/ComponentName.c
@@ -2,7 +2,7 @@
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 the terms and conditions of the BSD License
@@ -19,7 +19,7 @@
///
/// Component Name Protocol instance
///
-GLOBAL_REMOVE_IF_UNREFERENCED
+GLOBAL_REMOVE_IF_UNREFERENCED
EFI_COMPONENT_NAME_PROTOCOL gHttpDxeComponentName = {
(EFI_COMPONENT_NAME_GET_DRIVER_NAME) HttpDxeComponentNameGetDriverName,
(EFI_COMPONENT_NAME_GET_CONTROLLER_NAME) HttpDxeComponentNameGetControllerName,
@@ -29,7 +29,7 @@ EFI_COMPONENT_NAME_PROTOCOL gHttpDxeComponentName = {
///
/// Component Name 2 Protocol instance
///
-GLOBAL_REMOVE_IF_UNREFERENCED
+GLOBAL_REMOVE_IF_UNREFERENCED
EFI_COMPONENT_NAME2_PROTOCOL gHttpDxeComponentName2 = {
HttpDxeComponentNameGetDriverName,
HttpDxeComponentNameGetControllerName,
@@ -39,7 +39,7 @@ EFI_COMPONENT_NAME2_PROTOCOL gHttpDxeComponentName2 = {
///
/// Table of driver names
///
-GLOBAL_REMOVE_IF_UNREFERENCED
+GLOBAL_REMOVE_IF_UNREFERENCED
EFI_UNICODE_STRING_TABLE mHttpDxeDriverNameTable[] = {
{ "eng;en", (CHAR16 *) L"HttpDxe" },
{ NULL, NULL }
diff --git a/NetworkPkg/HttpDxe/HttpDns.c b/NetworkPkg/HttpDxe/HttpDns.c
index 59cd7b3251..d0d57a5b2d 100644
--- a/NetworkPkg/HttpDxe/HttpDns.c
+++ b/NetworkPkg/HttpDxe/HttpDns.c
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -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_DEVICE_ERROR An unexpected network error occurred.
@retval Others Other errors as indicated.
-
+
**/
EFI_STATUS
HttpDns4 (
IN HTTP_PROTOCOL *HttpInstance,
IN CHAR16 *HostName,
- OUT EFI_IPv4_ADDRESS *IpAddress
+ OUT EFI_IPv4_ADDRESS *IpAddress
)
{
EFI_STATUS Status;
@@ -45,7 +45,7 @@ HttpDns4 (
UINTN DnsServerListCount;
EFI_IPv4_ADDRESS *DnsServerList;
UINTN DataSize;
-
+
Service = HttpInstance->Service;
ASSERT (Service != NULL);
@@ -82,7 +82,7 @@ HttpDns4 (
Dns4Handle = NULL;
Dns4 = NULL;
-
+
//
// Create a DNS child instance and get the protocol.
//
@@ -94,7 +94,7 @@ HttpDns4 (
);
if (EFI_ERROR (Status)) {
goto Exit;
- }
+ }
Status = gBS->OpenProtocol (
Dns4Handle,
@@ -128,7 +128,7 @@ HttpDns4 (
if (EFI_ERROR (Status)) {
goto Exit;
}
-
+
//
// Create event to set the is done flag when name resolution is finished.
//
@@ -161,7 +161,7 @@ HttpDns4 (
//
// Name resolution is done, check result.
//
- Status = Token.Status;
+ Status = Token.Status;
if (!EFI_ERROR (Status)) {
if (Token.RspData.H2AData == NULL) {
Status = EFI_DEVICE_ERROR;
@@ -179,7 +179,7 @@ HttpDns4 (
}
Exit:
-
+
if (Token.Event != NULL) {
gBS->CloseEvent (Token.Event);
}
@@ -192,7 +192,7 @@ Exit:
if (Dns4 != NULL) {
Dns4->Configure (Dns4, NULL);
-
+
gBS->CloseProtocol (
Dns4Handle,
&gEfiDns4ProtocolGuid,
@@ -213,7 +213,7 @@ Exit:
if (DnsServerList != NULL) {
FreePool (DnsServerList);
}
-
+
return Status;
}
@@ -228,13 +228,13 @@ Exit:
@retval EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
@retval Others Other errors as indicated.
-
+
**/
EFI_STATUS
HttpDns6 (
IN HTTP_PROTOCOL *HttpInstance,
IN CHAR16 *HostName,
- OUT EFI_IPv6_ADDRESS *IpAddress
+ OUT EFI_IPv6_ADDRESS *IpAddress
)
{
EFI_STATUS Status;
@@ -248,7 +248,7 @@ HttpDns6 (
UINTN DnsServerListCount;
UINTN DataSize;
BOOLEAN IsDone;
-
+
Service = HttpInstance->Service;
ASSERT (Service != NULL);
@@ -258,7 +258,7 @@ HttpDns6 (
Dns6 = NULL;
Dns6Handle = NULL;
ZeroMem (&Token, sizeof (EFI_DNS6_COMPLETION_TOKEN));
-
+
//
// Get DNS server list from EFI IPv6 Configuration protocol.
//
@@ -273,7 +273,7 @@ HttpDns6 (
DnsServerList = AllocatePool (DataSize);
if (DnsServerList == NULL) {
return EFI_OUT_OF_RESOURCES;
- }
+ }
Status = Ip6Config->GetData (Ip6Config, Ip6ConfigDataTypeDnsServer, &DataSize, DnsServerList);
if (EFI_ERROR (Status)) {
@@ -296,8 +296,8 @@ HttpDns6 (
);
if (EFI_ERROR (Status)) {
goto Exit;
- }
-
+ }
+
Status = gBS->OpenProtocol (
Dns6Handle,
&gEfiDns6ProtocolGuid,
@@ -358,7 +358,7 @@ HttpDns6 (
//
// Name resolution is done, check result.
//
- Status = Token.Status;
+ Status = Token.Status;
if (!EFI_ERROR (Status)) {
if (Token.RspData.H2AData == NULL) {
Status = EFI_DEVICE_ERROR;
@@ -374,7 +374,7 @@ HttpDns6 (
IP6_COPY_ADDRESS (IpAddress, Token.RspData.H2AData->IpList);
Status = EFI_SUCCESS;
}
-
+
Exit:
if (Token.Event != NULL) {
@@ -389,7 +389,7 @@ Exit:
if (Dns6 != NULL) {
Dns6->Configure (Dns6, NULL);
-
+
gBS->CloseProtocol (
Dns6Handle,
&gEfiDns6ProtocolGuid,
@@ -410,6 +410,6 @@ Exit:
if (DnsServerList != NULL) {
FreePool (DnsServerList);
}
-
- return Status;
+
+ return Status;
}
diff --git a/NetworkPkg/HttpDxe/HttpDns.h b/NetworkPkg/HttpDxe/HttpDns.h
index fa0c8f4a99..2dc178af00 100644
--- a/NetworkPkg/HttpDxe/HttpDns.h
+++ b/NetworkPkg/HttpDxe/HttpDns.h
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -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_DEVICE_ERROR An unexpected network error occurred.
@retval Others Other errors as indicated.
-
+
**/
EFI_STATUS
HttpDns4 (
IN HTTP_PROTOCOL *HttpInstance,
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_DEVICE_ERROR An unexpected network error occurred.
@retval Others Other errors as indicated.
-
+
**/
EFI_STATUS
HttpDns6 (
IN HTTP_PROTOCOL *HttpInstance,
IN CHAR16 *HostName,
- OUT EFI_IPv6_ADDRESS *IpAddress
+ OUT EFI_IPv6_ADDRESS *IpAddress
);
-#endif \ No newline at end of file
+#endif
diff --git a/NetworkPkg/HttpDxe/HttpDriver.c b/NetworkPkg/HttpDxe/HttpDriver.c
index 5727526273..8df984db41 100644
--- a/NetworkPkg/HttpDxe/HttpDriver.c
+++ b/NetworkPkg/HttpDxe/HttpDriver.c
@@ -1,7 +1,7 @@
/** @file
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>
This program and the accompanying materials
@@ -73,7 +73,7 @@ HttpCreateService (
HttpService->ControllerHandle = Controller;
HttpService->ChildrenNumber = 0;
InitializeListHead (&HttpService->ChildrenList);
-
+
*ServiceData = HttpService;
return EFI_SUCCESS;
}
@@ -91,8 +91,8 @@ HttpCleanService (
IN HTTP_SERVICE *HttpService,
IN BOOLEAN UsingIpv6
)
-{
-
+{
+
if (HttpService == NULL) {
return ;
}
@@ -104,14 +104,14 @@ HttpCleanService (
HttpService->Ip4DriverBindingHandle,
HttpService->ControllerHandle
);
-
+
NetLibDestroyServiceChild (
HttpService->ControllerHandle,
HttpService->Ip4DriverBindingHandle,
&gEfiTcp4ServiceBindingProtocolGuid,
HttpService->Tcp4ChildHandle
);
-
+
HttpService->Tcp4ChildHandle = NULL;
}
} else {
@@ -122,18 +122,18 @@ HttpCleanService (
HttpService->Ip6DriverBindingHandle,
HttpService->ControllerHandle
);
-
+
NetLibDestroyServiceChild (
HttpService->ControllerHandle,
HttpService->Ip6DriverBindingHandle,
&gEfiTcp6ServiceBindingProtocolGuid,
HttpService->Tcp6ChildHandle
);
-
+
HttpService->Tcp6ChildHandle = NULL;
}
}
-
+
}
/**
@@ -152,11 +152,11 @@ HttpUtilitiesInstalledCallback (
)
{
gBS->LocateProtocol (
- &gEfiHttpUtilitiesProtocolGuid,
- NULL,
+ &gEfiHttpUtilitiesProtocolGuid,
+ NULL,
(VOID **) &mHttpUtilities
);
-
+
//
// Close the event if Http utilities protocol is loacted.
//
@@ -183,13 +183,13 @@ HttpDxeDriverEntryPoint (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
-{
+{
EFI_STATUS Status;
VOID *Registration;
gBS->LocateProtocol (
- &gEfiHttpUtilitiesProtocolGuid,
- NULL,
+ &gEfiHttpUtilitiesProtocolGuid,
+ NULL,
(VOID **) &mHttpUtilities
);
@@ -246,7 +246,7 @@ HttpDxeDriverEntryPoint (
/**
Callback function which provided by user to remove one node in NetDestroyLinkList process.
-
+
@param[in] Entry The entry to be removed.
@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
device to be started.
@param[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
-
+
@retval EFI_SUCCESS This driver supports this device.
@retval EFI_UNSUPPORTED This driver does not support this device.
@@ -383,9 +383,9 @@ HttpDxeStart (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
ASSERT (HttpService != NULL);
-
+
//
// Install the HttpServiceBinding Protocol onto Controller
//
@@ -395,7 +395,7 @@ HttpDxeStart (
&HttpService->ServiceBinding,
NULL
);
-
+
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
@@ -414,11 +414,11 @@ HttpDxeStart (
&gEfiTcp4ServiceBindingProtocolGuid,
&HttpService->Tcp4ChildHandle
);
-
+
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
Status = gBS->OpenProtocol (
HttpService->Tcp4ChildHandle,
&gEfiTcp4ProtocolGuid,
@@ -427,11 +427,11 @@ HttpDxeStart (
ControllerHandle,
EFI_OPEN_PROTOCOL_BY_DRIVER
);
-
+
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
} else {
return EFI_ALREADY_STARTED;
}
@@ -450,11 +450,11 @@ HttpDxeStart (
&gEfiTcp6ServiceBindingProtocolGuid,
&HttpService->Tcp6ChildHandle
);
-
+
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
Status = gBS->OpenProtocol (
HttpService->Tcp6ChildHandle,
&gEfiTcp6ProtocolGuid,
@@ -463,11 +463,11 @@ HttpDxeStart (
ControllerHandle,
EFI_OPEN_PROTOCOL_BY_DRIVER
);
-
+
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
} else {
return EFI_ALREADY_STARTED;
}
@@ -475,16 +475,16 @@ HttpDxeStart (
}
return EFI_SUCCESS;
-
+
ON_ERROR:
-
+
if (HttpService != NULL) {
HttpCleanService (HttpService, UsingIpv6);
if (HttpService->Tcp4ChildHandle == NULL && HttpService->Tcp6ChildHandle == NULL) {
FreePool (HttpService);
}
}
-
+
return Status;
@@ -551,9 +551,9 @@ HttpDxeStop (
);
if (!EFI_ERROR (Status)) {
-
+
HttpService = HTTP_SERVICE_FROM_PROTOCOL (ServiceBinding);
-
+
if (NumberOfChildren != 0) {
//
// Destroy the HTTP child instance in ChildHandleBuffer.
@@ -569,9 +569,9 @@ HttpDxeStop (
NULL
);
} else {
-
+
HttpCleanService (HttpService, UsingIpv6);
-
+
if (HttpService->Tcp4ChildHandle == NULL && HttpService->Tcp6ChildHandle == NULL) {
gBS->UninstallProtocolInterface (
NicHandle,
@@ -581,41 +581,41 @@ HttpDxeStop (
FreePool (HttpService);
}
Status = EFI_SUCCESS;
- }
+ }
}
-
+
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.
- 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 and/or the services from the bus I/O abstraction attached to
- 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
- 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
- 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(),
- AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
- 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
+ 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 and/or the services from the bus I/O abstraction attached to
+ 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
+ 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
+ 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(),
+ AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
+ 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
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] ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by 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
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@@ -650,28 +650,28 @@ HttpDxeIp4DriverBindingSupported (
Starts a device controller or a bus controller.
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
- common boot service. It is legal to call Start() from other locations,
+ 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,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
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] ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For a bus driver, if this parameter is NULL, then handles
- for all the children of Controller are created by this driver.
- 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
- child device specified by the first Device Path Node of
+ @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
+ drivers. For a bus driver, if this parameter is NULL, then handles
+ for all the children of Controller are created by this driver.
+ 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
+ child device specified by the first Device Path Node of
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
driver.
@@ -700,10 +700,10 @@ HttpDxeIp4DriverBindingStart (
/**
Stops a device controller or a bus controller.
-
- 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
- into this common boot service. It is legal to call Stop() from other locations,
+
+ 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
+ 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.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
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
Start() function, and the Start() function must have called OpenProtocol() on
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] ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@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.
@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.
- 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 and/or the services from the bus I/O abstraction attached to
- 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
- 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
- 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(),
- AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
- 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
+ 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 and/or the services from the bus I/O abstraction attached to
+ 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
+ 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
+ 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(),
+ AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
+ 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
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] ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by 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
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@@ -791,7 +791,7 @@ HttpDxeIp6DriverBindingSupported (
IN EFI_HANDLE ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
)
-{
+{
return HttpDxeSupported (
This,
ControllerHandle,
@@ -805,28 +805,28 @@ HttpDxeIp6DriverBindingSupported (
Starts a device controller or a bus controller.
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
- common boot service. It is legal to call Start() from other locations,
+ 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,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
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] ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For a bus driver, if this parameter is NULL, then handles
- for all the children of Controller are created by this driver.
- 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
- child device specified by the first Device Path Node of
+ @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
+ drivers. For a bus driver, if this parameter is NULL, then handles
+ for all the children of Controller are created by this driver.
+ 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
+ child device specified by the first Device Path Node of
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
driver.
@@ -855,10 +855,10 @@ HttpDxeIp6DriverBindingStart (
/**
Stops a device controller or a bus controller.
-
- 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
- into this common boot service. It is legal to call Stop() from other locations,
+
+ 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
+ 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.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
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
Start() function, and the Start() function must have called OpenProtocol() on
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] ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@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.
@retval EFI_SUCCESS The device was stopped.
@@ -936,7 +936,7 @@ HttpServiceBindingCreateChild (
if (HttpInstance == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
HttpInstance->Signature = HTTP_PROTOCOL_SIGNATURE;
HttpInstance->Service = HttpService;
HttpInstance->Method = HttpMethodMax;
@@ -972,9 +972,9 @@ HttpServiceBindingCreateChild (
gBS->RestoreTPL (OldTpl);
return EFI_SUCCESS;
-
+
ON_ERROR:
-
+
NetMapClean (&HttpInstance->TxTokens);
NetMapClean (&HttpInstance->RxTokens);
FreePool (HttpInstance);
@@ -1010,7 +1010,7 @@ HttpServiceBindingDestroyChild (
EFI_HTTP_PROTOCOL *Http;
EFI_STATUS Status;
EFI_TPL OldTpl;
-
+
if ((This == NULL) || (ChildHandle == NULL)) {
return EFI_INVALID_PARAMETER;
}
@@ -1027,7 +1027,7 @@ HttpServiceBindingDestroyChild (
if (EFI_ERROR (Status)) {
return EFI_UNSUPPORTED;
}
-
+
HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (Http);
if (HttpInstance->Service != HttpService) {
return EFI_INVALID_PARAMETER;
@@ -1052,16 +1052,16 @@ HttpServiceBindingDestroyChild (
HttpInstance->InDestroy = FALSE;
return Status;
}
-
+
HttpCleanProtocol (HttpInstance);
-
+
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
-
+
RemoveEntryList (&HttpInstance->Link);
HttpService->ChildrenNumber--;
gBS->RestoreTPL (OldTpl);
-
+
FreePool (HttpInstance);
return EFI_SUCCESS;
}
diff --git a/NetworkPkg/HttpDxe/HttpDriver.h b/NetworkPkg/HttpDxe/HttpDriver.h
index 3b7a7a22a5..bf9d4db8b6 100644
--- a/NetworkPkg/HttpDxe/HttpDriver.h
+++ b/NetworkPkg/HttpDxe/HttpDriver.h
@@ -97,33 +97,33 @@ typedef struct {
} 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.
- 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 and/or the services from the bus I/O abstraction attached to
- 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
- 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
- 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(),
- AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
- 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
+ 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 and/or the services from the bus I/O abstraction attached to
+ 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
+ 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
+ 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(),
+ AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
+ 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
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] ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by 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
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@@ -150,28 +150,28 @@ HttpDxeIp4DriverBindingSupported (
Starts a device controller or a bus controller.
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
- common boot service. It is legal to call Start() from other locations,
+ 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,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
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] ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For a bus driver, if this parameter is NULL, then handles
- for all the children of Controller are created by this driver.
- 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
- child device specified by the first Device Path Node of
+ @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
+ drivers. For a bus driver, if this parameter is NULL, then handles
+ for all the children of Controller are created by this driver.
+ 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
+ child device specified by the first Device Path Node of
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
driver.
@@ -191,10 +191,10 @@ HttpDxeIp4DriverBindingStart (
/**
Stops a device controller or a bus controller.
-
- 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
- into this common boot service. It is legal to call Stop() from other locations,
+
+ 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
+ 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.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
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
Start() function, and the Start() function must have called OpenProtocol() on
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] ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@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.
@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.
- 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 and/or the services from the bus I/O abstraction attached to
- 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
- 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
- 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(),
- AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
- 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
+ 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 and/or the services from the bus I/O abstraction attached to
+ 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
+ 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
+ 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(),
+ AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
+ 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
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] ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by 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
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@@ -278,28 +278,28 @@ HttpDxeIp6DriverBindingSupported (
Starts a device controller or a bus controller.
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
- common boot service. It is legal to call Start() from other locations,
+ 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,
but the following calling restrictions must be followed, or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
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] ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For a bus driver, if this parameter is NULL, then handles
- for all the children of Controller are created by this driver.
- 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
- child device specified by the first Device Path Node of
+ @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
+ drivers. For a bus driver, if this parameter is NULL, then handles
+ for all the children of Controller are created by this driver.
+ 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
+ child device specified by the first Device Path Node of
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
driver.
@@ -320,10 +320,10 @@ HttpDxeIp6DriverBindingStart (
/**
Stops a device controller or a bus controller.
-
- 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
- into this common boot service. It is legal to call Stop() from other locations,
+
+ 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
+ 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.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
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
Start() function, and the Start() function must have called OpenProtocol() on
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] ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@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.
@retval EFI_SUCCESS The device was stopped.
diff --git a/NetworkPkg/HttpDxe/HttpDxe.inf b/NetworkPkg/HttpDxe/HttpDxe.inf
index 6c0688d130..b90a7ef4f8 100644
--- a/NetworkPkg/HttpDxe/HttpDxe.inf
+++ b/NetworkPkg/HttpDxe/HttpDxe.inf
@@ -78,7 +78,7 @@
gEfiCertX509Guid ## SOMETIMES_CONSUMES ## GUID # Check the cert type
[Pcd]
- gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections ## CONSUMES
+ gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections ## CONSUMES
[UserExtensions.TianoCore."ExtraFiles"]
HttpDxeExtra.uni
diff --git a/NetworkPkg/HttpDxe/HttpDxe.uni b/NetworkPkg/HttpDxe/HttpDxe.uni
index 8aee8f72a6..e8fc3fe8db 100644
--- a/NetworkPkg/HttpDxe/HttpDxe.uni
+++ b/NetworkPkg/HttpDxe/HttpDxe.uni
@@ -2,15 +2,15 @@
// UEFI HTTP DXE Driver.
//
// 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
// 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
// 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.
//
diff --git a/NetworkPkg/HttpDxe/HttpDxeExtra.uni b/NetworkPkg/HttpDxe/HttpDxeExtra.uni
index 2e96fc8aa5..bd50de2269 100644
--- a/NetworkPkg/HttpDxe/HttpDxeExtra.uni
+++ b/NetworkPkg/HttpDxe/HttpDxeExtra.uni
@@ -1,7 +1,7 @@
// /** @file
// 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
// are licensed and made available under the terms and conditions of the BSD License
@@ -13,8 +13,8 @@
//
// **/
-#string STR_PROPERTIES_MODULE_NAME
-#language en-US
+#string STR_PROPERTIES_MODULE_NAME
+#language en-US
"UEFI HTTP DXE"
diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c
index a2af59674a..f70e116f38 100644
--- a/NetworkPkg/HttpDxe/HttpImpl.c
+++ b/NetworkPkg/HttpDxe/HttpImpl.c
@@ -33,17 +33,17 @@ EFI_HTTP_PROTOCOL mEfiHttpTemplate = {
@param[in] This Pointer to EFI_HTTP_PROTOCOL instance.
@param[out] HttpConfigData Point to buffer for operational parameters of this
- HTTP instance. It is the responsibility of the caller
- to allocate the memory for HttpConfigData and
- HttpConfigData->AccessPoint.IPv6Node/IPv4Node. In fact,
- it is recommended to allocate sufficient memory to record
- IPv6Node since it is big enough for all possibilities.
+ HTTP instance. It is the responsibility of the caller
+ to allocate the memory for HttpConfigData and
+ HttpConfigData->AccessPoint.IPv6Node/IPv4Node. In fact,
+ it is recommended to allocate sufficient memory to record
+ IPv6Node since it is big enough for all possibilities.
@retval EFI_SUCCESS Operation succeeded.
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
This is NULL.
HttpConfigData is NULL.
- HttpConfigData->AccessPoint.IPv4Node or
+ HttpConfigData->AccessPoint.IPv4Node or
HttpConfigData->AccessPoint.IPv6Node is NULL.
@retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been started.
@@ -132,16 +132,16 @@ EFIAPI
EfiHttpConfigure (
IN EFI_HTTP_PROTOCOL *This,
IN EFI_HTTP_CONFIG_DATA *HttpConfigData OPTIONAL
- )
+ )
{
HTTP_PROTOCOL *HttpInstance;
EFI_STATUS Status;
-
+
//
// Check input parameters.
//
if (This == NULL ||
- (HttpConfigData != NULL &&
+ (HttpConfigData != NULL &&
((HttpConfigData->LocalAddressIsIPv6 && HttpConfigData->AccessPoint.IPv6Node == NULL) ||
(!HttpConfigData->LocalAddressIsIPv6 && HttpConfigData->AccessPoint.IPv4Node == NULL)))) {
return EFI_INVALID_PARAMETER;
@@ -166,8 +166,8 @@ EfiHttpConfigure (
HttpInstance->HttpVersion = HttpConfigData->HttpVersion;
HttpInstance->TimeOutMillisec = HttpConfigData->TimeOutMillisec;
HttpInstance->LocalAddressIsIPv6 = HttpConfigData->LocalAddressIsIPv6;
-
- if (HttpConfigData->LocalAddressIsIPv6) {
+
+ if (HttpConfigData->LocalAddressIsIPv6) {
CopyMem (
&HttpInstance->Ipv6Node,
HttpConfigData->AccessPoint.IPv6Node,
@@ -180,7 +180,7 @@ EfiHttpConfigure (
sizeof (HttpInstance->IPv4Node)
);
}
-
+
//
// Creat Tcp child
//
@@ -188,7 +188,7 @@ EfiHttpConfigure (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
HttpInstance->State = HTTP_STATE_HTTP_CONFIGED;
return EFI_SUCCESS;
@@ -201,7 +201,7 @@ EfiHttpConfigure (
return EFI_SUCCESS;
}
}
-
+
/**
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.
//
if ((Request != NULL) && (Request->Method != HttpMethodGet) &&
- (Request->Method != HttpMethodHead) && (Request->Method != HttpMethodDelete) &&
- (Request->Method != HttpMethodPut) && (Request->Method != HttpMethodPost) &&
+ (Request->Method != HttpMethodHead) && (Request->Method != HttpMethodDelete) &&
+ (Request->Method != HttpMethodPut) && (Request->Method != HttpMethodPost) &&
(Request->Method != HttpMethodPatch)) {
return EFI_UNSUPPORTED;
}
@@ -307,8 +307,8 @@ EfiHttpRequest (
//
// Request would be NULL only for PUT/POST/PATCH operation (in the current implementation)
//
- if ((HttpInstance->Method != HttpMethodPut) &&
- (HttpInstance->Method != HttpMethodPost) &&
+ if ((HttpInstance->Method != HttpMethodPut) &&
+ (HttpInstance->Method != HttpMethodPost) &&
(HttpInstance->Method != HttpMethodPatch)) {
return EFI_INVALID_PARAMETER;
}
@@ -358,7 +358,7 @@ EfiHttpRequest (
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.
//
HttpInstance->UseHttps = IsHttpsUrl (Url);
@@ -367,7 +367,7 @@ EfiHttpRequest (
// HTTP is disabled, return directly if the URI is not HTTPS.
//
if (!PcdGetBool (PcdAllowHttpConnections) && !(HttpInstance->UseHttps)) {
-
+
DEBUG ((EFI_D_ERROR, "EfiHttpRequest: HTTP is disabled.\n"));
return EFI_ACCESS_DENIED;
@@ -434,9 +434,9 @@ EfiHttpRequest (
ReConfigure = FALSE;
} else {
if ((HttpInstance->RemotePort == RemotePort) &&
- (AsciiStrCmp (HttpInstance->RemoteHost, HostName) == 0) &&
- (!HttpInstance->UseHttps || (HttpInstance->UseHttps &&
- !TlsConfigure &&
+ (AsciiStrCmp (HttpInstance->RemoteHost, HostName) == 0) &&
+ (!HttpInstance->UseHttps || (HttpInstance->UseHttps &&
+ !TlsConfigure &&
HttpInstance->TlsSessionState == EfiTlsSessionDataTransferring))) {
//
// Host Name and port number of the request URL are the same with previous call to Request().
@@ -495,7 +495,7 @@ EfiHttpRequest (
}
}
}
- }
+ }
if (Configure) {
//
@@ -514,14 +514,14 @@ EfiHttpRequest (
Status = EFI_OUT_OF_RESOURCES;
goto Error1;
}
-
+
AsciiStrToUnicodeStrS (HostName, HostNameStr, HostNameSize);
if (!HttpInstance->LocalAddressIsIPv6) {
Status = HttpDns4 (HttpInstance, HostNameStr, &HttpInstance->RemoteAddr);
} else {
Status = HttpDns6 (HttpInstance, HostNameStr, &HttpInstance->RemoteIpv6Addr);
}
-
+
FreePool (HostNameStr);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "Error: Could not retrieve the host address from DNS server.\n"));
@@ -553,10 +553,10 @@ EfiHttpRequest (
if (EFI_ERROR (Status)) {
goto Error1;
}
-
+
TlsCloseTxRxEvent (HttpInstance);
}
-
+
HttpCloseConnection (HttpInstance);
EfiHttpCancel (This, NULL);
}
@@ -575,11 +575,11 @@ EfiHttpRequest (
if (Request != NULL) {
Wrap->TcpWrap.Method = Request->Method;
}
-
+
Status = HttpInitSession (
- HttpInstance,
- Wrap,
- Configure || ReConfigure,
+ HttpInstance,
+ Wrap,
+ Configure || ReConfigure,
TlsConfigure
);
if (EFI_ERROR (Status)) {
@@ -588,14 +588,14 @@ EfiHttpRequest (
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);
if (EFI_ERROR (Status)) {
goto Error1;
}
}
-
+
//
// Create request message.
//
@@ -647,11 +647,11 @@ EfiHttpRequest (
RequestMsgSize
);
if (EFI_ERROR (Status)) {
- goto Error5;
+ goto Error5;
}
DispatchDpc ();
-
+
if (HostName != NULL) {
FreePool (HostName);
}
@@ -659,7 +659,7 @@ EfiHttpRequest (
if (UrlParser != NULL) {
HttpUrlFreeParser (UrlParser);
}
-
+
return EFI_SUCCESS;
Error5:
@@ -674,7 +674,7 @@ Error5:
Error4:
if (RequestMsg != NULL) {
FreePool (RequestMsg);
- }
+ }
Error3:
if (HttpInstance->UseHttps) {
@@ -684,7 +684,7 @@ Error3:
Error2:
HttpCloseConnection (HttpInstance);
-
+
HttpCloseTcpConnCloseEvent (HttpInstance);
if (NULL != Wrap->TcpWrap.Tx4Token.CompletionToken.Event) {
gBS->CloseEvent (Wrap->TcpWrap.Tx4Token.CompletionToken.Event);
@@ -707,12 +707,12 @@ Error1:
}
return Status;
-
+
}
/**
- Cancel a user's Token.
-
+ Cancel a user's Token.
+
@param[in] Map The HTTP instance's token queue.
@param[in] Item Object container for one HTTP token and token's wrap.
@param[in] Context The user's token to cancel.
@@ -746,7 +746,7 @@ HttpCancelTokens (
Wrap = (HTTP_TOKEN_WRAP *) Item->Value;
ASSERT (Wrap != NULL);
HttpInstance = Wrap->HttpInstance;
-
+
if (!HttpInstance->LocalAddressIsIPv6) {
if (Wrap->TcpWrap.Rx4Token.CompletionToken.Event != NULL) {
//
@@ -781,7 +781,7 @@ HttpCancelTokens (
return EFI_ABORTED;
}
- return EFI_SUCCESS;
+ return EFI_SUCCESS;
}
/**
@@ -794,7 +794,7 @@ HttpCancelTokens (
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.
**/
@@ -814,7 +814,7 @@ HttpCancel (
if (Token != NULL) {
if (Status == EFI_ABORTED) {
return EFI_SUCCESS;
- }
+ }
} else {
return Status;
}
@@ -843,7 +843,7 @@ HttpCancel (
HttpInstance->Tcp6->Cancel (HttpInstance->Tcp6, &HttpInstance->Tcp6TlsRxToken.CompletionToken);
}
}
-
+
return EFI_SUCCESS;
}
@@ -936,7 +936,7 @@ HttpBodyParserCallback (
} else {
Wrap->HttpInstance->NextMsg = NULL;
}
-
+
//
// Free Tx4Token or Tx6Token since already received corrsponding HTTP response.
@@ -953,7 +953,7 @@ HttpBodyParserCallback (
@retval EFI_SUCCESS Allocation succeeded.
@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.
**/
@@ -983,7 +983,7 @@ HttpResponseWorker (
if (Wrap == NULL || Wrap->HttpInstance == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
HttpInstance = Wrap->HttpInstance;
Token = Wrap->HttpToken;
HttpMsg = Token->Message;
@@ -998,7 +998,7 @@ HttpResponseWorker (
ValueInItem = NULL;
Fragment.Len = 0;
Fragment.Bulk = NULL;
-
+
if (HttpMsg->Data.Response != NULL) {
//
// Check whether we have cached header from previous call.
@@ -1025,8 +1025,8 @@ HttpResponseWorker (
//
// 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->HttpHeaders = &HttpHeaders;
@@ -1239,7 +1239,7 @@ HttpResponseWorker (
//
// 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 {
BodyLen = HttpInstance->CacheLen - HttpInstance->CacheOffset;
}
@@ -1274,7 +1274,7 @@ HttpResponseWorker (
//
Status = EFI_SUCCESS;
goto Exit;
- }
+ }
if (BodyLen == 0 && HttpInstance->MsgParser == NULL) {
//
@@ -1282,8 +1282,8 @@ HttpResponseWorker (
//
HttpMsg->BodyLength = 0;
Status = EFI_SUCCESS;
- goto Exit;
- }
+ goto Exit;
+ }
}
ASSERT (HttpInstance->MsgParser != NULL);
@@ -1297,7 +1297,7 @@ HttpResponseWorker (
if (EFI_ERROR (Status)) {
goto Error2;
}
-
+
} else {
if (HttpInstance->TimeoutEvent == NULL) {
//
@@ -1322,11 +1322,11 @@ HttpResponseWorker (
if (EFI_ERROR (Status)) {
goto Error2;
}
-
+
Status = HttpsReceive (HttpInstance, &Fragment, HttpInstance->TimeoutEvent);
gBS->SetTimer (HttpInstance->TimeoutEvent, TimerCancel, 0);
-
+
if (EFI_ERROR (Status)) {
goto Error2;
}
@@ -1357,19 +1357,19 @@ HttpResponseWorker (
if (HttpInstance->NextMsg != NULL) {
HttpMsg->BodyLength = MIN ((UINTN) HttpInstance->NextMsg - (UINTN) Fragment.Bulk, HttpMsg->BodyLength);
CopyMem (HttpMsg->Body, Fragment.Bulk, HttpMsg->BodyLength);
-
+
HttpInstance->CacheLen = Fragment.Len - HttpMsg->BodyLength;
if (HttpInstance->CacheLen != 0) {
if (HttpInstance->CacheBody != NULL) {
FreePool (HttpInstance->CacheBody);
}
-
+
HttpInstance->CacheBody = AllocateZeroPool (HttpInstance->CacheLen);
if (HttpInstance->CacheBody == NULL) {
Status = EFI_OUT_OF_RESOURCES;
goto Error2;
}
-
+
CopyMem (HttpInstance->CacheBody, Fragment.Bulk + HttpMsg->BodyLength, HttpInstance->CacheLen);
HttpInstance->CacheOffset = 0;
@@ -1383,7 +1383,7 @@ HttpResponseWorker (
if (HttpInstance->CacheBody != NULL) {
FreePool (HttpInstance->CacheBody);
}
-
+
HttpInstance->CacheBody = AllocateZeroPool (HttpInstance->CacheLen);
if (HttpInstance->CacheBody == NULL) {
Status = EFI_OUT_OF_RESOURCES;
@@ -1438,7 +1438,7 @@ Error:
} else {
FreePool (Wrap);
}
-
+
if (HttpHeaders != NULL) {
FreePool (HttpHeaders);
HttpHeaders = NULL;
@@ -1467,7 +1467,7 @@ Error:
gBS->SignalEvent (Token->Event);
- return Status;
+ return Status;
}
@@ -1539,7 +1539,7 @@ EfiHttpResponse (
if (HttpMsg == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);
if (HttpInstance->State != HTTP_STATE_TCP_CONNECTED) {
@@ -1550,7 +1550,7 @@ EfiHttpResponse (
// Check whether the token already existed.
//
if (EFI_ERROR (NetMapIterate (&HttpInstance->RxTokens, HttpTokenExist, Token))) {
- return EFI_ACCESS_DENIED;
+ return EFI_ACCESS_DENIED;
}
Wrap = AllocateZeroPool (sizeof (HTTP_TOKEN_WRAP));
@@ -1562,8 +1562,8 @@ EfiHttpResponse (
Wrap->HttpToken = Token;
//
- // 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
+ // 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
// related messages. It should be a blocking response.
//
if (!HttpInstance->UseHttps) {
@@ -1597,9 +1597,9 @@ Error:
gBS->CloseEvent (Wrap->TcpWrap.Rx6Token.CompletionToken.Event);
}
FreePool (Wrap);
- }
+ }
- return Status;
+ return Status;
}
/**
@@ -1640,7 +1640,7 @@ EfiHttpPoll (
if (HttpInstance->State != HTTP_STATE_TCP_CONNECTED) {
return EFI_NOT_STARTED;
}
-
+
if (HttpInstance->LocalAddressIsIPv6) {
if (HttpInstance->Tcp6 == NULL) {
return EFI_NOT_STARTED;
@@ -1652,8 +1652,8 @@ EfiHttpPoll (
}
Status = HttpInstance->Tcp4->Poll (HttpInstance->Tcp4);
}
-
+
DispatchDpc ();
-
+
return Status;
}
diff --git a/NetworkPkg/HttpDxe/HttpImpl.h b/NetworkPkg/HttpDxe/HttpImpl.h
index 6550ce0375..de6f597b95 100644
--- a/NetworkPkg/HttpDxe/HttpImpl.h
+++ b/NetworkPkg/HttpDxe/HttpImpl.h
@@ -1,8 +1,8 @@
/** @file
The header files of implementation of EFI_HTTP_PROTOCOL protocol interfaces.
- Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
- (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
+ Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
+ (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
This program and the accompanying materials
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[out] HttpConfigData Point to buffer for operational parameters of this
- HTTP instance. It is the responsibility of the caller
- to allocate the memory for HttpConfigData and
- HttpConfigData->AccessPoint.IPv6Node/IPv4Node. In fact,
- it is recommended to allocate sufficient memory to record
+ HTTP instance. It is the responsibility of the caller
+ to allocate the memory for HttpConfigData and
+ HttpConfigData->AccessPoint.IPv6Node/IPv4Node. In fact,
+ it is recommended to allocate sufficient memory to record
IPv6Node since it is big enough for all possibilities.
@retval EFI_SUCCESS Operation succeeded.
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
This is NULL.
HttpConfigData is NULL.
- HttpConfigData->AccessPoint.IPv4Node or
+ HttpConfigData->AccessPoint.IPv4Node or
HttpConfigData->AccessPoint.IPv6Node is NULL.
@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
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.
@param[in] This Pointer to EFI_HTTP_PROTOCOL instance.
diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c
index 35c4a166c4..5356cd35c0 100644
--- a/NetworkPkg/HttpDxe/HttpProto.c
+++ b/NetworkPkg/HttpDxe/HttpProto.c
@@ -16,7 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#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] Context The context.
@@ -54,10 +54,10 @@ HttpTcpTransmitNotifyDpc (
if (Context == NULL) {
return ;
}
-
+
Wrap = (HTTP_TOKEN_WRAP *) Context;
HttpInstance = Wrap->HttpInstance;
-
+
if (!HttpInstance->LocalAddressIsIPv6) {
Wrap->HttpToken->Status = Wrap->TcpWrap.Tx4Token.CompletionToken.Status;
gBS->SignalEvent (Wrap->HttpToken->Event);
@@ -72,11 +72,11 @@ HttpTcpTransmitNotifyDpc (
if (Wrap->TcpWrap.Tx4Token.CompletionToken.Event != NULL) {
gBS->CloseEvent (Wrap->TcpWrap.Tx4Token.CompletionToken.Event);
}
-
+
} else {
Wrap->HttpToken->Status = Wrap->TcpWrap.Tx6Token.CompletionToken.Status;
gBS->SignalEvent (Wrap->HttpToken->Event);
-
+
//
// Free resources.
//
@@ -86,7 +86,7 @@ HttpTcpTransmitNotifyDpc (
if (Wrap->TcpWrap.Tx6Token.CompletionToken.Event != NULL) {
gBS->CloseEvent (Wrap->TcpWrap.Tx6Token.CompletionToken.Event);
- }
+ }
}
@@ -145,11 +145,11 @@ HttpTcpReceiveNotifyDpc (
Wrap = (HTTP_TOKEN_WRAP *) Context;
HttpInstance = Wrap->HttpInstance;
UsingIpv6 = HttpInstance->LocalAddressIsIPv6;
-
+
if (UsingIpv6) {
gBS->CloseEvent (Wrap->TcpWrap.Rx6Token.CompletionToken.Event);
Wrap->TcpWrap.Rx6Token.CompletionToken.Event = NULL;
-
+
if (EFI_ERROR (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;
@@ -159,30 +159,30 @@ HttpTcpReceiveNotifyDpc (
if (Item != NULL) {
NetMapRemoveItem (&HttpInstance->RxTokens, Item, NULL);
}
-
+
FreePool (Wrap);
Wrap = NULL;
-
+
return ;
}
} else {
gBS->CloseEvent (Wrap->TcpWrap.Rx4Token.CompletionToken.Event);
Wrap->TcpWrap.Rx4Token.CompletionToken.Event = NULL;
-
+
if (EFI_ERROR (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;
gBS->SignalEvent (Wrap->HttpToken->Event);
-
+
Item = NetMapFindKey (&HttpInstance->RxTokens, Wrap->HttpToken);
if (Item != NULL) {
NetMapRemoveItem (&HttpInstance->RxTokens, Item, NULL);
}
-
+
FreePool (Wrap);
Wrap = NULL;
-
+
return ;
}
}
@@ -220,7 +220,7 @@ HttpTcpReceiveNotifyDpc (
// We receive part of header of next HTTP msg.
//
if (HttpInstance->NextMsg != NULL) {
- Wrap->HttpToken->Message->BodyLength = HttpInstance->NextMsg -
+ Wrap->HttpToken->Message->BodyLength = HttpInstance->NextMsg -
(CHAR8 *) Wrap->HttpToken->Message->Body;
HttpInstance->CacheLen = Length - Wrap->HttpToken->Message->BodyLength;
if (HttpInstance->CacheLen != 0) {
@@ -246,7 +246,7 @@ HttpTcpReceiveNotifyDpc (
} else {
Wrap->HttpToken->Status = Wrap->TcpWrap.Rx4Token.CompletionToken.Status;
}
-
+
gBS->SignalEvent (Wrap->HttpToken->Event);
@@ -323,7 +323,7 @@ HttpCreateTcpConnCloseEvent (
if (EFI_ERROR (Status)) {
goto ERROR;
}
-
+
} else {
//
// Create events for variuos asynchronous operations.
@@ -353,7 +353,7 @@ HttpCreateTcpConnCloseEvent (
goto ERROR;
}
}
-
+
return EFI_SUCCESS;
ERROR:
@@ -401,7 +401,7 @@ HttpCloseTcpConnCloseEvent (
HttpInstance->Tcp4CloseToken.CompletionToken.Event = NULL;
}
}
-
+
}
/**
@@ -436,7 +436,7 @@ HttpCreateTcpTxEvent (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
TcpWrap->Tx4Data.Push = TRUE;
TcpWrap->Tx4Data.Urgent = FALSE;
TcpWrap->Tx4Data.FragmentCount = 1;
@@ -460,9 +460,9 @@ HttpCreateTcpTxEvent (
TcpWrap->Tx6Data.FragmentCount = 1;
TcpWrap->Tx6Token.Packet.TxData = &Wrap->TcpWrap.Tx6Data;
TcpWrap->Tx6Token.CompletionToken.Status =EFI_NOT_READY;
-
+
}
-
+
return EFI_SUCCESS;
}
@@ -493,7 +493,7 @@ HttpCreateTcpRxEventForHeader (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
HttpInstance->Rx4Data.FragmentCount = 1;
HttpInstance->Rx4Token.Packet.RxData = &HttpInstance->Rx4Data;
HttpInstance->Rx4Token.CompletionToken.Status = EFI_NOT_READY;
@@ -513,7 +513,7 @@ HttpCreateTcpRxEventForHeader (
HttpInstance->Rx6Data.FragmentCount =1;
HttpInstance->Rx6Token.Packet.RxData = &HttpInstance->Rx6Data;
HttpInstance->Rx6Token.CompletionToken.Status = EFI_NOT_READY;
-
+
}
@@ -531,7 +531,7 @@ HttpCreateTcpRxEventForHeader (
**/
EFI_STATUS
HttpCreateTcpRxEvent (
- IN HTTP_TOKEN_WRAP *Wrap
+ IN HTTP_TOKEN_WRAP *Wrap
)
{
EFI_STATUS Status;
@@ -551,7 +551,7 @@ HttpCreateTcpRxEvent (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
TcpWrap->Rx4Data.FragmentCount = 1;
TcpWrap->Rx4Token.Packet.RxData = &Wrap->TcpWrap.Rx4Data;
TcpWrap->Rx4Token.CompletionToken.Status = EFI_NOT_READY;
@@ -563,7 +563,7 @@ HttpCreateTcpRxEvent (
HttpTcpReceiveNotify,
Wrap,
&TcpWrap->Rx6Token.CompletionToken.Event
- );
+ );
if (EFI_ERROR (Status)) {
return Status;
}
@@ -572,7 +572,7 @@ HttpCreateTcpRxEvent (
TcpWrap->Rx6Token.Packet.RxData = &Wrap->TcpWrap.Rx6Data;
TcpWrap->Rx6Token.CompletionToken.Status = EFI_NOT_READY;
}
-
+
return EFI_SUCCESS;
}
@@ -580,7 +580,7 @@ HttpCreateTcpRxEvent (
Close Events for Tcp Receive Tokens for HTTP body and HTTP header.
@param[in] Wrap Pointer to HTTP token's wrap data.
-
+
**/
VOID
HttpCloseTcpRxEvent (
@@ -591,7 +591,7 @@ HttpCloseTcpRxEvent (
ASSERT (Wrap != NULL);
HttpInstance = Wrap->HttpInstance;
-
+
if (HttpInstance->LocalAddressIsIPv6) {
if (Wrap->TcpWrap.Rx6Token.CompletionToken.Event != NULL) {
gBS->CloseEvent (Wrap->TcpWrap.Rx6Token.CompletionToken.Event);
@@ -605,7 +605,7 @@ HttpCloseTcpRxEvent (
if (Wrap->TcpWrap.Rx4Token.CompletionToken.Event != NULL) {
gBS->CloseEvent (Wrap->TcpWrap.Rx4Token.CompletionToken.Event);
}
-
+
if (HttpInstance->Rx4Token.CompletionToken.Event != NULL) {
gBS->CloseEvent (HttpInstance->Rx4Token.CompletionToken.Event);
HttpInstance->Rx4Token.CompletionToken.Event = NULL;
@@ -619,7 +619,7 @@ HttpCloseTcpRxEvent (
@param[in, out] HttpInstance Pointer to HTTP_PROTOCOL structure.
@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.
**/
@@ -632,10 +632,10 @@ HttpInitProtocol (
EFI_STATUS Status;
VOID *Interface;
BOOLEAN UsingIpv6;
-
+
ASSERT (HttpInstance != NULL);
UsingIpv6 = IpVersion;
-
+
if (!UsingIpv6) {
//
// Create TCP4 child.
@@ -659,7 +659,7 @@ HttpInitProtocol (
HttpInstance->Service->ControllerHandle,
EFI_OPEN_PROTOCOL_BY_DRIVER
);
-
+
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
@@ -710,7 +710,7 @@ HttpInitProtocol (
HttpInstance->Service->ControllerHandle,
EFI_OPEN_PROTOCOL_BY_DRIVER
);
-
+
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
@@ -723,10 +723,10 @@ HttpInitProtocol (
HttpInstance->Handle,
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
);
-
+
if (EFI_ERROR(Status)) {
goto ON_ERROR;
- }
+ }
Status = gBS->OpenProtocol (
HttpInstance->Service->Tcp6ChildHandle,
@@ -741,7 +741,7 @@ HttpInitProtocol (
goto ON_ERROR;
}
}
-
+
HttpInstance->Url = AllocateZeroPool (HTTP_URL_BUFFER_LEN);
if (HttpInstance->Url == NULL) {
Status = EFI_OUT_OF_RESOURCES;
@@ -751,7 +751,7 @@ HttpInitProtocol (
return EFI_SUCCESS;
ON_ERROR:
-
+
if (HttpInstance->Tcp4ChildHandle != NULL) {
gBS->CloseProtocol (
HttpInstance->Tcp4ChildHandle,
@@ -765,8 +765,8 @@ ON_ERROR:
&gEfiTcp4ProtocolGuid,
HttpInstance->Service->Ip4DriverBindingHandle,
HttpInstance->Handle
- );
-
+ );
+
NetLibDestroyServiceChild (
HttpInstance->Service->ControllerHandle,
HttpInstance->Service->Ip4DriverBindingHandle,
@@ -774,7 +774,7 @@ ON_ERROR:
HttpInstance->Tcp4ChildHandle
);
}
-
+
if (HttpInstance->Service->Tcp4ChildHandle != NULL) {
gBS->CloseProtocol (
HttpInstance->Service->Tcp4ChildHandle,
@@ -783,7 +783,7 @@ ON_ERROR:
HttpInstance->Handle
);
}
-
+
if (HttpInstance->Tcp6ChildHandle != NULL) {
gBS->CloseProtocol (
HttpInstance->Tcp6ChildHandle,
@@ -798,7 +798,7 @@ ON_ERROR:
HttpInstance->Service->Ip6DriverBindingHandle,
HttpInstance->Handle
);
-
+
NetLibDestroyServiceChild (
HttpInstance->Service->ControllerHandle,
HttpInstance->Service->Ip6DriverBindingHandle,
@@ -806,7 +806,7 @@ ON_ERROR:
HttpInstance->Tcp6ChildHandle
);
}
-
+
if (HttpInstance->Service->Tcp6ChildHandle != NULL) {
gBS->CloseProtocol (
HttpInstance->Service->Tcp6ChildHandle,
@@ -817,7 +817,7 @@ ON_ERROR:
}
return EFI_UNSUPPORTED;
-
+
}
/**
@@ -832,7 +832,7 @@ HttpCleanProtocol (
)
{
HttpCloseConnection (HttpInstance);
-
+
HttpCloseTcpConnCloseEvent (HttpInstance);
if (HttpInstance->TimeoutEvent != NULL) {
@@ -855,18 +855,18 @@ HttpCleanProtocol (
HttpFreeMsgParser (HttpInstance->MsgParser);
HttpInstance->MsgParser = NULL;
}
-
+
if (HttpInstance->Url != NULL) {
FreePool (HttpInstance->Url);
HttpInstance->Url = NULL;
}
-
+
NetMapClean (&HttpInstance->TxTokens);
NetMapClean (&HttpInstance->RxTokens);
if (HttpInstance->TlsSb != NULL && HttpInstance->TlsChildHandle != NULL) {
//
- // Destroy the TLS instance.
+ // Destroy the TLS instance.
//
HttpInstance->TlsSb->DestroyChild (HttpInstance->TlsSb, HttpInstance->TlsChildHandle);
}
@@ -885,7 +885,7 @@ HttpCleanProtocol (
HttpInstance->Service->Ip4DriverBindingHandle,
HttpInstance->Handle
);
-
+
NetLibDestroyServiceChild (
HttpInstance->Service->ControllerHandle,
HttpInstance->Service->Ip4DriverBindingHandle,
@@ -901,7 +901,7 @@ HttpCleanProtocol (
HttpInstance->Service->Ip4DriverBindingHandle,
HttpInstance->Handle
);
- }
+ }
if (HttpInstance->Tcp6ChildHandle != NULL) {
gBS->CloseProtocol (
@@ -917,7 +917,7 @@ HttpCleanProtocol (
HttpInstance->Service->Ip6DriverBindingHandle,
HttpInstance->Handle
);
-
+
NetLibDestroyServiceChild (
HttpInstance->Service->ControllerHandle,
HttpInstance->Service->Ip6DriverBindingHandle,
@@ -925,7 +925,7 @@ HttpCleanProtocol (
HttpInstance->Tcp6ChildHandle
);
}
-
+
if (HttpInstance->Service->Tcp6ChildHandle != NULL) {
gBS->CloseProtocol (
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));
return Status;
}
-
+
while (!HttpInstance->IsTcp4ConnDone) {
HttpInstance->Tcp4->Poll (HttpInstance->Tcp4);
}
-
+
Status = HttpInstance->Tcp4ConnToken.CompletionToken.Status;
-
+
} else {
HttpInstance->IsTcp6ConnDone = FALSE;
HttpInstance->Tcp6ConnToken.CompletionToken.Status = EFI_NOT_READY;
@@ -985,9 +985,9 @@ HttpCreateConnection (
HttpInstance->Tcp6->Poll (HttpInstance->Tcp6);
}
- Status = HttpInstance->Tcp6ConnToken.CompletionToken.Status;
+ Status = HttpInstance->Tcp6ConnToken.CompletionToken.Status;
}
-
+
if (!EFI_ERROR (Status)) {
HttpInstance->State = HTTP_STATE_TCP_CONNECTED;
}
@@ -1024,7 +1024,7 @@ HttpCloseConnection (
while (!HttpInstance->IsTcp6CloseDone) {
HttpInstance->Tcp6->Poll (HttpInstance->Tcp6);
}
-
+
} else {
HttpInstance->Tcp4CloseToken.AbortOnClose = TRUE;
HttpInstance->IsTcp4CloseDone = FALSE;
@@ -1070,7 +1070,7 @@ HttpConfigureTcp4 (
Tcp4CfgData = &HttpInstance->Tcp4CfgData;
ZeroMem (Tcp4CfgData, sizeof (EFI_TCP4_CONFIG_DATA));
-
+
Tcp4CfgData->TypeOfService = HTTP_TOS_DEAULT;
Tcp4CfgData->TimeToLive = HTTP_TTL_DEAULT;
Tcp4CfgData->ControlOption = &HttpInstance->Tcp4Option;
@@ -1081,7 +1081,7 @@ HttpConfigureTcp4 (
IP4_COPY_ADDRESS (&Tcp4AP->StationAddress, &HttpInstance->IPv4Node.LocalAddress);
IP4_COPY_ADDRESS (&Tcp4AP->SubnetMask, &HttpInstance->IPv4Node.LocalSubnet);
}
-
+
Tcp4AP->StationPort = HttpInstance->IPv4Node.LocalPort;
Tcp4AP->RemotePort = HttpInstance->RemotePort;
Tcp4AP->ActiveFlag = TRUE;
@@ -1141,16 +1141,16 @@ HttpConfigureTcp6 (
EFI_TCP6_CONFIG_DATA *Tcp6CfgData;
EFI_TCP6_ACCESS_POINT *Tcp6Ap;
EFI_TCP6_OPTION *Tcp6Option;
-
+
ASSERT (HttpInstance != NULL);
-
+
Tcp6CfgData = &HttpInstance->Tcp6CfgData;
ZeroMem (Tcp6CfgData, sizeof (EFI_TCP6_CONFIG_DATA));
Tcp6CfgData->TrafficClass = 0;
Tcp6CfgData->HopLimit = 255;
Tcp6CfgData->ControlOption = &HttpInstance->Tcp6Option;
-
+
Tcp6Ap = &Tcp6CfgData->AccessPoint;
Tcp6Ap->ActiveFlag = TRUE;
Tcp6Ap->StationPort = HttpInstance->Ipv6Node.LocalPort;
@@ -1175,7 +1175,7 @@ HttpConfigureTcp6 (
DEBUG ((EFI_D_ERROR, "HttpConfigureTcp6 - %r\n", Status));
return Status;
}
-
+
Status = HttpCreateTcpConnCloseEvent (HttpInstance);
if (EFI_ERROR (Status)) {
return Status;
@@ -1189,11 +1189,11 @@ HttpConfigureTcp6 (
HttpInstance->State = HTTP_STATE_TCP_CONFIGED;
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.
@param[in] HttpInstance The HTTP instance private data.
@@ -1217,8 +1217,8 @@ HttpConnectTcp4 (
}
Status = HttpInstance->Tcp4->GetModeData(
- HttpInstance->Tcp4,
- &Tcp4State,
+ HttpInstance->Tcp4,
+ &Tcp4State,
NULL,
NULL,
NULL,
@@ -1240,7 +1240,7 @@ HttpConnectTcp4 (
DEBUG ((EFI_D_ERROR, "Tcp4 Connection fail - %x\n", Status));
return Status;
}
-
+
//
// Tls session connection.
//
@@ -1270,11 +1270,11 @@ HttpConnectTcp4 (
TlsCloseTxRxEvent (HttpInstance);
return Status;
}
-
+
Status = TlsConnectSession (HttpInstance, HttpInstance->TimeoutEvent);
gBS->SetTimer (HttpInstance->TimeoutEvent, TimerCancel, 0);
-
+
if (EFI_ERROR (Status)) {
TlsCloseTxRxEvent (HttpInstance);
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.
@param[in] HttpInstance The HTTP instance private data.
@@ -1315,7 +1315,7 @@ HttpConnectTcp6 (
NULL,
NULL
);
-
+
if (EFI_ERROR(Status)){
DEBUG ((EFI_D_ERROR, "Tcp6 GetModeData fail - %x\n", Status));
return Status;
@@ -1332,7 +1332,7 @@ HttpConnectTcp6 (
DEBUG ((EFI_D_ERROR, "Tcp6 Connection fail - %x\n", Status));
return Status;
}
-
+
//
// Tls session connection.
//
@@ -1362,11 +1362,11 @@ HttpConnectTcp6 (
TlsCloseTxRxEvent (HttpInstance);
return Status;
}
-
+
Status = TlsConnectSession (HttpInstance, HttpInstance->TimeoutEvent);
gBS->SetTimer (HttpInstance->TimeoutEvent, TimerCancel, 0);
-
+
if (EFI_ERROR (Status)) {
TlsCloseTxRxEvent (HttpInstance);
return Status;
@@ -1384,7 +1384,7 @@ HttpConnectTcp6 (
@param[in] Configure The Flag indicates whether need to initialize 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.
**/
@@ -1446,9 +1446,9 @@ HttpInitSession (
return Status;
}
}
-
+
return EFI_SUCCESS;
-
+
}
/**
@@ -1476,7 +1476,7 @@ HttpTransmitTcp (
EFI_TCP4_PROTOCOL *Tcp4;
EFI_TCP6_IO_TOKEN *Tx6Token;
EFI_TCP6_PROTOCOL *Tcp6;
- UINT8 *TlsRecord;
+ UINT8 *TlsRecord;
UINT16 PayloadSize;
NET_FRAGMENT TempFragment;
NET_FRAGMENT Fragment;
@@ -1522,19 +1522,19 @@ HttpTransmitTcp (
RemainingLen = TxStringLen;
while (RemainingLen != 0) {
PayloadSize = (UINT16) MIN (TLS_PLAINTEXT_RECORD_MAX_PAYLOAD_LENGTH, RemainingLen);
-
+
((TLS_RECORD_HEADER *) TlsRecord)->ContentType = TlsContentTypeApplicationData;
((TLS_RECORD_HEADER *) TlsRecord)->Version.Major = HttpInstance->TlsConfigData.Version.Major;
((TLS_RECORD_HEADER *) TlsRecord)->Version.Minor = HttpInstance->TlsConfigData.Version.Minor;
((TLS_RECORD_HEADER *) TlsRecord)->Length = PayloadSize;
CopyMem (TlsRecord + TLS_RECORD_HEADER_LENGTH, TxString + (TxStringLen - RemainingLen), PayloadSize);
-
+
Status = TlsProcessMessage (
- HttpInstance,
- TlsRecord,
- TLS_RECORD_HEADER_LENGTH + PayloadSize,
- EfiTlsEncrypt,
+ HttpInstance,
+ TlsRecord,
+ TLS_RECORD_HEADER_LENGTH + PayloadSize,
+ EfiTlsEncrypt,
&TempFragment
);
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);
Fragment.Len += TempFragment.Len;
@@ -1550,7 +1550,7 @@ HttpTransmitTcp (
FreePool (TempFragment.Bulk);
TempFragment.Len = 0;
TempFragment.Bulk = NULL;
-
+
RemainingLen -= (UINTN) PayloadSize;
ZeroMem (TlsRecord, TLS_RECORD_HEADER_LENGTH + TLS_PLAINTEXT_RECORD_MAX_PAYLOAD_LENGTH);
}
@@ -1558,7 +1558,7 @@ HttpTransmitTcp (
FreePool (TlsRecord);
TlsRecord = NULL;
}
-
+
if (!HttpInstance->LocalAddressIsIPv6) {
Tcp4 = HttpInstance->Tcp4;
Tx4Token = &Wrap->TcpWrap.Tx4Token;
@@ -1572,9 +1572,9 @@ HttpTransmitTcp (
Tx4Token->Packet.TxData->FragmentTable[0].FragmentLength = (UINT32) TxStringLen;
Tx4Token->Packet.TxData->FragmentTable[0].FragmentBuffer = (VOID *) TxString;
}
-
- Tx4Token->CompletionToken.Status = EFI_NOT_READY;
-
+
+ Tx4Token->CompletionToken.Status = EFI_NOT_READY;
+
Wrap->TcpWrap.IsTxDone = FALSE;
Status = Tcp4->Transmit (Tcp4, Tx4Token);
if (EFI_ERROR (Status)) {
@@ -1585,7 +1585,7 @@ HttpTransmitTcp (
} else {
Tcp6 = HttpInstance->Tcp6;
Tx6Token = &Wrap->TcpWrap.Tx6Token;
-
+
if (HttpInstance->UseHttps) {
Tx6Token->Packet.TxData->DataLength = 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].FragmentBuffer = (VOID *) TxString;
}
-
+
Tx6Token->CompletionToken.Status = EFI_NOT_READY;
Wrap->TcpWrap.IsTxDone = FALSE;
@@ -1605,17 +1605,17 @@ HttpTransmitTcp (
goto ON_ERROR;
}
}
-
+
return Status;
ON_ERROR:
-
+
if (HttpInstance->UseHttps) {
if (TlsRecord != NULL) {
FreePool (TlsRecord);
TlsRecord = NULL;
}
-
+
if (Fragment.Bulk != NULL) {
FreePool (Fragment.Bulk);
Fragment.Bulk = NULL;
@@ -1686,7 +1686,7 @@ HttpTcpNotReady (
if (!ValueInItem->TcpWrap.IsTxDone) {
return EFI_NOT_READY;
}
-
+
return EFI_SUCCESS;
}
@@ -1798,8 +1798,8 @@ HttpTcpReceive (
@param[in, out] SizeofHeaders The HTTP header length.
@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.
-
- @retval EFI_SUCCESS The HTTP header is received.
+
+ @retval EFI_SUCCESS The HTTP header is received.
@retval Others Other errors as indicated.
**/
@@ -1832,7 +1832,7 @@ HttpTcpReceiveHeader (
Rx6Token = NULL;
Fragment.Len = 0;
Fragment.Bulk = NULL;
-
+
if (HttpInstance->LocalAddressIsIPv6) {
ASSERT (Tcp6 != NULL);
} else {
@@ -1855,7 +1855,7 @@ HttpTcpReceiveHeader (
return Status;
}
}
-
+
//
// Receive the HTTP headers only when EFI_HTTP_RESPONSE_DATA is not NULL.
//
@@ -1887,7 +1887,7 @@ HttpTcpReceiveHeader (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
Fragment.Len = Rx4Token->Packet.RxData->FragmentTable[0].FragmentLength;
Fragment.Bulk = (UINT8 *) Rx4Token->Packet.RxData->FragmentTable[0].FragmentBuffer;
} else {
@@ -1895,7 +1895,7 @@ HttpTcpReceiveHeader (
FreePool (Fragment.Bulk);
Fragment.Bulk = NULL;
}
-
+
Status = HttpsReceive (HttpInstance, &Fragment, Timeout);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "Tcp4 receive failed: %r\n", Status));
@@ -1931,7 +1931,7 @@ HttpTcpReceiveHeader (
//
*EndofHeader = AsciiStrStr (*HttpHeaders, HTTP_END_OF_HDR_STR);
};
-
+
//
// Free the buffer.
//
@@ -1944,7 +1944,7 @@ HttpTcpReceiveHeader (
if (Fragment.Bulk != NULL) {
FreePool (Fragment.Bulk);
Fragment.Bulk = NULL;
- }
+ }
} else {
if (!HttpInstance->UseHttps) {
Rx6Token = &HttpInstance->Rx6Token;
@@ -1954,7 +1954,7 @@ HttpTcpReceiveHeader (
return Status;
}
}
-
+
//
// Receive the HTTP headers only when EFI_HTTP_RESPONSE_DATA is not NULL.
//
@@ -1986,7 +1986,7 @@ HttpTcpReceiveHeader (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
Fragment.Len = Rx6Token->Packet.RxData->FragmentTable[0].FragmentLength;
Fragment.Bulk = (UINT8 *) Rx6Token->Packet.RxData->FragmentTable[0].FragmentBuffer;
} else {
@@ -1994,7 +1994,7 @@ HttpTcpReceiveHeader (
FreePool (Fragment.Bulk);
Fragment.Bulk = NULL;
}
-
+
Status = HttpsReceive (HttpInstance, &Fragment, Timeout);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "Tcp6 receive failed: %r\n", Status));
@@ -2028,7 +2028,7 @@ HttpTcpReceiveHeader (
//
// 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);
Fragment.Bulk = NULL;
}
- }
+ }
//
// Skip the CRLF after the HTTP headers.
@@ -2062,7 +2062,7 @@ HttpTcpReceiveHeader (
@param[in] Wrap The HTTP token's wrap 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.
**/
@@ -2078,19 +2078,19 @@ HttpTcpReceiveBody (
EFI_TCP6_IO_TOKEN *Rx6Token;
EFI_TCP4_PROTOCOL *Tcp4;
EFI_TCP4_IO_TOKEN *Rx4Token;
-
+
HttpInstance = Wrap->HttpInstance;
Tcp4 = HttpInstance->Tcp4;
Tcp6 = HttpInstance->Tcp6;
Rx4Token = NULL;
Rx6Token = NULL;
-
+
if (HttpInstance->LocalAddressIsIPv6) {
ASSERT (Tcp6 != NULL);
} else {
ASSERT (Tcp4 != NULL);
}
-
+
if (HttpInstance->LocalAddressIsIPv6) {
Rx6Token = &Wrap->TcpWrap.Rx6Token;
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->FragmentTable[0].FragmentLength = (UINT32) MIN (MAX_UINT32, HttpMsg->BodyLength);
Rx4Token->Packet.RxData->FragmentTable[0].FragmentBuffer = (VOID *) HttpMsg->Body;
-
+
Rx4Token->CompletionToken.Status = EFI_NOT_READY;
Status = Tcp4->Receive (Tcp4, Rx4Token);
if (EFI_ERROR (Status)) {
@@ -2125,13 +2125,13 @@ HttpTcpReceiveBody (
Clean up Tcp Tokens while the Tcp transmission error occurs.
@param[in] Wrap Pointer to HTTP token's wrap data.
-
+
**/
VOID
HttpTcpTokenCleanup (
IN HTTP_TOKEN_WRAP *Wrap
)
-{
+{
HTTP_PROTOCOL *HttpInstance;
EFI_TCP4_IO_TOKEN *Rx4Token;
EFI_TCP6_IO_TOKEN *Rx6Token;
@@ -2140,10 +2140,10 @@ HttpTcpTokenCleanup (
HttpInstance = Wrap->HttpInstance;
Rx4Token = NULL;
Rx6Token = NULL;
-
+
if (HttpInstance->LocalAddressIsIPv6) {
Rx6Token = &Wrap->TcpWrap.Rx6Token;
-
+
if (Rx6Token->CompletionToken.Event != NULL) {
gBS->CloseEvent (Rx6Token->CompletionToken.Event);
Rx6Token->CompletionToken.Event = NULL;
@@ -2152,25 +2152,25 @@ HttpTcpTokenCleanup (
FreePool (Wrap);
Rx6Token = &HttpInstance->Rx6Token;
-
+
if (Rx6Token->CompletionToken.Event != NULL) {
gBS->CloseEvent (Rx6Token->CompletionToken.Event);
Rx6Token->CompletionToken.Event = NULL;
}
-
+
if (Rx6Token->Packet.RxData->FragmentTable[0].FragmentBuffer != NULL) {
FreePool (Rx6Token->Packet.RxData->FragmentTable[0].FragmentBuffer);
Rx6Token->Packet.RxData->FragmentTable[0].FragmentBuffer = NULL;
}
-
+
} else {
Rx4Token = &Wrap->TcpWrap.Rx4Token;
-
+
if (Rx4Token->CompletionToken.Event != NULL) {
gBS->CloseEvent (Rx4Token->CompletionToken.Event);
Rx4Token->CompletionToken.Event = NULL;
}
-
+
FreePool (Wrap);
Rx4Token = &HttpInstance->Rx4Token;
@@ -2179,8 +2179,8 @@ HttpTcpTokenCleanup (
gBS->CloseEvent (Rx4Token->CompletionToken.Event);
Rx4Token->CompletionToken.Event = NULL;
}
-
-
+
+
if (Rx4Token->Packet.RxData->FragmentTable[0].FragmentBuffer != NULL) {
FreePool (Rx4Token->Packet.RxData->FragmentTable[0].FragmentBuffer);
Rx4Token->Packet.RxData->FragmentTable[0].FragmentBuffer = NULL;
diff --git a/NetworkPkg/HttpDxe/HttpProto.h b/NetworkPkg/HttpDxe/HttpProto.h
index 04d36aaca0..cc6c1eb566 100644
--- a/NetworkPkg/HttpDxe/HttpProto.h
+++ b/NetworkPkg/HttpDxe/HttpProto.h
@@ -1,7 +1,7 @@
/** @file
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>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -117,18 +117,18 @@ typedef struct _HTTP_PROTOCOL {
CHAR8 *RemoteHost;
UINT16 RemotePort;
EFI_IPv4_ADDRESS RemoteAddr;
-
+
EFI_HANDLE Tcp6ChildHandle;
EFI_TCP6_PROTOCOL *Tcp6;
EFI_TCP6_CONFIG_DATA Tcp6CfgData;
EFI_TCP6_OPTION Tcp6Option;
-
+
EFI_TCP6_CONNECTION_TOKEN Tcp6ConnToken;
BOOLEAN IsTcp6ConnDone;
EFI_TCP6_CLOSE_TOKEN Tcp6CloseToken;
BOOLEAN IsTcp6CloseDone;
EFI_IPv6_ADDRESS RemoteIpv6Addr;
-
+
//
// Rx4Token or Rx6Token used for receiving HTTP header.
//
@@ -149,7 +149,7 @@ typedef struct _HTTP_PROTOCOL {
// HTTP message-body parser.
//
VOID *MsgParser;
-
+
EFI_HTTP_VERSION HttpVersion;
UINT32 TimeOutMillisec;
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] Context The context.
@@ -288,14 +288,14 @@ HttpCreateTcpRxEventForHeader (
**/
EFI_STATUS
HttpCreateTcpRxEvent (
- IN HTTP_TOKEN_WRAP *Wrap
+ IN HTTP_TOKEN_WRAP *Wrap
);
/**
Close Events for Tcp Receive Tokens for HTTP body and HTTP header.
@param[in] Wrap Pointer to HTTP token's wrap data.
-
+
**/
VOID
HttpCloseTcpRxEvent (
@@ -308,7 +308,7 @@ HttpCloseTcpRxEvent (
@param[in, out] HttpInstance Pointer to HTTP_PROTOCOL structure.
@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.
**/
@@ -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.
@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.
@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] 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.
**/
@@ -550,7 +550,7 @@ HttpTcpReceive (
@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.
- @retval EFI_SUCCESS The HTTP header is received.
+ @retval EFI_SUCCESS The HTTP header is received.
@retval Others Other errors as indicated.
**/
@@ -568,7 +568,7 @@ HttpTcpReceiveHeader (
@param[in] Wrap The HTTP token's wrap 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.
**/
@@ -582,7 +582,7 @@ HttpTcpReceiveBody (
Clean up Tcp Tokens while the Tcp transmission error occurs.
@param[in] Wrap Pointer to HTTP token's wrap data.
-
+
**/
VOID
HttpTcpTokenCleanup (
diff --git a/NetworkPkg/HttpDxe/HttpsSupport.c b/NetworkPkg/HttpDxe/HttpsSupport.c
index d658512f6d..ed883a1f71 100644
--- a/NetworkPkg/HttpDxe/HttpsSupport.c
+++ b/NetworkPkg/HttpDxe/HttpsSupport.c
@@ -603,9 +603,9 @@ TlsConfigCipherList (
CipherListSize
);
-ON_EXIT:
+ON_EXIT:
FreePool (CipherList);
-
+
return Status;
}
@@ -1453,18 +1453,18 @@ TlsCloseSession (
Process one message according to the CryptMode.
@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
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.
@param[in] MessageSize Pointer to the message buffer size.
@param[in] ProcessMode Process mode.
@param[in, out] Fragment Only one Fragment returned after the Message is
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.
- 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.
@retval EFI_SUCCESS Message is processed successfully.
diff --git a/NetworkPkg/HttpDxe/HttpsSupport.h b/NetworkPkg/HttpDxe/HttpsSupport.h
index 5d4ca01108..3329e65168 100644
--- a/NetworkPkg/HttpDxe/HttpsSupport.h
+++ b/NetworkPkg/HttpDxe/HttpsSupport.h
@@ -217,18 +217,18 @@ TlsCloseSession (
Process one message according to the CryptMode.
@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
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.
@param[in] MessageSize Pointer to the message buffer size.
@param[in] ProcessMode Process mode.
@param[in, out] Fragment Only one Fragment returned after the Message is
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.
- 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.
@retval EFI_SUCCESS Message is processed successfully.
diff --git a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.c b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.c
index 8c54874b9f..290107880b 100644
--- a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.c
+++ b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.c
@@ -1,7 +1,7 @@
/** @file
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
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.
**/
-EFI_STATUS
+EFI_STATUS
EFIAPI
HttpUtilitiesDxeUnload (
IN EFI_HANDLE ImageHandle
@@ -59,11 +59,11 @@ HttpUtilitiesDxeUnload (
// Firstly, find HttpUtilitiesProtocol interface
//
Status = gBS->OpenProtocol (
- HandleBuffer[Index],
- &gEfiHttpUtilitiesProtocolGuid,
- (VOID **) &HttpUtilitiesProtocol,
- ImageHandle,
- NULL,
+ HandleBuffer[Index],
+ &gEfiHttpUtilitiesProtocolGuid,
+ (VOID **) &HttpUtilitiesProtocol,
+ ImageHandle,
+ NULL,
EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL
);
if (EFI_ERROR (Status)) {
@@ -72,7 +72,7 @@ HttpUtilitiesDxeUnload (
//
// Then, uninstall HttpUtilities interface
- //
+ //
Status = gBS->UninstallMultipleProtocolInterfaces (
HandleBuffer[Index],
&gEfiHttpUtilitiesProtocolGuid, HttpUtilitiesProtocol,
@@ -120,7 +120,7 @@ HttpUtilitiesDxeDriverEntryPoint (
&mHttpUtilitiesProtocol,
NULL
);
-
+
return Status;
}
diff --git a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.uni b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.uni
index 0efdcd5429..11d4a3351e 100644
--- a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.uni
+++ b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.uni
@@ -2,15 +2,15 @@
// 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
// 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
// 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.
//
diff --git a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxeExtra.uni b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxeExtra.uni
index a9194be736..74f1915a5e 100644
--- a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxeExtra.uni
+++ b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxeExtra.uni
@@ -1,7 +1,7 @@
// /** @file
// 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
// are licensed and made available under the terms and conditions of the BSD License
@@ -13,8 +13,8 @@
//
// **/
-#string STR_PROPERTIES_MODULE_NAME
-#language en-US
+#string STR_PROPERTIES_MODULE_NAME
+#language en-US
"UEFI HTTP UTILITIES DXE"
diff --git a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c
index 645fca4084..a9a1c7c586 100644
--- a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c
+++ b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c
@@ -1,7 +1,7 @@
/** @file
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>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -91,17 +91,17 @@ HttpUtilitiesBuild (
NewMessagePtr = NULL;
*NewMessageSize = 0;
Status = EFI_SUCCESS;
-
+
if (This == NULL) {
return EFI_INVALID_PARAMETER;
}
if (SeedMessage != NULL) {
Status = This->Parse (
- This,
- SeedMessage,
- SeedMessageSize,
- &SeedHeaderFields,
+ This,
+ SeedMessage,
+ SeedMessageSize,
+ &SeedHeaderFields,
&SeedFieldCount
);
if (EFI_ERROR (Status)) {
@@ -118,15 +118,15 @@ HttpUtilitiesBuild (
Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
}
-
+
for (Index = 0, TempFieldCount = 0; Index < SeedFieldCount; Index++) {
//
// Check whether each SeedHeaderFields member is in DeleteList
//
if (HttpIsValidHttpHeader( DeleteList, DeleteCount, SeedHeaderFields[Index].FieldName)) {
Status = HttpSetFieldNameAndValue (
- &TempHeaderFields[TempFieldCount],
- SeedHeaderFields[Index].FieldName,
+ &TempHeaderFields[TempFieldCount],
+ SeedHeaderFields[Index].FieldName,
SeedHeaderFields[Index].FieldValue
);
if (EFI_ERROR (Status)) {
@@ -151,23 +151,23 @@ HttpUtilitiesBuild (
for (Index = 0; Index < TempFieldCount; Index++) {
Status = HttpSetFieldNameAndValue (
- &NewHeaderFields[Index],
- TempHeaderFields[Index].FieldName,
+ &NewHeaderFields[Index],
+ TempHeaderFields[Index].FieldName,
TempHeaderFields[Index].FieldValue
);
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
}
-
+
NewFieldCount = TempFieldCount;
for (Index = 0; Index < AppendCount; Index++) {
HttpHeader = HttpFindHeader (NewFieldCount, NewHeaderFields, AppendList[Index]->FieldName);
if (HttpHeader != NULL) {
Status = HttpSetFieldNameAndValue (
- HttpHeader,
- AppendList[Index]->FieldName,
+ HttpHeader,
+ AppendList[Index]->FieldName,
AppendList[Index]->FieldValue
);
if (EFI_ERROR (Status)) {
@@ -175,8 +175,8 @@ HttpUtilitiesBuild (
}
} else {
Status = HttpSetFieldNameAndValue (
- &NewHeaderFields[NewFieldCount],
- AppendList[Index]->FieldName,
+ &NewHeaderFields[NewFieldCount],
+ AppendList[Index]->FieldName,
AppendList[Index]->FieldValue
);
if (EFI_ERROR (Status)) {
@@ -241,13 +241,13 @@ HttpUtilitiesBuild (
ASSERT (*NewMessageSize == (UINTN)NewMessagePtr - (UINTN)(*NewMessage));
//
- // Free allocated buffer
+ // Free allocated buffer
//
ON_EXIT:
if (SeedHeaderFields != NULL) {
HttpFreeHeaderFields(SeedHeaderFields, SeedFieldCount);
}
-
+
if (TempHeaderFields != NULL) {
HttpFreeHeaderFields(TempHeaderFields, TempFieldCount);
}
@@ -255,7 +255,7 @@ ON_EXIT:
if (NewHeaderFields != NULL) {
HttpFreeHeaderFields(NewHeaderFields, NewFieldCount);
}
-
+
return Status;
}
@@ -298,7 +298,7 @@ HttpUtilitiesParse (
CHAR8 *FieldName;
CHAR8 *FieldValue;
UINTN Index;
-
+
Status = EFI_SUCCESS;
TempHttpMessage = NULL;
Token = NULL;
@@ -306,18 +306,18 @@ HttpUtilitiesParse (
FieldName = NULL;
FieldValue = NULL;
Index = 0;
-
+
if (This == NULL || HttpMessage == NULL || HeaderFields == NULL || FieldCount == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
TempHttpMessage = AllocateZeroPool (HttpMessageSize);
if (TempHttpMessage == NULL) {
return EFI_OUT_OF_RESOURCES;
}
CopyMem (TempHttpMessage, HttpMessage, HttpMessageSize);
-
+
//
// Get header number
//
@@ -339,7 +339,7 @@ HttpUtilitiesParse (
Status = EFI_INVALID_PARAMETER;
goto ON_EXIT;
}
-
+
//
// Allocate buffer for header
//
@@ -349,9 +349,9 @@ HttpUtilitiesParse (
Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
}
-
+
CopyMem (TempHttpMessage, HttpMessage, HttpMessageSize);
-
+
//
// Set Field and Value to each header
//
@@ -371,17 +371,17 @@ HttpUtilitiesParse (
HttpFreeHeaderFields (*HeaderFields, Index);
goto ON_EXIT;
}
-
+
Index++;
}
//
- // Free allocated buffer
+ // Free allocated buffer
//
ON_EXIT:
if (TempHttpMessage != NULL) {
FreePool (TempHttpMessage);
}
-
+
return Status;
-} \ No newline at end of file
+}
diff --git a/NetworkPkg/IScsiDxe/ComponentName.c b/NetworkPkg/IScsiDxe/ComponentName.c
index 46d89d855c..cb91af3fc3 100644
--- a/NetworkPkg/IScsiDxe/ComponentName.c
+++ b/NetworkPkg/IScsiDxe/ComponentName.c
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -106,11 +106,11 @@ IScsiComponentNameGetDriverName (
@param[in] IScsiExtScsiPassThru A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
@param[in] Ipv6Flag TRUE if IP6 network stack is used.
-
+
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
@retval EFI_UNSUPPORTED Can't get the corresponding NIC info from the Controller handle.
-
+
**/
EFI_STATUS
UpdateName (
@@ -126,10 +126,10 @@ UpdateName (
if (IScsiExtScsiPassThru == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
Private = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (IScsiExtScsiPassThru);
NicIndex = Private->Session->ConfigData->NicIndex;
-
+
UnicodeSPrint (
HandleName,
sizeof (HandleName),
@@ -242,14 +242,14 @@ IScsiComponentNameGetControllerName (
)
{
EFI_STATUS Status;
-
+
EFI_HANDLE IScsiController;
BOOLEAN Ipv6Flag;
EFI_GUID *IScsiPrivateGuid;
ISCSI_PRIVATE_PROTOCOL *IScsiIdentifier;
-
+
EFI_EXT_SCSI_PASS_THRU_PROTOCOL *IScsiExtScsiPassThru;
-
+
if (ControllerHandle == NULL) {
return EFI_UNSUPPORTED;
}
@@ -309,7 +309,7 @@ IScsiComponentNameGetControllerName (
return Status;
}
}
-
+
//
// Retrieve an instance of a produced protocol from ChildHandle
//
@@ -324,7 +324,7 @@ IScsiComponentNameGetControllerName (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
//
// Update the component name for this child handle.
//
diff --git a/NetworkPkg/IScsiDxe/IScsiCHAP.c b/NetworkPkg/IScsiDxe/IScsiCHAP.c
index 18c49b952f..da6da3f17e 100644
--- a/NetworkPkg/IScsiDxe/IScsiCHAP.c
+++ b/NetworkPkg/IScsiDxe/IScsiCHAP.c
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -16,14 +16,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/**
Initator calculates its own expected hash value.
-
+
@param[in] ChapIdentifier iSCSI CHAP identifier sent by authenticator.
@param[in] ChapSecret iSCSI CHAP secret of the authenticator.
@param[in] SecretLength The length of iSCSI CHAP secret.
@param[in] ChapChallenge The challenge message sent by authenticator.
@param[in] ChallengeLength The length of iSCSI CHAP challenge message.
@param[out] ChapResponse The calculation of the expected hash value.
-
+
@retval EFI_SUCCESS The expected hash value was calculatedly successfully.
@retval EFI_PROTOCOL_ERROR The length of the secret should be at least the
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
- calculation of the expected hash value.
-
- @param[in] AuthData iSCSI CHAP authentication data.
- @param[in] TargetResponse The response from target.
+ calculation of the expected hash value.
+
+ @param[in] AuthData iSCSI CHAP authentication data.
+ @param[in] TargetResponse The response from target.
@retval EFI_SUCCESS The response from target passed authentication.
@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.
// Calculate Response value.
- //
+ //
Result = IScsiNetNtoi (Identifier);
if (Result > 0xFF) {
goto ON_EXIT;
- }
-
+ }
+
AuthData->InIdentifier = (UINT32) Result;
AuthData->InChallengeLength = ISCSI_CHAP_AUTH_MAX_LEN;
IScsiHexToBin ((UINT8 *) AuthData->InChallenge, &AuthData->InChallengeLength, Challenge);
@@ -331,7 +331,7 @@ ON_EXIT:
if (KeyValueList != NULL) {
IScsiFreeKeyValueList (KeyValueList);
- }
+ }
FreePool (Data);
diff --git a/NetworkPkg/IScsiDxe/IScsiCHAP.h b/NetworkPkg/IScsiDxe/IScsiCHAP.h
index 132461b84d..768fc0d9b4 100644
--- a/NetworkPkg/IScsiDxe/IScsiCHAP.h
+++ b/NetworkPkg/IScsiDxe/IScsiCHAP.h
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -29,7 +29,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
///
/// MD5_HASHSIZE
///
-#define ISCSI_CHAP_RSP_LEN 16
+#define ISCSI_CHAP_RSP_LEN 16
#define ISCSI_CHAP_STEP_ONE 1
#define ISCSI_CHAP_STEP_TWO 2
diff --git a/NetworkPkg/IScsiDxe/IScsiConfig.c b/NetworkPkg/IScsiDxe/IScsiConfig.c
index 62df367da7..893eca61d5 100644
--- a/NetworkPkg/IScsiDxe/IScsiConfig.c
+++ b/NetworkPkg/IScsiDxe/IScsiConfig.c
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -34,7 +34,7 @@ HII_VENDOR_DEVICE_PATH mIScsiHiiVendorDevicePath = {
{
END_DEVICE_PATH_TYPE,
END_ENTIRE_DEVICE_PATH_SUBTYPE,
- {
+ {
(UINT8) (END_DEVICE_PATH_LENGTH),
(UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
}
@@ -939,7 +939,7 @@ IScsiConvertIfrNvDataToAttemptConfigData (
L"CHAP Name or CHAP Secret is invalid!",
NULL
);
-
+
return EFI_INVALID_PARAMETER;
}
@@ -951,7 +951,7 @@ IScsiConvertIfrNvDataToAttemptConfigData (
&Key,
L"Reverse CHAP Name or Reverse CHAP Secret is invalid!",
NULL
- );
+ );
return EFI_INVALID_PARAMETER;
}
}
@@ -970,7 +970,7 @@ IScsiConvertIfrNvDataToAttemptConfigData (
if (AttemptName2 == NULL) {
FreePool (AttemptName1);
return EFI_OUT_OF_RESOURCES;
- }
+ }
AsciiStrToUnicodeStrS (Attempt->AttemptName, AttemptName1, ATTEMPT_NAME_SIZE);
AsciiStrToUnicodeStrS (SameNicAttempt->AttemptName, AttemptName2, ATTEMPT_NAME_SIZE);
@@ -988,7 +988,7 @@ IScsiConvertIfrNvDataToAttemptConfigData (
&Key,
mPrivate->PortString,
NULL
- );
+ );
FreePool (AttemptName1);
FreePool (AttemptName2);
@@ -2026,7 +2026,7 @@ IScsiConfigAddAttempt (
PortTitleHelpToken = HiiSetString (mCallbackInfo->RegisteredHandle, 0, mPrivate->PortString, NULL);
if (PortTitleHelpToken == 0) {
Status = EFI_INVALID_PARAMETER;
- goto Exit;
+ goto Exit;
}
HiiCreateGotoOpCode (
@@ -2050,14 +2050,14 @@ IScsiConfigAddAttempt (
Exit:
HiiFreeOpCodeHandle (StartOpCodeHandle);
HiiFreeOpCodeHandle (EndOpCodeHandle);
-
+
return Status;
}
/**
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
- 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.
@@ -2505,7 +2505,7 @@ IScsiConfigDisplayDeleteAttempts (
FORMID_DELETE_FORM, // Form ID
StartOpCodeHandle, // Label for where to insert opcodes
EndOpCodeHandle // Replace data
- );
+ );
HiiFreeOpCodeHandle (StartOpCodeHandle);
HiiFreeOpCodeHandle (EndOpCodeHandle);
@@ -2536,8 +2536,8 @@ IScsiConfigDisplayOrderAttempts (
EFI_IFR_GUID_LABEL *StartLabel;
VOID *EndOpCodeHandle;
EFI_IFR_GUID_LABEL *EndLabel;
- VOID *OptionsOpCodeHandle;
-
+ VOID *OptionsOpCodeHandle;
+
Status = IScsiCreateOpCode (
ORDER_ENTRY_LABEL,
&StartOpCodeHandle,
@@ -2589,14 +2589,14 @@ IScsiConfigDisplayOrderAttempts (
DYNAMIC_ORDERED_LIST_QUESTION_ID, // Question ID
CONFIGURATION_VARSTORE_ID, // VarStore ID
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 help text
+ STRING_TOKEN (STR_ORDER_ATTEMPT_ENTRY), // Question prompt text
+ STRING_TOKEN (STR_ORDER_ATTEMPT_ENTRY), // Question help text
0, // Question flag
EFI_IFR_UNIQUE_SET, // Ordered list flag, e.g. EFI_IFR_UNIQUE_SET
EFI_IFR_NUMERIC_SIZE_1, // Data type of Question value
ISCSI_MAX_ATTEMPTS_NUM, // Maximum container
- OptionsOpCodeHandle, // Option Opcode list
- NULL // Default Opcode is NULL
+ OptionsOpCodeHandle, // Option Opcode list
+ NULL // Default Opcode is NULL
);
Exit:
@@ -2606,11 +2606,11 @@ Exit:
FORMID_ORDER_FORM, // Form ID
StartOpCodeHandle, // Label for where to insert opcodes
EndOpCodeHandle // Replace data
- );
+ );
Error:
HiiFreeOpCodeHandle (StartOpCodeHandle);
- HiiFreeOpCodeHandle (EndOpCodeHandle);
+ HiiFreeOpCodeHandle (EndOpCodeHandle);
if (OptionsOpCodeHandle != NULL) {
HiiFreeOpCodeHandle (OptionsOpCodeHandle);
}
@@ -2821,10 +2821,10 @@ IScsiConfigProcessDefault (
if (AttemptConfigData == NULL || AttemptConfigData->Actived == ISCSI_ACTIVE_ENABLED) {
continue;
}
-
+
break;
}
-
+
if (Index > PcdGet8 (PcdMaxIScsiAttemptNumber)) {
CreatePopUp (
EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
@@ -2858,7 +2858,7 @@ IScsiConfigProcessDefault (
// Generate OUI-format ISID based on MAC address.
//
CopyMem (AttemptConfigData->SessionConfigData.IsId, &NicInfo->PermanentAddress, 6);
- AttemptConfigData->SessionConfigData.IsId[0] =
+ AttemptConfigData->SessionConfigData.IsId[0] =
(UINT8) (AttemptConfigData->SessionConfigData.IsId[0] & 0x3F);
//
@@ -2908,7 +2908,7 @@ IScsiConfigProcessDefault (
ZeroMem (IfrNvData->ReverseCHAPName, sizeof (IfrNvData->ReverseCHAPName));
ZeroMem (IfrNvData->ReverseCHAPSecret, sizeof (IfrNvData->ReverseCHAPSecret));
}
-
+
IScsiConvertAttemptConfigDataToIfrNvData (AttemptConfigData, IfrNvData);
//
@@ -2921,7 +2921,7 @@ IScsiConfigProcessDefault (
/**
-
+
This function allows the caller to request the current
configuration for one or more named elements. The resulting
string is in <ConfigAltResp> format. Also, any and all alternative
@@ -2950,7 +2950,7 @@ IScsiConfigProcessDefault (
to the most recent "&" before the first
failing name / value pair (or the beginning
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
<ConfigAltResp> format which has all values
@@ -2971,7 +2971,7 @@ IScsiConfigProcessDefault (
would result in this type of
error. In this case, the
Progress parameter would be
- set to NULL.
+ set to NULL.
@retval EFI_NOT_FOUND Routing data doesn't match any
known driver. Progress set to the
@@ -3046,7 +3046,7 @@ IScsiFormExtractConfig (
FreePool (IfrNvData);
return EFI_OUT_OF_RESOURCES;
}
-
+
Status = gIScsiInitiatorName.Get (&gIScsiInitiatorName, &BufferSize, InitiatorName);
if (EFI_ERROR (Status)) {
IfrNvData->InitiatorName[0] = L'\0';
@@ -3114,7 +3114,7 @@ IScsiFormExtractConfig (
/**
-
+
This function applies changes in a driver's configuration.
Input is a Configuration, which has the routing data for this
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] Configuration A null-terminated Unicode string in
- <ConfigString> format.
-
+ <ConfigString> format.
+
@param[out] Progress A pointer to a string filled in with the
offset of the most recent '&' before the
first failing name / value pair (or the
@@ -3139,16 +3139,16 @@ IScsiFormExtractConfig (
@retval EFI_SUCCESS The results have been distributed or are
awaiting distribution.
-
+
@retval EFI_OUT_OF_RESOURCES Not enough memory to store the
parts of the results that must be
stored awaiting possible future
protocols.
-
+
@retval EFI_INVALID_PARAMETERS Passing in a NULL for the
Results parameter would result
in this type of error.
-
+
@retval EFI_NOT_FOUND Target for the specified routing data
was not found.
@@ -3374,7 +3374,7 @@ Exit:
}
/**
-
+
This function is called to provide results data to the driver.
This data consists of a unique key that is used to identify
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] QuestionId A unique value which is sent to the original
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.
@param[in] Type The type of value for the question.
@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);
-
+
//
// Retrieve uncommitted data from Browser
//
-
+
BufferSize = sizeof (ISCSI_CONFIG_IFR_NVDATA);
IfrNvData = AllocateZeroPool (BufferSize);
if (IfrNvData == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
IScsiName = (CHAR8 *) AllocateZeroPool (ISCSI_NAME_MAX_SIZE);
if (IScsiName == NULL) {
FreePool (IfrNvData);
return EFI_OUT_OF_RESOURCES;
}
-
+
Status = EFI_SUCCESS;
-
+
ZeroMem (&OldIfrNvData, BufferSize);
-
+
HiiGetBrowserData (NULL, NULL, BufferSize, (UINT8 *) IfrNvData);
-
+
CopyMem (&OldIfrNvData, IfrNvData, BufferSize);
if (Action == EFI_BROWSER_ACTION_CHANGING) {
@@ -3488,10 +3488,10 @@ IScsiFormCallback (
&Key,
L"Error: please configure iSCSI initiator name first!",
NULL
- );
+ );
break;
}
-
+
Status = IScsiConfigAddAttempt ();
break;
@@ -3515,12 +3515,12 @@ IScsiFormCallback (
);
IScsiConfigDisplayOrderAttempts ();
break;
-
+
default:
Status = IScsiConfigProcessDefault (QuestionId, IfrNvData);
break;
}
- } else if (Action == EFI_BROWSER_ACTION_CHANGED) {
+ } else if (Action == EFI_BROWSER_ACTION_CHANGED) {
switch (QuestionId) {
case KEY_INITIATOR_NAME:
UnicodeStrToAsciiStrS (IfrNvData->InitiatorName, IScsiName, ISCSI_NAME_MAX_SIZE);
@@ -3533,12 +3533,12 @@ IScsiFormCallback (
&Key,
L"Invalid iSCSI Name!",
NULL
- );
+ );
}
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
break;
-
+
case KEY_SAVE_ATTEMPT_CONFIG:
Status = IScsiConvertIfrNvDataToAttemptConfigData (IfrNvData, Private->Current);
if (EFI_ERROR (Status)) {
@@ -3595,17 +3595,17 @@ IScsiFormCallback (
case KEY_IP_MODE:
switch (Value->u8) {
case IP_MODE_IP6:
- NicInfo = IScsiGetNicInfoByIndex (Private->Current->NicIndex);
+ NicInfo = IScsiGetNicInfoByIndex (Private->Current->NicIndex);
if(NicInfo == NULL) {
break;
}
- if(!NicInfo->Ipv6Available) {
- //
- // Current NIC doesn't Support IPv6, hence use IPv4.
- //
+ if(!NicInfo->Ipv6Available) {
+ //
+ // Current NIC doesn't Support IPv6, hence use IPv4.
+ //
IfrNvData->IpMode = IP_MODE_IP4;
-
+
CreatePopUp (
EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
&Key,
@@ -3613,7 +3613,7 @@ IScsiFormCallback (
NULL
);
}
-
+
case IP_MODE_IP4:
ZeroMem (IfrNvData->LocalIp, sizeof (IfrNvData->LocalIp));
ZeroMem (IfrNvData->SubnetMask, sizeof (IfrNvData->SubnetMask));
@@ -3624,7 +3624,7 @@ IScsiFormCallback (
ZeroMem (&Private->Current->SessionConfigData.SubnetMask, sizeof (EFI_IPv4_ADDRESS));
ZeroMem (&Private->Current->SessionConfigData.Gateway, sizeof (EFI_IP_ADDRESS));
ZeroMem (&Private->Current->SessionConfigData.TargetIp, sizeof (EFI_IP_ADDRESS));
-
+
break;
}
@@ -3632,16 +3632,16 @@ IScsiFormCallback (
case KEY_LOCAL_IP:
Status = NetLibStrToIp4 (IfrNvData->LocalIp, &HostIp.v4);
- if (EFI_ERROR (Status) ||
- ((Private->Current->SessionConfigData.SubnetMask.Addr[0] != 0) &&
+ if (EFI_ERROR (Status) ||
+ ((Private->Current->SessionConfigData.SubnetMask.Addr[0] != 0) &&
!NetIp4IsUnicast (NTOHL (HostIp.Addr[0]), NTOHL(*(UINT32*)Private->Current->SessionConfigData.SubnetMask.Addr)))) {
CreatePopUp (
EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
&Key,
L"Invalid IP address!",
NULL
- );
-
+ );
+
Status = EFI_INVALID_PARAMETER;
} else {
CopyMem (&Private->Current->SessionConfigData.LocalIp, &HostIp.v4, sizeof (HostIp.v4));
@@ -3657,8 +3657,8 @@ IScsiFormCallback (
&Key,
L"Invalid Subnet Mask!",
NULL
- );
-
+ );
+
Status = EFI_INVALID_PARAMETER;
} else {
CopyMem (&Private->Current->SessionConfigData.SubnetMask, &SubnetMask.v4, sizeof (SubnetMask.v4));
@@ -3668,16 +3668,16 @@ IScsiFormCallback (
case KEY_GATE_WAY:
Status = NetLibStrToIp4 (IfrNvData->Gateway, &Gateway.v4);
- if (EFI_ERROR (Status) ||
- ((Gateway.Addr[0] != 0) &&
- (Private->Current->SessionConfigData.SubnetMask.Addr[0] != 0) &&
+ if (EFI_ERROR (Status) ||
+ ((Gateway.Addr[0] != 0) &&
+ (Private->Current->SessionConfigData.SubnetMask.Addr[0] != 0) &&
!NetIp4IsUnicast (NTOHL (Gateway.Addr[0]), NTOHL(*(UINT32*)Private->Current->SessionConfigData.SubnetMask.Addr)))) {
CreatePopUp (
EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
&Key,
L"Invalid Gateway!",
NULL
- );
+ );
Status = EFI_INVALID_PARAMETER;
} else {
CopyMem (&Private->Current->SessionConfigData.Gateway, &Gateway.v4, sizeof (Gateway.v4));
@@ -3734,7 +3734,7 @@ IScsiFormCallback (
&Key,
L"Invalid LUN string!",
NULL
- );
+ );
} else {
CopyMem (Private->Current->SessionConfigData.BootLun, &Lun, sizeof (Lun));
}
@@ -3851,7 +3851,7 @@ IScsiConfigFormInit (
NULL
);
ASSERT_EFI_ERROR (Status);
-
+
//
// Publish our HII data.
//
diff --git a/NetworkPkg/IScsiDxe/IScsiConfigStrings.uni b/NetworkPkg/IScsiDxe/IScsiConfigStrings.uni
index 10583f8f3b..21a2a200fc 100644
--- a/NetworkPkg/IScsiDxe/IScsiConfigStrings.uni
+++ b/NetworkPkg/IScsiDxe/IScsiConfigStrings.uni
@@ -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
// 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
@@ -26,8 +26,8 @@
#langdef en-US "English"
#langdef x-UEFI-ns "UefiNameSpace"
-#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_TITLE #language en-US "iSCSI Configuration"
+#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_MAC_FORM_TITLE #language en-US "MAC Selection"
#string STR_ISCSI_CONFIG_INIT_NAME #language en-US "iSCSI Initiator Name"
diff --git a/NetworkPkg/IScsiDxe/IScsiConfigVfr.vfr b/NetworkPkg/IScsiDxe/IScsiConfigVfr.vfr
index 35e8f9a275..7d2c53e908 100644
--- a/NetworkPkg/IScsiDxe/IScsiConfigVfr.vfr
+++ b/NetworkPkg/IScsiDxe/IScsiConfigVfr.vfr
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -113,7 +113,7 @@ formset
text = STRING_TOKEN (STR_NO_SAVE_AND_EXIT),
flags = INTERACTIVE,
key = KEY_IGNORE_DELETE_ATTEMPT;
- endform;
+ endform;
form formid = FORMID_ATTEMPT_FORM,
title = STRING_TOKEN(STR_ISCSI_ATTEMPT_FORM_TITLE);
@@ -157,8 +157,8 @@ formset
minimum = CONNECT_MIN_RETRY,
maximum = CONNECT_MAX_RETRY,
step = 0,
- endnumeric;
-
+ endnumeric;
+
numeric varid = ISCSI_CONFIG_IFR_NVDATA.ConnectTimeout,
prompt = STRING_TOKEN(STR_ISCSI_CONFIG_TIMEOUT),
help = STRING_TOKEN(STR_ISCSI_CONFIG_TIMEOUT_HELP),
@@ -171,7 +171,7 @@ formset
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),
help = STRING_TOKEN(STR_ISCSI_CONFIG_ISID_HELP),
flags = INTERACTIVE,
@@ -191,9 +191,9 @@ formset
endcheckbox;
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;
-
+
grayoutif ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x01;
string varid = ISCSI_CONFIG_IFR_NVDATA.LocalIp,
prompt = STRING_TOKEN(STR_ISCSI_LOCAL_IP_ADDRESS),
@@ -222,12 +222,12 @@ formset
maxsize = IP4_MAX_SIZE,
endstring;
endif;
-
+
endif;
suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG;
subtitle text = STRING_TOKEN(STR_NULL);
- endif;
+ endif;
suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG OR
ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x00;
@@ -276,22 +276,22 @@ formset
minsize = LUN_MIN_SIZE,
maxsize = LUN_MAX_SIZE,
endstring;
-
+
endif;
suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG;
subtitle text = STRING_TOKEN(STR_NULL);
- endif;
+ endif;
oneof varid = ISCSI_CONFIG_IFR_NVDATA.AuthenticationType,
- questionid = KEY_AUTH_TYPE,
+ questionid = KEY_AUTH_TYPE,
prompt = STRING_TOKEN(STR_AUTHEN_TYPE_PROMPT),
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_NONE), value = ISCSI_AUTH_TYPE_NONE, flags = DEFAULT;
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,
prompt = STRING_TOKEN(STR_CHAP_TYPE_PROMPT),
help = STRING_TOKEN(STR_CHAP_TYPE_HELP),
@@ -393,7 +393,7 @@ formset
text = STRING_TOKEN (STR_SAVE_CHANGES),
flags = INTERACTIVE,
key = KEY_SAVE_ATTEMPT_CONFIG;
-
+
goto FORMID_MAIN_FORM,
prompt = STRING_TOKEN (STR_RETURN_MAIN_FORM),
help = STRING_TOKEN (STR_RETURN_MAIN_FORM),
diff --git a/NetworkPkg/IScsiDxe/IScsiDhcp.c b/NetworkPkg/IScsiDxe/IScsiDhcp.c
index e34352370c..2a0da0ccf3 100644
--- a/NetworkPkg/IScsiDxe/IScsiDhcp.c
+++ b/NetworkPkg/IScsiDxe/IScsiDhcp.c
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -201,14 +201,14 @@ ON_EXIT:
/**
The callback function registerd to the DHCP4 instance that is used to select
the qualified DHCP OFFER.
-
+
@param[in] This 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] 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.
-
+
@retval EFI_SUCCESS Either the DHCP OFFER is qualified or we're not intereseted
in the Dhcp4Event.
@retval EFI_NOT_READY The DHCP OFFER packet doesn't match our requirements.
@@ -411,7 +411,7 @@ IScsiSetIp4Policy (
);
if (EFI_ERROR (Status)) {
return Status;
- }
+ }
}
return EFI_SUCCESS;
@@ -462,10 +462,10 @@ IScsiDoDhcp (
}
//
- // 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
- // 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.
+ // 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
+ // 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.
// So, we need to switch it's policy to static.
//
Status = gBS->HandleProtocol (Controller, &gEfiIp4Config2ProtocolGuid, (VOID **) &Ip4Config2);
diff --git a/NetworkPkg/IScsiDxe/IScsiDhcp6.c b/NetworkPkg/IScsiDxe/IScsiDhcp6.c
index 90acb94e0e..b24ba66c64 100644
--- a/NetworkPkg/IScsiDxe/IScsiDhcp6.c
+++ b/NetworkPkg/IScsiDxe/IScsiDhcp6.c
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -47,7 +47,7 @@ IScsiDhcp6ExtractRootPath (
UINT8 Index;
ISCSI_SESSION_CONFIG_NVDATA *ConfigNvData;
EFI_IP_ADDRESS Ip;
- UINT8 IpMode;
+ UINT8 IpMode;
ConfigNvData = &ConfigData->SessionConfigData;
ConfigNvData->DnsMode = FALSE;
@@ -156,7 +156,7 @@ IScsiDhcp6ExtractRootPath (
//
// 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) {
IpMode = ConfigNvData->IpMode;
} 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
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.
@param[in] Context Pointer to the context that is initialized in
the EFI_DHCP6_PROTOCOL.InfoRequest().
@@ -276,10 +276,10 @@ IScsiDhcp6ParseReply (
EFI_DHCP6_PACKET_OPTION **OptionList;
ISCSI_ATTEMPT_CONFIG_NVDATA *ConfigData;
UINT16 ParaLen;
-
+
OptionCount = 0;
BootFileOpt = NULL;
-
+
Status = This->Parse (This, Packet, &OptionCount, NULL);
if (Status != EFI_BUFFER_TOO_SMALL) {
return EFI_NOT_READY;
@@ -353,7 +353,7 @@ IScsiDhcp6ParseReply (
Status = EFI_UNSUPPORTED;
goto Exit;
}
-
+
//
// Get iSCSI root path from Boot File Uniform Resource Locator (URL) Option
//
@@ -524,7 +524,7 @@ ON_EXIT:
if (Oro != NULL) {
FreePool (Oro);
- }
+ }
if (Timer != NULL) {
gBS->CloseEvent (Timer);
diff --git a/NetworkPkg/IScsiDxe/IScsiDns.h b/NetworkPkg/IScsiDxe/IScsiDns.h
index 0b7ff8680b..c8457174e3 100644
--- a/NetworkPkg/IScsiDxe/IScsiDns.h
+++ b/NetworkPkg/IScsiDxe/IScsiDns.h
@@ -2,7 +2,7 @@
The header file of routines for IScsi 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
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
@@ -56,4 +56,4 @@ IScsiDns6 (
IN OUT ISCSI_SESSION_CONFIG_NVDATA *NvData
);
-#endif \ No newline at end of file
+#endif
diff --git a/NetworkPkg/IScsiDxe/IScsiDriver.c b/NetworkPkg/IScsiDxe/IScsiDriver.c
index a0ece3ae1f..91176e6715 100644
--- a/NetworkPkg/IScsiDxe/IScsiDriver.c
+++ b/NetworkPkg/IScsiDxe/IScsiDriver.c
@@ -1,7 +1,7 @@
/** @file
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>
This program and the accompanying materials
@@ -39,14 +39,14 @@ EFI_GUID gIScsiV6PrivateGuid = ISCSI_V6_PRIVATE_GUID;
ISCSI_PRIVATE_DATA *mPrivate = NULL;
/**
- Tests to see if this driver supports the RemainingDevicePath.
-
- @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
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by this
+ Tests to see if this driver supports the RemainingDevicePath.
+
+ @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
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The RemainingDevicePath is supported or NULL.
@@ -222,15 +222,15 @@ Exit:
IScsiIp4(6)DriverBindingSupported.
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- @param[in] ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by 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
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@param[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
@@ -437,7 +437,7 @@ IScsiStart (
return EFI_ABORTED;
}
}
-
+
//
// Record the incoming NIC info.
//
@@ -479,13 +479,13 @@ IScsiStart (
ControllerHandle,
EFI_OPEN_PROTOCOL_BY_DRIVER
);
-
+
if (EFI_ERROR (Status)) {
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.
//
Status = gBS->InstallProtocolInterface (
@@ -497,7 +497,7 @@ IScsiStart (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
if (IpVersion == IP_VERSION_4) {
mPrivate->Ipv6Flag = FALSE;
} else {
@@ -900,8 +900,8 @@ IScsiStart (
ExistPrivate->Controller,
IScsiPrivateGuid,
&ExistPrivate->IScsiIdentifier
- );
-
+ );
+
IScsiRemoveNic (ExistPrivate->Controller);
if (ExistPrivate->Session != NULL) {
IScsiSessionAbort (ExistPrivate->Session);
@@ -973,7 +973,7 @@ IScsiStart (
Image,
Private->ExtScsiPassThruHandle,
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
- );
+ );
if (EFI_ERROR (Status)) {
gBS->UninstallMultipleProtocolInterfaces (
Private->ExtScsiPassThruHandle,
@@ -983,7 +983,7 @@ IScsiStart (
Private->DevicePath,
NULL
);
-
+
goto ON_ERROR;
}
@@ -1010,16 +1010,16 @@ ON_ERROR:
/**
Stops a device controller or a bus controller. This is the worker function for
IScsiIp4(6)DriverBindingStop.
-
+
@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
- support a bus specific I/O protocol for the driver
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@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.
@param[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
-
+
@retval EFI_SUCCESS The device was stopped.
@retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.
@retval EFI_INVALID_PARAMETER Child handle is NULL.
@@ -1084,7 +1084,7 @@ IScsiStop (
Private->Image,
Private->ExtScsiPassThruHandle
);
-
+
gBS->CloseProtocol (
Conn->TcpIo.Handle,
ProtocolGuid,
@@ -1094,7 +1094,7 @@ IScsiStop (
return EFI_SUCCESS;
}
-
+
//
// Get the handle of the controller we are controling.
//
@@ -1134,7 +1134,7 @@ IScsiStop (
This->DriverBindingHandle,
IScsiController
);
-
+
ASSERT (!EFI_ERROR (Status));
Status = NetLibDestroyServiceChild (
@@ -1151,7 +1151,7 @@ IScsiStop (
IScsiController,
ProtocolGuid,
&Private->IScsiIdentifier
- );
+ );
//
// 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.
- 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 and/or the services from the bus I/O abstraction attached to
- 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
- 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
- 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(),
- AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
- 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
+ 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 and/or the services from the bus I/O abstraction attached to
+ 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
+ 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
+ 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(),
+ AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
+ 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
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] ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by 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
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@@ -1238,28 +1238,28 @@ IScsiIp4DriverBindingSupported (
Starts a device controller or a bus controller.
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
- common boot service. It is legal to call Start() from other locations,
+ 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,
but the following calling restrictions must be followed or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
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] ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For a bus driver, if this parameter is NULL, then handles
- for all the children of Controller are created by this driver.
- 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
- child device specified by the first Device Path Node of
+ @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
+ drivers. For a bus driver, if this parameter is NULL, then handles
+ for all the children of Controller are created by this driver.
+ 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
+ child device specified by the first Device Path Node of
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
driver.
@@ -1289,10 +1289,10 @@ IScsiIp4DriverBindingStart (
/**
Stops a device controller or a bus controller.
-
- 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
- into this common boot service. It is legal to call Stop() from other locations,
+
+ 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
+ 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.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
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
Start() function, and the Start() function must have called OpenProtocol() on
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] ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@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.
@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.
- 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 and/or the services from the bus I/O abstraction attached to
- 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
- 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
- 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(),
- AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
- 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
+ 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 and/or the services from the bus I/O abstraction attached to
+ 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
+ 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
+ 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(),
+ AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
+ 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
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] ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by 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
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@@ -1393,28 +1393,28 @@ IScsiIp6DriverBindingSupported (
Starts a device controller or a bus controller.
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
- common boot service. It is legal to call Start() from other locations,
+ 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,
but the following calling restrictions must be followed or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
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] ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For a bus driver, if this parameter is NULL, then handles
- for all the children of Controller are created by this driver.
- 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
- child device specified by the first Device Path Node of
+ @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
+ drivers. For a bus driver, if this parameter is NULL, then handles
+ for all the children of Controller are created by this driver.
+ 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
+ child device specified by the first Device Path Node of
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
driver.
@@ -1444,10 +1444,10 @@ IScsiIp6DriverBindingStart (
/**
Stops a device controller or a bus controller.
-
- 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
- into this common boot service. It is legal to call Stop() from other locations,
+
+ 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
+ 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.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
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
Start() function, and the Start() function must have called OpenProtocol() on
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] ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@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.
@retval EFI_SUCCESS The device was stopped.
@@ -1573,7 +1573,7 @@ IScsiUnload (
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
-
+
//
// Uninstall the protocols installed by iSCSI driver.
//
@@ -1586,7 +1586,7 @@ IScsiUnload (
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
-
+
if (gIScsiControllerNameTable!= NULL) {
Status = FreeUnicodeStringTable (gIScsiControllerNameTable);
if (EFI_ERROR (Status)) {
@@ -1615,7 +1615,7 @@ IScsiUnload (
goto ON_EXIT;
}
}
-
+
Status = gBS->HandleProtocol (
gIScsiIp4DriverBinding.DriverBindingHandle,
&gEfiComponentName2ProtocolGuid,
@@ -1653,7 +1653,7 @@ IScsiUnload (
goto ON_EXIT;
}
}
-
+
Status = gBS->HandleProtocol (
gIScsiIp6DriverBinding.DriverBindingHandle,
&gEfiComponentName2ProtocolGuid,
@@ -1698,7 +1698,7 @@ ON_EXIT:
if (DeviceHandleBuffer != NULL) {
FreePool (DeviceHandleBuffer);
}
-
+
return Status;
}
@@ -1706,11 +1706,11 @@ ON_EXIT:
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
both device drivers and bus drivers.
-
+
The entry point for iSCSI driver which initializes the global variables and
installs the driver binding, component name protocol, iSCSI initiator name
protocol and Authentication Info protocol on its image.
-
+
@param[in] ImageHandle The firmware allocated handle for the UEFI image.
@param[in] SystemTable A pointer to the EFI System Table.
@@ -1767,7 +1767,7 @@ IScsiDriverEntryPoint (
if (EFI_ERROR (Status)) {
goto Error1;
}
-
+
//
// Install the iSCSI Initiator Name Protocol.
//
@@ -1779,7 +1779,7 @@ IScsiDriverEntryPoint (
);
if (EFI_ERROR (Status)) {
goto Error2;
- }
+ }
//
// Create the private data structures.
@@ -1835,7 +1835,7 @@ IScsiDriverEntryPoint (
);
if (EFI_ERROR (Status)) {
goto Error6;
- }
+ }
}
return EFI_SUCCESS;
diff --git a/NetworkPkg/IScsiDxe/IScsiDriver.h b/NetworkPkg/IScsiDxe/IScsiDriver.h
index 2db93c5d01..ea76cf7221 100644
--- a/NetworkPkg/IScsiDxe/IScsiDriver.h
+++ b/NetworkPkg/IScsiDxe/IScsiDriver.h
@@ -1,7 +1,7 @@
/** @file
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>
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.
- 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 and/or the services from the bus I/O abstraction attached to
- 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
- 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
- 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(),
- AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
- 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
+ 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 and/or the services from the bus I/O abstraction attached to
+ 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
+ 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
+ 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(),
+ AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
+ 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
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] ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by 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
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@@ -146,28 +146,28 @@ IScsiIp4DriverBindingSupported (
Starts a device controller or a bus controller.
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
- common boot service. It is legal to call Start() from other locations,
+ 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,
but the following calling restrictions must be followed or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
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] ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For a bus driver, if this parameter is NULL, then handles
- for all the children of Controller are created by this driver.
- 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
- child device specified by the first Device Path Node of
+ @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
+ drivers. For a bus driver, if this parameter is NULL, then handles
+ for all the children of Controller are created by this driver.
+ 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
+ child device specified by the first Device Path Node of
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
driver.
@@ -187,10 +187,10 @@ IScsiIp4DriverBindingStart (
/**
Stops a device controller or a bus controller.
-
- 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
- into this common boot service. It is legal to call Stop() from other locations,
+
+ 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
+ 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.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
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
Start() function, and the Start() function must have called OpenProtocol() on
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] ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@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.
@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.
- 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 and/or the services from the bus I/O abstraction attached to
- 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
- 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
- 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(),
- AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
- 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
+ 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 and/or the services from the bus I/O abstraction attached to
+ 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
+ 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
+ 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(),
+ AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
+ 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
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] ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For bus drivers, if this parameter is not NULL, then
- the bus driver must determine if the bus controller specified
- by ControllerHandle and the child controller specified
- by RemainingDevicePath are both supported by 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
+ drivers. For bus drivers, if this parameter is not NULL, then
+ the bus driver must determine if the bus controller specified
+ by ControllerHandle and the child controller specified
+ by RemainingDevicePath are both supported by this
bus driver.
@retval EFI_SUCCESS The device specified by ControllerHandle and
@@ -274,28 +274,28 @@ IScsiIp6DriverBindingSupported (
Starts a device controller or a bus controller.
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
- common boot service. It is legal to call Start() from other locations,
+ 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,
but the following calling restrictions must be followed or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
EFI_DEVICE_PATH_PROTOCOL.
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] ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param[in] ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @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
- drivers. For a bus driver, if this parameter is NULL, then handles
- for all the children of Controller are created by this driver.
- 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
- child device specified by the first Device Path Node of
+ @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
+ drivers. For a bus driver, if this parameter is NULL, then handles
+ for all the children of Controller are created by this driver.
+ 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
+ child device specified by the first Device Path Node of
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
driver.
@@ -315,10 +315,10 @@ IScsiIp6DriverBindingStart (
/**
Stops a device controller or a bus controller.
-
- 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
- into this common boot service. It is legal to call Stop() from other locations,
+
+ 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
+ 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.
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
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
Start() function, and the Start() function must have called OpenProtocol() on
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] ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param[in] ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@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.
@retval EFI_SUCCESS The device was stopped.
@@ -434,11 +434,11 @@ IScsiComponentNameGetDriverName (
language of the driver name that the caller is
requesting, and it must match one of the
languages specified in SupportedLanguages. The
- number of languages supported by a driver is
- determined by the driver writer. Language is
- specified inRFC 4646 or ISO 639-2 language code
+ number of languages supported by a driver is
+ determined by the driver writer. Language is
+ specified inRFC 4646 or ISO 639-2 language code
format.
-
+
@param[out] ControllerName A pointer to the Unicode string to return.
This Unicode string is the name of the
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.
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] Target The Target is an array of size TARGET_MAX_BYTES and it
represents the id of the SCSI device to send the SCSI
Request Packet. Each transport driver may choose to
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)
to represent an FC target.
@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
- 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,
and blocking I/O is performed. If Event is NULL, then
blocking I/O is performed. If Event is not NULL and non
@@ -618,7 +618,7 @@ IScsiSetAuthenticationInfo (
completes.
@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.
For write and bi-directional commands, OutTransferLength
bytes were transferred by OutDataBuffer.
@@ -631,7 +631,7 @@ IScsiSetAuthenticationInfo (
there are too many SCSI Request Packets already
queued. The caller may retry later.
@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
are invalid.
@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
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
- 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
- on the SCSI channel.
+ 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
+ on the SCSI channel.
@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
@@ -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
instance.
@@ -800,7 +800,7 @@ IScsiExtScsiPassThruResetTargetLun (
next SCSI device present on a SCSI channel.
An input value of 0xF(all bytes in the array are 0xF)
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
channel was returned in Target.
diff --git a/NetworkPkg/IScsiDxe/IScsiDxe.inf b/NetworkPkg/IScsiDxe/IScsiDxe.inf
index 319c7fe79a..2d96611b44 100644
--- a/NetworkPkg/IScsiDxe/IScsiDxe.inf
+++ b/NetworkPkg/IScsiDxe/IScsiDxe.inf
@@ -3,8 +3,8 @@
#
# The iSCSI driver provides iSCSI service in the preboot environment and supports
# 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
# 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
@@ -57,7 +57,7 @@
IScsiExtScsiPassThru.c
IScsiIbft.c
IScsiIbft.h
- IScsiInitiatorName.c
+ IScsiInitiatorName.c
IScsiImpl.h
IScsiMisc.c
IScsiMisc.h
@@ -82,7 +82,7 @@
PrintLib
UefiBootServicesTableLib
UefiDriverEntryPoint
- UefiLib
+ UefiLib
UefiRuntimeServicesTableLib
UefiHiiServicesLib
BaseCryptLib
@@ -113,7 +113,7 @@
## PRODUCES
## UNDEFINED # Variable
gEfiIScsiInitiatorNameProtocolGuid
- ## PRODUCES
+ ## PRODUCES
gEfiAuthenticationInfoProtocolGuid
## SOMETIMES_CONSUMES
gEfiAdapterInformationProtocolGuid
@@ -127,7 +127,7 @@
gEfiAcpi20TableGuid ## SOMETIMES_CONSUMES ## SystemTable
gEfiAdapterInfoNetworkBootGuid ## SOMETIMES_CONSUMES ## UNDEFINED
gEfiAdapterInfoUndiIpv6SupportGuid ## SOMETIMES_CONSUMES ## GUID
-
+
## SOMETIMES_PRODUCES ## Variable:L"AttemptOrder"
## SOMETIMES_CONSUMES ## Variable:L"AttemptOrder"
## SOMETIMES_PRODUCES ## Variable:L"InitialAttemptOrder"
diff --git a/NetworkPkg/IScsiDxe/IScsiDxe.uni b/NetworkPkg/IScsiDxe/IScsiDxe.uni
index 8522a4991c..ae3082d794 100644
--- a/NetworkPkg/IScsiDxe/IScsiDxe.uni
+++ b/NetworkPkg/IScsiDxe/IScsiDxe.uni
@@ -4,13 +4,13 @@
// The iSCSI driver provides iSCSI service in the preboot environment and supports
// 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
// 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
// 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.
//
diff --git a/NetworkPkg/IScsiDxe/IScsiDxeExtra.uni b/NetworkPkg/IScsiDxe/IScsiDxeExtra.uni
index 4a0579875e..98b9231920 100644
--- a/NetworkPkg/IScsiDxe/IScsiDxeExtra.uni
+++ b/NetworkPkg/IScsiDxe/IScsiDxeExtra.uni
@@ -1,7 +1,7 @@
// /** @file
// 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
// are licensed and made available under the terms and conditions of the BSD License
@@ -14,7 +14,7 @@
// **/
#string STR_PROPERTIES_MODULE_NAME
-#language en-US
+#language en-US
"iSCSI DXE"
diff --git a/NetworkPkg/IScsiDxe/IScsiExtScsiPassThru.c b/NetworkPkg/IScsiDxe/IScsiExtScsiPassThru.c
index 90e26d4611..dcc33a2e22 100644
--- a/NetworkPkg/IScsiDxe/IScsiExtScsiPassThru.c
+++ b/NetworkPkg/IScsiDxe/IScsiExtScsiPassThru.c
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -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.
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] Target The Target is an array of size TARGET_MAX_BYTES and it
represents the id of the SCSI device to send the SCSI
Request Packet. Each transport driver may choose to
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)
to represent an FC target.
@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
- 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,
and blocking I/O is performed. If Event is NULL, then
blocking I/O is performed. If Event is not NULL and non
@@ -50,7 +50,7 @@ EFI_EXT_SCSI_PASS_THRU_PROTOCOL gIScsiExtScsiPassThruProtocolTemplate = {
completes.
@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.
For write and bi-directional commands, OutTransferLength
bytes were transferred by OutDataBuffer.
@@ -63,7 +63,7 @@ EFI_EXT_SCSI_PASS_THRU_PROTOCOL gIScsiExtScsiPassThruProtocolTemplate = {
there are too many SCSI Request Packets already
queued. The caller may retry later.
@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,
are invalid.
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
@@ -88,7 +88,7 @@ IScsiExtScsiPassThruFunction (
{
EFI_STATUS Status;
ISCSI_DRIVER_DATA *Private;
-
+
if (Target[0] != 0) {
return EFI_INVALID_PARAMETER;
}
@@ -118,9 +118,9 @@ IScsiExtScsiPassThruFunction (
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
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
- and LUN returned to see if a SCSI device is actually present at that location
- on the SCSI channel.
+ 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
+ on the SCSI channel.
@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
@@ -298,7 +298,7 @@ IScsiExtScsiPassThruBuildDevicePath (
@retval EFI_INVALID_PARAMETER DevicePath/Target/Lun is NULL.
@retval EFI_UNSUPPORTED This driver does not support the device path node
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.
**/
@@ -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
instance.
@@ -392,7 +392,7 @@ IScsiExtScsiPassThruResetTargetLun (
next SCSI device present on a SCSI channel.
An input value of 0xF(all bytes in the array are 0xF)
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
channel was returned in Target.
diff --git a/NetworkPkg/IScsiDxe/IScsiIbft.c b/NetworkPkg/IScsiDxe/IScsiIbft.c
index 27d098d578..a3b7c4e26f 100644
--- a/NetworkPkg/IScsiDxe/IScsiIbft.c
+++ b/NetworkPkg/IScsiDxe/IScsiIbft.c
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -19,7 +19,7 @@ UINTN mTableKey;
/**
Initialize 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] OemTableId The OEM table ID for the iBFT.
diff --git a/NetworkPkg/IScsiDxe/IScsiIbft.h b/NetworkPkg/IScsiDxe/IScsiIbft.h
index 35d5216419..aa85794d77 100644
--- a/NetworkPkg/IScsiDxe/IScsiIbft.h
+++ b/NetworkPkg/IScsiDxe/IScsiIbft.h
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -16,7 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define _ISCSI_IBFT_H_
#include <IndustryStandard/Acpi.h>
-#include <IndustryStandard/IScsiBootFirmwareTable.h>
+#include <IndustryStandard/IScsiBootFirmwareTable.h>
#include <Protocol/AcpiTable.h>
#include <Protocol/PciIo.h>
diff --git a/NetworkPkg/IScsiDxe/IScsiImpl.h b/NetworkPkg/IScsiDxe/IScsiImpl.h
index 9e36da0203..5ab685aa84 100644
--- a/NetworkPkg/IScsiDxe/IScsiImpl.h
+++ b/NetworkPkg/IScsiDxe/IScsiImpl.h
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -201,7 +201,7 @@ struct _ISCSI_DRIVER_DATA {
EFI_EXT_SCSI_PASS_THRU_MODE ExtScsiPassThruMode;
EFI_HANDLE ExtScsiPassThruHandle;
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
- EFI_HANDLE ChildHandle;
+ EFI_HANDLE ChildHandle;
ISCSI_SESSION *Session;
};
diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c b/NetworkPkg/IScsiDxe/IScsiMisc.c
index 745b7ac07b..dd0d32dcda 100644
--- a/NetworkPkg/IScsiDxe/IScsiMisc.c
+++ b/NetworkPkg/IScsiDxe/IScsiMisc.c
@@ -20,7 +20,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 IScsiHexString[] = "0123456789ABCDEFa
Removes (trims) specified leading and trailing characters from a string.
@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.
@@ -33,18 +33,18 @@ IScsiStrTrim (
{
CHAR16 *Pointer1;
CHAR16 *Pointer2;
-
+
if (*Str == 0) {
return ;
}
-
+
//
// Trim off the leading and trailing characters c
//
for (Pointer1 = Str; (*Pointer1 != 0) && (*Pointer1 == CharC); Pointer1++) {
;
}
-
+
Pointer2 = Str;
if (Pointer2 == Pointer1) {
while (*Pointer1 != 0) {
@@ -52,19 +52,19 @@ IScsiStrTrim (
Pointer1++;
}
} else {
- while (*Pointer1 != 0) {
- *Pointer2 = *Pointer1;
+ while (*Pointer1 != 0) {
+ *Pointer2 = *Pointer1;
Pointer1++;
Pointer2++;
}
*Pointer2 = 0;
}
-
-
+
+
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;
}
}
@@ -131,11 +131,11 @@ IScsiAsciiStrToLun (
CHAR8 TemStr[2];
UINT8 TemValue;
UINT16 Value[4];
-
+
ZeroMem (Lun, 8);
ZeroMem (TemStr, 2);
ZeroMem ((UINT8 *) Value, sizeof (Value));
- SizeStr = AsciiStrLen (Str);
+ SizeStr = AsciiStrLen (Str);
IndexValue = 0;
IndexNum = 0;
@@ -150,7 +150,7 @@ IScsiAsciiStrToLun (
return EFI_INVALID_PARAMETER;
}
}
-
+
if ((TemValue == 0) && (TemStr[0] == '-')) {
//
// Next Lun value.
@@ -167,24 +167,24 @@ IScsiAsciiStrToLun (
IndexNum = 0;
continue;
}
-
+
if (++IndexNum > 4) {
- //
+ //
// Each Lun Str can't exceed size 4, because it will be as UINT16 value.
//
return EFI_INVALID_PARAMETER;
}
-
+
//
// Combine UINT16 value.
//
Value[IndexValue] = (UINT16) ((Value[IndexValue] << 4) + TemValue);
}
-
+
for (Index = 0; Index <= IndexValue; Index ++) {
*((UINT16 *) &Lun[Index * 2]) = HTONS (Value[Index]);
}
-
+
return EFI_SUCCESS;
}
@@ -319,7 +319,7 @@ IScsiMacAddrToStr (
@param[in, out] HexStr Pointer to 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.
@retval EFI_BUFFER_TOO_SMALL The string is too small.
@retval EFI_INVALID_PARAMETER The IP string is malformatted.
@@ -385,7 +385,7 @@ IScsiHexToBin (
UINTN Length;
UINT8 Digit;
CHAR8 TemStr[2];
-
+
ZeroMem (TemStr, sizeof (TemStr));
//
@@ -394,7 +394,7 @@ IScsiHexToBin (
if ((HexStr[0] == '0') && ((HexStr[1] == 'x') || (HexStr[1] == 'X'))) {
HexStr += 2;
}
-
+
Length = AsciiStrLen (HexStr);
for (Index = 0; Index < Length; Index ++) {
@@ -412,7 +412,7 @@ IScsiHexToBin (
BinBuffer [Index/2] = (UINT8) ((BinBuffer [Index/2] << 4) + Digit);
}
}
-
+
*BinLength = (UINT32) ((Index + 1)/2);
return EFI_SUCCESS;
@@ -492,7 +492,7 @@ IScsiCheckIpv6Support (
BOOLEAN Supported;
VOID *InfoBlock;
UINTN InfoBlockSize;
-
+
EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL *Nii;
ASSERT (Ipv6Support != NULL);
@@ -515,7 +515,7 @@ IScsiCheckIpv6Support (
//
// Get the NIC handle by SNP protocol.
- //
+ //
Handle = NetLibGetSnpHandle (ControllerHandle, NULL);
if (Handle == NULL) {
return EFI_NOT_FOUND;
@@ -561,11 +561,11 @@ IScsiCheckIpv6Support (
if (EFI_ERROR (Status) || InfoBlock == NULL) {
FreePool (InfoBlock);
return EFI_NOT_FOUND;
- }
+ }
*Ipv6Support = ((EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT *) InfoBlock)->Ipv6Support;
FreePool (InfoBlock);
-
+
return EFI_SUCCESS;
}
@@ -615,19 +615,19 @@ IScsiAddNic (
CompareMem (&NicInfo->PermanentAddress, MacAddr.Addr, HwAddressSize) == 0 &&
NicInfo->VlanId == VlanId) {
mPrivate->CurrentNic = NicInfo->NicIndex;
-
- //
+
+ //
// Set IPv6 available flag.
- //
+ //
Status = IScsiCheckIpv6Support (Controller, Image, &NicInfo->Ipv6Available);
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.
//
NicInfo->Ipv6Available = TRUE;
}
-
+
return EFI_SUCCESS;
}
@@ -649,19 +649,19 @@ IScsiAddNic (
NicInfo->VlanId = VlanId;
NicInfo->NicIndex = (UINT8) (mPrivate->MaxNic + 1);
mPrivate->MaxNic = NicInfo->NicIndex;
-
+
//
// Set IPv6 available flag.
- //
+ //
Status = IScsiCheckIpv6Support (Controller, Image, &NicInfo->Ipv6Available);
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.
//
NicInfo->Ipv6Available = TRUE;
}
-
+
//
// Get the PCI location.
//
@@ -1799,7 +1799,7 @@ IScsiCleanDriverData (
EXIT:
if (Private->ExitBootServiceEvent != NULL) {
- gBS->CloseEvent (Private->ExitBootServiceEvent);
+ gBS->CloseEvent (Private->ExitBootServiceEvent);
}
mCallbackInfo->Current = NULL;
@@ -1813,10 +1813,10 @@ EXIT:
@param[in] Controller The handle of the controller.
@param[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
-
+
@retval TRUE The handle of the controller need the Dhcp protocol.
@retval FALSE The handle of the controller does not need the Dhcp protocol.
-
+
**/
BOOLEAN
IScsiDhcpIsConfigured (
@@ -1835,7 +1835,7 @@ IScsiDhcpIsConfigured (
CHAR16 MacString[ISCSI_MAX_MAC_STRING_LEN];
CHAR16 AttemptMacString[ISCSI_MAX_MAC_STRING_LEN];
CHAR16 AttemptName[ISCSI_NAME_IFR_MAX_SIZE];
-
+
AttemptConfigOrder = IScsiGetVariableAndSize (
L"AttemptOrder",
&gIScsiConfigGuid,
@@ -1844,7 +1844,7 @@ IScsiDhcpIsConfigured (
if (AttemptConfigOrder == NULL || AttemptConfigOrderSize == 0) {
return FALSE;
}
-
+
//
// Get MAC address of this network device.
//
@@ -1857,7 +1857,7 @@ IScsiDhcpIsConfigured (
//
VlanId = NetLibGetVlanId (Controller);
IScsiMacAddrToStr (&MacAddr, (UINT32) HwAddressSize, VlanId, MacString);
-
+
for (Index = 0; Index < AttemptConfigOrderSize / sizeof (UINT8); Index++) {
UnicodeSPrint (
AttemptName,
@@ -1874,7 +1874,7 @@ IScsiDhcpIsConfigured (
if(AttemptTmp == NULL || EFI_ERROR (Status)) {
continue;
}
-
+
ASSERT (AttemptConfigOrder[Index] == AttemptTmp->AttemptConfigIndex);
if (AttemptTmp->SessionConfigData.Enabled == ISCSI_DISABLED) {
@@ -1882,7 +1882,7 @@ IScsiDhcpIsConfigured (
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)) {
FreePool (AttemptTmp);
continue;
@@ -1896,7 +1896,7 @@ IScsiDhcpIsConfigured (
if(AttemptTmp->SessionConfigData.IpMode == IP_MODE_AUTOCONFIG ||
AttemptTmp->SessionConfigData.InitiatorInfoFromDhcp == TRUE ||
- AttemptTmp->SessionConfigData.TargetInfoFromDhcp == TRUE) {
+ AttemptTmp->SessionConfigData.TargetInfoFromDhcp == TRUE) {
FreePool (AttemptTmp);
FreePool (AttemptConfigOrder);
return TRUE;
@@ -1904,7 +1904,7 @@ IScsiDhcpIsConfigured (
FreePool (AttemptTmp);
}
-
+
FreePool (AttemptConfigOrder);
return FALSE;
}
@@ -1913,10 +1913,10 @@ IScsiDhcpIsConfigured (
Check whether the Controller handle is configured to use DNS protocol.
@param[in] Controller The handle of the controller.
-
+
@retval TRUE The handle of the controller need the Dns protocol.
@retval FALSE The handle of the controller does not need the Dns protocol.
-
+
**/
BOOLEAN
IScsiDnsIsConfigured (
@@ -1934,7 +1934,7 @@ IScsiDnsIsConfigured (
CHAR16 AttemptMacString[ISCSI_MAX_MAC_STRING_LEN];
CHAR16 MacString[ISCSI_MAX_MAC_STRING_LEN];
CHAR16 AttemptName[ISCSI_NAME_IFR_MAX_SIZE];
-
+
AttemptConfigOrder = IScsiGetVariableAndSize (
L"AttemptOrder",
&gIScsiConfigGuid,
@@ -1943,7 +1943,7 @@ IScsiDnsIsConfigured (
if (AttemptConfigOrder == NULL || AttemptConfigOrderSize == 0) {
return FALSE;
}
-
+
//
// Get MAC address of this network device.
//
@@ -1956,7 +1956,7 @@ IScsiDnsIsConfigured (
//
VlanId = NetLibGetVlanId (Controller);
IScsiMacAddrToStr (&MacAddr, (UINT32) HwAddressSize, VlanId, MacString);
-
+
for (Index = 0; Index < AttemptConfigOrderSize / sizeof (UINT8); Index++) {
UnicodeSPrint (
AttemptName,
@@ -1974,7 +1974,7 @@ IScsiDnsIsConfigured (
if(AttemptTmp == NULL || EFI_ERROR (Status)) {
continue;
}
-
+
ASSERT (AttemptConfigOrder[Index] == AttemptTmp->AttemptConfigIndex);
AsciiStrToUnicodeStrS (AttemptTmp->MacString, AttemptMacString, sizeof (AttemptMacString) / sizeof (AttemptMacString[0]));
@@ -1983,7 +1983,7 @@ IScsiDnsIsConfigured (
FreePool (AttemptTmp);
continue;
}
-
+
if (AttemptTmp->SessionConfigData.DnsMode || AttemptTmp->SessionConfigData.TargetInfoFromDhcp) {
FreePool (AttemptTmp);
FreePool (AttemptConfigOrder);
@@ -2060,7 +2060,7 @@ IScsiGetConfigData (
//
// Check whether the attempt exists in AttemptConfig.
//
- AttemptTmp = IScsiConfigGetAttemptByConfigIndex (AttemptConfigOrder[Index]);
+ AttemptTmp = IScsiConfigGetAttemptByConfigIndex (AttemptConfigOrder[Index]);
if (AttemptTmp != NULL && AttemptTmp->SessionConfigData.Enabled == ISCSI_DISABLED) {
continue;
} else if (AttemptTmp != NULL && AttemptTmp->SessionConfigData.Enabled != ISCSI_DISABLED) {
@@ -2126,11 +2126,11 @@ IScsiGetConfigData (
continue;
}
- } else if (AttemptTmp->SessionConfigData.InitiatorInfoFromDhcp &&
- !AttemptTmp->ValidPath &&
+ } else if (AttemptTmp->SessionConfigData.InitiatorInfoFromDhcp &&
+ !AttemptTmp->ValidPath &&
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.
//
AttemptTmp->DhcpSuccess = FALSE;
@@ -2213,7 +2213,7 @@ IScsiGetConfigData (
(UINT8) (mPrivate->Ipv6Flag ? IP_MODE_AUTOCONFIG_IP6 : IP_MODE_AUTOCONFIG_IP4);
AttemptConfigData->AutoConfigureSuccess = FALSE;
}
-
+
//
// Get some information from dhcp server.
//
@@ -2384,7 +2384,7 @@ IScsiGetTcpConnDevicePath (
Conn->TcpIo.Handle,
&gEfiDevicePathProtocolGuid,
(VOID **) &DevicePath
- );
+ );
if (EFI_ERROR (Status)) {
return NULL;
}
@@ -2403,7 +2403,7 @@ IScsiGetTcpConnDevicePath (
if (!Conn->Ipv6Flag && DevicePathSubType (&DPathNode->DevPath) == MSG_IPv4_DP) {
DPathNode->Ipv4.LocalPort = 0;
- DPathNode->Ipv4.StaticIpAddress =
+ DPathNode->Ipv4.StaticIpAddress =
(BOOLEAN) (!Session->ConfigData->SessionConfigData.InitiatorInfoFromDhcp);
//
@@ -2414,9 +2414,9 @@ IScsiGetTcpConnDevicePath (
//
PathLen = DevicePathNodeLength (&DPathNode->Ipv4);
-
- if (PathLen == IP4_NODE_LEN_NEW_VERSIONS) {
-
+
+ if (PathLen == IP4_NODE_LEN_NEW_VERSIONS) {
+
IP4_COPY_ADDRESS (
&DPathNode->Ipv4.GatewayIpAddress,
&Session->ConfigData->SessionConfigData.Gateway
@@ -2427,7 +2427,7 @@ IScsiGetTcpConnDevicePath (
&Session->ConfigData->SessionConfigData.SubnetMask
);
}
-
+
break;
} else if (Conn->Ipv6Flag && DevicePathSubType (&DPathNode->DevPath) == MSG_IPv6_DP) {
DPathNode->Ipv6.LocalPort = 0;
@@ -2436,28 +2436,28 @@ IScsiGetTcpConnDevicePath (
// Add a judgement here to support previous versions of IPv6_DEVICE_PATH.
// In previous versions of IPv6_DEVICE_PATH, IpAddressOrigin, PrefixLength
// 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.
//
PathLen = DevicePathNodeLength (&DPathNode->Ipv6);
-
- if (PathLen == IP6_NODE_LEN_NEW_VERSIONS ) {
+
+ if (PathLen == IP6_NODE_LEN_NEW_VERSIONS ) {
DPathNode->Ipv6.IpAddressOrigin = 0;
DPathNode->Ipv6.PrefixLength = IP6_PREFIX_LENGTH;
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.
//
- *((UINT8 *)(&DPathNode->Ipv6) + IP6_OLD_IPADDRESS_OFFSET) =
+ *((UINT8 *)(&DPathNode->Ipv6) + IP6_OLD_IPADDRESS_OFFSET) =
(BOOLEAN) (!Session->ConfigData->SessionConfigData.InitiatorInfoFromDhcp);
}
-
+
break;
}
}
@@ -2486,10 +2486,10 @@ IScsiOnExitBootService (
ISCSI_DRIVER_DATA *Private;
Private = (ISCSI_DRIVER_DATA *) Context;
-
+
gBS->CloseEvent (Private->ExitBootServiceEvent);
Private->ExitBootServiceEvent = NULL;
-
+
if (Private->Session != NULL) {
IScsiSessionAbort (Private->Session);
}
@@ -2502,7 +2502,7 @@ IScsiOnExitBootService (
currently managing the controller specified by ControllerHandle. This test
is performed by evaluating if the the protocol specified by ProtocolGuid is
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().
@param ControllerHandle A handle for a controller to test.
diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.h b/NetworkPkg/IScsiDxe/IScsiMisc.h
index 659c0268b5..afd4b84910 100644
--- a/NetworkPkg/IScsiDxe/IScsiMisc.h
+++ b/NetworkPkg/IScsiDxe/IScsiMisc.h
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -62,7 +62,7 @@ typedef struct _ISCSI_SESSION_CONFIG_NVDATA {
BOOLEAN DnsMode; // Flag indicate whether the Target address is expressed as URL format.
CHAR8 TargetUrl[ISCSI_TARGET_URI_MAX_SIZE];
-
+
} ISCSI_SESSION_CONFIG_NVDATA;
#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[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] 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.
@retval EFI_BUFFER_TOO_SMALL The string is too small.
@retval EFI_INVALID_PARAMETER The IP string is malformatted.
@@ -372,10 +372,10 @@ IScsiCleanDriverData (
@param[in] Controller The handle of the controller.
@param[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
-
+
@retval TRUE The handle of the controller need the Dhcp protocol.
@retval FALSE The handle of the controller does not need the Dhcp protocol.
-
+
**/
BOOLEAN
IScsiDhcpIsConfigured (
@@ -387,10 +387,10 @@ IScsiDhcpIsConfigured (
Check wheather the Controller handle is configured to use DNS protocol.
@param[in] Controller The handle of the controller.
-
+
@retval TRUE The handle of the controller need the DNS protocol.
@retval FALSE The handle of the controller does not need the DNS protocol.
-
+
**/
BOOLEAN
IScsiDnsIsConfigured (
@@ -447,7 +447,7 @@ IScsiOnExitBootService (
currently managing the controller specified by ControllerHandle. This test
is performed by evaluating if the the protocol specified by ProtocolGuid is
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().
@param ControllerHandle A handle for a controller to test.
diff --git a/NetworkPkg/IScsiDxe/IScsiProto.c b/NetworkPkg/IScsiDxe/IScsiProto.c
index 38e4af26bc..7619360568 100644
--- a/NetworkPkg/IScsiDxe/IScsiProto.c
+++ b/NetworkPkg/IScsiDxe/IScsiProto.c
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -17,7 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
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] 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.
@@ -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] 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_TIMEOUT Timeout occurred during the login procedure.
- @retval Others Other errors as indicated.
+ @retval Others Other errors as indicated.
**/
EFI_STATUS
@@ -274,7 +274,7 @@ IScsiCreateConnection (
if (!Conn->Ipv6Flag) {
Tcp4IoConfig = &TcpIoConfig.Tcp4IoConfigData;
-
+
CopyMem (&Tcp4IoConfig->LocalIp, &NvData->LocalIp, sizeof (EFI_IPv4_ADDRESS));
CopyMem (&Tcp4IoConfig->SubnetMask, &NvData->SubnetMask, sizeof (EFI_IPv4_ADDRESS));
CopyMem (&Tcp4IoConfig->Gateway, &NvData->Gateway, sizeof (EFI_IPv4_ADDRESS));
@@ -285,7 +285,7 @@ IScsiCreateConnection (
Tcp4IoConfig->StationPort = 0;
} else {
Tcp6IoConfig = &TcpIoConfig.Tcp6IoConfigData;
-
+
CopyMem (&Tcp6IoConfig->RemoteIp, &NvData->TargetIp, sizeof (EFI_IPv6_ADDRESS));
Tcp6IoConfig->RemotePort = NvData->TargetPort;
Tcp6IoConfig->ActiveFlag = TRUE;
@@ -338,7 +338,7 @@ IScsiDestroyConnection (
@retval EFI_SUCCESS Get the NIC information successfully.
@retval Others Other errors as indicated.
-
+
**/
EFI_STATUS
IScsiGetIp6NicInfo (
@@ -494,7 +494,7 @@ IScsiSessionLogin (
Session->State = SESSION_STATE_LOGGED_IN;
if (!Conn->Ipv6Flag) {
- ProtocolGuid = &gEfiTcp4ProtocolGuid;
+ ProtocolGuid = &gEfiTcp4ProtocolGuid;
} else {
ProtocolGuid = &gEfiTcp6ProtocolGuid;
}
@@ -505,7 +505,7 @@ IScsiSessionLogin (
(VOID **) &Tcp,
Session->Private->Image,
Session->Private->ExtScsiPassThruHandle,
- EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
+ EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
);
ASSERT_EFI_ERROR (Status);
@@ -612,7 +612,7 @@ IScsiSendLoginReq (
Receive and process the iSCSI login response.
@param[in] Conn The connection in the iSCSI login phase.
-
+
@retval EFI_SUCCESS The iSCSI login response PDU is received and processed.
@retval Others Other errors as indicated.
@@ -793,7 +793,7 @@ IScsiPrepareLoginReq (
case ISCSI_SECURITY_NEGOTIATION:
//
// Both none authentication and CHAP authentication share the CHAP path.
- //
+ //
//
if (Session->AuthType != ISCSI_AUTH_TYPE_KRB) {
Status = IScsiCHAPToSendReq (Conn, Nbuf);
@@ -808,7 +808,7 @@ IScsiPrepareLoginReq (
if (!Conn->ParamNegotiated) {
IScsiFillOpParams (Conn, Nbuf);
}
-
+
ISCSI_SET_FLAG (LoginReq, ISCSI_LOGIN_REQ_PDU_FLAG_TRANSIT);
break;
@@ -964,7 +964,7 @@ IScsiProcessLoginRsp (
// the value presented in CmdSN as the target value for 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
TargetAddress key-value list.
@param[in] Len Length of the data.
-
+
@retval EFI_SUCCESS The target address is updated.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval EFI_NOT_FOUND The TargetAddress key is not found.
@@ -1101,7 +1101,7 @@ IScsiUpdateTargetAddress (
Status = EFI_NOT_FOUND;
NvData = &Session->ConfigData->SessionConfigData;
-
+
while (TRUE) {
TargetAddress = IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_TARGET_ADDRESS);
if (TargetAddress == NULL) {
@@ -1188,7 +1188,7 @@ IScsiUpdateTargetAddress (
//
// Save the origial user setting which specifies the proxy/virtual iSCSI target.
- //
+ //
CopyMem (&NvData->OriginalTargetIp, &NvData->TargetIp, sizeof (EFI_IP_ADDRESS));
//
@@ -1365,7 +1365,7 @@ IScsiReceivePdu (
switch (ISCSI_GET_OPCODE (Header)) {
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.
//
InDataOffset = ISCSI_GET_BUFFER_OFFSET (Header);
@@ -1713,7 +1713,7 @@ IScsiCheckOpParams (
IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_TARGET_ALIAS);
IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_TARGET_PORTAL_GROUP_TAG);
-
+
//
// Remove the key-value that may not needed for result function is OR.
//
@@ -2228,7 +2228,7 @@ IScsiNewScsiCmdPdu (
if (ScsiCmd == NULL) {
NetbufFree (PduHeader);
return NULL;
- }
+ }
Header = (ISCSI_ADDITIONAL_HEADER *) (ScsiCmd + 1);
ZeroMem (ScsiCmd, Length);
@@ -2902,8 +2902,8 @@ IScsiOnNopInRcvd (
@param[in] Lun The LUN.
@param[in, out] Packet The request packet containing IO request, SCSI command
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.
@retval EFI_DEVICE_ERROR Session state was not as required.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@@ -3197,7 +3197,7 @@ IScsiSessionAbort (
if (!Conn->Ipv6Flag) {
ProtocolGuid = &gEfiTcp4ProtocolGuid;
} else {
- ProtocolGuid = &gEfiTcp6ProtocolGuid;
+ ProtocolGuid = &gEfiTcp6ProtocolGuid;
}
gBS->CloseProtocol (
diff --git a/NetworkPkg/IScsiDxe/IScsiProto.h b/NetworkPkg/IScsiDxe/IScsiProto.h
index d57bda5909..465838666f 100644
--- a/NetworkPkg/IScsiDxe/IScsiProto.h
+++ b/NetworkPkg/IScsiDxe/IScsiProto.h
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -627,7 +627,7 @@ typedef struct _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] 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.
@@ -658,7 +658,7 @@ IScsiDetatchConnection (
@retval EFI_SUCCESS The iSCSI connection is logged into the iSCSI target.
@retval EFI_TIMEOUT Timeout occurred during the login procedure.
- @retval Others Other errors as indicated.
+ @retval Others Other errors as indicated.
**/
EFI_STATUS
@@ -743,7 +743,7 @@ IScsiSendLoginReq (
Receive and process the iSCSI login response.
@param[in] Conn The connection in the iSCSI login phase.
-
+
@retval EFI_SUCCESS The iSCSI login response PDU is received and processed.
@retval Others Other errors as indicated.
@@ -815,7 +815,7 @@ IScsiProcessLoginRsp (
@param[in] Data The data segment which should contain the
TargetAddress key-value list.
@param[in] Len Length of the data.
-
+
@retval EFI_SUCCESS The target address is updated.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval EFI_NOT_FOUND The TargetAddress key is not found.
@@ -983,8 +983,8 @@ IScsiNormalizeName (
@param[in] Lun The LUN.
@param[in, out] Packet The request packet containing IO request, SCSI command
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.
@retval EFI_DEVICE_ERROR Session state was not as required.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@@ -1026,7 +1026,7 @@ IScsiSessionInit (
IN OUT ISCSI_SESSION *Session,
IN BOOLEAN Recovery
);
-
+
/**
Abort the iSCSI session, that is, reset all the connection and free the
resources.
diff --git a/NetworkPkg/Include/Guid/HttpBootConfigHii.h b/NetworkPkg/Include/Guid/HttpBootConfigHii.h
index 7e44436633..cb12445244 100644
--- a/NetworkPkg/Include/Guid/HttpBootConfigHii.h
+++ b/NetworkPkg/Include/Guid/HttpBootConfigHii.h
@@ -1,13 +1,13 @@
/** @file
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.
+
+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.
+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.
**/
diff --git a/NetworkPkg/Include/Guid/HttpTlsCipherList.h b/NetworkPkg/Include/Guid/HttpTlsCipherList.h
index bd3023125d..c648f67576 100644
--- a/NetworkPkg/Include/Guid/HttpTlsCipherList.h
+++ b/NetworkPkg/Include/Guid/HttpTlsCipherList.h
@@ -1,7 +1,7 @@
/** @file
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
the terms and conditions of the BSD License that accompanies this distribution.
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.
-// 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.
// 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}
// Then, the contents of variable should be:
// {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 } \
}
-
+
#define EDKII_HTTP_TLS_CIPHER_LIST_VARIABLE L"HttpTlsCipherList"
extern EFI_GUID gEdkiiHttpTlsCipherListGuid;
diff --git a/NetworkPkg/Include/Guid/IScsiConfigHii.h b/NetworkPkg/Include/Guid/IScsiConfigHii.h
index 5077022558..e5a7d131b8 100644
--- a/NetworkPkg/Include/Guid/IScsiConfigHii.h
+++ b/NetworkPkg/Include/Guid/IScsiConfigHii.h
@@ -1,14 +1,14 @@
/** @file
- GUIDs used as HII FormSet and HII Package list GUID in IScsiConfig driver
- 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.
+ GUIDs used as HII FormSet and HII Package list GUID in IScsiConfig driver
+ that supports IP4 and IP6 both.
+
+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.
+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.
**/
diff --git a/NetworkPkg/Include/Guid/Ip6ConfigHii.h b/NetworkPkg/Include/Guid/Ip6ConfigHii.h
index f7a3889596..eefcd016f0 100644
--- a/NetworkPkg/Include/Guid/Ip6ConfigHii.h
+++ b/NetworkPkg/Include/Guid/Ip6ConfigHii.h
@@ -1,13 +1,13 @@
/** @file
- 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.
+ GUIDs used as HII FormSet and HII Package list GUID in Ip6Config driver.
+
+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.
+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.
**/
diff --git a/NetworkPkg/Ip6Dxe/ComponentName.c b/NetworkPkg/Ip6Dxe/ComponentName.c
index 6a1f082edd..e314f15207 100644
--- a/NetworkPkg/Ip6Dxe/ComponentName.c
+++ b/NetworkPkg/Ip6Dxe/ComponentName.c
@@ -2,7 +2,7 @@
Implementation of EFI_COMPONENT_NAME_PROTOCOL and
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
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.
-
+
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
-
+
**/
EFI_STATUS
UpdateName (
@@ -320,7 +320,7 @@ UpdateName (
FreeUnicodeStringTable (gIp6ControllerNameTable);
gIp6ControllerNameTable = NULL;
}
-
+
Status = AddUnicodeString2 (
"eng",
gIp6ComponentName.SupportedLanguages,
@@ -331,7 +331,7 @@ UpdateName (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
return AddUnicodeString2 (
"en",
gIp6ComponentName2.SupportedLanguages,
@@ -421,7 +421,7 @@ Ip6ComponentNameGetControllerName (
{
EFI_STATUS Status;
EFI_IP6_PROTOCOL *Ip6;
-
+
//
// 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 (
ControllerHandle,
diff --git a/NetworkPkg/Ip6Dxe/Ip6Common.c b/NetworkPkg/Ip6Dxe/Ip6Common.c
index 7007301f81..c18918e734 100644
--- a/NetworkPkg/Ip6Dxe/Ip6Common.c
+++ b/NetworkPkg/Ip6Dxe/Ip6Common.c
@@ -1,7 +1,7 @@
/** @file
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
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.
-
+
@param[in] Entry The entry to be removed.
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
@@ -348,7 +348,7 @@ Ip6DestroyChildEntryByAddr (
IP6_PROTOCOL *Instance;
EFI_SERVICE_BINDING_PROTOCOL *ServiceBinding;
EFI_IPv6_ADDRESS *Address;
-
+
Instance = NET_LIST_USER_STRUCT_S (Entry, IP6_PROTOCOL, Link, IP6_PROTOCOL_SIGNATURE);
ServiceBinding = ((IP6_DESTROY_CHILD_BY_ADDR_CALLBACK_CONTEXT*) Context)->ServiceBinding;
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)) {
return ServiceBinding->DestroyChild (ServiceBinding, Instance->Handle);
}
-
+
return EFI_SUCCESS;
}
diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
index f4b9374da2..6ec87716a2 100644
--- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
+++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
@@ -1,7 +1,7 @@
/** @file
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
are licensed and made available under the terms and conditions of the BSD License
@@ -58,7 +58,7 @@ Ip6ConfigOnPolicyChanged (
BOOLEAN Recovery;
Recovery = FALSE;
-
+
//
// Currently there are only two policies: Manual and Automatic. Regardless of
// 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 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
- // called, which may break the upper layer network stacks. So, the driver should take the responsibility
- // for the recovery by using ConnectController() after Ip6RemoveAddr().
+ //
+ // 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
+ // called, which may break the upper layer network stacks. So, the driver should take the responsibility
+ // for the recovery by using ConnectController() after Ip6RemoveAddr().
// 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);
if (!IsListEmpty (&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
// should be destroyed now. The survivers are those use the link-local address
@@ -118,7 +118,7 @@ Ip6ConfigOnPolicyChanged (
NULL,
0
);
-
+
if (IpSb->Controller != NULL && Recovery) {
//
// ConnectController() to recover the upper layer network stacks.
@@ -726,7 +726,7 @@ Ip6ConfigSetPolicy (
DataItem->DataSize = 0;
DataItem->Status = EFI_NOT_FOUND;
NetMapIterate (&DataItem->EventMap, Ip6ConfigSignalEvent, NULL);
-
+
if (NewPolicy == Ip6ConfigPolicyManual) {
//
// The policy is changed from automatic to manual. Stop the DHCPv6 process
@@ -1546,7 +1546,7 @@ Ip6ConfigSetDnsServer (
}
} 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) {
FreePool (Item->Data.Ptr);
@@ -1965,7 +1965,7 @@ Ip6ConfigOnDhcp6SbInstalled (
network stack was set successfully.
@retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
- 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.
@retval EFI_WRITE_PROTECTED The specified configuration data is read-only or the specified
configuration data cannot be set under the current policy.
diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h
index 3a6e8ad4d1..6f818d5335 100644
--- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h
+++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h
@@ -1,7 +1,7 @@
/** @file
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
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.
@retval EFI_SUCCESS The specified configuration data for the EFI IPv6
network stack was set successfully.
-
+
**/
typedef
EFI_STATUS
@@ -87,14 +87,14 @@ EFI_STATUS
@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
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.
@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.
- @retval EFI_SUCCESS The specified configuration data was obtained successfully.
-
+ @retval EFI_SUCCESS The specified configuration data was obtained successfully.
+
**/
typedef
EFI_STATUS
@@ -162,9 +162,9 @@ typedef struct {
} IP6_ADDRESS_INFO_ENTRY;
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_INTERFACE_ID InterfaceId; ///< alternative interface id
+ EFI_IP6_CONFIG_INTERFACE_ID InterfaceId; ///< alternative interface id
LIST_ENTRY ManualAddress; ///< IP addresses
UINT32 ManualAddressCount; ///< IP addresses count
LIST_ENTRY GatewayAddress; ///< Gateway address
@@ -236,13 +236,13 @@ Ip6ConfigReadConfigData (
/**
The event process routine when the DHCPv6 server is answered with a reply packet
for an information request.
-
+
@param[in] This Points to the EFI_DHCP6_PROTOCOL.
@param[in] Context The pointer to the IP6 configuration instance data.
@param[in] Packet The DHCPv6 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.
**/
@@ -256,7 +256,7 @@ Ip6ConfigOnDhcp6Reply (
/**
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] OtherInfoOnly If FALSE, get stateful address and other information
via DHCPv6. Otherwise, only get the other information.
@@ -275,10 +275,10 @@ Ip6ConfigStartStatefulAutoConfig (
Initialize an IP6_CONFIG_INSTANCE.
@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_SUCCESS The IP6_CONFIG_INSTANCE initialized successfully.
-
+
**/
EFI_STATUS
Ip6ConfigInitInstance (
@@ -289,7 +289,7 @@ Ip6ConfigInitInstance (
Release an IP6_CONFIG_INSTANCE.
@param[in, out] Instance The buffer of IP6_CONFIG_INSTANCE to be freed.
-
+
**/
VOID
Ip6ConfigCleanInstance (
@@ -303,7 +303,7 @@ Ip6ConfigCleanInstance (
@retval EFI_SUCCESS The child was successfully destroyed.
@retval Others Failed to destroy the child.
-
+
**/
EFI_STATUS
Ip6ConfigDestroyDhcp6 (
diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigNv.c b/NetworkPkg/Ip6Dxe/Ip6ConfigNv.c
index 1b878a56a3..50adc371c7 100644
--- a/NetworkPkg/Ip6Dxe/Ip6ConfigNv.c
+++ b/NetworkPkg/Ip6Dxe/Ip6ConfigNv.c
@@ -1,7 +1,7 @@
/** @file
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
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
- 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, out] Instance The IP6 config instance data.
@@ -1541,7 +1541,7 @@ Ip6GetCurrentSetting (
EFI_STATUS Status;
CHAR16 PortString[ADDRESS_STR_MAX_SIZE];
EFI_IP6_CONFIG_INTERFACE_INFO *IfInfo;
-
+
Ip6Config = &Instance->Ip6Config;
HiiHandle = Instance->CallbackInfo.RegisteredHandle;
@@ -1794,7 +1794,7 @@ Ip6FormCallback (
}
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT;
break;
-
+
case KEY_INTERFACE_ID:
Status = Ip6ParseInterfaceIdFromString (IfrNvData->InterfaceId, &Ip6NvData->InterfaceId);
if (EFI_ERROR (Status)) {
@@ -1805,9 +1805,9 @@ Ip6FormCallback (
NULL
);
}
-
+
break;
-
+
case KEY_MANUAL_ADDRESS:
Status = Ip6ParseAddressListFromString (
IfrNvData->ManualAddress,
@@ -1822,9 +1822,9 @@ Ip6FormCallback (
NULL
);
}
-
+
break;
-
+
case KEY_GATEWAY_ADDRESS:
Status = Ip6ParseAddressListFromString (
IfrNvData->GatewayAddress,
@@ -1839,9 +1839,9 @@ Ip6FormCallback (
NULL
);
}
-
+
break;
-
+
case KEY_DNS_ADDRESS:
Status = Ip6ParseAddressListFromString (
IfrNvData->DnsAddress,
@@ -1856,7 +1856,7 @@ Ip6FormCallback (
NULL
);
}
-
+
break;
default:
diff --git a/NetworkPkg/Ip6Dxe/Ip6Driver.c b/NetworkPkg/Ip6Dxe/Ip6Driver.c
index 0797a742f2..0bda1687f0 100644
--- a/NetworkPkg/Ip6Dxe/Ip6Driver.c
+++ b/NetworkPkg/Ip6Dxe/Ip6Driver.c
@@ -1,7 +1,7 @@
/** @file
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>
This program and the accompanying materials
@@ -182,7 +182,7 @@ Ip6CleanService (
Status = Ip6LeaveGroup (IpSb, &AllNodes);
if (EFI_ERROR (Status)) {
return Status;
- }
+ }
}
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.
//
Status = Ip6ConfigReadConfigData (IpSb->MacString, &IpSb->Ip6ConfigInstance);
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
//
// If there is any default manual address, set it.
//
@@ -638,7 +638,7 @@ Ip6DriverBindingStart (
);
if (EFI_ERROR (Status)) {
goto ON_ERROR;
- }
+ }
//
// Initialize the IP6 ID
@@ -655,7 +655,7 @@ ON_ERROR:
/**
Callback function which provided by user to remove one node in NetDestroyLinkList process.
-
+
@param[in] Entry The entry to be removed.
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
@@ -786,7 +786,7 @@ Ip6DriverBindingStop (
FreePool (IpSb);
Status = EFI_SUCCESS;
}
-
+
Exit:
return Status;
}
diff --git a/NetworkPkg/Ip6Dxe/Ip6Dxe.inf b/NetworkPkg/Ip6Dxe/Ip6Dxe.inf
index 2d0fecc77e..71aef4dc89 100644
--- a/NetworkPkg/Ip6Dxe/Ip6Dxe.inf
+++ b/NetworkPkg/Ip6Dxe/Ip6Dxe.inf
@@ -1,13 +1,13 @@
## @file
# Basic IPv6 packet I/O Service.
-#
-# This module provides basic network IPv6 packet I/O services which includes support for
-# Neighbor Discovery Protocol (ND), Multicast Listener Discovery Protocol (MLD),
-# and a subset of the Internet Control Message Protocol (ICMPv6). This driver
+#
+# This module provides basic network IPv6 packet I/O services which includes support for
+# Neighbor Discovery Protocol (ND), Multicast Listener Discovery Protocol (MLD),
+# 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
# 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
# are licensed and made available under the terms and conditions of the BSD License
diff --git a/NetworkPkg/Ip6Dxe/Ip6Dxe.uni b/NetworkPkg/Ip6Dxe/Ip6Dxe.uni
index 11e97344f4..028841958b 100644
--- a/NetworkPkg/Ip6Dxe/Ip6Dxe.uni
+++ b/NetworkPkg/Ip6Dxe/Ip6Dxe.uni
@@ -7,13 +7,13 @@
// also provides the mechanism to set and get various types of configurations for
// 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
// 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
// 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.
//
diff --git a/NetworkPkg/Ip6Dxe/Ip6DxeExtra.uni b/NetworkPkg/Ip6Dxe/Ip6DxeExtra.uni
index c3c34e4ab7..0ae1d678b7 100644
--- a/NetworkPkg/Ip6Dxe/Ip6DxeExtra.uni
+++ b/NetworkPkg/Ip6Dxe/Ip6DxeExtra.uni
@@ -1,7 +1,7 @@
// /** @file
// Ip6Dxe 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
// are licensed and made available under the terms and conditions of the BSD License
@@ -13,8 +13,8 @@
//
// **/
-#string STR_PROPERTIES_MODULE_NAME
-#language en-US
+#string STR_PROPERTIES_MODULE_NAME
+#language en-US
"Ip6 DXE"
diff --git a/NetworkPkg/Ip6Dxe/Ip6Icmp.c b/NetworkPkg/Ip6Dxe/Ip6Icmp.c
index 1828d51a7d..5a64512b60 100644
--- a/NetworkPkg/Ip6Dxe/Ip6Icmp.c
+++ b/NetworkPkg/Ip6Dxe/Ip6Icmp.c
@@ -1,9 +1,9 @@
/** @file
The ICMPv6 handle routines to process the ICMPv6 control messages.
- Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
-
+
This program and the accompanying materials
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
diff --git a/NetworkPkg/Ip6Dxe/Ip6If.c b/NetworkPkg/Ip6Dxe/Ip6If.c
index 280cd764f1..2597915311 100644
--- a/NetworkPkg/Ip6Dxe/Ip6If.c
+++ b/NetworkPkg/Ip6Dxe/Ip6If.c
@@ -1,7 +1,7 @@
/** @file
Implement IP6 pesudo interface.
- 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
are licensed and made available under the terms and conditions of the BSD License
@@ -565,7 +565,7 @@ Ip6ReceiveFrame (
{
EFI_STATUS Status;
IP6_LINK_RX_TOKEN *Token;
-
+
NET_CHECK_SIGNATURE (IpSb, IP6_SERVICE_SIGNATURE);
Token = &IpSb->RecvRequest;
diff --git a/NetworkPkg/Ip6Dxe/Ip6Input.c b/NetworkPkg/Ip6Dxe/Ip6Input.c
index 6aa55555b8..4596c01d2f 100644
--- a/NetworkPkg/Ip6Dxe/Ip6Input.c
+++ b/NetworkPkg/Ip6Dxe/Ip6Input.c
@@ -1,7 +1,7 @@
/** @file
IP6 internal functions to process the incoming packets.
- 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>
This program and the accompanying materials
@@ -531,7 +531,7 @@ Ip6IpSecProcessPacket (
goto ON_EXIT;
}
ASSERT (mIpSec != NULL);
-
+
Packet = *Netbuf;
RecycleEvent = NULL;
IpSecWrap = NULL;
@@ -647,7 +647,7 @@ Ip6IpSecProcessPacket (
IP6_GET_CLIP_INFO (Packet),
sizeof (IP6_CLIP_INFO)
);
-
+
NetIpSecNetbufFree(Packet);
*Netbuf = TxWrap->Packet;
@@ -724,13 +724,13 @@ ON_EXIT:
@param[in, out] Packet The received IP6 packet to be processed.
@param[in] Flag The link layer flag for the packet received, such
as multicast.
- @param[out] Payload The pointer to the payload of the recieved packet.
- it starts from the first byte of the extension header.
+ @param[out] Payload The pointer to the payload of the recieved packet.
+ it starts from the first byte of the extension header.
@param[out] LastHead The pointer of NextHeader of the last extension
header processed by IP6.
@param[out] ExtHdrsLen The length of the whole option.
@param[out] UnFragmentLen The length of unfragmented length of extension headers.
- @param[out] Fragmented Indicate whether the packet is fragmented.
+ @param[out] Fragmented Indicate whether the packet is fragmented.
@param[out] Head The pointer to the EFI_IP6_Header.
@retval EFI_SUCCESS The received packet is well format.
@@ -746,7 +746,7 @@ Ip6PreProcessPacket (
OUT UINT8 **LastHead,
OUT UINT32 *ExtHdrsLen,
OUT UINT32 *UnFragmentLen,
- OUT BOOLEAN *Fragmented,
+ OUT BOOLEAN *Fragmented,
OUT EFI_IP6_HEADER **Head
)
{
@@ -964,7 +964,7 @@ Ip6PreProcessPacket (
// and Packet->TotalLen == Info->Length.
//
NetbufTrim (*Packet, sizeof (EFI_IP6_HEADER) + *ExtHdrsLen, TRUE);
-
+
return EFI_SUCCESS;
}
@@ -1009,18 +1009,18 @@ Ip6AcceptFrame (
if (EFI_ERROR (IoStatus) || (IpSb->State == IP6_SERVICE_DESTROY)) {
goto Drop;
}
-
+
//
// Pre-Process the Ipv6 Packet and then reassemble if it is necessary.
//
Status = Ip6PreProcessPacket (
- IpSb,
- &Packet,
- Flag,
- &Payload,
- &LastHead,
- &ExtHdrsLen,
- &UnFragmentLen,
+ IpSb,
+ &Packet,
+ Flag,
+ &Payload,
+ &LastHead,
+ &ExtHdrsLen,
+ &UnFragmentLen,
&Fragmented,
&Head
);
@@ -1052,14 +1052,14 @@ Ip6AcceptFrame (
ZeroMem (&ZeroHead, sizeof (EFI_IP6_HEADER));
if (0 == CompareMem (Head, &ZeroHead, sizeof (EFI_IP6_HEADER))) {
Status = Ip6PreProcessPacket (
- IpSb,
- &Packet,
- Flag,
- &Payload,
- &LastHead,
- &ExtHdrsLen,
- &UnFragmentLen,
- &Fragmented,
+ IpSb,
+ &Packet,
+ Flag,
+ &Payload,
+ &LastHead,
+ &ExtHdrsLen,
+ &UnFragmentLen,
+ &Fragmented,
&Head
);
if (EFI_ERROR (Status)) {
@@ -1073,7 +1073,7 @@ Ip6AcceptFrame (
if (Packet == NULL) {
goto Restart;
}
-
+
//
// Packet may have been changed. The ownership of the packet
// is transfered to the packet process logic.
diff --git a/NetworkPkg/Ip6Dxe/Ip6Nd.c b/NetworkPkg/Ip6Dxe/Ip6Nd.c
index a3f49bb2da..e4132ff4c8 100644
--- a/NetworkPkg/Ip6Dxe/Ip6Nd.c
+++ b/NetworkPkg/Ip6Dxe/Ip6Nd.c
@@ -1,7 +1,7 @@
/** @file
Implementation of Neighbor Discovery support routines.
- 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
are licensed and made available under the terms and conditions of the BSD License
@@ -822,7 +822,7 @@ Ip6OnDADFinished (
EFI_DHCP6_PACKET_OPTION *Oro;
EFI_DHCP6_RETRANSMISSION InfoReqReXmit;
EFI_IPv6_ADDRESS AllNodes;
-
+
IpSb = IpIf->Service;
AddrInfo = DadEntry->AddressInfo;
@@ -988,7 +988,7 @@ Ip6InitDADProcess (
if (Ip6FindDADEntry (IpIf->Service, &AddressInfo->Address, NULL) != NULL) {
return EFI_SUCCESS;
}
-
+
Status = EFI_SUCCESS;
IpSb = IpIf->Service;
DadXmits = &IpSb->Ip6ConfigInstance.DadXmits;
diff --git a/NetworkPkg/IpSecDxe/ComponentName.c b/NetworkPkg/IpSecDxe/ComponentName.c
index d68b175cc1..92a1eb3ce8 100644
--- a/NetworkPkg/IpSecDxe/ComponentName.c
+++ b/NetworkPkg/IpSecDxe/ComponentName.c
@@ -1,7 +1,7 @@
/** @file
UEFI Component Name(2) protocol implementation for IPsec 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
are licensed and made available under the terms and conditions of the BSD License
@@ -325,7 +325,7 @@ IpSecComponentNameGetControllerName (
if (ChildHandle != NULL) {
return EFI_UNSUPPORTED;
}
-
+
//
// Make sure this driver is currently managing ControllerHandle
//
diff --git a/NetworkPkg/IpSecDxe/IetfConstants.c b/NetworkPkg/IpSecDxe/IetfConstants.c
index 7bd5c81da8..1ccc937172 100644
--- a/NetworkPkg/IpSecDxe/IetfConstants.c
+++ b/NetworkPkg/IpSecDxe/IetfConstants.c
@@ -1,7 +1,7 @@
/** @file
Cryptographic Parameter Constant Definitions from IETF;
-
- Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+
+ Copyright (c) 2010 - 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
diff --git a/NetworkPkg/IpSecDxe/Ike.h b/NetworkPkg/IpSecDxe/Ike.h
index 50c680a528..63ab29bd72 100644
--- a/NetworkPkg/IpSecDxe/Ike.h
+++ b/NetworkPkg/IpSecDxe/Ike.h
@@ -1,7 +1,7 @@
/** @file
The common definition of IPsec Key Exchange (IKE).
- Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
@@ -55,7 +55,7 @@
#define IPSEC_ESP_BLOWFISH 7
#define IPSEC_ESP_3IDEA 8
#define IPSEC_ESP_DES_IV32 9
-#define IPSEC_ESP_RC4 10 // It's reserved in IKEv2
+#define IPSEC_ESP_RC4 10 // It's reserved in IKEv2
#define IPSEC_ESP_NULL 11
#define IPSEC_ESP_AES 12
@@ -150,7 +150,7 @@ typedef struct {
typedef union {
UINT16 AttrLength;
UINT16 AttrValue;
-} IKE_SA_ATTR_UNION;
+} IKE_SA_ATTR_UNION;
//
// SA Attribute present in Transform Payload
@@ -163,7 +163,7 @@ typedef struct {
#pragma pack()
//
-// Contains the IKE packet information.
+// Contains the IKE packet information.
//
typedef struct {
UINTN RefCount;
@@ -219,7 +219,7 @@ typedef struct {
//
// Each algorithm has its own Id, Guid, BlockSize and KeyLength.
// This struct contains these information for each algorithm. It is generic structure
-// for both encryption and authentication algorithm.
+// for both encryption and authentication algorithm.
// For authentication algorithm, the AlgSize means IcvSize. For encryption algorithm,
// it means IvSize.
//
diff --git a/NetworkPkg/IpSecDxe/IkeCommon.c b/NetworkPkg/IpSecDxe/IkeCommon.c
index c5fbfab6a9..67fc2f4084 100644
--- a/NetworkPkg/IpSecDxe/IkeCommon.c
+++ b/NetworkPkg/IpSecDxe/IkeCommon.c
@@ -1,7 +1,7 @@
/** @file
Common operation of the IKE
-
- Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
+
+ Copyright (c) 2010 - 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
@@ -26,7 +26,7 @@
@retval TRUE This SpiValue has existed in the Child SA Session
@retval FALSE This SpiValue doesn't exist in the Child SA Session.
-
+
**/
BOOLEAN
IkeSpiValueExisted (
@@ -40,8 +40,8 @@ IkeSpiValueExisted (
Entry = NULL;
Next = NULL;
- SaSession = NULL;
-
+ SaSession = NULL;
+
//
// Check whether the SPI value has existed in ChildSaEstablishSessionList.
//
@@ -67,7 +67,7 @@ IkeSpiValueExisted (
/**
Call Crypto Lib to generate a random value with eight-octet length.
-
+
@return the 64 byte vaule.
**/
@@ -91,8 +91,8 @@ IkeGenerateCookie (
Generate the random data for Nonce payload.
@param[in] NonceSize Size of the data in bytes.
-
- @return Buffer which contains the random data of the spcified size.
+
+ @return Buffer which contains the random data of the spcified size.
**/
UINT8 *
@@ -168,7 +168,7 @@ IkePayloadAlloc (
if (IkePayload == NULL) {
return NULL;
}
-
+
IkePayload->Signature = IKE_PAYLOAD_SIGNATURE;
return IkePayload;
@@ -200,11 +200,11 @@ IkePayloadFree (
/**
Generate an new SPI.
-
- @param[in] IkeSaSession Pointer to IKEV2_SA_SESSION related to this Child SA
+
+ @param[in] IkeSaSession Pointer to IKEV2_SA_SESSION related to this Child SA
Session.
- @param[in, out] SpiValue Pointer to the new generated SPI value.
-
+ @param[in, out] SpiValue Pointer to the new generated SPI value.
+
@retval EFI_SUCCESS The operation performs successfully.
@retval Otherwise The operation is failed.
@@ -218,7 +218,7 @@ IkeGenerateSpi (
EFI_STATUS Status;
Status = EFI_SUCCESS;
-
+
while (TRUE) {
//
// Generate SPI randomly
@@ -229,13 +229,13 @@ IkeGenerateSpi (
}
//
- // The set of SPI values in the range 1 through 255 are reserved by the
- // Internet Assigned Numbers Authority (IANA) for future use; a reserved
- // SPI value will not normally be assigned by IANA unless the use of the
+ // The set of SPI values in the range 1 through 255 are reserved by the
+ // Internet Assigned Numbers Authority (IANA) for future use; a reserved
+ // SPI value will not normally be assigned by IANA unless the use of the
// assigned SPI value is specified in an RFC.
//
if (*SpiValue < IKE_SPI_BASE) {
- *SpiValue += IKE_SPI_BASE;
+ *SpiValue += IKE_SPI_BASE;
}
//
@@ -245,7 +245,7 @@ IkeGenerateSpi (
break;
}
}
-
+
return Status;
}
diff --git a/NetworkPkg/IpSecDxe/IkeCommon.h b/NetworkPkg/IpSecDxe/IkeCommon.h
index eb7e913ee8..ba9f1bb2fb 100644
--- a/NetworkPkg/IpSecDxe/IkeCommon.h
+++ b/NetworkPkg/IpSecDxe/IkeCommon.h
@@ -1,7 +1,7 @@
/** @file
Common operation of the IKE.
- Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
@@ -19,7 +19,7 @@
#include <Protocol/Udp4.h>
#include <Protocol/Udp6.h>
#include <Protocol/Ip4Config2.h>
-
+
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
@@ -62,7 +62,7 @@
/**
Call Crypto Lib to generate a random value with eight-octet length.
-
+
@return the 64 byte vaule.
**/
@@ -75,8 +75,8 @@ IkeGenerateCookie (
Generate the random data for Nonce payload.
@param[in] NonceSize Size of the data in bytes.
-
- @return Buffer which contains the random data of the spcified size.
+
+ @return Buffer which contains the random data of the spcified size.
**/
UINT8 *
@@ -131,11 +131,11 @@ IkePayloadFree (
/**
Generate an new SPI.
-
- @param[in] IkeSaSession Pointer to IKEV2_SA_SESSION related to this Child SA
+
+ @param[in] IkeSaSession Pointer to IKEV2_SA_SESSION related to this Child SA
Session.
- @param[in, out] SpiValue Pointer to the new generated SPI value.
-
+ @param[in, out] SpiValue Pointer to the new generated SPI value.
+
@retval EFI_SUCCESS The operation performs successfully.
@retval Otherwise The operation is failed.
diff --git a/NetworkPkg/IpSecDxe/IkePacket.c b/NetworkPkg/IpSecDxe/IkePacket.c
index 14dbb9d5d6..acfe079855 100644
--- a/NetworkPkg/IpSecDxe/IkePacket.c
+++ b/NetworkPkg/IpSecDxe/IkePacket.c
@@ -1,7 +1,7 @@
/** @file
IKE Packet related operation.
- Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
@@ -36,7 +36,7 @@ IkePacketAlloc (
IkePacket->RefCount = 1;
InitializeListHead (&IkePacket->PayloadList);
-
+
IkePacket->Header = (IKE_HEADER *) AllocateZeroPool (sizeof (IKE_HEADER));
if (IkePacket->Header == NULL) {
FreePool (IkePacket);
@@ -94,8 +94,8 @@ IkePacketFree (
/**
Callback funtion of NetbufFromExt()
-
- @param[in] Arg The data passed from the NetBufFromExe().
+
+ @param[in] Arg The data passed from the NetBufFromExe().
**/
VOID
@@ -111,11 +111,11 @@ IkePacketNetbufFree (
/**
Copy the NetBuf into a IKE_PACKET sturcture.
-
- Create a IKE_PACKET and fill the received IKE header into the header of IKE_PACKET
+
+ Create a IKE_PACKET and fill the received IKE header into the header of IKE_PACKET
and copy the recieved packet without IKE HEADER to the PayloadBuf of IKE_PACKET.
- @param[in] Netbuf The pointer of the Netbuf which contains the whole received
+ @param[in] Netbuf The pointer of the Netbuf which contains the whole received
IKE packet.
@return The pointer of the IKE_PACKET which contains the received packet.
@@ -174,12 +174,12 @@ Error:
@param[in] SessionCommon Pointer of related IKE_COMMON_SESSION
@param[in] IkePacket Pointer of IKE_PACKET to be copy to NetBuf
- @param[in] IkeType The IKE type to pointer the packet is for which IKE
- phase. Now it supports IKE_SA_TYPE, IKE_CHILDSA_TYPE,
+ @param[in] IkeType The IKE type to pointer the packet is for which IKE
+ phase. Now it supports IKE_SA_TYPE, IKE_CHILDSA_TYPE,
IKE_INFO_TYPE.
@return a pointer of Netbuff which contains the IKE_PACKE in network order.
-
+
**/
NET_BUF *
IkeNetbufFromPacket (
@@ -210,7 +210,7 @@ IkeNetbufFromPacket (
if (EFI_ERROR (RetStatus)) {
return NULL;
}
-
+
} else {
//
// If IKEv1 support, check it here.
@@ -224,7 +224,7 @@ IkeNetbufFromPacket (
// Get the number of the payloads
//
NET_LIST_FOR_EACH (PacketEntry, &(IkePacket)->PayloadList) {
-
+
NumPayloads++;
}
//
@@ -258,7 +258,7 @@ IkeNetbufFromPacket (
IkePacketNetbufFree,
NULL
);
-
+
FreePool (Fragments);
return Netbuf;
}
diff --git a/NetworkPkg/IpSecDxe/IkePacket.h b/NetworkPkg/IpSecDxe/IkePacket.h
index 053d659d9c..674d52a699 100644
--- a/NetworkPkg/IpSecDxe/IkePacket.h
+++ b/NetworkPkg/IpSecDxe/IkePacket.h
@@ -1,7 +1,7 @@
/** @file
IKE Packet related definitions and function declarations.
- Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
@@ -10,7 +10,7 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
+
**/
#ifndef _IKE_V1_PACKET_H_
@@ -46,11 +46,11 @@ IkePacketFree (
/**
Copy the NetBuf into a IKE_PACKET sturcture.
-
- Create a IKE_PACKET and fill the received IKE header into the header of IKE_PACKET
+
+ Create a IKE_PACKET and fill the received IKE header into the header of IKE_PACKET
and copy the recieved packet without IKE HEADER to the PayloadBuf of IKE_PACKET.
- @param[in] Netbuf The pointer of the Netbuf which contains the whole received
+ @param[in] Netbuf The pointer of the Netbuf which contains the whole received
IKE packet.
@return The pointer of the IKE_PACKET which contains the received packet.
@@ -66,8 +66,8 @@ IkePacketFromNetbuf (
@param[in] SessionCommon Pointer of related IKE_COMMON_SESSION
@param[in] IkePacket Pointer of IKE_PACKET to be copy to NetBuf
- @param[in] IkeType The IKE type to pointer the packet is for which IKE
- phase. Now it supports IKE_SA_TYPE, IKE_CHILDSA_TYPE,
+ @param[in] IkeType The IKE type to pointer the packet is for which IKE
+ phase. Now it supports IKE_SA_TYPE, IKE_CHILDSA_TYPE,
IKE_INFO_TYPE.
@return A pointer of Netbuff which contains the contents of the IKE_PACKE in network order.
diff --git a/NetworkPkg/IpSecDxe/IkeService.c b/NetworkPkg/IpSecDxe/IkeService.c
index 4c0f6f5eb1..3dc7f31570 100644
--- a/NetworkPkg/IpSecDxe/IkeService.c
+++ b/NetworkPkg/IpSecDxe/IkeService.c
@@ -1,7 +1,7 @@
/** @file
Provide IPsec Key Exchange (IKE) service general interfaces.
- Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
@@ -273,7 +273,7 @@ IkeOpenOutputUdp (
&BufSize,
IfInfo
);
-
+
if (EFI_ERROR (Status)) {
goto ON_EXIT;
}
diff --git a/NetworkPkg/IpSecDxe/Ikev2/ChildSa.c b/NetworkPkg/IpSecDxe/Ikev2/ChildSa.c
index eaccad2086..a8791cca15 100644
--- a/NetworkPkg/IpSecDxe/Ikev2/ChildSa.c
+++ b/NetworkPkg/IpSecDxe/Ikev2/ChildSa.c
@@ -1,7 +1,7 @@
/** @file
The operations for Child SA.
- Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
@@ -16,12 +16,12 @@
#include "Utility.h"
/**
- Generate IKE Packet for CREATE_CHILD_SA exchange.
+ Generate IKE Packet for CREATE_CHILD_SA exchange.
This IKE Packet would be the packet for creating new CHILD SA, or the packet for
rekeying existing IKE SA, or the packet for existing CHILD SA.
-
- @param[in] SaSession Pointer to related SA session.
+
+ @param[in] SaSession Pointer to related SA session.
@param[in] Context The data passed by the caller.
return a pointer of IKE packet.
@@ -42,12 +42,12 @@ Ikev2CreateChildGenerator (
NotifyPayload = NULL;
MessageId = NULL;
-
+
ChildSaSession = (IKEV2_CHILD_SA_SESSION *) SaSession;
if (ChildSaSession == NULL) {
return NULL;
}
-
+
IkePacket = IkePacketAlloc();
if (IkePacket == NULL) {
return NULL;
@@ -57,28 +57,28 @@ Ikev2CreateChildGenerator (
if (Context != NULL) {
MessageId = (UINT32 *) Context;
}
-
+
IkePacket->Header->Version = (UINT8) (2 << 4);
IkePacket->Header->NextPayload = IKEV2_PAYLOAD_TYPE_NOTIFY;
IkePacket->Header->ExchangeType = IKE_XCG_TYPE_CREATE_CHILD_SA;
-
+
if (ChildSaSession->SessionCommon.IkeSessionType == IkeSessionTypeChildSa) {
//
// 1.a Fill the IkePacket->Hdr
- //
+ //
IkePacket->Header->InitiatorCookie = ChildSaSession->IkeSaSession->InitiatorCookie;
IkePacket->Header->ResponderCookie = ChildSaSession->IkeSaSession->ResponderCookie;
-
+
if (MessageId != NULL) {
IkePacket->Header->MessageId = *MessageId;
} else {
IkePacket->Header->MessageId = ChildSaSession->MessageId;
- }
-
+ }
+
if (ChildSaSession->SessionCommon.IsInitiator) {
IkePacket->Header->Flags = IKE_HEADER_FLAGS_INIT;
}
-
+
} else {
IkeSaSession = (IKEV2_SA_SESSION *) SaSession;
//
@@ -91,8 +91,8 @@ Ikev2CreateChildGenerator (
IkePacket->Header->MessageId = *MessageId;
} else {
IkePacket->Header->MessageId = IkeSaSession->MessageId;
- }
-
+ }
+
if (IkeSaSession->SessionCommon.IsInitiator) {
IkePacket->Header->Flags = IKE_HEADER_FLAGS_INIT;
}
@@ -101,7 +101,7 @@ Ikev2CreateChildGenerator (
if (MessageId != NULL) {
IkePacket->Header->Flags |= IKE_HEADER_FLAGS_RESPOND;
}
-
+
//
// According to RFC4306, Chapter 4.
// A minimal implementation may support the CREATE_CHILD_SA exchange only to
@@ -110,33 +110,33 @@ Ikev2CreateChildGenerator (
NotifyPayload = Ikev2GenerateNotifyPayload (
0,
IKEV2_PAYLOAD_TYPE_NONE,
- 0,
+ 0,
IKEV2_NOTIFICATION_NO_ADDITIONAL_SAS,
NULL,
NULL,
0
);
- if (NotifyPayload == NULL) {
+ if (NotifyPayload == NULL) {
IkePacketFree (IkePacket);
return NULL;
}
-
+
IKE_PACKET_APPEND_PAYLOAD (IkePacket, NotifyPayload);
//
- // TODO: Support the CREATE_CHILD_SA exchange.
- //
+ // TODO: Support the CREATE_CHILD_SA exchange.
+ //
return IkePacket;
}
/**
Parse the IKE packet of CREATE_CHILD_SA exchange.
-
+
This function parse the IKE packet and save the related information to further
- calculation.
-
+ calculation.
+
@param[in] SaSession Pointer to IKEv2_CHILD_SA_SESSION related to this Exchange.
@param[in] IkePacket Received packet to be parsed.
-
+
@retval EFI_SUCCESS The IKE Packet is acceptable.
@retval EFI_UNSUPPORTED Not support the CREATE_CHILD_SA request.
diff --git a/NetworkPkg/IpSecDxe/Ikev2/Exchange.c b/NetworkPkg/IpSecDxe/Ikev2/Exchange.c
index 5609964fa4..0f2f94f118 100644
--- a/NetworkPkg/IpSecDxe/Ikev2/Exchange.c
+++ b/NetworkPkg/IpSecDxe/Ikev2/Exchange.c
@@ -1,7 +1,7 @@
/** @file
The general interfaces of the IKEv2.
- Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
@@ -498,7 +498,7 @@ Ikev2HandleSa (
if (ChildSaSession == NULL) {
goto ON_ERROR;
}
-
+
ChildSaCommon = &ChildSaSession->SessionCommon;
}
@@ -526,7 +526,7 @@ Ikev2HandleSa (
if (ChildSaSession == NULL) {
goto ON_ERROR;
}
-
+
ChildSaCommon = &ChildSaSession->SessionCommon;
//
diff --git a/NetworkPkg/IpSecDxe/Ikev2/Ikev2.h b/NetworkPkg/IpSecDxe/Ikev2/Ikev2.h
index a2b733a4d2..268464b5cc 100644
--- a/NetworkPkg/IpSecDxe/Ikev2/Ikev2.h
+++ b/NetworkPkg/IpSecDxe/Ikev2/Ikev2.h
@@ -1,7 +1,7 @@
/** @file
IKEv2 related definitions.
- Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
@@ -231,7 +231,7 @@ typedef struct {
UINT8 *Data;
} PRF_DATA_FRAGMENT;
-typedef
+typedef
IKE_PACKET *
(*IKEV2_PACKET_GENERATOR) (
IN UINT8 *SaSession,
diff --git a/NetworkPkg/IpSecDxe/Ikev2/Info.c b/NetworkPkg/IpSecDxe/Ikev2/Info.c
index 0d2b290817..22ce9e676f 100644
--- a/NetworkPkg/IpSecDxe/Ikev2/Info.c
+++ b/NetworkPkg/IpSecDxe/Ikev2/Info.c
@@ -2,7 +2,7 @@
The Implementations for Information Exchange.
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
- Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
@@ -11,7 +11,7 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
+
**/
#include "Utility.h"
@@ -21,14 +21,14 @@
/**
Generate Information Packet.
- The information Packet may contain one Delete Payload, or Notify Payload, which
+ The information Packet may contain one Delete Payload, or Notify Payload, which
dependes on the Context's parameters.
- @param[in] SaSession Pointer to IKE SA Session or Child SA Session which is
+ @param[in] SaSession Pointer to IKE SA Session or Child SA Session which is
related to the information Exchange.
@param[in] Context The Data passed from the caller. If the Context is not NULL
it should contain the information for Notification Data.
-
+
@retval Pointer of IKE_PACKET generated.
**/
@@ -55,7 +55,7 @@ Ikev2InfoGenerator (
// Fill IkePacket Header.
//
IkePacket->Header->ExchangeType = IKEV2_EXCHANGE_TYPE_INFO;
- IkePacket->Header->Version = (UINT8) (2 << 4);
+ IkePacket->Header->Version = (UINT8) (2 << 4);
if (Context != NULL) {
InfoContext = (IKEV2_INFO_EXCHANGE_CONTEXT *) Context;
@@ -64,8 +64,8 @@ Ikev2InfoGenerator (
//
// For Liveness Check
//
- if (InfoContext != NULL &&
- (InfoContext->InfoType == Ikev2InfoLiveCheck || InfoContext->InfoType == Ikev2InfoNotify)
+ if (InfoContext != NULL &&
+ (InfoContext->InfoType == Ikev2InfoLiveCheck || InfoContext->InfoType == Ikev2InfoNotify)
) {
IkePacket->Header->MessageId = InfoContext->MessageId;
IkePacket->Header->InitiatorCookie = IkeSaSession->InitiatorCookie;
@@ -77,10 +77,10 @@ Ikev2InfoGenerator (
//
return IkePacket;
}
-
+
//
// For delete SAs
- //
+ //
if (IkeSaSession->SessionCommon.IkeSessionType == IkeSessionTypeIkeSa) {
IkePacket->Header->InitiatorCookie = IkeSaSession->InitiatorCookie;
@@ -101,12 +101,12 @@ Ikev2InfoGenerator (
//
if (IkeSaSession->SessionCommon.State == IkeStateSaDeleting ) {
IkePayload = Ikev2GenerateDeletePayload (
- IkeSaSession,
- IKEV2_PAYLOAD_TYPE_NONE,
- 0,
- 0,
+ IkeSaSession,
+ IKEV2_PAYLOAD_TYPE_NONE,
+ 0,
+ 0,
NULL
- );
+ );
if (IkePayload == NULL) {
goto ERROR_EXIT;
}
@@ -118,7 +118,7 @@ Ikev2InfoGenerator (
IkePacket->Private = IkeSaSession->SessionCommon.Private;
IkePacket->Spi = 0;
IkePacket->IsDeleteInfo = TRUE;
-
+
} else if (Context != NULL) {
//
// TODO: If contest is not NULL Generate a Notify Payload.
@@ -132,7 +132,7 @@ Ikev2InfoGenerator (
if (IkeSaSession->SessionCommon.IsInitiator) {
IkePacket->Header->Flags = IKE_HEADER_FLAGS_INIT ;
- }
+ }
} else {
//
// Delete the Child SA Information Exchagne
@@ -152,7 +152,7 @@ Ikev2InfoGenerator (
IkePacket->Header->MessageId = ChildSaSession->IkeSaSession->MessageId;
Ikev2SaSessionIncreaseMessageId (IkeSaSession);
}
-
+
IkePayload = Ikev2GenerateDeletePayload (
ChildSaSession->IkeSaSession,
IKEV2_PAYLOAD_TYPE_DELETE,
@@ -193,7 +193,7 @@ Ikev2InfoGenerator (
if (InfoContext != NULL) {
IkePacket->Header->Flags |= IKE_HEADER_FLAGS_RESPOND;
}
-
+
return IkePacket;
ERROR_EXIT:
@@ -233,16 +233,16 @@ Ikev2InfoParser (
UINT8 Value;
EFI_STATUS Status;
IKE_PACKET *RespondPacket;
-
+
IKEV2_INFO_EXCHANGE_CONTEXT Context;
-
+
IkeSaSession = (IKEV2_SA_SESSION *) SaSession;
DeletePayload = NULL;
Private = NULL;
RespondPacket = NULL;
Status = EFI_SUCCESS;
-
+
//
// For Liveness Check
//
@@ -279,13 +279,13 @@ Ikev2InfoParser (
//
// For SA Delete
//
- NET_LIST_FOR_EACH (Entry, &(IkePacket)->PayloadList) {
+ NET_LIST_FOR_EACH (Entry, &(IkePacket)->PayloadList) {
//
// Iterate payloads to find the Delete/Notify Payload.
//
IkePayload = IKE_PAYLOAD_BY_PACKET (Entry);
-
+
if (IkePayload->PayloadType == IKEV2_PAYLOAD_TYPE_DELETE) {
DeletePayload = IkePayload;
Delete = (IKEV2_DELETE *)DeletePayload->PayloadBuf;
@@ -310,7 +310,7 @@ Ikev2InfoParser (
// After all IKE SAs were deleted, set the IPSEC_STATUS_DISABLED value in
// IPsec status variable.
//
- if (IsListEmpty (&Private->Ikev1EstablishedList) &&
+ if (IsListEmpty (&Private->Ikev1EstablishedList) &&
(IsListEmpty (&Private->Ikev2EstablishedList))
) {
Value = IPSEC_STATUS_DISABLED;
@@ -341,9 +341,9 @@ Ikev2InfoParser (
return Status;
}
Status = Ikev2SendIkePacket (
- IkeSaSession->SessionCommon.UdpService,
- (UINT8 *)(&IkeSaSession->SessionCommon),
- RespondPacket,
+ IkeSaSession->SessionCommon.UdpService,
+ (UINT8 *)(&IkeSaSession->SessionCommon),
+ RespondPacket,
0
);
}
@@ -373,7 +373,7 @@ Ikev2InfoParser (
Context.InfoType = Ikev2InfoDelete;
Context.MessageId = IkePacket->Header->MessageId;
-
+
RespondPacket = Ikev2InfoGenerator ((UINT8 *)ChildSaSession, &Context);
if (RespondPacket == NULL) {
Status = EFI_INVALID_PARAMETER;
@@ -382,7 +382,7 @@ Ikev2InfoParser (
Status = Ikev2SendIkePacket (
ChildSaSession->SessionCommon.UdpService,
(UINT8 *)(&ChildSaSession->SessionCommon),
- RespondPacket,
+ RespondPacket,
0
);
} else {
@@ -399,7 +399,7 @@ Ikev2InfoParser (
}
}
}
-
+
return Status;
}
diff --git a/NetworkPkg/IpSecDxe/Ikev2/Payload.c b/NetworkPkg/IpSecDxe/Ikev2/Payload.c
index 237743b1b1..218c26f934 100644
--- a/NetworkPkg/IpSecDxe/Ikev2/Payload.c
+++ b/NetworkPkg/IpSecDxe/Ikev2/Payload.c
@@ -2,7 +2,7 @@
The implementation of Payloads Creation.
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
- Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
@@ -55,7 +55,7 @@ Ikev2GenerateSaPayload (
if (SaPayload == NULL) {
return NULL;
}
-
+
//
// TODO: Get the Proposal Number and Transform Number from IPsec Config,
// after the Ipsecconfig Application is support it.
@@ -127,7 +127,7 @@ Ikev2GenerateNoncePayload (
if (Nonce == NULL) {
return NULL;
}
-
+
CopyMem (Nonce + 1, NonceBlock, Size - sizeof (IKEV2_NONCE));
Nonce->Header.NextPayload = NextPayload;
@@ -137,7 +137,7 @@ Ikev2GenerateNoncePayload (
FreePool (Nonce);
return NULL;
}
-
+
NoncePayload->PayloadType = IKEV2_PAYLOAD_TYPE_NONCE;
NoncePayload->PayloadBuf = (UINT8 *) Nonce;
NoncePayload->PayloadSize = Size;
@@ -428,11 +428,11 @@ Ikev2PskGenerateAuthPayload (
if (Digest == NULL) {
return NULL;
}
-
+
if (IdPayload == NULL) {
return NULL;
}
-
+
//
// Calcualte Prf(Seceret, "Key Pad for IKEv2");
//
@@ -460,7 +460,7 @@ Ikev2PskGenerateAuthPayload (
Status = EFI_OUT_OF_RESOURCES;
goto EXIT;
}
-
+
CopyMem (KeyBuf, Digest, DigestSize);
KeySize = DigestSize;
@@ -522,7 +522,7 @@ Ikev2PskGenerateAuthPayload (
Status = EFI_OUT_OF_RESOURCES;
goto EXIT;
}
-
+
Fragments[2].DataSize = DigestSize;
CopyMem (Fragments[2].Data, Digest, DigestSize);
@@ -557,7 +557,7 @@ Ikev2PskGenerateAuthPayload (
Status = EFI_OUT_OF_RESOURCES;
goto EXIT;
}
-
+
//
// Fill in Auth payload.
//
@@ -761,7 +761,7 @@ Ikev2CertGenerateAuthPayload (
Status = EFI_OUT_OF_RESOURCES;
goto EXIT;
}
-
+
Fragments[2].DataSize = DigestSize;
CopyMem (Fragments[2].Data, Digest, DigestSize);
@@ -820,7 +820,7 @@ Ikev2CertGenerateAuthPayload (
Status = EFI_OUT_OF_RESOURCES;
goto EXIT;
}
-
+
//
// Fill in Auth payload.
//
@@ -1229,7 +1229,7 @@ Ikev2GenerateNotifyPayload (
FreePool (Notify);
return NULL;
}
-
+
NotifyPayload->PayloadType = IKEV2_PAYLOAD_TYPE_NOTIFY;
NotifyPayload->PayloadBuf = (UINT8 *) Notify;
NotifyPayload->PayloadSize = NotifyPayloadLen;
@@ -1320,7 +1320,7 @@ Ikev2GenerateDeletePayload (
FreePool (Del);
return NULL;
}
-
+
DelPayload->PayloadType = IKEV2_PAYLOAD_TYPE_DELETE;
DelPayload->PayloadBuf = (UINT8 *) Del;
DelPayload->PayloadSize = DelPayloadLen;
@@ -1687,7 +1687,7 @@ Ikev2EncodeSa (
if (Sa == NULL) {
return NULL;
}
-
+
CopyMem (Sa, SaData, sizeof (IKEV2_SA));
Sa->Header.PayloadLength = (UINT16) sizeof (IKEV2_SA);
ProposalsSize = 0;
@@ -1884,7 +1884,7 @@ Ikev2DecodeSa (
Status = EFI_OUT_OF_RESOURCES;
goto Exit;
}
-
+
CopyMem (SaData, Sa, sizeof (IKEV2_SA));
SaData->NumProposals = TotalProposals;
ProposalData = (IKEV2_PROPOSAL_DATA *) (SaData + 1);
@@ -1921,7 +1921,7 @@ Ikev2DecodeSa (
Status = EFI_OUT_OF_RESOURCES;
goto Exit;
}
-
+
CopyMem (Spi, (UINT32 *) (Proposal + 1), Proposal->SpiSize);
*((UINT32*) Spi) = NTOHL (*((UINT32*) Spi));
ProposalData->Spi = Spi;
@@ -2357,7 +2357,7 @@ Ikev2DecodePacket (
Status = EFI_OUT_OF_RESOURCES;
goto Exit;
}
-
+
CopyMem (IkeHeader, IkePacket->Header, sizeof (IKE_HEADER));
//
@@ -2565,7 +2565,7 @@ Ikev2EncodePacket (
if (IkeSaSession->InitPacket == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
CopyMem (IkeSaSession->InitPacket, IkePacket->Header, sizeof (IKE_HEADER));
PayloadTotalSize = 0;
for (Entry = IkePacket->PayloadList.ForwardLink; Entry != &(IkePacket->PayloadList);) {
@@ -2584,7 +2584,7 @@ Ikev2EncodePacket (
if (IkeSaSession->RespPacket == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
CopyMem (IkeSaSession->RespPacket, IkePacket->Header, sizeof (IKE_HEADER));
PayloadTotalSize = 0;
for (Entry = IkePacket->PayloadList.ForwardLink; Entry != &(IkePacket->PayloadList);) {
@@ -2695,7 +2695,7 @@ Ikev2DecryptPacket (
Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
}
-
+
CopyMem (IntegrityBuffer, IkePacket->Header, sizeof(IKE_HEADER));
CopyMem (IntegrityBuffer + sizeof (IKE_HEADER), IkePacket->PayloadsBuf, IkePacket->PayloadTotalSize);
@@ -2910,7 +2910,7 @@ Ikev2EncryptPacket (
Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
}
-
+
//
// Copy all payload into EncryptedIkePayload
//
diff --git a/NetworkPkg/IpSecDxe/Ikev2/Payload.h b/NetworkPkg/IpSecDxe/Ikev2/Payload.h
index 7a85792ed7..544c9b9948 100644
--- a/NetworkPkg/IpSecDxe/Ikev2/Payload.h
+++ b/NetworkPkg/IpSecDxe/Ikev2/Payload.h
@@ -1,7 +1,7 @@
/** @file
The Definitions related to IKEv2 payload.
- Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
@@ -37,12 +37,12 @@
#define IKEV2_PAYLOAD_TYPE_EAP 48
//
-// IKE header Flag (1 octet) for IKEv2, defined in RFC 4306 section 3.1
+// IKE header Flag (1 octet) for IKEv2, defined in RFC 4306 section 3.1
//
-// I(nitiator) (bit 3 of Flags, 0x08) - This bit MUST be set in messages sent by the
+// I(nitiator) (bit 3 of Flags, 0x08) - This bit MUST be set in messages sent by the
// original initiator of the IKE_SA
//
-// R(esponse) (bit 5 of Flags, 0x20) - This bit indicates that this message is a response to
+// R(esponse) (bit 5 of Flags, 0x20) - This bit indicates that this message is a response to
// a message containing the same message ID.
//
#define IKE_HEADER_FLAGS_INIT 0x08
@@ -67,7 +67,7 @@ typedef struct {
#pragma pack(1)
typedef struct {
IKEV2_COMMON_PAYLOAD_HEADER Header;
- //
+ //
// Proposals
//
} IKEV2_SA;
@@ -94,7 +94,7 @@ typedef struct {
//
// IKEv2 Transform ID for Encrypt Algorithm (ENCR)
-//
+//
#define IKEV2_TRANSFORM_ID_ENCR_DES_IV64 1
#define IKEV2_TRANSFORM_ID_ENCR_DES 2
#define IKEV2_TRANSFORM_ID_ENCR_3DES 3
diff --git a/NetworkPkg/IpSecDxe/Ikev2/Sa.c b/NetworkPkg/IpSecDxe/Ikev2/Sa.c
index f9421ed4e8..554bcabd49 100644
--- a/NetworkPkg/IpSecDxe/Ikev2/Sa.c
+++ b/NetworkPkg/IpSecDxe/Ikev2/Sa.c
@@ -2,7 +2,7 @@
The operations for IKEv2 SA.
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
- Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
@@ -23,7 +23,7 @@
Generates the DH Key.
This generates the DH local public key and store it in the IKEv2 SA Session's GxBuffer.
-
+
@param[in] IkeSaSession Pointer to related IKE SA Session.
@retval EFI_SUCCESS The operation succeeded.
@@ -155,7 +155,7 @@ Ikev2InitPskGenerator (
// IkeSaSession is responder. If resending IKE_SA_INIT with Cookie Notify
// No need to recompute the Public key.
//
- if ((IkeSaSession->SessionCommon.IsInitiator) && (IkeSaSession->NCookie == NULL)) {
+ if ((IkeSaSession->SessionCommon.IsInitiator) && (IkeSaSession->NCookie == NULL)) {
Status = Ikev2GenerateSaDhPublicKey (IkeSaSession);
if (EFI_ERROR (Status)) {
goto CheckError;
@@ -166,7 +166,7 @@ Ikev2InitPskGenerator (
// 4. Generate KE Payload according to SaParams->DhGroup
//
KePayload = Ikev2GenerateKePayload (
- IkeSaSession,
+ IkeSaSession,
IKEV2_PAYLOAD_TYPE_NONCE
);
@@ -223,7 +223,7 @@ CheckError:
if (SaPayload != NULL) {
IkePayloadFree (SaPayload);
}
- return NULL;
+ return NULL;
}
/**
@@ -241,7 +241,7 @@ EFI_STATUS
Ikev2InitPskParser (
IN UINT8 *SaSession,
IN IKE_PACKET *IkePacket
- )
+ )
{
IKEV2_SA_SESSION *IkeSaSession;
IKE_PAYLOAD *SaPayload;
@@ -305,7 +305,7 @@ Ikev2InitPskParser (
Status = EFI_OUT_OF_RESOURCES;
goto CheckError;
}
-
+
CopyMem (
NonceBuffer,
NoncePayload->PayloadBuf + sizeof (IKEV2_COMMON_PAYLOAD_HEADER),
@@ -410,7 +410,7 @@ CheckError:
if (NonceBuffer != NULL) {
FreePool (NonceBuffer);
}
-
+
return Status;
}
@@ -439,7 +439,7 @@ Ikev2AuthPskGenerator (
IKE_PAYLOAD *NotifyPayload;
IKE_PAYLOAD *CpPayload;
IKEV2_CHILD_SA_SESSION *ChildSaSession;
-
+
IkeSaSession = (IKEV2_SA_SESSION *) SaSession;
ChildSaSession = IKEV2_CHILD_SA_SESSION_BY_IKE_SA (GetFirstNode (&IkeSaSession->ChildSaSessionList));
@@ -453,7 +453,7 @@ Ikev2AuthPskGenerator (
NotifyPayload = NULL;
CpPayload = NULL;
NotifyPayload = NULL;
-
+
//
// 1. Allocate IKE Packet
//
@@ -476,7 +476,7 @@ Ikev2AuthPskGenerator (
}
//
- // According to RFC4306_2.2, For the IKE_SA_INIT message the MessageID should
+ // According to RFC4306_2.2, For the IKE_SA_INIT message the MessageID should
// be always number 0 and 1;
//
IkePacket->Header->MessageId = 1;
@@ -623,7 +623,7 @@ CheckError:
if (IkePacket != NULL) {
IkePacketFree (IkePacket);
}
-
+
if (IdPayload != NULL) {
IkePayloadFree (IdPayload);
}
@@ -631,7 +631,7 @@ CheckError:
if (AuthPayload != NULL) {
IkePayloadFree (AuthPayload);
}
-
+
if (CpPayload != NULL) {
IkePayloadFree (CpPayload);
}
@@ -639,20 +639,20 @@ CheckError:
if (SaPayload != NULL) {
IkePayloadFree (SaPayload);
}
-
+
if (TsiPayload != NULL) {
IkePayloadFree (TsiPayload);
}
-
+
if (TsrPayload != NULL) {
IkePayloadFree (TsrPayload);
}
-
+
if (NotifyPayload != NULL) {
IkePayloadFree (NotifyPayload);
}
-
- return NULL;
+
+ return NULL;
}
/**
@@ -661,13 +661,13 @@ CheckError:
@param[in] SaSession Pointer to the IKE_SA_SESSION related to this packet.
@param[in] IkePacket Pointer to the IKE_AUTH packet to be parsered.
- @retval EFI_INVALID_PARAMETER The IKE packet is malformed or the SA
+ @retval EFI_INVALID_PARAMETER The IKE packet is malformed or the SA
proposal is unacceptable.
@retval EFI_SUCCESS The IKE packet is acceptable and the
relative data is saved for furthure communication.
**/
-EFI_STATUS
+EFI_STATUS
Ikev2AuthPskParser (
IN UINT8 *SaSession,
IN IKE_PACKET *IkePacket
@@ -733,7 +733,7 @@ Ikev2AuthPskParser (
// Check IkePacket Header is match the state
//
if (IkeSaSession->SessionCommon.IsInitiator) {
-
+
//
// 1. Check the IkePacket->Hdr == IKE_HEADER_FLAGS_RESPOND
//
@@ -830,7 +830,7 @@ Ikev2AuthPskParser (
(((TRAFFIC_SELECTOR *)(TsrPayload->PayloadBuf + sizeof (IKEV2_TS)))->StartPort != ChildSaSession->RemotePort)
) {
return EFI_INVALID_PARAMETER;
- }
+ }
if ((((TRAFFIC_SELECTOR *)(TsiPayload->PayloadBuf + sizeof (IKEV2_TS)))->StartPort != 0) &&
(((TRAFFIC_SELECTOR *)(TsiPayload->PayloadBuf + sizeof (IKEV2_TS)))->StartPort != ChildSaSession->LocalPort)
) {
@@ -847,7 +847,7 @@ Ikev2AuthPskParser (
return EFI_INVALID_PARAMETER;
}
//
- // Get the Virtual IP address from the Tsi traffic selector.
+ // Get the Virtual IP address from the Tsi traffic selector.
// TODO: check the CFG reply payload
//
CopyMem (
@@ -856,7 +856,7 @@ Ikev2AuthPskParser (
(ChildSaSession->SessionCommon.UdpService->IpVersion == IP_VERSION_4) ?
sizeof (EFI_IPv4_ADDRESS) : sizeof (EFI_IPv6_ADDRESS)
);
- }
+ }
}
//
@@ -866,7 +866,7 @@ Ikev2AuthPskParser (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
if (IkeSaSession->SessionCommon.IsInitiator) {
//
// 6. Change the state of IkeSaSession
@@ -874,7 +874,7 @@ Ikev2AuthPskParser (
IKEV2_DUMP_STATE (IkeSaSession->SessionCommon.State, IkeStateIkeSaEstablished);
IkeSaSession->SessionCommon.State = IkeStateIkeSaEstablished;
}
-
+
return EFI_SUCCESS;
}
@@ -892,7 +892,7 @@ IKE_PACKET*
Ikev2InitCertGenerator (
IN UINT8 *SaSession,
IN VOID *Context
- )
+ )
{
IKE_PACKET *IkePacket;
IKE_PAYLOAD *CertReqPayload;
@@ -944,7 +944,7 @@ Ikev2InitCertGenerator (
@retval EFI_SUCCESS The IKEv2 packet is acceptable and the relative data is
saved for furthure communication.
- @retval EFI_INVALID_PARAMETER The IKE packet is malformed or the SA proposal is unacceptable.
+ @retval EFI_INVALID_PARAMETER The IKE packet is malformed or the SA proposal is unacceptable.
@retval EFI_UNSUPPORTED The certificate authentication is not supported.
**/
@@ -956,11 +956,11 @@ Ikev2InitCertParser (
{
if (!FeaturePcdGet (PcdIpsecCertificateEnabled)) {
return EFI_UNSUPPORTED;
- }
-
+ }
+
//
// The first two messages exchange is same between PSK and Cert.
- // Todo: Parse Certificate Request from responder Initial Exchange.
+ // Todo: Parse Certificate Request from responder Initial Exchange.
//
return Ikev2InitPskParser (SaSession, IkePacket);
}
@@ -1071,7 +1071,7 @@ Ikev2AuthCertGenerator (
if (CertPayload == NULL) {
goto CheckError;
}
-
+
if (IkeSaSession->SessionCommon.IsInitiator) {
CertReqPayload = Ikev2GenerateCertificatePayload (
IkeSaSession,
@@ -1083,7 +1083,7 @@ Ikev2AuthCertGenerator (
);
if (CertReqPayload == NULL) {
goto CheckError;
- }
+ }
}
//
@@ -1126,15 +1126,15 @@ Ikev2AuthCertGenerator (
IKEV2_CFG_ATTR_INTERNAL_IP6_ADDRESS
);
}
-
+
if (CpPayload == NULL) {
goto CheckError;
- }
+ }
}
if (AuthPayload == NULL) {
goto CheckError;
- }
+ }
//
// 5. Generate SA Payload according to the Sa Data in ChildSaSession
@@ -1165,7 +1165,7 @@ Ikev2AuthCertGenerator (
);
//
- // Generate Notify Payload. If transport mode, there should have Notify
+ // Generate Notify Payload. If transport mode, there should have Notify
// payload with TRANSPORT_MODE notification.
//
NotifyPayload = Ikev2GenerateNotifyPayload (
@@ -1222,7 +1222,7 @@ CheckError:
if (IkePacket != NULL) {
IkePacketFree (IkePacket);
}
-
+
if (IdPayload != NULL) {
IkePayloadFree (IdPayload);
}
@@ -1230,7 +1230,7 @@ CheckError:
if (CertPayload != NULL) {
IkePayloadFree (CertPayload);
}
-
+
if (CertReqPayload != NULL) {
IkePayloadFree (CertReqPayload);
}
@@ -1242,24 +1242,24 @@ CheckError:
if (CpPayload != NULL) {
IkePayloadFree (CpPayload);
}
-
+
if (SaPayload != NULL) {
IkePayloadFree (SaPayload);
}
-
+
if (TsiPayload != NULL) {
IkePayloadFree (TsiPayload);
}
-
+
if (TsrPayload != NULL) {
IkePayloadFree (TsrPayload);
}
-
+
if (NotifyPayload != NULL) {
IkePayloadFree (NotifyPayload);
}
-
- return NULL;
+
+ return NULL;
}
/**
@@ -1342,7 +1342,7 @@ Ikev2AuthCertParser (
}
}
- if ((SaPayload == NULL) || (AuthPayload == NULL) || (TsiPayload == NULL) ||
+ if ((SaPayload == NULL) || (AuthPayload == NULL) || (TsiPayload == NULL) ||
(TsrPayload == NULL) || (CertPayload == NULL)) {
goto Exit;
}
@@ -1354,7 +1354,7 @@ Ikev2AuthCertParser (
// Check IkePacket Header is match the state
//
if (IkeSaSession->SessionCommon.IsInitiator) {
-
+
//
// 1. Check the IkePacket->Hdr == IKE_HEADER_FLAGS_RESPOND
//
@@ -1451,7 +1451,7 @@ Ikev2AuthCertParser (
(((TRAFFIC_SELECTOR *)(TsrPayload->PayloadBuf + sizeof (IKEV2_TS)))->StartPort != ChildSaSession->RemotePort)
) {
goto Exit;
- }
+ }
if ((((TRAFFIC_SELECTOR *)(TsiPayload->PayloadBuf + sizeof (IKEV2_TS)))->StartPort != 0) &&
(((TRAFFIC_SELECTOR *)(TsiPayload->PayloadBuf + sizeof (IKEV2_TS)))->StartPort != ChildSaSession->LocalPort)
) {
@@ -1468,7 +1468,7 @@ Ikev2AuthCertParser (
goto Exit;
}
//
- // Get the Virtual IP address from the Tsi traffic selector.
+ // Get the Virtual IP address from the Tsi traffic selector.
// TODO: check the CFG reply payload
//
CopyMem (
@@ -1479,7 +1479,7 @@ Ikev2AuthCertParser (
);
}
}
-
+
//
// 5. Generat keymats for IPsec protocol.
//
@@ -1487,7 +1487,7 @@ Ikev2AuthCertParser (
if (EFI_ERROR (Status)) {
goto Exit;
}
-
+
if (IkeSaSession->SessionCommon.IsInitiator) {
//
// 6. Change the state of IkeSaSession
@@ -1528,7 +1528,7 @@ Ikev2GenerateSaDhPublicKey (
if (IkeSaSession->IkeKeys == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
IkeKeys = IkeSaSession->IkeKeys;
IkeKeys->DhBuffer = AllocateZeroPool (sizeof (IKEV2_DH_BUFFER));
if (IkeKeys->DhBuffer == NULL) {
@@ -1560,13 +1560,13 @@ Ikev2GenerateSaDhPublicKey (
);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "Error CPLKeyManGetKeyParam X public key error Status = %r\n", Status));
-
+
FreePool (IkeKeys->DhBuffer->GxBuffer);
-
+
FreePool (IkeKeys->DhBuffer);
-
+
FreePool (IkeSaSession->IkeKeys);
-
+
return Status;
}
@@ -1583,7 +1583,7 @@ Ikev2GenerateSaDhPublicKey (
@param[in] DhBuffer Pointer to buffer of peer's puliic key.
@param[in] KePayload Pointer to received key payload.
-
+
@retval EFI_SUCCESS The operation succeeded.
@retval Otherwise The operation failed.
@@ -1622,7 +1622,7 @@ Ikev2GenerateSaDhComputeKey (
DEBUG ((DEBUG_ERROR, "Error CPLKeyManGetKeyParam Y session key error Status = %r\n", Status));
FreePool (DhBuffer->GxyBuffer);
-
+
return Status;
}
@@ -1633,10 +1633,10 @@ Ikev2GenerateSaDhComputeKey (
DhBuffer->GyBuffer = AllocateZeroPool (DhBuffer->GySize);
if (DhBuffer->GyBuffer == NULL) {
FreePool (DhBuffer->GxyBuffer);
-
+
return Status;
}
-
+
CopyMem (DhBuffer->GyBuffer, PubKey, DhBuffer->GySize);
IPSEC_DUMP_BUF ("DH Public Key (g^y) Dump", DhBuffer->GyBuffer, DhBuffer->GySize);
@@ -1705,7 +1705,7 @@ Ikev2GenerateSaKeys (
//
// If one or more algorithm is not support, return EFI_UNSUPPORTED.
//
- if (AuthAlgKeyLen == 0 ||
+ if (AuthAlgKeyLen == 0 ||
EncryptAlgKeyLen == 0 ||
IntegrityAlgKeyLen == 0 ||
PrfAlgKeyLen == 0
@@ -1767,8 +1767,8 @@ Ikev2GenerateSaKeys (
IPSEC_DUMP_BUF (">>> NrBlock", IkeSaSession->NrBlock, IkeSaSession->NrBlkSize);
IPSEC_DUMP_BUF (">>> InitiatorCookie", (UINT8 *)&IkeSaSession->InitiatorCookie, sizeof(UINT64));
IPSEC_DUMP_BUF (">>> ResponderCookie", (UINT8 *)&IkeSaSession->ResponderCookie, sizeof(UINT64));
-
- OutputKeyLength = PrfAlgKeyLen +
+
+ OutputKeyLength = PrfAlgKeyLen +
2 * EncryptAlgKeyLen +
2 * AuthAlgKeyLen +
2 * IntegrityAlgKeyLen;
@@ -1818,7 +1818,7 @@ Ikev2GenerateSaKeys (
}
IkeSaSession->IkeKeys->SkAiKeySize = IntegrityAlgKeyLen;
CopyMem (IkeSaSession->IkeKeys->SkAiKey, OutputKey + PrfAlgKeyLen, IntegrityAlgKeyLen);
-
+
IPSEC_DUMP_BUF (">>> SK_Ai Key", IkeSaSession->IkeKeys->SkAiKey, IkeSaSession->IkeKeys->SkAiKeySize);
//
@@ -1835,7 +1835,7 @@ Ikev2GenerateSaKeys (
OutputKey + PrfAlgKeyLen + IntegrityAlgKeyLen,
IntegrityAlgKeyLen
);
-
+
IPSEC_DUMP_BUF (">>> SK_Ar Key", IkeSaSession->IkeKeys->SkArKey, IkeSaSession->IkeKeys->SkArKeySize);
//
@@ -1847,14 +1847,14 @@ Ikev2GenerateSaKeys (
goto Exit;
}
IkeSaSession->IkeKeys->SkEiKeySize = EncryptAlgKeyLen;
-
+
CopyMem (
IkeSaSession->IkeKeys->SkEiKey,
OutputKey + AuthAlgKeyLen + 2 * IntegrityAlgKeyLen,
EncryptAlgKeyLen
);
IPSEC_DUMP_BUF (
- ">>> SK_Ei Key",
+ ">>> SK_Ei Key",
OutputKey + AuthAlgKeyLen + 2 * IntegrityAlgKeyLen,
EncryptAlgKeyLen
);
@@ -1915,7 +1915,7 @@ Ikev2GenerateSaKeys (
IkeSaSession->IkeKeys->SkPrKey,
OutputKey + AuthAlgKeyLen + 2 * IntegrityAlgKeyLen + 2 * EncryptAlgKeyLen + AuthAlgKeyLen,
AuthAlgKeyLen
- );
+ );
IPSEC_DUMP_BUF (
">>> SK_Pr Key",
OutputKey + AuthAlgKeyLen + 2 * IntegrityAlgKeyLen + 2 * EncryptAlgKeyLen + AuthAlgKeyLen,
@@ -1958,7 +1958,7 @@ Exit:
}
}
-
+
return Status;
}
@@ -1988,16 +1988,16 @@ Ikev2GenerateChildSaKeys (
Status = EFI_SUCCESS;
OutputKey = NULL;
-
+
if (KePayload != NULL) {
//
- // Generate Gxy
+ // Generate Gxy
//
Status = Ikev2GenerateSaDhComputeKey (ChildSaSession->DhBuffer, KePayload);
if (EFI_ERROR (Status)) {
goto Exit;
}
-
+
Fragments[0].Data = ChildSaSession->DhBuffer->GxyBuffer;
Fragments[0].DataSize = ChildSaSession->DhBuffer->GxySize;
}
@@ -2021,7 +2021,7 @@ Ikev2GenerateChildSaKeys (
}
//
- //
+ //
// If KePayload is not NULL, calculate KEYMAT = prf+(SK_d, g^ir (new) | Ni | Nr ),
// otherwise, KEYMAT = prf+(SK_d, Ni | Nr )
//
@@ -2045,16 +2045,16 @@ Ikev2GenerateChildSaKeys (
);
if (EFI_ERROR (Status)) {
- goto Exit;
+ goto Exit;
}
-
+
//
// Copy KEYMATE (SK_ENCRYPT_i | SK_ENCRYPT_r | SK_INTEG_i | SK_INTEG_r) to
// ChildKeyMates.
- //
+ //
if (!ChildSaSession->SessionCommon.IsInitiator) {
- //
+ //
// Initiator Encryption Key
//
ChildSaSession->ChildKeymats.LocalPeerInfo.EspAlgoInfo.EncAlgoId = (UINT8)SaParams->EncAlgId;
@@ -2080,8 +2080,8 @@ Ikev2GenerateChildSaKeys (
if (ChildSaSession->ChildKeymats.LocalPeerInfo.EspAlgoInfo.AuthKey == NULL) {
Status = EFI_OUT_OF_RESOURCES;
goto Exit;
- }
-
+ }
+
CopyMem (
ChildSaSession->ChildKeymats.LocalPeerInfo.EspAlgoInfo.AuthKey,
OutputKey + EncryptAlgKeyLen,
@@ -2097,8 +2097,8 @@ Ikev2GenerateChildSaKeys (
if (ChildSaSession->ChildKeymats.RemotePeerInfo.EspAlgoInfo.EncKey == NULL) {
Status = EFI_OUT_OF_RESOURCES;
goto Exit;
- }
-
+ }
+
CopyMem (
ChildSaSession->ChildKeymats.RemotePeerInfo.EspAlgoInfo.EncKey,
OutputKey + EncryptAlgKeyLen + IntegrityAlgKeyLen,
@@ -2114,8 +2114,8 @@ Ikev2GenerateChildSaKeys (
if (ChildSaSession->ChildKeymats.RemotePeerInfo.EspAlgoInfo.AuthKey == NULL) {
Status = EFI_OUT_OF_RESOURCES;
goto Exit;
- }
-
+ }
+
CopyMem (
ChildSaSession->ChildKeymats.RemotePeerInfo.EspAlgoInfo.AuthKey,
OutputKey + 2 * EncryptAlgKeyLen + IntegrityAlgKeyLen,
@@ -2131,8 +2131,8 @@ Ikev2GenerateChildSaKeys (
if (ChildSaSession->ChildKeymats.RemotePeerInfo.EspAlgoInfo.EncKey == NULL) {
Status = EFI_OUT_OF_RESOURCES;
goto Exit;
- }
-
+ }
+
CopyMem (
ChildSaSession->ChildKeymats.RemotePeerInfo.EspAlgoInfo.EncKey,
OutputKey,
@@ -2148,8 +2148,8 @@ Ikev2GenerateChildSaKeys (
if (ChildSaSession->ChildKeymats.RemotePeerInfo.EspAlgoInfo.AuthKey == NULL) {
Status = EFI_OUT_OF_RESOURCES;
goto Exit;
- }
-
+ }
+
CopyMem (
ChildSaSession->ChildKeymats.RemotePeerInfo.EspAlgoInfo.AuthKey,
OutputKey + EncryptAlgKeyLen,
@@ -2165,8 +2165,8 @@ Ikev2GenerateChildSaKeys (
if (ChildSaSession->ChildKeymats.LocalPeerInfo.EspAlgoInfo.EncKey == NULL) {
Status = EFI_OUT_OF_RESOURCES;
goto Exit;
- }
-
+ }
+
CopyMem (
ChildSaSession->ChildKeymats.LocalPeerInfo.EspAlgoInfo.EncKey,
OutputKey + EncryptAlgKeyLen + IntegrityAlgKeyLen,
@@ -2182,8 +2182,8 @@ Ikev2GenerateChildSaKeys (
if (ChildSaSession->ChildKeymats.LocalPeerInfo.EspAlgoInfo.AuthKey == NULL) {
Status = EFI_OUT_OF_RESOURCES;
goto Exit;
- }
-
+ }
+
CopyMem (
ChildSaSession->ChildKeymats.LocalPeerInfo.EspAlgoInfo.AuthKey,
OutputKey + 2 * EncryptAlgKeyLen + IntegrityAlgKeyLen,
@@ -2233,7 +2233,7 @@ Exit:
if (OutputKey != NULL) {
FreePool (OutputKey);
}
-
+
return EFI_SUCCESS;
}
diff --git a/NetworkPkg/IpSecDxe/Ikev2/Utility.c b/NetworkPkg/IpSecDxe/Ikev2/Utility.c
index 8589af0b2a..698aba1327 100644
--- a/NetworkPkg/IpSecDxe/Ikev2/Utility.c
+++ b/NetworkPkg/IpSecDxe/Ikev2/Utility.c
@@ -2,7 +2,7 @@
The Common operations used by IKE Exchange Process.
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
- Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
@@ -21,7 +21,7 @@
UINT16 mIkev2EncryptAlgorithmList[IKEV2_SUPPORT_ENCRYPT_ALGORITHM_NUM] = {
IKEV2_TRANSFORM_ID_ENCR_3DES,
- IKEV2_TRANSFORM_ID_ENCR_AES_CBC,
+ IKEV2_TRANSFORM_ID_ENCR_AES_CBC,
};
UINT16 mIkev2PrfAlgorithmList[IKEV2_SUPPORT_PRF_ALGORITHM_NUM] = {
@@ -69,7 +69,7 @@ Ikev2SaSessionAlloc (
IkeSaSession->InitiatorCookie = IkeGenerateCookie ();
IkeSaSession->ResponderCookie = 0;
//
- // BUGBUG: Message ID starts from 2 is to match the OpenSwan requirement, but it
+ // BUGBUG: Message ID starts from 2 is to match the OpenSwan requirement, but it
// might not match the IPv6 Logo. In its test specification, it mentions that
// the Message ID should start from zero after the IKE_SA_INIT exchange.
//
@@ -143,7 +143,7 @@ Ikev2SaSessionReg (
//
// Cleanup the fields of SessionCommon for processing.
- //
+ //
Ikev2SessionCommonRefresh (SessionCommon);
//
@@ -163,8 +163,8 @@ Ikev2SaSessionReg (
);
if (EFI_ERROR(Status)){
//
- // If TimerEvent creation failed, the SA will be alive untill user disable it or
- // receiving a Delete Payload from peer.
+ // If TimerEvent creation failed, the SA will be alive untill user disable it or
+ // receiving a Delete Payload from peer.
//
return;
}
@@ -177,7 +177,7 @@ Ikev2SaSessionReg (
} else {
Lifetime = IkeSaSession->Spd->Data->ProcessingPolicy->SaLifetime.HardLifetime;
}
-
+
Status = gBS->SetTimer (
SessionCommon->TimeoutEvent,
TimerRelative,
@@ -185,8 +185,8 @@ Ikev2SaSessionReg (
);
if (EFI_ERROR(Status)){
//
- // If SetTimer failed, the SA will be alive untill user disable it or
- // receiving a Delete Payload from peer.
+ // If SetTimer failed, the SA will be alive untill user disable it or
+ // receiving a Delete Payload from peer.
//
return ;
}
@@ -239,8 +239,8 @@ Ikev2SaSessionLookup (
Private->Ikev2SaSession list or Private->Ikev2EstablishedList list.
@param[in] SaSessionList Pointer to list to be inserted into.
- @param[in] IkeSaSession Pointer to IKEV2_SA_SESSION to be inserted.
- @param[in] RemotePeerIp Pointer to EFI_IP_ADDRESSS to indicate the
+ @param[in] IkeSaSession Pointer to IKEV2_SA_SESSION to be inserted.
+ @param[in] RemotePeerIp Pointer to EFI_IP_ADDRESSS to indicate the
unique IKEV2_SA_SESSION.
**/
@@ -261,7 +261,7 @@ Ikev2SaSessionInsert (
@param[in] SaSessionList Pointer to list to be searched.
@param[in] RemotePeerIp Pointer to EFI_IP_ADDRESS to use for SA Session search.
- @retval Pointer to IKEV2_SA_SESSION with the specified remote IP address or NULL.
+ @retval Pointer to IKEV2_SA_SESSION with the specified remote IP address or NULL.
**/
IKEV2_SA_SESSION *
@@ -307,7 +307,7 @@ Ikev2SaSessionOnDeleting (
}
/**
- Free specified Seession Common. The session common would belong to a IKE SA or
+ Free specified Seession Common. The session common would belong to a IKE SA or
a Child SA.
@param[in] SessionCommon Pointer to a Session Common.
@@ -358,7 +358,7 @@ Ikev2SessionCommonRefresh (
return ;
}
/**
- Free specified IKEV2 SA Session.
+ Free specified IKEV2 SA Session.
@param[in] IkeSaSession Pointer to IKEV2_SA_SESSION to be freed.
@@ -374,7 +374,7 @@ Ikev2SaSessionFree (
IKEV2_DH_BUFFER *DhBuffer;
ASSERT (IkeSaSession != NULL);
-
+
//
// Delete Common Session
//
@@ -419,7 +419,7 @@ Ikev2SaSessionFree (
//
// Delete Keys
- //
+ //
if (IkeKeys->SkAiKey != NULL) {
FreePool (IkeKeys->SkAiKey);
}
@@ -495,9 +495,9 @@ Ikev2SaSessionIncreaseMessageId (
/**
Allocate memory for IKEV2 Child SA Session.
-
+
@param[in] UdpService Pointer to IKE_UDP_SERVICE.
- @param[in] IkeSaSession Pointer to IKEV2_SA_SESSION related to this Child SA
+ @param[in] IkeSaSession Pointer to IKEV2_SA_SESSION related to this Child SA
Session.
@retval Pointer of a new created IKEV2 Child SA Session or NULL.
@@ -534,7 +534,7 @@ Ikev2ChildSaSessionAlloc (
FreePool (ChildSaSession);
return NULL;
}
-
+
ChildSaCommon = &ChildSaSession->SessionCommon;
ChildSaCommon->UdpService = UdpService;
ChildSaCommon->Private = IkeSaSession->SessionCommon.Private;
@@ -566,8 +566,8 @@ Ikev2ChildSaSessionAlloc (
}
/**
- Register a established IKEv2 Child SA into IkeSaSession->ChildSaEstablishSessionList.
- If the there is IKEV2_CHILD_SA_SESSION with same remote peer IP, remove the old one
+ Register a established IKEv2 Child SA into IkeSaSession->ChildSaEstablishSessionList.
+ If the there is IKEV2_CHILD_SA_SESSION with same remote peer IP, remove the old one
then register the new one.
@param[in] ChildSaSession Pointer to IKEV2_CHILD_SA_SESSION to be registered.
@@ -610,9 +610,9 @@ Ikev2ChildSaSessionReg (
//
// Cleanup the fields of SessionCommon for processing.
- //
+ //
Ikev2SessionCommonRefresh (SessionCommon);
-
+
//
// Insert the ready child SA session into established list.
//
@@ -692,7 +692,7 @@ Ikev2ChildSaSessionLookupByMid (
This functin find a ChildSA session by searching the ChildSaSessionlist of
the input IKEV2_SA_SESSION by specified MessageID.
-
+
@param[in] SaSessionList Pointer to List to be searched.
@param[in] Spi Specified SPI.
@@ -737,19 +737,19 @@ Ikev2ChildSaSessionInsert (
/**
Remove the IKEV2_CHILD_SA_SESSION from IkeSaSessionList.
-
+
@param[in] SaSessionList The SA Session List to be iterated.
@param[in] Spi Spi used to identified the IKEV2_CHILD_SA_SESSION.
- @param[in] ListType The type of the List to indicate whether it is a
- Established.
+ @param[in] ListType The type of the List to indicate whether it is a
+ Established.
@return The point to IKEV2_CHILD_SA_SESSION or NULL.
-
+
**/
IKEV2_CHILD_SA_SESSION *
Ikev2ChildSaSessionRemove (
IN LIST_ENTRY *SaSessionList,
- IN UINT32 Spi,
+ IN UINT32 Spi,
IN UINT8 ListType
)
{
@@ -758,7 +758,7 @@ Ikev2ChildSaSessionRemove (
IKEV2_CHILD_SA_SESSION *ChildSaSession;
NET_LIST_FOR_EACH_SAFE (Entry, NextEntry, SaSessionList) {
-
+
if (ListType == IKEV2_ESTABLISHED_CHILDSA_LIST || ListType == IKEV2_ESTABLISHING_CHILDSA_LIST) {
ChildSaSession = IKEV2_CHILD_SA_SESSION_BY_IKE_SA (Entry);
} else if (ListType == IKEV2_DELET_CHILDSA_LIST) {
@@ -793,7 +793,7 @@ Ikev2ChildSaSessionOnDeleting (
}
/**
- Free the memory located for the specified IKEV2_CHILD_SA_SESSION.
+ Free the memory located for the specified IKEV2_CHILD_SA_SESSION.
@param[in] ChildSaSession Pointer to IKEV2_CHILD_SA_SESSION.
@@ -907,7 +907,7 @@ Ikev2ChildSaSilentDelete (
//
ChildSession = Ikev2ChildSaSessionRemove(
&(IkeSaSession->ChildSaEstablishSessionList),
- Spi,
+ Spi,
IKEV2_ESTABLISHED_CHILDSA_LIST
);
if (ChildSession == NULL) {
@@ -916,7 +916,7 @@ Ikev2ChildSaSilentDelete (
LocalSpi = ChildSession->LocalPeerSpi;
RemoteSpi = ChildSession->RemotePeerSpi;
-
+
SelectorSize = sizeof (EFI_IPSEC_CONFIG_SELECTOR);
Selector = AllocateZeroPool (SelectorSize);
if (Selector == NULL) {
@@ -938,7 +938,7 @@ Ikev2ChildSaSilentDelete (
Status = EFI_OUT_OF_RESOURCES;
break;
}
-
+
Status = EfiIpSecConfigGetNextSelector (
&Private->IpSecConfig,
IPsecConfigDataTypeSad,
@@ -962,7 +962,7 @@ Ikev2ChildSaSilentDelete (
Status = EFI_OUT_OF_RESOURCES;
break;
}
-
+
CopyMem (RemoteSelector, Selector, SelectorSize);
}
@@ -977,7 +977,7 @@ Ikev2ChildSaSilentDelete (
Status = EFI_OUT_OF_RESOURCES;
break;
}
-
+
CopyMem (LocalSelector, Selector, SelectorSize);
}
}
@@ -1032,12 +1032,12 @@ Ikev2ChildSaSilentDelete (
Free the specified DhBuffer.
@param[in] DhBuffer Pointer to IKEV2_DH_BUFFER to be freed.
-
+
**/
VOID
Ikev2DhBufferFree (
IKEV2_DH_BUFFER *DhBuffer
-)
+)
{
if (DhBuffer != NULL) {
if (DhBuffer->GxBuffer != NULL) {
@@ -1058,7 +1058,7 @@ Ikev2DhBufferFree (
/**
This function is to parse a request IKE packet and return its request type.
- The request type is one of IKE CHILD SA creation, IKE SA rekeying and
+ The request type is one of IKE CHILD SA creation, IKE SA rekeying and
IKE CHILD SA rekeying.
@param[in] IkePacket IKE packet to be prased.
@@ -1085,10 +1085,10 @@ Ikev2ChildExchangeRequestType(
//
Flag = TRUE;
}
- if (IkePayload->PayloadType == IKEV2_PAYLOAD_TYPE_NOTIFY) {
+ if (IkePayload->PayloadType == IKEV2_PAYLOAD_TYPE_NOTIFY) {
if (((IKEV2_NOTIFY*)IkePayload)->MessageType == IKEV2_NOTIFICATION_REKEY_SA) {
//
- // If notify payload with REKEY_SA message type, the IkePacket is for
+ // If notify payload with REKEY_SA message type, the IkePacket is for
// rekeying Child SA.
//
return IkeRequestTypeRekeyChildSa;
@@ -1103,7 +1103,7 @@ Ikev2ChildExchangeRequestType(
return IkeRequestTypeRekeyIkeSa;
} else {
//
- // If the Notify payloaad with transport mode message type, the IkePacket is
+ // If the Notify payloaad with transport mode message type, the IkePacket is
// for create Child SA.
//
return IkeRequestTypeCreateChildSa;
@@ -1113,10 +1113,10 @@ Ikev2ChildExchangeRequestType(
/**
Associate a SPD selector to the Child SA Session.
- This function is called when the Child SA is not the first child SA of its
+ This function is called when the Child SA is not the first child SA of its
IKE SA. It associate a SPD to this Child SA.
- @param[in, out] ChildSaSession Pointer to the Child SA Session to be associated to
+ @param[in, out] ChildSaSession Pointer to the Child SA Session to be associated to
a SPD selector.
@retval EFI_SUCCESS Associate one SPD selector to this Child SA Session successfully.
@@ -1139,7 +1139,7 @@ Ikev2ChildSaAssociateSpdEntry (
/**
This function finds the SPI from Create Child SA Exchange Packet.
-
+
@param[in] IkePacket Pointer to IKE_PACKET to be searched.
@retval SPI number or 0 if it is not supported.
@@ -1152,7 +1152,7 @@ Ikev2ChildExchangeRekeySpi (
{
//
// Not support yet.
- //
+ //
return 0;
}
@@ -1202,7 +1202,7 @@ Ikev2ValidateHeader (
//
// Information Exchagne and Create Child Exchange can be started from each part.
//
- if (IkeHdr->ExchangeType != IKEV2_EXCHANGE_TYPE_INFO &&
+ if (IkeHdr->ExchangeType != IKEV2_EXCHANGE_TYPE_INFO &&
IkeHdr->ExchangeType != IKEV2_EXCHANGE_TYPE_CREATE_CHILD
) {
if (IkeSaSession->SessionCommon.IsInitiator) {
@@ -1277,7 +1277,7 @@ Ikev2InitializeSaData (
ProposalData->ProposalIndex = 1;
//
- // If SA data for IKE_SA_INIT exchage, contains 4 transforms. If SA data for
+ // If SA data for IKE_SA_INIT exchage, contains 4 transforms. If SA data for
// IKE_AUTH exchange contains 3 transforms.
//
if (SessionCommon->IkeSessionType == IkeSessionTypeIkeSa) {
@@ -1297,7 +1297,7 @@ Ikev2InitializeSaData (
FreePool (SaData);
return NULL;
}
-
+
CopyMem (
ProposalData->Spi,
&ChildSaSession->LocalPeerSpi,
@@ -1370,7 +1370,7 @@ Ikev2InitializeSaData (
FreePool (SaData);
return NULL;
}
-
+
CopyMem (
ProposalData->Spi,
&ChildSaSession->LocalPeerSpi,
@@ -1456,9 +1456,9 @@ Ikev2StoreSaData (
//
// Create a SpdSelector. In this implementation, one SPD represents
- // 2 direction traffic, so in here, there needs to reverse the local address
+ // 2 direction traffic, so in here, there needs to reverse the local address
// and remote address for Remote Peer's SA, then reverse again for the locate
- // SA.
+ // SA.
//
TempAddressCount = ChildSaSession->SpdSelector->LocalAddressCount;
TempAddressInfo = ChildSaSession->SpdSelector->LocalAddress;
@@ -1483,7 +1483,7 @@ Ikev2StoreSaData (
//
if (SaData.Mode == EfiIPsecTunnel) {
CopyMem (
- &SaData.TunnelSourceAddress,
+ &SaData.TunnelSourceAddress,
&ChildSaSession->Spd->Data->ProcessingPolicy->TunnelOption->RemoteTunnelAddress,
sizeof (EFI_IP_ADDRESS)
);
@@ -1512,13 +1512,13 @@ Ikev2StoreSaData (
//
// Store the local SA into SAD.
- //
+ //
ChildSaSession->SpdSelector->RemoteAddressCount = ChildSaSession->SpdSelector->LocalAddressCount;
ChildSaSession->SpdSelector->RemoteAddress = ChildSaSession->SpdSelector->LocalAddress;
ChildSaSession->SpdSelector->LocalAddress = TempAddressInfo;
ChildSaSession->SpdSelector->LocalAddressCount = TempAddressCount;
-
+
SaId.Spi = ChildSaSession->RemotePeerSpi;
CopyMem (&SaId.DestAddress, &ChildSaSession->SessionCommon.RemotePeerIp, sizeof (EFI_IP_ADDRESS));
@@ -1555,12 +1555,12 @@ Ikev2StoreSaData (
/**
Call back function of the IKE life time is over.
- This function will mark the related IKE SA Session as deleting and trigger a
+ This function will mark the related IKE SA Session as deleting and trigger a
Information negotiation.
@param[in] Event The signaled Event.
@param[in] Context Pointer to data passed by caller.
-
+
**/
VOID
EFIAPI
@@ -1602,7 +1602,7 @@ Ikev2LifetimeNotify (
//
// Change the Child SA Session's State to IKE_STATE_SA_DELETING.
- //
+ //
DEBUG ((
DEBUG_INFO,
"\n------ChildSa Lifetime is out(SPI):(0x%x)------\n",
@@ -1638,7 +1638,7 @@ Ikev2ResendNotify (
UINT8 Value;
EFI_STATUS Status;
- ASSERT (Context != NULL);
+ ASSERT (Context != NULL);
IkeSaSession = NULL;
ChildSaSession = NULL;
SessionCommon = (IKEV2_SESSION_COMMON *) Context;
@@ -1714,9 +1714,9 @@ Ikev2ResendNotify (
if (ChildSaSession->SessionCommon.State == IkeStateSaDeleting) {
//
- // Established Child SA should be remove from the SAD entry and
- // DeleteList. The function of Ikev2DeleteChildSaSilent() will remove
- // the childSA from the IkeSaSession->ChildSaEstablishedList. So there
+ // Established Child SA should be remove from the SAD entry and
+ // DeleteList. The function of Ikev2DeleteChildSaSilent() will remove
+ // the childSA from the IkeSaSession->ChildSaEstablishedList. So there
// is no need to remove it here.
//
Ikev2ChildSaSilentDelete (IkeSaSession, ChildSaSession->LocalPeerSpi);
@@ -1759,19 +1759,19 @@ Ikev2ResendNotify (
Copy ChildSaSession->Spd->Selector to ChildSaSession->SpdSelector.
ChildSaSession->SpdSelector stores the real Spdselector for its SA. Sometime,
- the SpdSelector in ChildSaSession is more accurated or the scope is smaller
+ the SpdSelector in ChildSaSession is more accurated or the scope is smaller
than the one in ChildSaSession->Spd, especially for the tunnel mode.
-
+
@param[in, out] ChildSaSession Pointer to IKEV2_CHILD_SA_SESSION related to.
@retval EFI_SUCCESS The operation complete successfully.
@retval EFI_OUT_OF_RESOURCES If the required resource can't be allocated.
-
+
**/
EFI_STATUS
Ikev2ChildSaSessionSpdSelectorCreate (
IN OUT IKEV2_CHILD_SA_SESSION *ChildSaSession
- )
+ )
{
EFI_STATUS Status;
@@ -1786,26 +1786,26 @@ Ikev2ChildSaSessionSpdSelectorCreate (
}
}
CopyMem (
- ChildSaSession->SpdSelector,
- ChildSaSession->Spd->Selector,
+ ChildSaSession->SpdSelector,
+ ChildSaSession->Spd->Selector,
sizeof (EFI_IPSEC_SPD_SELECTOR)
);
ChildSaSession->SpdSelector->RemoteAddress = AllocateCopyPool (
- ChildSaSession->Spd->Selector->RemoteAddressCount *
- sizeof (EFI_IP_ADDRESS_INFO),
+ ChildSaSession->Spd->Selector->RemoteAddressCount *
+ sizeof (EFI_IP_ADDRESS_INFO),
ChildSaSession->Spd->Selector->RemoteAddress
);
if (ChildSaSession->SpdSelector->RemoteAddress == NULL) {
Status = EFI_OUT_OF_RESOURCES;
FreePool (ChildSaSession->SpdSelector);
-
+
return Status;
}
-
+
ChildSaSession->SpdSelector->LocalAddress = AllocateCopyPool (
- ChildSaSession->Spd->Selector->LocalAddressCount *
- sizeof (EFI_IP_ADDRESS_INFO),
+ ChildSaSession->Spd->Selector->LocalAddressCount *
+ sizeof (EFI_IP_ADDRESS_INFO),
ChildSaSession->Spd->Selector->LocalAddress
);
if (ChildSaSession->SpdSelector->LocalAddress == NULL) {
@@ -1814,12 +1814,12 @@ Ikev2ChildSaSessionSpdSelectorCreate (
FreePool (ChildSaSession->SpdSelector->RemoteAddress);
FreePool (ChildSaSession->SpdSelector);
-
+
return Status;
}
ChildSaSession->SpdSelector->RemoteAddressCount = ChildSaSession->Spd->Selector->RemoteAddressCount;
- ChildSaSession->SpdSelector->LocalAddressCount = ChildSaSession->Spd->Selector->LocalAddressCount;
+ ChildSaSession->SpdSelector->LocalAddressCount = ChildSaSession->Spd->Selector->LocalAddressCount;
}
return Status;
@@ -1853,7 +1853,7 @@ Ikev2ChildSaSessionCreate (
//
// Set the specific parameters.
- //
+ //
ChildSaSession->Spd = IkeSaSession->Spd;
ChildSaCommon = &ChildSaSession->SessionCommon;
ChildSaCommon->IsInitiator = IkeSaSession->SessionCommon.IsInitiator;
@@ -1883,7 +1883,7 @@ Ikev2ChildSaSessionCreate (
Ikev2ChildSaSessionFree (ChildSaSession);
return NULL;
}
-
+
ChildSaSession->NiBlkSize = IkeSaSession->NiBlkSize;
CopyMem (ChildSaSession->NiBlock, IkeSaSession->NiBlock, IkeSaSession->NiBlkSize);
@@ -1892,13 +1892,13 @@ Ikev2ChildSaSessionCreate (
Ikev2ChildSaSessionFree (ChildSaSession);
return NULL;
}
-
+
ChildSaSession->NrBlkSize = IkeSaSession->NrBlkSize;
CopyMem (ChildSaSession->NrBlock, IkeSaSession->NrBlock, IkeSaSession->NrBlkSize);
//
- // Only if the Create Child SA is called for the IKE_INIT Exchange and
- // IkeSaSession is initiator (Only Initiator's SPD is not NULL), Set the
+ // Only if the Create Child SA is called for the IKE_INIT Exchange and
+ // IkeSaSession is initiator (Only Initiator's SPD is not NULL), Set the
// Traffic Selectors related information here.
//
if (IkeSaSession->SessionCommon.State == IkeStateAuth && IkeSaSession->Spd != NULL) {
@@ -1918,20 +1918,20 @@ Ikev2ChildSaSessionCreate (
Check if the SPD is related to the input Child SA Session.
This function is the subfunction of Ikev1AssociateSpdEntry(). It is the call
- back function of IpSecVisitConfigData().
-
+ back function of IpSecVisitConfigData().
+
@param[in] Type Type of the input Config Selector.
- @param[in] Selector Pointer to the Configure Selector to be checked.
- @param[in] Data Pointer to the Configure Selector's Data passed
+ @param[in] Selector Pointer to the Configure Selector to be checked.
+ @param[in] Data Pointer to the Configure Selector's Data passed
from the caller.
@param[in] SelectorSize The buffer size of Selector.
@param[in] DataSize The buffer size of the Data.
@param[in] Context The data passed from the caller. It is a Child
SA Session in this context.
- @retval EFI_SUCCESS The SPD Selector is not related to the Child SA Session.
- @retval EFI_ABORTED The SPD Selector is related to the Child SA session and
+ @retval EFI_SUCCESS The SPD Selector is not related to the Child SA Session.
+ @retval EFI_ABORTED The SPD Selector is related to the Child SA session and
set the ChildSaSession->Spd to point to this SPD Selector.
**/
@@ -1962,7 +1962,7 @@ Ikev2MatchSpdEntry (
ChildSaSession = (IKEV2_CHILD_SA_SESSION *) Context;
IpVersion = ChildSaSession->SessionCommon.UdpService->IpVersion;
- SpdSelector = (EFI_IPSEC_SPD_SELECTOR *) Selector;
+ SpdSelector = (EFI_IPSEC_SPD_SELECTOR *) Selector;
IsMatch = TRUE;
if (SpdSelector->NextLayerProtocol == EFI_IP_PROTO_UDP &&
@@ -1991,7 +1991,7 @@ Ikev2MatchSpdEntry (
IsMatch = FALSE;
}
- IsMatch = (BOOLEAN) (IsMatch &&
+ IsMatch = (BOOLEAN) (IsMatch &&
IpSecMatchIpAddress (
IpVersion,
&ChildSaSession->SessionCommon.LocalPeerIp,
@@ -1999,7 +1999,7 @@ Ikev2MatchSpdEntry (
SpdSelector->LocalAddressCount
));
- IsMatch = (BOOLEAN) (IsMatch &&
+ IsMatch = (BOOLEAN) (IsMatch &&
IpSecMatchIpAddress (
IpVersion,
&ChildSaSession->SessionCommon.RemotePeerIp,
@@ -2073,12 +2073,12 @@ Ikev2IsSupportAlg (
@param[in] ProposalData Pointer to related IKEV2_PROPOSAL_DATA.
@param[out] PreferEncryptAlgorithm Output of preferred encrypt algorithm.
- @param[out] PreferIntegrityAlgorithm Output of preferred integrity algorithm.
- @param[out] PreferPrfAlgorithm Output of preferred PRF algorithm. Only
+ @param[out] PreferIntegrityAlgorithm Output of preferred integrity algorithm.
+ @param[out] PreferPrfAlgorithm Output of preferred PRF algorithm. Only
for IKE SA.
- @param[out] PreferDhGroup Output of preferred DH group. Only for
+ @param[out] PreferDhGroup Output of preferred DH group. Only for
IKE SA.
- @param[out] PreferEncryptKeylength Output of preferred encrypt key length
+ @param[out] PreferEncryptKeylength Output of preferred encrypt key length
in bytes.
@param[out] IsSupportEsn Output of value about the Extented Sequence
Number is support or not. Only for Child SA.
@@ -2088,7 +2088,7 @@ Ikev2IsSupportAlg (
**/
VOID
Ikev2ParseProposalData (
- IN IKEV2_PROPOSAL_DATA *ProposalData,
+ IN IKEV2_PROPOSAL_DATA *ProposalData,
OUT UINT16 *PreferEncryptAlgorithm,
OUT UINT16 *PreferIntegrityAlgorithm,
OUT UINT16 *PreferPrfAlgorithm,
@@ -2096,7 +2096,7 @@ Ikev2ParseProposalData (
OUT UINTN *PreferEncryptKeylength,
OUT BOOLEAN *IsSupportEsn,
IN BOOLEAN IsChildSa
-)
+)
{
IKEV2_TRANSFORM_DATA *TransformData;
UINT8 TransformIndex;
@@ -2105,7 +2105,7 @@ Ikev2ParseProposalData (
// Check input parameters.
//
if (ProposalData == NULL ||
- PreferEncryptAlgorithm == NULL ||
+ PreferEncryptAlgorithm == NULL ||
PreferIntegrityAlgorithm == NULL ||
PreferEncryptKeylength == NULL
) {
@@ -2120,14 +2120,14 @@ Ikev2ParseProposalData (
if (PreferPrfAlgorithm == NULL || PreferDhGroup == NULL) {
return;
}
- }
+ }
TransformData = (IKEV2_TRANSFORM_DATA *)(ProposalData + 1);
for (TransformIndex = 0; TransformIndex < ProposalData->NumTransforms; TransformIndex++) {
- switch (TransformData->TransformType) {
+ switch (TransformData->TransformType) {
//
- // For IKE SA there are four algorithm types. Encryption Algorithm, Pseudo-random Function,
- // Integrity Algorithm, Diffie-Hellman Group. For Child SA, there are three algorithm types.
+ // For IKE SA there are four algorithm types. Encryption Algorithm, Pseudo-random Function,
+ // Integrity Algorithm, Diffie-Hellman Group. For Child SA, there are three algorithm types.
// Encryption Algorithm, Integrity Algorithm, Extended Sequence Number.
//
case IKEV2_TRANSFORM_TYPE_ENCR:
@@ -2154,7 +2154,7 @@ Ikev2ParseProposalData (
if (*PreferPrfAlgorithm == 0 && Ikev2IsSupportAlg (TransformData->TransformId, IKE_PRF_TYPE)) {
*PreferPrfAlgorithm = TransformData->TransformId;
}
- }
+ }
break;
case IKEV2_TRANSFORM_TYPE_INTEG :
@@ -2162,21 +2162,21 @@ Ikev2ParseProposalData (
*PreferIntegrityAlgorithm = TransformData->TransformId;
}
break;
-
+
case IKEV2_TRANSFORM_TYPE_DH :
if (!IsChildSa) {
if (*PreferDhGroup == 0 && Ikev2IsSupportAlg (TransformData->TransformId, IKE_DH_TYPE)) {
*PreferDhGroup = TransformData->TransformId;
}
- }
+ }
break;
-
+
case IKEV2_TRANSFORM_TYPE_ESN :
if (IsChildSa) {
if (TransformData->TransformId != 0) {
*IsSupportEsn = TRUE;
}
- }
+ }
break;
default:
@@ -2188,14 +2188,14 @@ Ikev2ParseProposalData (
/**
Parse the received Initial Exchange Packet.
-
- This function parse the SA Payload and Key Payload to find out the cryptographic
- suite for the further IKE negotiation and fill it into the IKE SA Session's
+
+ This function parse the SA Payload and Key Payload to find out the cryptographic
+ suite for the further IKE negotiation and fill it into the IKE SA Session's
CommonSession->SaParams.
@param[in, out] IkeSaSession Pointer to related IKEV2_SA_SESSION.
@param[in] SaPayload The received packet.
- @param[in] Type The received packet IKE header flag.
+ @param[in] Type The received packet IKE header flag.
@retval TRUE If the SA proposal in Packet is acceptable.
@retval FALSE If the SA proposal in Packet is not acceptable.
@@ -2246,7 +2246,7 @@ Ikev2SaParseSaPayload (
// Get the preferred algorithms.
//
Ikev2ParseProposalData (
- ProposalData,
+ ProposalData,
&PreferEncryptAlgorithm,
&PreferIntegrityAlgorithm,
&PreferPrfAlgorithm,
@@ -2258,17 +2258,17 @@ Ikev2SaParseSaPayload (
if (PreferEncryptAlgorithm != 0 &&
PreferIntegrityAlgorithm != 0 &&
- PreferPrfAlgorithm != 0 &&
+ PreferPrfAlgorithm != 0 &&
PreferDhGroup != 0
) {
//
- // Find the matched one.
+ // Find the matched one.
//
IkeSaSession->SessionCommon.SaParams = AllocateZeroPool (sizeof (IKEV2_SA_PARAMS));
if (IkeSaSession->SessionCommon.SaParams == NULL) {
return FALSE;
}
-
+
IkeSaSession->SessionCommon.SaParams->EncAlgId = PreferEncryptAlgorithm;
IkeSaSession->SessionCommon.SaParams->EnckeyLen = PreferEncryptKeylength;
IkeSaSession->SessionCommon.SaParams->DhGroup = PreferDhGroup;
@@ -2296,13 +2296,13 @@ Ikev2SaParseSaPayload (
// one than one transform with same type.
//
CopyMem (
- (IKEV2_PROPOSAL_DATA *) (IkeSaSession->SaData + 1),
- ProposalData,
+ (IKEV2_PROPOSAL_DATA *) (IkeSaSession->SaData + 1),
+ ProposalData,
SaDataSize - sizeof (IKEV2_SA_DATA)
);
((IKEV2_PROPOSAL_DATA *) (IkeSaSession->SaData + 1))->ProposalIndex = 1;
-
+
return TRUE;
} else {
PreferEncryptAlgorithm = 0;
@@ -2315,21 +2315,21 @@ Ikev2SaParseSaPayload (
//
// Point to next Proposal.
//
- ProposalData = (IKEV2_PROPOSAL_DATA*)((UINT8*)(ProposalData + 1) +
+ ProposalData = (IKEV2_PROPOSAL_DATA*)((UINT8*)(ProposalData + 1) +
ProposalData->NumTransforms * sizeof (IKEV2_TRANSFORM_DATA));
}
} else if (Type == IKE_HEADER_FLAGS_RESPOND) {
//
- // First check the SA proposal's ProtoctolID and Transform Numbers. Since it is
- // the responded SA proposal, suppose it only has one proposal and the transform Numbers
- // is 4.
+ // First check the SA proposal's ProtoctolID and Transform Numbers. Since it is
+ // the responded SA proposal, suppose it only has one proposal and the transform Numbers
+ // is 4.
//
ProposalData = (IKEV2_PROPOSAL_DATA *)((IKEV2_SA_DATA *) SaPayload->PayloadBuf + 1);
if (ProposalData->ProtocolId != IPSEC_PROTO_ISAKMP || ProposalData->NumTransforms != 4) {
return FALSE;
}
//
- // Get the preferred algorithms.
+ // Get the preferred algorithms.
//
Ikev2ParseProposalData (
ProposalData,
@@ -2338,17 +2338,17 @@ Ikev2SaParseSaPayload (
&PreferPrfAlgorithm,
&PreferDhGroup,
&PreferEncryptKeylength,
- NULL,
+ NULL,
FALSE
);
- //
+ //
// Check if the Sa proposal data from received packet is in the IkeSaSession->SaData.
//
ProposalData = (IKEV2_PROPOSAL_DATA *) (IkeSaSession->SaData + 1);
for (ProposalIndex = 0; ProposalIndex < IkeSaSession->SaData->NumProposals && (!IsMatch); ProposalIndex++) {
Ikev2ParseProposalData (
- ProposalData,
+ ProposalData,
&EncryptAlgorithm,
&IntegrityAlgorithm,
&PrfAlgorithm,
@@ -2369,11 +2369,11 @@ Ikev2SaParseSaPayload (
IntegrityAlgorithm = 0;
PrfAlgorithm = 0;
DhGroup = 0;
- EncryptKeylength = 0;
+ EncryptKeylength = 0;
}
- ProposalData = (IKEV2_PROPOSAL_DATA*)((UINT8*)(ProposalData + 1) +
- ProposalData->NumTransforms * sizeof (IKEV2_TRANSFORM_DATA));
+ ProposalData = (IKEV2_PROPOSAL_DATA*)((UINT8*)(ProposalData + 1) +
+ ProposalData->NumTransforms * sizeof (IKEV2_TRANSFORM_DATA));
}
if (IsMatch) {
@@ -2381,32 +2381,32 @@ Ikev2SaParseSaPayload (
if (IkeSaSession->SessionCommon.SaParams == NULL) {
return FALSE;
}
-
+
IkeSaSession->SessionCommon.SaParams->EncAlgId = PreferEncryptAlgorithm;
IkeSaSession->SessionCommon.SaParams->EnckeyLen = PreferEncryptKeylength;
IkeSaSession->SessionCommon.SaParams->DhGroup = PreferDhGroup;
IkeSaSession->SessionCommon.SaParams->Prf = PreferPrfAlgorithm;
IkeSaSession->SessionCommon.SaParams->IntegAlgId = PreferIntegrityAlgorithm;
IkeSaSession->SessionCommon.PreferDhGroup = PreferDhGroup;
-
+
return TRUE;
}
}
-
+
return FALSE;
}
/**
Parse the received Authentication Exchange Packet.
-
+
This function parse the SA Payload and Key Payload to find out the cryptographic
suite for the ESP and fill it into the Child SA Session's CommonSession->SaParams.
-
- @param[in, out] ChildSaSession Pointer to IKEV2_CHILD_SA_SESSION related to
+
+ @param[in, out] ChildSaSession Pointer to IKEV2_CHILD_SA_SESSION related to
this Authentication Exchange.
@param[in] SaPayload The received packet.
- @param[in] Type The IKE header's flag of received packet .
-
+ @param[in] Type The IKE header's flag of received packet .
+
@retval TRUE If the SA proposal in Packet is acceptable.
@retval FALSE If the SA proposal in Packet is not acceptable.
@@ -2465,18 +2465,18 @@ Ikev2ChildSaParseSaPayload (
//
// Don't support the ESN now.
//
- if (PreferEncryptAlgorithm != 0 &&
+ if (PreferEncryptAlgorithm != 0 &&
PreferIntegrityAlgorithm != 0 &&
!IsSupportEsn
) {
//
- // Find the matched one.
+ // Find the matched one.
//
ChildSaSession->SessionCommon.SaParams = AllocateZeroPool (sizeof (IKEV2_SA_PARAMS));
if (ChildSaSession->SessionCommon.SaParams == NULL) {
return FALSE;
}
-
+
ChildSaSession->SessionCommon.SaParams->EncAlgId = PreferEncryptAlgorithm;
ChildSaSession->SessionCommon.SaParams->EnckeyLen = PreferEncryptKeylength;
ChildSaSession->SessionCommon.SaParams->IntegAlgId = PreferIntegrityAlgorithm;
@@ -2499,7 +2499,7 @@ Ikev2ChildSaParseSaPayload (
//
// BUGBUG: Suppose there are 4 transforms in the matched proposal. If
- // the matched Proposal has more than 4 transforms that means there
+ // the matched Proposal has more than 4 transforms that means there
// are more than one transform with same type.
//
CopyMem (
@@ -2511,17 +2511,17 @@ Ikev2ChildSaParseSaPayload (
((IKEV2_PROPOSAL_DATA *) (ChildSaSession->SaData + 1))->ProposalIndex = 1;
((IKEV2_PROPOSAL_DATA *) (ChildSaSession->SaData + 1))->Spi = AllocateCopyPool (
- sizeof (ChildSaSession->LocalPeerSpi),
+ sizeof (ChildSaSession->LocalPeerSpi),
&ChildSaSession->LocalPeerSpi
);
if (((IKEV2_PROPOSAL_DATA *) (ChildSaSession->SaData + 1))->Spi == NULL) {
FreePool (ChildSaSession->SessionCommon.SaParams);
FreePool (ChildSaSession->SaData );
-
+
return FALSE;
}
-
+
return TRUE;
} else {
@@ -2533,14 +2533,14 @@ Ikev2ChildSaParseSaPayload (
//
// Point to next Proposal
//
- ProposalData = (IKEV2_PROPOSAL_DATA *)((UINT8 *)(ProposalData + 1) +
+ ProposalData = (IKEV2_PROPOSAL_DATA *)((UINT8 *)(ProposalData + 1) +
ProposalData->NumTransforms * sizeof (IKEV2_TRANSFORM_DATA));
}
} else if (Type == IKE_HEADER_FLAGS_RESPOND) {
//
- // First check the SA proposal's ProtoctolID and Transform Numbers. Since it is
- // the responded SA proposal, suppose it only has one proposal and the transform Numbers
- // is 3.
+ // First check the SA proposal's ProtoctolID and Transform Numbers. Since it is
+ // the responded SA proposal, suppose it only has one proposal and the transform Numbers
+ // is 3.
//
ProposalData = (IKEV2_PROPOSAL_DATA *)((IKEV2_SA_DATA *)SaPayload->PayloadBuf + 1);
if (ProposalData->ProtocolId != IPSEC_PROTO_IPSEC_ESP || ProposalData->NumTransforms != 3) {
@@ -2564,7 +2564,7 @@ Ikev2ChildSaParseSaPayload (
for (ProposalIndex = 0; ProposalIndex < ChildSaSession->SaData->NumProposals && (!IsMatch); ProposalIndex++) {
Ikev2ParseProposalData (
- ProposalData,
+ ProposalData,
&EncryptAlgorithm,
&IntegrityAlgorithm,
NULL,
@@ -2576,7 +2576,7 @@ Ikev2ChildSaParseSaPayload (
if (EncryptAlgorithm == PreferEncryptAlgorithm &&
EncryptKeylength == PreferEncryptKeylength &&
IntegrityAlgorithm == PreferIntegrityAlgorithm &&
- IsSupportEsn == PreferIsSupportEsn
+ IsSupportEsn == PreferIsSupportEsn
) {
IsMatch = TRUE;
} else {
@@ -2584,17 +2584,17 @@ Ikev2ChildSaParseSaPayload (
PreferIntegrityAlgorithm = 0;
IsSupportEsn = TRUE;
}
- ProposalData = (IKEV2_PROPOSAL_DATA*)((UINT8*)(ProposalData + 1) +
- ProposalData->NumTransforms * sizeof (IKEV2_TRANSFORM_DATA));
+ ProposalData = (IKEV2_PROPOSAL_DATA*)((UINT8*)(ProposalData + 1) +
+ ProposalData->NumTransforms * sizeof (IKEV2_TRANSFORM_DATA));
}
-
+
ProposalData = (IKEV2_PROPOSAL_DATA *)((IKEV2_SA_DATA *)SaPayload->PayloadBuf + 1);
if (IsMatch) {
ChildSaSession->SessionCommon.SaParams = AllocateZeroPool (sizeof (IKEV2_SA_PARAMS));
if (ChildSaSession->SessionCommon.SaParams == NULL) {
return FALSE;
}
-
+
ChildSaSession->SessionCommon.SaParams->EncAlgId = PreferEncryptAlgorithm;
ChildSaSession->SessionCommon.SaParams->EnckeyLen = PreferEncryptKeylength;
ChildSaSession->SessionCommon.SaParams->IntegAlgId = PreferIntegrityAlgorithm;
@@ -2609,17 +2609,17 @@ Ikev2ChildSaParseSaPayload (
/**
Generate Key buffer from fragments.
- If the digest length of specified HashAlgId is larger than or equal with the
- required output key length, derive the key directly. Otherwise, Key Material
- needs to be PRF-based concatenation according to 2.13 of RFC 4306:
+ If the digest length of specified HashAlgId is larger than or equal with the
+ required output key length, derive the key directly. Otherwise, Key Material
+ needs to be PRF-based concatenation according to 2.13 of RFC 4306:
prf+ (K,S) = T1 | T2 | T3 | T4 | ..., T1 = prf (K, S | 0x01),
T2 = prf (K, T1 | S | 0x02), T3 = prf (K, T2 | S | 0x03),T4 = prf (K, T3 | S | 0x04)
then derive the key from this key material.
-
+
@param[in] HashAlgId The Hash Algorithm ID used to generate key.
@param[in] HashKey Pointer to a key buffer which contains hash key.
@param[in] HashKeyLength The length of HashKey in bytes.
- @param[in, out] OutputKey Pointer to buffer which is used to receive the
+ @param[in, out] OutputKey Pointer to buffer which is used to receive the
output key.
@param[in] OutputKeyLength The length of OutPutKey buffer.
@param[in] Fragments Pointer to the data to be used to generate key.
@@ -2682,11 +2682,11 @@ Ikev2SaGenerateKey (
if (OutputKeyLength <= DigestSize) {
Status = IpSecCryptoIoHmac (
HashAlgId,
- HashKey,
- HashKeyLength,
- (HASH_DATA_FRAGMENT *) Fragments,
- NumFragments,
- Digest,
+ HashKey,
+ HashKeyLength,
+ (HASH_DATA_FRAGMENT *) Fragments,
+ NumFragments,
+ Digest,
DigestSize
);
if (EFI_ERROR (Status)) {
@@ -2713,7 +2713,7 @@ Ikev2SaGenerateKey (
Status = EFI_OUT_OF_RESOURCES;
goto Exit;
}
-
+
LocalFragments[1].DataSize = FragmentsSize;
//
@@ -2722,7 +2722,7 @@ Ikev2SaGenerateKey (
FragmentsSize = 0;
for (Index = 0; Index < NumFragments; Index++) {
CopyMem (
- LocalFragments[1].Data + FragmentsSize,
+ LocalFragments[1].Data + FragmentsSize,
Fragments[Index].Data,
Fragments[Index].DataSize
);
@@ -2743,17 +2743,17 @@ Ikev2SaGenerateKey (
Status = EFI_OUT_OF_RESOURCES;
goto Exit;
}
-
+
LocalFragments[0].DataSize = AuthKeyLength;
Round = (OutputKeyLength - 1) / AuthKeyLength + 1;
for (Index = 0; Index < Round; Index++) {
Status = IpSecCryptoIoHmac (
- HashAlgId,
- HashKey,
- HashKeyLength,
+ HashAlgId,
+ HashKey,
+ HashKeyLength,
(HASH_DATA_FRAGMENT *)(Index == 0 ? &LocalFragments[1] : LocalFragments),
- Index == 0 ? 2 : 3,
+ Index == 0 ? 2 : 3,
Digest,
DigestSize
);
@@ -2761,25 +2761,25 @@ Ikev2SaGenerateKey (
goto Exit;
}
CopyMem (
- LocalFragments[0].Data,
- Digest,
+ LocalFragments[0].Data,
+ Digest,
DigestSize
);
if (OutputKeyLength > DigestSize * (Index + 1)) {
CopyMem (
- OutputKey + Index * DigestSize,
- Digest,
+ OutputKey + Index * DigestSize,
+ Digest,
DigestSize
);
LocalFragments[0].DataSize = DigestSize;
TailData ++;
} else {
- //
+ //
// The last round
//
CopyMem (
- OutputKey + Index * DigestSize,
- Digest,
+ OutputKey + Index * DigestSize,
+ Digest,
OutputKeyLength - Index * DigestSize
);
}
diff --git a/NetworkPkg/IpSecDxe/Ikev2/Utility.h b/NetworkPkg/IpSecDxe/Ikev2/Utility.h
index 319b6cb32c..8383ff8dd6 100644
--- a/NetworkPkg/IpSecDxe/Ikev2/Utility.h
+++ b/NetworkPkg/IpSecDxe/Ikev2/Utility.h
@@ -1,8 +1,8 @@
/** @file
- The interfaces of IKE/Child session operations and payload related operations
+ The interfaces of IKE/Child session operations and payload related operations
used by IKE Exchange Process.
- Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 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
@@ -76,8 +76,8 @@ Ikev2SaSessionLookup (
Private->Ikev2SaSession list or Private->Ikev2EstablishedList list.
@param[in] SaSessionList Pointer to list to be inserted into.
- @param[in] IkeSaSession Pointer to IKEV2_SA_SESSION to be inserted.
- @param[in] RemotePeerIp Pointer to EFI_IP_ADDRESSS to indicate the
+ @param[in] IkeSaSession Pointer to IKEV2_SA_SESSION to be inserted.
+ @param[in] RemotePeerIp Pointer to EFI_IP_ADDRESSS to indicate the
unique IKEV2_SA_SESSION.
**/
@@ -94,7 +94,7 @@ Ikev2SaSessionInsert (
@param[in] SaSessionList Pointer to list to be searched.
@param[in] RemotePeerIp Pointer to EFI_IP_ADDRESS to use for SA Session search.
- @retval Pointer to IKEV2_SA_SESSION with the specified remote IP address.
+ @retval Pointer to IKEV2_SA_SESSION with the specified remote IP address.
**/
IKEV2_SA_SESSION *
@@ -129,7 +129,7 @@ Ikev2SessionCommonRefresh (
);
/**
- Free specified IKEV2 SA Session.
+ Free specified IKEV2 SA Session.
@param[in] IkeSaSession Pointer to IKEV2_SA_SESSION to be freed.
@@ -140,7 +140,7 @@ Ikev2SaSessionFree (
);
/**
- Free specified Seession Common. The session common would belong to a IKE SA or
+ Free specified Seession Common. The session common would belong to a IKE SA or
a Child SA.
@param[in] SessionCommon Pointer to a Session Common.
@@ -164,9 +164,9 @@ Ikev2SaSessionIncreaseMessageId (
/**
Allocate Momery for IKEV2 Child SA Session.
-
+
@param[in] UdpService Pointer to IKE_UDP_SERVICE.
- @param[in] IkeSaSession Pointer to IKEV2_SA_SESSION related to this Child SA
+ @param[in] IkeSaSession Pointer to IKEV2_SA_SESSION related to this Child SA
Session.
@retval Pointer of a new created IKEV2 Child SA Session.
@@ -179,8 +179,8 @@ Ikev2ChildSaSessionAlloc (
);
/**
- Register a established IKEv2 Child SA into IkeSaSession->ChildSaEstablishSessionList.
- If the there is IKEV2_CHILD_SA_SESSION with same remote peer IP, remove the old one
+ Register a established IKEv2 Child SA into IkeSaSession->ChildSaEstablishSessionList.
+ If the there is IKEV2_CHILD_SA_SESSION with same remote peer IP, remove the old one
then register the new one.
@param[in] ChildSaSession Pointer to IKEV2_CHILD_SA_SESSION to be registered.
@@ -198,7 +198,7 @@ Ikev2ChildSaSessionReg (
This functin find a ChildSA session by searching the ChildSaSessionlist of
the input IKEV2_SA_SESSION by specified MessageID.
-
+
@param[in] SaSessionList Pointer to List to be searched.
@param[in] Spi Specified SPI.
@@ -241,20 +241,20 @@ Ikev2ChildSaSessionInsert (
/**
Remove the IKEV2_CHILD_SA_SESSION from IkeSaSessionList.
-
+
@param[in] SaSessionList The SA Session List to be iterated.
@param[in] Spi Spi used to identify the IKEV2_CHILD_SA_SESSION.
- @param[in] ListType The type of the List to indicate whether it is a
- Established.
+ @param[in] ListType The type of the List to indicate whether it is a
+ Established.
@return The point to IKEV2_CHILD_SA_SESSION.
-
+
**/
IKEV2_CHILD_SA_SESSION *
Ikev2ChildSaSessionRemove (
IN LIST_ENTRY *SaSessionList,
- IN UINT32 Spi,
- IN UINT8 ListType
+ IN UINT32 Spi,
+ IN UINT8 ListType
);
/**
@@ -271,7 +271,7 @@ Ikev2ChildSaSessionOnDeleting (
);
/**
- Free the memory located for the specified IKEV2_CHILD_SA_SESSION.
+ Free the memory located for the specified IKEV2_CHILD_SA_SESSION.
@param[in] ChildSaSession Pointer to IKEV2_CHILD_SA_SESSION.
@@ -285,7 +285,7 @@ Ikev2ChildSaSessionFree (
Free the specified DhBuffer.
@param[in] DhBuffer Pointer to IKEV2_DH_BUFFER to be freed.
-
+
**/
VOID
Ikev2DhBufferFree (
@@ -315,7 +315,7 @@ Ikev2ChildSaSilentDelete (
/**
This function is to parse a request IKE packet and return its request type.
- The request type is one of IKE CHILD SA creation, IKE SA rekeying and
+ The request type is one of IKE CHILD SA creation, IKE SA rekeying and
IKE CHILD SA rekeying.
@param[in] IkePacket IKE packet to be prased.
@@ -330,7 +330,7 @@ Ikev2ChildExchangeRequestType(
/**
This function finds the SPI from Create Child Sa Exchange Packet.
-
+
@param[in] IkePacket Pointer to IKE_PACKET to be searched.
@retval SPI number.
@@ -345,10 +345,10 @@ Ikev2ChildExchangeRekeySpi(
/**
Associate a SPD selector to the Child SA Session.
- This function is called when the Child SA is not the first child SA of its
+ This function is called when the Child SA is not the first child SA of its
IKE SA. It associate a SPD to this Child SA.
- @param[in, out] ChildSaSession Pointer to the Child SA Session to be associated to
+ @param[in, out] ChildSaSession Pointer to the Child SA Session to be associated to
a SPD selector.
@retval EFI_SUCCESS Associate one SPD selector to this Child SA Session successfully.
@@ -441,13 +441,13 @@ Ikev2ChildSaAfterEncodePayload (
Generate Ikev2 SA payload according to SessionSaData
@param[in] SessionSaData The data used in SA payload.
- @param[in] NextPayload The payload type presented in NextPayload field of
+ @param[in] NextPayload The payload type presented in NextPayload field of
SA Payload header.
@param[in] Type The SA type. It MUST be neither (1) for IKE_SA or
(2) for CHILD_SA or (3) for INFO.
@retval a Pointer to SA IKE payload.
-
+
**/
IKE_PAYLOAD *
Ikev2GenerateSaPayload (
@@ -460,7 +460,7 @@ Ikev2GenerateSaPayload (
Generate a ID payload.
@param[in] CommonSession Pointer to IKEV2_SESSION_COMMON related to ID payload.
- @param[in] NextPayload The payload type presented in the NextPayload field
+ @param[in] NextPayload The payload type presented in the NextPayload field
of ID Payload header.
@retval Pointer to ID IKE payload.
@@ -476,7 +476,7 @@ Ikev2GenerateIdPayload (
Generate a ID payload.
@param[in] CommonSession Pointer to IKEV2_SESSION_COMMON related to ID payload.
- @param[in] NextPayload The payload type presented in the NextPayload field
+ @param[in] NextPayload The payload type presented in the NextPayload field
of ID Payload header.
@param[in] InCert Pointer to the Certificate which distinguished name
will be added into the Id payload.
@@ -488,7 +488,7 @@ Ikev2GenerateIdPayload (
IKE_PAYLOAD *
Ikev2GenerateCertIdPayload (
IN IKEV2_SESSION_COMMON *CommonSession,
- IN UINT8 NextPayload,
+ IN UINT8 NextPayload,
IN UINT8 *InCert,
IN UINTN CertSize
);
@@ -496,10 +496,10 @@ Ikev2GenerateCertIdPayload (
/**
Generate a Nonce payload contenting the input parameter NonceBuf.
- @param[in] NonceBuf The nonce buffer content the whole Nonce payload block
+ @param[in] NonceBuf The nonce buffer content the whole Nonce payload block
except the payload header.
@param[in] NonceSize The buffer size of the NonceBuf
- @param[in] NextPayload The payload type presented in the NextPayload field
+ @param[in] NextPayload The payload type presented in the NextPayload field
of Nonce Payload header.
@retval Pointer to Nonce IKE paload.
@@ -516,23 +516,23 @@ Ikev2GenerateNoncePayload (
Generate the Notify payload.
Since the structure of Notify payload which defined in RFC 4306 is simple, so
- there is no internal data structure for Notify payload. This function generate
- Notify payload defined in RFC 4306, but all the fields in this payload are still
- in host order and need call Ikev2EncodePayload() to convert those fields from
+ there is no internal data structure for Notify payload. This function generate
+ Notify payload defined in RFC 4306, but all the fields in this payload are still
+ in host order and need call Ikev2EncodePayload() to convert those fields from
the host order to network order beforing sending it.
@param[in] ProtocolId The protocol type ID. For IKE_SA it MUST be one (1).
For IPsec SAs it MUST be neither (2) for AH or (3)
for ESP.
- @param[in] NextPayload The next paylaod type in NextPayload field of
+ @param[in] NextPayload The next paylaod type in NextPayload field of
the Notify payload.
@param[in] SpiSize Size of the SPI in SPI size field of the Notify Payload.
- @param[in] MessageType The message type in NotifyMessageType field of the
+ @param[in] MessageType The message type in NotifyMessageType field of the
Notify Payload.
@param[in] SpiBuf Pointer to buffer contains the SPI value.
@param[in] NotifyData Pointer to buffer contains the notification data.
@param[in] NotifyDataSize The size of NotifyData in bytes.
-
+
@retval Pointer to IKE Notify Payload.
@@ -551,14 +551,14 @@ Ikev2GenerateNotifyPayload (
/**
Generate the Delete payload.
- Since the structure of Delete payload which defined in RFC 4306 is simple,
- there is no internal data structure for Delete payload. This function generate
- Delete payload defined in RFC 4306, but all the fields in this payload are still
- in host order and need call Ikev2EncodePayload() to convert those fields from
+ Since the structure of Delete payload which defined in RFC 4306 is simple,
+ there is no internal data structure for Delete payload. This function generate
+ Delete payload defined in RFC 4306, but all the fields in this payload are still
+ in host order and need call Ikev2EncodePayload() to convert those fields from
the host order to network order beforing sending it.
@param[in] IkeSaSession Pointer to IKE SA Session to be used of Delete payload generation.
- @param[in] NextPayload The next paylaod type in NextPayload field of
+ @param[in] NextPayload The next paylaod type in NextPayload field of
the Delete payload.
@param[in] SpiSize Size of the SPI in SPI size field of the Delete Payload.
@param[in] SpiNum Number of SPI in NumofSPIs field of the Delete Payload.
@@ -573,19 +573,19 @@ Ikev2GenerateDeletePayload (
IN UINT8 NextPayload,
IN UINT8 SpiSize,
IN UINT16 SpiNum,
- IN UINT8 *SpiBuf
+ IN UINT8 *SpiBuf
);
/**
Generate the Configuration payload.
- This function generates a configuration payload defined in RFC 4306, but all the
- fields in this payload are still in host order and need call Ikev2EncodePayload()
+ This function generates a configuration payload defined in RFC 4306, but all the
+ fields in this payload are still in host order and need call Ikev2EncodePayload()
to convert those fields from the host order to network order beforing sending it.
@param[in] IkeSaSession Pointer to IKE SA Session to be used for Delete payload
generation.
- @param[in] NextPayload The next paylaod type in NextPayload field of
+ @param[in] NextPayload The next paylaod type in NextPayload field of
the Delete payload.
@param[in] CfgType The attribute type in the Configuration attribute.
@@ -602,15 +602,15 @@ Ikev2GenerateCpPayload (
/**
Generate a Authentication Payload.
- This function is used for both Authentication generation and verification. When the
- IsVerify is TRUE, it create a Auth Data for verification. This function choose the
+ This function is used for both Authentication generation and verification. When the
+ IsVerify is TRUE, it create a Auth Data for verification. This function choose the
related IKE_SA_INIT Message for Auth data creation according to the IKE Session's type
and the value of IsVerify parameter.
@param[in] IkeSaSession Pointer to IKEV2_SA_SESSION related to.
- @param[in] IdPayload Pointer to the ID payload to be used for Authentication
+ @param[in] IdPayload Pointer to the ID payload to be used for Authentication
payload generation.
- @param[in] NextPayload The type filled into the Authentication Payload next
+ @param[in] NextPayload The type filled into the Authentication Payload next
payload field.
@param[in] IsVerify If it is TURE, the Authentication payload is used for
verification.
@@ -627,26 +627,26 @@ Ikev2PskGenerateAuthPayload (
);
/**
- Generate a Authentication Payload for Certificate Auth method.
+ Generate a Authentication Payload for Certificate Auth method.
- This function has two functions. One is creating a local Authentication
- Payload for sending and other is creating the remote Authentication data
+ This function has two functions. One is creating a local Authentication
+ Payload for sending and other is creating the remote Authentication data
for verification when the IsVerify is TURE.
@param[in] IkeSaSession Pointer to IKEV2_SA_SESSION related to.
- @param[in] IdPayload Pointer to the ID payload to be used for Authentication
+ @param[in] IdPayload Pointer to the ID payload to be used for Authentication
payload generation.
- @param[in] NextPayload The type filled into the Authentication Payload
+ @param[in] NextPayload The type filled into the Authentication Payload
next payload field.
- @param[in] IsVerify If it is TURE, the Authentication payload is used
+ @param[in] IsVerify If it is TURE, the Authentication payload is used
for verification.
- @param[in] UefiPrivateKey Pointer to the UEFI private key. Ignore it when
+ @param[in] UefiPrivateKey Pointer to the UEFI private key. Ignore it when
verify the authenticate payload.
- @param[in] UefiPrivateKeyLen The size of UefiPrivateKey in bytes. Ignore it
+ @param[in] UefiPrivateKeyLen The size of UefiPrivateKey in bytes. Ignore it
when verify the authenticate payload.
- @param[in] UefiKeyPwd Pointer to the password of UEFI private key.
+ @param[in] UefiKeyPwd Pointer to the password of UEFI private key.
Ignore it when verify the authenticate payload.
- @param[in] UefiKeyPwdLen The size of UefiKeyPwd in bytes.Ignore it when
+ @param[in] UefiKeyPwdLen The size of UefiKeyPwd in bytes.Ignore it when
verify the authenticate payload.
@return pointer to IKE Authentication payload for certification method.
@@ -670,9 +670,9 @@ Ikev2CertGenerateAuthPayload (
This function generates TSi or TSr payload according to type of next payload.
If the next payload is Responder TS, gereate TSi Payload. Otherwise, generate
TSr payload
-
+
@param[in] ChildSa Pointer to IKEV2_CHILD_SA_SESSION related to this TS payload.
- @param[in] NextPayload The payload type presented in the NextPayload field
+ @param[in] NextPayload The payload type presented in the NextPayload field
of ID Payload header.
@param[in] IsTunnel It indicates that if the Ts Payload is after the CP payload.
If yes, it means the Tsi and Tsr payload should be with
@@ -696,7 +696,7 @@ Ikev2GenerateTsPayload (
IPSEC_PROTO_ISAKMP or if the SpiSize is not zero or if the MessageType is not
the COOKIE, return EFI_INVALID_PARAMETER.
- @param[in] IkeNCookie Pointer to the IKE_PAYLOAD which contians the
+ @param[in] IkeNCookie Pointer to the IKE_PAYLOAD which contians the
Notify Cookie payload.
the Notify payload.
@param[in, out] IkeSaSession Pointer to the relevant IKE SA Session.
@@ -715,16 +715,16 @@ Ikev2ParserNotifyCookiePayload (
/**
Generate the Certificate payload or Certificate Request Payload.
- Since the Certificate Payload structure is same with Certificate Request Payload,
+ Since the Certificate Payload structure is same with Certificate Request Payload,
the only difference is that one contains the Certificate Data, other contains
- the acceptable certificateion CA. This function generate Certificate payload
- or Certificate Request Payload defined in RFC 4306, but all the fields
- in the payload are still in host order and need call Ikev2EncodePayload()
+ the acceptable certificateion CA. This function generate Certificate payload
+ or Certificate Request Payload defined in RFC 4306, but all the fields
+ in the payload are still in host order and need call Ikev2EncodePayload()
to convert those fields from the host order to network order beforing sending it.
- @param[in] IkeSaSession Pointer to IKE SA Session to be used of Delete payload
+ @param[in] IkeSaSession Pointer to IKE SA Session to be used of Delete payload
generation.
- @param[in] NextPayload The next paylaod type in NextPayload field of
+ @param[in] NextPayload The next paylaod type in NextPayload field of
the Delete payload.
@param[in] Certificate Pointer of buffer contains the certification data.
@param[in] CertificateLen The length of Certificate in byte.
@@ -747,15 +747,15 @@ Ikev2GenerateCertificatePayload (
IN UINT8 EncodeType,
IN BOOLEAN IsRequest
);
-
+
/**
General interface of payload encoding.
- This function encode the internal data structure into payload which
- is defined in RFC 4306. The IkePayload->PayloadBuf used to store both the input
- payload and converted payload. Only the SA payload use the interal structure
- to store the attribute. Other payload use structure which is same with the RFC
- defined, for this kind payloads just do host order to network order change of
+ This function encode the internal data structure into payload which
+ is defined in RFC 4306. The IkePayload->PayloadBuf used to store both the input
+ payload and converted payload. Only the SA payload use the interal structure
+ to store the attribute. Other payload use structure which is same with the RFC
+ defined, for this kind payloads just do host order to network order change of
some fields.
@param[in] SessionCommon Pointer to IKE Session Common used to encode the payload.
@@ -779,7 +779,7 @@ Ikev2EncodePayload (
@param[in] SessionCommon Pointer to IKE Session Common to use for decoding.
@param[in, out] IkePayload Pointer to IKE payload to be decode as input, and
- store the decoded result as output.
+ store the decoded result as output.
@retval EFI_INVALID_PARAMETER Meet error when decode the SA payload.
@retval EFI_SUCCESS Decode successfully.
@@ -796,18 +796,18 @@ Ikev2DecodePayload (
This function decrpt the Encrypted IKE packet and put the result into IkePacket->PayloadBuf.
- @param[in] SessionCommon Pointer to IKEV2_SESSION_COMMON containing
+ @param[in] SessionCommon Pointer to IKEV2_SESSION_COMMON containing
some parameter used during decrypting.
- @param[in, out] IkePacket Point to IKE_PACKET to be decrypted as input,
+ @param[in, out] IkePacket Point to IKE_PACKET to be decrypted as input,
and the decrypted reslult as output.
@param[in, out] IkeType The type of IKE. IKE_SA_TYPE, IKE_INFO_TYPE and
IKE_CHILD_TYPE are supportted.
- @retval EFI_INVALID_PARAMETER If the IKE packet length is zero or the
+ @retval EFI_INVALID_PARAMETER If the IKE packet length is zero or the
IKE packet length is not Algorithm Block Size
alignment.
@retval EFI_SUCCESS Decrypt IKE packet successfully.
-
+
**/
EFI_STATUS
Ikev2DecryptPacket (
@@ -821,7 +821,7 @@ Ikev2DecryptPacket (
This function encrypt IKE packet before sending it. The Encrypted IKE packet
is put in to IKEV2 Encrypted Payload.
-
+
@param[in] SessionCommon Pointer to IKEV2_SESSION_COMMON related to the IKE packet.
@param[in, out] IkePacket Pointer to IKE packet to be encrypted.
@@ -840,9 +840,9 @@ Ikev2EncryptPacket (
This function put all Payloads into one payload then encrypt it if needed.
- @param[in] SessionCommon Pointer to IKEV2_SESSION_COMMON containing
+ @param[in] SessionCommon Pointer to IKEV2_SESSION_COMMON containing
some parameter used during IKE packet encoding.
- @param[in, out] IkePacket Pointer to IKE_PACKET to be encoded as input,
+ @param[in, out] IkePacket Pointer to IKE_PACKET to be encoded as input,
and the encoded reslult as output.
@param[in] IkeType The type of IKE. IKE_SA_TYPE, IKE_INFO_TYPE and
IKE_CHILD_TYPE are supportted.
@@ -861,12 +861,12 @@ Ikev2EncodePacket (
/**
Decode the IKE packet.
- This function first decrypts the IKE packet if needed , then separats the whole
+ This function first decrypts the IKE packet if needed , then separats the whole
IKE packet from the IkePacket->PayloadBuf into IkePacket payload list.
-
- @param[in] SessionCommon Pointer to IKEV1_SESSION_COMMON containing
+
+ @param[in] SessionCommon Pointer to IKEV1_SESSION_COMMON containing
some parameter used by IKE packet decoding.
- @param[in, out] IkePacket The IKE Packet to be decoded on input, and
+ @param[in, out] IkePacket The IKE Packet to be decoded on input, and
the decoded result on return.
@param[in] IkeType The type of IKE. IKE_SA_TYPE, IKE_INFO_TYPE and
IKE_CHILD_TYPE are supportted.
@@ -904,8 +904,8 @@ Ikev2OnPacketAccepted (
@param[in] IkeUdpService Pointer to IKE_UDP_SERVICE used to send the IKE packet.
@param[in] SessionCommon Pointer to IKEV1_SESSION_COMMON related to the IKE packet.
@param[in] IkePacket Pointer to IKE_PACKET to be sent out.
- @param[in] IkeType The type of IKE to point what's kind of the IKE
- packet is to be sent out. IKE_SA_TYPE, IKE_INFO_TYPE
+ @param[in] IkeType The type of IKE to point what's kind of the IKE
+ packet is to be sent out. IKE_SA_TYPE, IKE_INFO_TYPE
and IKE_CHILD_TYPE are supportted.
@retval EFI_SUCCESS The operation complete successfully.
@@ -923,12 +923,12 @@ Ikev2SendIkePacket (
/**
Callback function for the IKE life time is over.
- This function will mark the related IKE SA Session as deleting and trigger a
+ This function will mark the related IKE SA Session as deleting and trigger a
Information negotiation.
@param[in] Event The time out event.
@param[in] Context Pointer to data passed by caller.
-
+
**/
VOID
EFIAPI
@@ -952,11 +952,11 @@ Ikev2ResendNotify (
);
/**
- Generate a Key Exchange payload according to the DH group type and save the
+ Generate a Key Exchange payload according to the DH group type and save the
public Key into IkeSaSession IkeKey field.
@param[in, out] IkeSaSession Pointer of the IKE_SA_SESSION.
- @param[in] NextPayload The payload type presented in the NextPayload field of Key
+ @param[in] NextPayload The payload type presented in the NextPayload field of Key
Exchange Payload header.
@retval Pointer to Key IKE payload.
@@ -964,28 +964,28 @@ Ikev2ResendNotify (
**/
IKE_PAYLOAD *
Ikev2GenerateKePayload (
- IN OUT IKEV2_SA_SESSION *IkeSaSession,
- IN UINT8 NextPayload
+ IN OUT IKEV2_SA_SESSION *IkeSaSession,
+ IN UINT8 NextPayload
);
/**
Check if the SPD is related to the input Child SA Session.
This function is the subfunction of Ikev1AssociateSpdEntry(). It is the call
- back function of IpSecVisitConfigData().
-
+ back function of IpSecVisitConfigData().
+
@param[in] Type Type of the input Config Selector.
- @param[in] Selector Pointer to the Configure Selector to be checked.
- @param[in] Data Pointer to the Configure Selector's Data passed
+ @param[in] Selector Pointer to the Configure Selector to be checked.
+ @param[in] Data Pointer to the Configure Selector's Data passed
from the caller.
@param[in] SelectorSize The buffer size of Selector.
@param[in] DataSize The buffer size of the Data.
@param[in] Context The data passed from the caller. It is a Child
SA Session in this context.
- @retval EFI_SUCCESS The SPD Selector is not related to the Child SA Session.
- @retval EFI_ABORTED The SPD Selector is related to the Child SA session and
+ @retval EFI_SUCCESS The SPD Selector is not related to the Child SA Session.
+ @retval EFI_ABORTED The SPD Selector is related to the Child SA session and
set the ChildSaSession->Spd to point to this SPD Selector.
**/
@@ -1033,14 +1033,14 @@ Ikev2ChildSaSessionCreate (
/**
Parse the received Initial Exchange Packet.
-
- This function parse the SA Payload and Key Payload to find out the cryptographic
- suite for the further IKE negotiation and fill it into the IKE SA Session's
+
+ This function parse the SA Payload and Key Payload to find out the cryptographic
+ suite for the further IKE negotiation and fill it into the IKE SA Session's
CommonSession->SaParams.
@param[in, out] IkeSaSession Pointer to related IKEV2_SA_SESSION.
@param[in] SaPayload The received packet.
- @param[in] Type The received packet IKE header flag.
+ @param[in] Type The received packet IKE header flag.
@retval TRUE If the SA proposal in Packet is acceptable.
@retval FALSE If the SA proposal in Packet is not acceptable.
@@ -1055,15 +1055,15 @@ Ikev2SaParseSaPayload (
/**
Parse the received Authentication Exchange Packet.
-
+
This function parse the SA Payload and Key Payload to find out the cryptographic
suite for the ESP and fill it into the Child SA Session's CommonSession->SaParams.
-
- @param[in, out] ChildSaSession Pointer to IKEV2_CHILD_SA_SESSION related to
+
+ @param[in, out] ChildSaSession Pointer to IKEV2_CHILD_SA_SESSION related to
this Authentication Exchange.
@param[in] SaPayload The received packet.
- @param[in] Type The IKE header's flag of received packet .
-
+ @param[in] Type The IKE header's flag of received packet .
+
@retval TRUE If the SA proposal in Packet is acceptable.
@retval FALSE If the SA proposal in Packet is not acceptable.
@@ -1078,17 +1078,17 @@ Ikev2ChildSaParseSaPayload (
/**
Generate Key buffer from fragments.
- If the digest length of specified HashAlgId is larger than or equal with the
- required output key length, derive the key directly. Otherwise, Key Material
- needs to be PRF-based concatenation according to 2.13 of RFC 4306:
+ If the digest length of specified HashAlgId is larger than or equal with the
+ required output key length, derive the key directly. Otherwise, Key Material
+ needs to be PRF-based concatenation according to 2.13 of RFC 4306:
prf+ (K,S) = T1 | T2 | T3 | T4 | ..., T1 = prf (K, S | 0x01),
T2 = prf (K, T1 | S | 0x02), T3 = prf (K, T2 | S | 0x03),T4 = prf (K, T3 | S | 0x04)
then derive the key from this key material.
-
+
@param[in] HashAlgId The Hash Algorithm ID used to generate key.
@param[in] HashKey Pointer to a key buffer which contains hash key.
@param[in] HashKeyLength The length of HashKey in bytes.
- @param[in, out] OutputKey Pointer to buffer which is used to receive the
+ @param[in, out] OutputKey Pointer to buffer which is used to receive the
output key.
@param[in] OutputKeyLength The length of OutPutKey buffer.
@param[in] Fragments Pointer to the data to be used to generate key.
@@ -1115,14 +1115,14 @@ Ikev2SaGenerateKey (
Copy ChildSaSession->Spd->Selector to ChildSaSession->SpdSelector.
ChildSaSession->SpdSelector stores the real Spdselector for its SA. Sometime,
- the SpdSelector in ChildSaSession is more accurated or the scope is smaller
+ the SpdSelector in ChildSaSession is more accurated or the scope is smaller
than the one in ChildSaSession->Spd, especially for the tunnel mode.
-
+
@param[in, out] ChildSaSession Pointer to IKEV2_CHILD_SA_SESSION related to.
@retval EFI_SUCCESS The operation complete successfully.
@retval EFI_OUT_OF_RESOURCES If the required resource can't be allocated.
-
+
**/
EFI_STATUS
Ikev2ChildSaSessionSpdSelectorCreate (
diff --git a/NetworkPkg/IpSecDxe/IpSecConfigImpl.c b/NetworkPkg/IpSecDxe/IpSecConfigImpl.c
index 4a51bff96f..8893d49a9f 100644
--- a/NetworkPkg/IpSecDxe/IpSecConfigImpl.c
+++ b/NetworkPkg/IpSecDxe/IpSecConfigImpl.c
@@ -1,7 +1,7 @@
/** @file
The implementation of IPSEC_CONFIG_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
are licensed and made available under the terms and conditions of the BSD License
@@ -97,7 +97,7 @@ EFI_IPSEC_CONFIG_PROTOCOL mIpSecConfigInstance = {
Get the all IPSec configuration variables and store those variables
to the internal data structure.
- This founction is called by IpSecConfigInitialize() that is to intialize the
+ This founction is called by IpSecConfigInitialize() that is to intialize the
IPsecConfiguration Protocol.
@param[in] Private Point to IPSEC_PRIVATE_DATA.
@@ -121,7 +121,7 @@ IpSecConfigRestore (
@retval TRUE The specified AddressInfo is in the AddressInfoList.
@retval FALSE The specified AddressInfo is not in the AddressInfoList.
-
+
**/
BOOLEAN
IsInAddressInfoList(
@@ -152,20 +152,20 @@ IsInAddressInfoList(
AddressInfo,
&AddressInfoList[Index].Address,
sizeof (EFI_IP_ADDRESS)
- ) == 0 &&
+ ) == 0 &&
AddressInfo->PrefixLength == AddressInfoList[Index].PrefixLength
- ) {
+ ) {
return TRUE;
}
}
return FALSE;
}
-
+
/**
Compare two SPD Selectors.
Compare two SPD Selector by the fields of LocalAddressCount/RemoteAddressCount/
- NextLayerProtocol/LocalPort/LocalPortRange/RemotePort/RemotePortRange and the
+ NextLayerProtocol/LocalPort/LocalPortRange/RemotePort/RemotePortRange and the
Local Addresses and remote Addresses.
@param[in] Selector1 Pointer of first SPD Selector.
@@ -173,7 +173,7 @@ IsInAddressInfoList(
@retval TRUE This two Selector have the same value in above fields.
@retval FALSE Not all above fields have the same value in these two Selectors.
-
+
**/
BOOLEAN
CompareSpdSelector (
@@ -193,7 +193,7 @@ CompareSpdSelector (
//
// Compare the LocalAddressCount/RemoteAddressCount/NextLayerProtocol/
// LocalPort/LocalPortRange/RemotePort/RemotePortRange fields in the
- // two Spdselectors. Since the SPD supports two directions, it needs to
+ // two Spdselectors. Since the SPD supports two directions, it needs to
// compare two directions.
//
if ((SpdSel1->LocalAddressCount != SpdSel2->LocalAddressCount &&
@@ -209,10 +209,10 @@ CompareSpdSelector (
IsMatch = FALSE;
return IsMatch;
}
-
+
//
// Compare the all LocalAddress and RemoteAddress fields in the two Spdselectors.
- // First, SpdSel1->LocalAddress to SpdSel2->LocalAddress && Compare
+ // First, SpdSel1->LocalAddress to SpdSel2->LocalAddress && Compare
// SpdSel1->RemoteAddress to SpdSel2->RemoteAddress. If all match, return
// TRUE.
//
@@ -263,14 +263,14 @@ CompareSpdSelector (
}
}
//
- // Finish the one direction compare. If it is matched, return; otherwise,
+ // Finish the one direction compare. If it is matched, return; otherwise,
// compare the other direction.
//
if (IsMatch) {
return IsMatch;
}
//
- // Secondly, the SpdSel1->LocalAddress doesn't equal to SpdSel2->LocalAddress and
+ // Secondly, the SpdSel1->LocalAddress doesn't equal to SpdSel2->LocalAddress and
// SpdSel1->RemoteAddress doesn't equal to SpdSel2->RemoteAddress. Try to compare
// the RemoteAddress to LocalAddress.
//
@@ -328,16 +328,16 @@ CompareSpdSelector (
Find if the two SPD Selectors has subordinative.
Compare two SPD Selector by the fields of LocalAddressCount/RemoteAddressCount/
- NextLayerProtocol/LocalPort/LocalPortRange/RemotePort/RemotePortRange and the
+ NextLayerProtocol/LocalPort/LocalPortRange/RemotePort/RemotePortRange and the
Local Addresses and remote Addresses.
@param[in] Selector1 Pointer of first SPD Selector.
@param[in] Selector2 Pointer of second SPD Selector.
@retval TRUE The first SPD Selector is subordinate Selector of second SPD Selector.
- @retval FALSE The first SPD Selector is not subordinate Selector of second
+ @retval FALSE The first SPD Selector is not subordinate Selector of second
SPD Selector.
-
+
**/
BOOLEAN
IsSubSpdSelector (
@@ -357,7 +357,7 @@ IsSubSpdSelector (
//
// Compare the LocalAddressCount/RemoteAddressCount/NextLayerProtocol/
// LocalPort/LocalPortRange/RemotePort/RemotePortRange fields in the
- // two Spdselectors. Since the SPD supports two directions, it needs to
+ // two Spdselectors. Since the SPD supports two directions, it needs to
// compare two directions.
//
if (SpdSel1->LocalAddressCount > SpdSel2->LocalAddressCount ||
@@ -370,10 +370,10 @@ IsSubSpdSelector (
) {
IsMatch = FALSE;
}
-
+
//
// Compare the all LocalAddress and RemoteAddress fields in the two Spdselectors.
- // First, SpdSel1->LocalAddress to SpdSel2->LocalAddress && Compare
+ // First, SpdSel1->LocalAddress to SpdSel2->LocalAddress && Compare
// SpdSel1->RemoteAddress to SpdSel2->RemoteAddress. If all match, return
// TRUE.
//
@@ -405,14 +405,14 @@ IsSubSpdSelector (
if (IsMatch) {
return IsMatch;
}
-
+
//
//
// The SPD selector in SPD entry is two way.
//
// Compare the LocalAddressCount/RemoteAddressCount/NextLayerProtocol/
// LocalPort/LocalPortRange/RemotePort/RemotePortRange fields in the
- // two Spdselectors. Since the SPD supports two directions, it needs to
+ // two Spdselectors. Since the SPD supports two directions, it needs to
// compare two directions.
//
IsMatch = TRUE;
@@ -427,10 +427,10 @@ IsSubSpdSelector (
IsMatch = FALSE;
return IsMatch;
}
-
+
//
// Compare the all LocalAddress and RemoteAddress fields in the two Spdselectors.
- // First, SpdSel1->LocalAddress to SpdSel2->RemoteAddress && Compare
+ // First, SpdSel1->LocalAddress to SpdSel2->RemoteAddress && Compare
// SpdSel1->RemoteAddress to SpdSel2->LocalAddress. If all match, return
// TRUE.
//
@@ -458,7 +458,7 @@ IsSubSpdSelector (
}
}
return IsMatch;
-
+
}
/**
@@ -469,7 +469,7 @@ IsSubSpdSelector (
@retval TRUE This two Selectors have the same SA ID.
@retval FALSE This two Selecotrs don't have the same SA ID.
-
+
**/
BOOLEAN
CompareSaId (
@@ -500,7 +500,7 @@ CompareSaId (
@retval TRUE This two Selectors have the same PAD ID.
@retval FALSE This two Selecotrs don't have the same PAD ID.
-
+
**/
BOOLEAN
ComparePadId (
@@ -589,7 +589,7 @@ IsZeroSaId (
{
BOOLEAN IsZero;
EFI_IPSEC_CONFIG_SELECTOR ZeroSelector;
-
+
IsZero = FALSE;
ZeroMem (&ZeroSelector, sizeof (EFI_IPSEC_CONFIG_SELECTOR));
@@ -636,14 +636,14 @@ IsZeroPadId (
@param[in, out] DstSel Pointer of Destination SPD Selector.
@param[in] SrcSel Pointer of Source SPD Selector.
- @param[in, out] Size The size of the Destination SPD Selector. If it
- not NULL and its value less than the size of
- Source SPD Selector, the value of Source SPD
+ @param[in, out] Size The size of the Destination SPD Selector. If it
+ not NULL and its value less than the size of
+ Source SPD Selector, the value of Source SPD
Selector's size will be passed to caller by this
parameter.
@retval EFI_INVALID_PARAMETER If the Destination or Source SPD Selector is NULL
- @retval EFI_BUFFER_TOO_SMALL If the input Size is less than size of the Source SPD Selector.
+ @retval EFI_BUFFER_TOO_SMALL If the input Size is less than size of the Source SPD Selector.
@retval EFI_SUCCESS Copy Source SPD Selector to the Destination SPD
Selector successfully.
@@ -702,13 +702,13 @@ DuplicateSpdSelector (
@param[in, out] DstSel Pointer of Destination SA ID.
@param[in] SrcSel Pointer of Source SA ID.
- @param[in, out] Size The size of the Destination SA ID. If it
- not NULL and its value less than the size of
- Source SA ID, the value of Source SA ID's size
+ @param[in, out] Size The size of the Destination SA ID. If it
+ not NULL and its value less than the size of
+ Source SA ID, the value of Source SA ID's size
will be passed to caller by this parameter.
@retval EFI_INVALID_PARAMETER If the Destination or Source SA ID is NULL.
- @retval EFI_BUFFER_TOO_SMALL If the input Size less than size of source SA ID.
+ @retval EFI_BUFFER_TOO_SMALL If the input Size less than size of source SA ID.
@retval EFI_SUCCESS Copy Source SA ID to the Destination SA ID successfully.
**/
@@ -744,9 +744,9 @@ DuplicateSaId (
@param[in, out] DstSel Pointer of Destination PAD ID.
@param[in] SrcSel Pointer of Source PAD ID.
- @param[in, out] Size The size of the Destination PAD ID. If it
- not NULL and its value less than the size of
- Source PAD ID, the value of Source PAD ID's size
+ @param[in, out] Size The size of the Destination PAD ID. If it
+ not NULL and its value less than the size of
+ Source PAD ID, the value of Source PAD ID's size
will be passed to caller by this parameter.
@retval EFI_INVALID_PARAMETER If the Destination or Source PAD ID is NULL.
@@ -782,11 +782,11 @@ DuplicatePadId (
}
/**
- Fix the value of some members of SPD Selector.
+ Fix the value of some members of SPD Selector.
- This function is called by IpSecCopyPolicyEntry()which copy the Policy
- Entry into the Variable. Since some members in SPD Selector are pointers,
- a physical address to relative address convertion is required before copying
+ This function is called by IpSecCopyPolicyEntry()which copy the Policy
+ Entry into the Variable. Since some members in SPD Selector are pointers,
+ a physical address to relative address convertion is required before copying
this SPD entry into the variable.
@param[in] Selector Pointer of SPD Selector.
@@ -817,11 +817,11 @@ FixSpdEntry (
}
/**
- Fix the value of some members of SA ID.
+ Fix the value of some members of SA ID.
- This function is called by IpSecCopyPolicyEntry()which copy the Policy
- Entry into the Variable. Since some members in SA ID are pointers,
- a physical address to relative address conversion is required before copying
+ This function is called by IpSecCopyPolicyEntry()which copy the Policy
+ Entry into the Variable. Since some members in SA ID are pointers,
+ a physical address to relative address conversion is required before copying
this SAD into the variable.
@param[in] SaId Pointer of SA ID
@@ -858,10 +858,10 @@ FixSadEntry (
}
/**
- Fix the value of some members of PAD ID.
+ Fix the value of some members of PAD ID.
- This function is called by IpSecCopyPolicyEntry()which copy the Policy
- Entry into the Variable. Since some members in PAD ID are pointers,
+ This function is called by IpSecCopyPolicyEntry()which copy the Policy
+ Entry into the Variable. Since some members in PAD ID are pointers,
a physical address to relative address conversion is required before copying
this PAD into the variable.
@@ -890,7 +890,7 @@ FixPadEntry (
}
/**
- Recover the value of some members of SPD Selector.
+ Recover the value of some members of SPD Selector.
This function is corresponding to FixSpdEntry(). It recovers the value of members
of SPD Selector that are fixed by FixSpdEntry().
@@ -918,11 +918,11 @@ UnfixSpdEntry (
UNFIX_REF_BUF_ADDR (Data->ProcessingPolicy->TunnelOption, Data);
}
}
-
+
}
/**
- Recover the value of some members of SA ID.
+ Recover the value of some members of SA ID.
This function is corresponding to FixSadEntry(). It recovers the value of members
of SAD ID that are fixed by FixSadEntry().
@@ -961,7 +961,7 @@ UnfixSadEntry (
}
/**
- Recover the value of some members of PAD ID.
+ Recover the value of some members of PAD ID.
This function is corresponding to FixPadEntry(). It recovers the value of members
of PAD ID that are fixed by FixPadEntry().
@@ -993,32 +993,32 @@ UnfixPadEntry (
/**
Set the security policy information for the EFI IPsec driver.
- The IPsec configuration data has a unique selector/identifier separately to
+ The IPsec configuration data has a unique selector/identifier separately to
identify a data entry.
- @param[in] Selector Pointer to an entry selector on operated
- configuration data specified by DataType.
- A NULL Selector causes the entire specified-type
+ @param[in] Selector Pointer to an entry selector on operated
+ configuration data specified by DataType.
+ A NULL Selector causes the entire specified-type
configuration information to be flushed.
- @param[in] Data The data buffer to be set. The structure
+ @param[in] Data The data buffer to be set. The structure
of the data buffer should be EFI_IPSEC_SPD_DATA.
- @param[in] Context Pointer to one entry selector that describes
- the expected position the new data entry will
+ @param[in] Context Pointer to one entry selector that describes
+ the expected position the new data entry will
be added. If Context is NULL, the new entry will
be appended the end of database.
@retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
- - Selector is not NULL and its LocalAddress
+ - Selector is not NULL and its LocalAddress
is NULL or its RemoteAddress is NULL.
- - Data is not NULL and its Action is Protected
+ - Data is not NULL and its Action is Protected
and its plolicy is NULL.
- Data is not NULL, its Action is not protected,
and its policy is not NULL.
- - The Action of Data is Protected, its policy
+ - The Action of Data is Protected, its policy
mode is Tunnel, and its tunnel option is NULL.
- - The Action of Data is protected and its policy
+ - The Action of Data is protected and its policy
mode is not Tunnel and it tunnel option is not NULL.
- - SadEntry requied to be set into new SpdEntry's Sas has
+ - SadEntry requied to be set into new SpdEntry's Sas has
been found but it is invalid.
@retval EFI_OUT_OF_RESOURCED The required system resource could not be allocated.
@retval EFI_SUCCESS The specified configuration data was obtained successfully.
@@ -1085,7 +1085,7 @@ SetSpdEntry (
SpdEntry = IPSEC_SPD_ENTRY_FROM_LIST (Entry);
- if (SpdSel == NULL ||
+ if (SpdSel == NULL ||
CompareSpdSelector ((EFI_IPSEC_CONFIG_SELECTOR *) SpdEntry->Selector, (EFI_IPSEC_CONFIG_SELECTOR *) SpdSel)
) {
//
@@ -1098,26 +1098,26 @@ SetSpdEntry (
// Update the reverse ref of SAD entry in the SPD.sas list.
//
SpdSas = &SpdEntry->Data->Sas;
-
+
//
- // Remove the related SAs from Sas(SadEntry->BySpd). If the SA entry is established by
- // IKE, remove from mConfigData list(SadEntry->List) and then free it directly since its
+ // Remove the related SAs from Sas(SadEntry->BySpd). If the SA entry is established by
+ // IKE, remove from mConfigData list(SadEntry->List) and then free it directly since its
// SpdEntry will be freed later.
//
NET_LIST_FOR_EACH_SAFE (Entry2, NextEntry2, SpdSas) {
SadEntry = IPSEC_SAD_ENTRY_FROM_SPD (Entry2);
-
+
if (SadEntry->Data->SpdEntry != NULL) {
RemoveEntryList (&SadEntry->BySpd);
SadEntry->Data->SpdEntry = NULL;
}
-
+
if (!(SadEntry->Data->ManualSet)) {
RemoveEntryList (&SadEntry->List);
FreePool (SadEntry);
}
}
-
+
//
// Free the existed SPD entry
//
@@ -1184,7 +1184,7 @@ SetSpdEntry (
SpdEntry->Data->PackageFlag = SpdData->PackageFlag;
SpdEntry->Data->TrafficDirection = SpdData->TrafficDirection;
SpdEntry->Data->Action = SpdData->Action;
-
+
//
// Fix the address of ProcessingPolicy and copy it if need, which is continous
// memory and close to the base structure of SAD data.
@@ -1229,9 +1229,9 @@ SetSpdEntry (
return EFI_INVALID_PARAMETER;
}
}
- }
+ }
}
-
+
//
// Insert the new SPD entry.
//
@@ -1243,17 +1243,17 @@ SetSpdEntry (
/**
Set the security association information for the EFI IPsec driver.
- The IPsec configuration data has a unique selector/identifier separately to
+ The IPsec configuration data has a unique selector/identifier separately to
identify a data entry.
- @param[in] Selector Pointer to an entry selector on operated
- configuration data specified by DataType.
- A NULL Selector causes the entire specified-type
+ @param[in] Selector Pointer to an entry selector on operated
+ configuration data specified by DataType.
+ A NULL Selector causes the entire specified-type
configuration information to be flushed.
- @param[in] Data The data buffer to be set. The structure
+ @param[in] Data The data buffer to be set. The structure
of the data buffer should be EFI_IPSEC_SA_DATA.
- @param[in] Context Pointer to one entry selector which describes
- the expected position the new data entry will
+ @param[in] Context Pointer to one entry selector which describes
+ the expected position the new data entry will
be added. If Context is NULL,the new entry will
be appended the end of database.
@@ -1279,7 +1279,7 @@ SetSadEntry (
EFI_IPSEC_SA_ID *InsertBefore;
LIST_ENTRY *EntryInsertBefore;
UINTN SadEntrySize;
-
+
SaId = (Selector == NULL) ? NULL : &Selector->SaId;
SaData = (Data == NULL) ? NULL : (EFI_IPSEC_SA_DATA2 *) Data;
InsertBefore = (Context == NULL) ? NULL : &((EFI_IPSEC_CONFIG_SELECTOR *) Context)->SaId;
@@ -1297,7 +1297,7 @@ SetSadEntry (
SadEntry = IPSEC_SAD_ENTRY_FROM_LIST (Entry);
- if (SaId == NULL ||
+ if (SaId == NULL ||
CompareSaId (
(EFI_IPSEC_CONFIG_SELECTOR *) SadEntry->Id,
(EFI_IPSEC_CONFIG_SELECTOR *) SaId
@@ -1348,7 +1348,7 @@ SetSadEntry (
SadEntrySize = ALIGN_VARIABLE (sizeof (IPSEC_SAD_ENTRY));
SadEntrySize = ALIGN_VARIABLE (SadEntrySize + sizeof (EFI_IPSEC_SA_ID));
SadEntrySize = ALIGN_VARIABLE (SadEntrySize + sizeof (IPSEC_SAD_DATA));
-
+
if (SaId->Proto == EfiIPsecAH) {
SadEntrySize += SaData->AlgoInfo.AhAlgoInfo.AuthKeyLength;
} else {
@@ -1405,7 +1405,7 @@ SetSadEntry (
if (SadEntry->Data->AlgoInfo.EspAlgoInfo.EncKeyLength != 0) {
SadEntry->Data->AlgoInfo.EspAlgoInfo.EncKey = (VOID *) ALIGN_POINTER (
- ((UINT8 *) (SadEntry->Data + 1) +
+ ((UINT8 *) (SadEntry->Data + 1) +
SadEntry->Data->AlgoInfo.EspAlgoInfo.AuthKeyLength),
sizeof (UINTN)
);
@@ -1479,17 +1479,17 @@ SetSadEntry (
/**
Set the peer authorization configuration information for the EFI IPsec driver.
- The IPsec configuration data has a unique selector/identifier separately to
+ The IPsec configuration data has a unique selector/identifier separately to
identify a data entry.
- @param[in] Selector Pointer to an entry selector on operated
- configuration data specified by DataType.
- A NULL Selector causes the entire specified-type
+ @param[in] Selector Pointer to an entry selector on operated
+ configuration data specified by DataType.
+ A NULL Selector causes the entire specified-type
configuration information to be flushed.
- @param[in] Data The data buffer to be set. The structure
+ @param[in] Data The data buffer to be set. The structure
of the data buffer should be EFI_IPSEC_PAD_DATA.
- @param[in] Context Pointer to one entry selector that describes
- the expected position the new data entry will
+ @param[in] Context Pointer to one entry selector that describes
+ the expected position the new data entry will
be added. If Context is NULL, the new entry will
be appended the end of database.
@@ -1513,7 +1513,7 @@ SetPadEntry (
EFI_IPSEC_PAD_ID *InsertBefore;
LIST_ENTRY *EntryInsertBefore;
UINTN PadEntrySize;
-
+
PadId = (Selector == NULL) ? NULL : &Selector->PadId;
PadData = (Data == NULL) ? NULL : (EFI_IPSEC_PAD_DATA *) Data;
InsertBefore = (Context == NULL) ? NULL : &((EFI_IPSEC_CONFIG_SELECTOR *) Context)->PadId;
@@ -1531,7 +1531,7 @@ SetPadEntry (
PadEntry = IPSEC_PAD_ENTRY_FROM_LIST (Entry);
- if (PadId == NULL ||
+ if (PadId == NULL ||
ComparePadId ((EFI_IPSEC_CONFIG_SELECTOR *) PadEntry->Id, (EFI_IPSEC_CONFIG_SELECTOR *) PadId)
) {
//
@@ -1631,16 +1631,16 @@ SetPadEntry (
}
/**
- This function lookup the data entry from IPsec SPD. Return the configuration
+ This function lookup the data entry from IPsec SPD. Return the configuration
value of the specified SPD Entry.
- @param[in] Selector Pointer to an entry selector which is an identifier
+ @param[in] Selector Pointer to an entry selector which is an identifier
of the SPD entry.
@param[in, out] DataSize On output the size of data returned in Data.
- @param[out] Data The buffer to return the contents of the IPsec
- configuration data. The type of the data buffer
- is associated with the DataType.
-
+ @param[out] Data The buffer to return the contents of the IPsec
+ configuration data. The type of the data buffer
+ is associated with the DataType.
+
@retval EFI_SUCCESS The specified configuration data was obtained successfully.
@retval EFI_INVALID_PARAMETER Data is NULL and *DataSize is not zero.
@retval EFI_NOT_FOUND The configuration data specified by Selector is not found.
@@ -1713,7 +1713,7 @@ GetSpdEntry (
SpdData->PackageFlag = SpdEntry->Data->PackageFlag;
SpdData->TrafficDirection = SpdEntry->Data->TrafficDirection;
SpdData->Action = SpdEntry->Data->Action;
-
+
if (SpdData->Action != EfiIPsecActionProtect) {
SpdData->ProcessingPolicy = NULL;
} else {
@@ -1733,16 +1733,16 @@ GetSpdEntry (
}
/**
- This function lookup the data entry from IPsec SAD. Return the configuration
+ This function lookup the data entry from IPsec SAD. Return the configuration
value of the specified SAD Entry.
- @param[in] Selector Pointer to an entry selector which is an identifier
+ @param[in] Selector Pointer to an entry selector which is an identifier
of the SAD entry.
@param[in, out] DataSize On output, the size of data returned in Data.
- @param[out] Data The buffer to return the contents of the IPsec
- configuration data. The type of the data buffer
- is associated with the DataType.
-
+ @param[out] Data The buffer to return the contents of the IPsec
+ configuration data. The type of the data buffer
+ is associated with the DataType.
+
@retval EFI_SUCCESS The specified configuration data was obtained successfully.
@retval EFI_NOT_FOUND The configuration data specified by Selector is not found.
@retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the result. DataSize has been
@@ -1783,8 +1783,8 @@ GetSadEntry (
// |EFI_IPSEC_SA_DATA
// |AuthKey
// |EncryptKey (Optional)
- // |SpdSelector (Optional)
- //
+ // |SpdSelector (Optional)
+ //
RequiredSize = ALIGN_VARIABLE (sizeof (EFI_IPSEC_SA_DATA2));
if (SaId->Proto == EfiIPsecAH) {
@@ -1797,12 +1797,12 @@ GetSadEntry (
if (SadEntry->Data->SpdSelector != NULL) {
RequiredSize += SIZE_OF_SPD_SELECTOR (SadEntry->Data->SpdSelector);
}
-
+
if (*DataSize < RequiredSize) {
*DataSize = RequiredSize;
return EFI_BUFFER_TOO_SMALL;
}
-
+
//
// Fill the data fields of SAD entry.
//
@@ -1895,7 +1895,7 @@ GetSadEntry (
RequiredSize -
SIZE_OF_SPD_SELECTOR (SadEntry->Data->SpdSelector)
);
-
+
DuplicateSpdSelector (
(EFI_IPSEC_CONFIG_SELECTOR *) SaData->SpdSelector,
(EFI_IPSEC_CONFIG_SELECTOR *) SadEntry->Data->SpdSelector,
@@ -1917,16 +1917,16 @@ GetSadEntry (
}
/**
- This function lookup the data entry from IPsec PAD. Return the configuration
+ This function lookup the data entry from IPsec PAD. Return the configuration
value of the specified PAD Entry.
- @param[in] Selector Pointer to an entry selector which is an identifier
+ @param[in] Selector Pointer to an entry selector which is an identifier
of the PAD entry.
@param[in, out] DataSize On output the size of data returned in Data.
- @param[out] Data The buffer to return the contents of the IPsec
- configuration data. The type of the data buffer
- is associated with the DataType.
-
+ @param[out] Data The buffer to return the contents of the IPsec
+ configuration data. The type of the data buffer
+ is associated with the DataType.
+
@retval EFI_SUCCESS The specified configuration data was obtained successfully.
@retval EFI_NOT_FOUND The configuration data specified by Selector is not found.
@retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the result. DataSize has been
@@ -2089,7 +2089,7 @@ IpSecGetSizeOfEfiSpdData (
/**
Calculate the a whole size of IPSEC_SPD_DATA which includes the buffer size pointed
- to by the pointer members and the buffer size used by the Sa List.
+ to by the pointer members and the buffer size used by the Sa List.
@param[in] SpdData Pointer to the specified IPSEC_SPD_DATA.
@@ -2125,25 +2125,25 @@ IpSecGetSizeOfSpdData (
Get the IPsec Variable.
Get the all variables which start with the string contained in VaraiableName.
- Since all IPsec related variable store in continual space, those kinds of
- variable can be searched by the EfiGetNextVariableName. Those variables also are
+ Since all IPsec related variable store in continual space, those kinds of
+ variable can be searched by the EfiGetNextVariableName. Those variables also are
returned in a continual buffer.
-
+
@param[in] VariableName Pointer to a specified Variable Name.
@param[in] VendorGuid Pointer to a specified Vendor Guid.
- @param[in] Attributes Point to memory location to return the attributes
- of variable. If the point is NULL, the parameter
+ @param[in] Attributes Point to memory location to return the attributes
+ of variable. If the point is NULL, the parameter
would be ignored.
- @param[in, out] DataSize As input, point to the maximum size of return
- Data-Buffer. As output, point to the actual
+ @param[in, out] DataSize As input, point to the maximum size of return
+ Data-Buffer. As output, point to the actual
size of the returned Data-Buffer.
@param[in] Data Point to return Data-Buffer.
-
+
@retval EFI_ABORTED If the Variable size which contained in the variable
- structure doesn't match the variable size obtained
+ structure doesn't match the variable size obtained
from the EFIGetVariable.
@retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the result. DataSize has
- been updated with the size needed to complete the request.
+ been updated with the size needed to complete the request.
@retval EFI_SUCCESS The function completed successfully.
@retval others Other errors found during the variable getting.
**/
@@ -2179,7 +2179,7 @@ IpSecGetVariable (
Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
}
-
+
//
// Construct the varible name of ipsecconfig meta data.
//
@@ -2318,14 +2318,14 @@ ON_EXIT:
@param[in] VariableName The name of the vendor's variable. It is a
Null-Terminated Unicode String.
@param[in] VendorGuid Unify identifier for vendor.
- @param[in] Attributes Point to memory location to return the attributes of
+ @param[in] Attributes Point to memory location to return the attributes of
variable. If the point is NULL, the parameter would be ignored.
@param[in] DataSize The size in bytes of Data-Buffer.
@param[in] Data Points to the content of the variable.
@retval EFI_SUCCESS The firmware successfully stored the variable and its data, as
defined by the Attributes.
- @retval others Storing the variables failed.
+ @retval others Storing the variables failed.
**/
EFI_STATUS
@@ -2355,7 +2355,7 @@ IpSecSetVariable (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
//
// "VariableName + Info/0001/0002/... + NULL"
//
@@ -2372,7 +2372,7 @@ IpSecSetVariable (
//
UnicodeSPrint (VariableNameI, VariableNameSize, L"%s%s", VariableName, L"Info");
MaximumVariableSize -= VariableNameSize;
-
+
IpSecVariableInfo.VariableCount = (UINT32) ((DataSize + (UINTN) MaximumVariableSize - 1) / (UINTN) MaximumVariableSize);
IpSecVariableInfo.VariableSize = (UINT32) DataSize;
IpSecVariableInfo.SingleVariableSize = (UINT32) MaximumVariableSize;
@@ -2397,7 +2397,7 @@ IpSecSetVariable (
// Construct and set the variable of ipsecconfig data one by one.
// The index of variable name begin from 0001, and the varaible name
// likes "VariableName0001", "VaraiableName0002"....
- //
+ //
UnicodeSPrint (VariableNameI, VariableNameSize, L"%s%04d", VariableName, VariableIndex + 1);
Status = gRT->SetVariable (
VariableNameI,
@@ -2424,20 +2424,20 @@ ON_EXIT:
}
/**
- Return the configuration value for the EFI IPsec driver.
+ Return the configuration value for the EFI IPsec driver.
This function lookup the data entry from IPsec database or IKEv2 configuration
information. The expected data type and unique identification are described in
- DataType and Selector parameters.
+ DataType and Selector parameters.
@param[in] This Pointer to the EFI_IPSEC_CONFIG_PROTOCOL instance.
@param[in] DataType The type of data to retrieve.
- @param[in] Selector Pointer to an entry selector that is an identifier of the IPsec
+ @param[in] Selector Pointer to an entry selector that is an identifier of the IPsec
configuration data entry.
@param[in, out] DataSize On output the size of data returned in Data.
- @param[out] Data The buffer to return the contents of the IPsec configuration data.
- The type of the data buffer associated with the DataType.
-
+ @param[out] Data The buffer to return the contents of the IPsec configuration data.
+ The type of the data buffer associated with the DataType.
+
@retval EFI_SUCCESS The specified configuration data was obtained successfully.
@retval EFI_INVALID_PARAMETER One or more of the followings are TRUE:
- This is NULL.
@@ -2477,26 +2477,26 @@ EfiIpSecConfigGetData (
/**
Set the security association, security policy and peer authorization configuration
- information for the EFI IPsec driver.
+ information for the EFI IPsec driver.
This function is used to set the IPsec configuration information of type DataType for
the EFI IPsec driver.
The IPsec configuration data has a unique selector/identifier separately to identify
a data entry. The selector structure depends on DataType's definition.
Using SetData() with a Data of NULL causes the IPsec configuration data entry identified
- by DataType and Selector to be deleted.
+ by DataType and Selector to be deleted.
@param[in] This Pointer to the EFI_IPSEC_CONFIG_PROTOCOL instance.
@param[in] DataType The type of data to be set.
- @param[in] Selector Pointer to an entry selector on operated configuration data
- specified by DataType. A NULL Selector causes the entire
+ @param[in] Selector Pointer to an entry selector on operated configuration data
+ specified by DataType. A NULL Selector causes the entire
specified-type configuration information to be flushed.
- @param[in] Data The data buffer to be set. The structure of the data buffer is
+ @param[in] Data The data buffer to be set. The structure of the data buffer is
associated with the DataType.
@param[in] InsertBefore Pointer to one entry selector which describes the expected
position the new data entry will be added. If InsertBefore is NULL,
the new entry will be appended to the end of the database.
-
+
@retval EFI_SUCCESS The specified configuration entry data was set successfully.
@retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
- This is NULL.
@@ -2523,7 +2523,7 @@ EfiIpSecConfigSetData (
if (DataType >= IPsecConfigDataTypeMaximum) {
return EFI_UNSUPPORTED;
}
-
+
Status = mSetPolicyEntry[DataType](Selector, Data, InsertBefore);
if (!EFI_ERROR (Status) && !mSetBySelf) {
@@ -2537,30 +2537,30 @@ EfiIpSecConfigSetData (
}
/**
- Enumerates the current selector for IPsec configuration data entry.
+ Enumerates the current selector for IPsec configuration data entry.
This function is called multiple times to retrieve the entry Selector in IPsec
- configuration database. On each call to GetNextSelector(), the next entry
+ configuration database. On each call to GetNextSelector(), the next entry
Selector are retrieved into the output interface.
-
- If the entire IPsec configuration database has been iterated, the error
+
+ If the entire IPsec configuration database has been iterated, the error
EFI_NOT_FOUND is returned.
- If the Selector buffer is too small for the next Selector copy, an
- EFI_BUFFER_TOO_SMALL error is returned, and SelectorSize is updated to reflect
+ If the Selector buffer is too small for the next Selector copy, an
+ EFI_BUFFER_TOO_SMALL error is returned, and SelectorSize is updated to reflect
the size of buffer needed.
On the initial call to GetNextSelector() to start the IPsec configuration database
- search, a pointer to the buffer with all zero value is passed in Selector. Calls
- to SetData() between calls to GetNextSelector may produce unpredictable results.
+ search, a pointer to the buffer with all zero value is passed in Selector. Calls
+ to SetData() between calls to GetNextSelector may produce unpredictable results.
@param[in] This Pointer to the EFI_IPSEC_CONFIG_PROTOCOL instance.
@param[in] DataType The type of IPsec configuration data to retrieve.
@param[in, out] SelectorSize The size of the Selector buffer.
- @param[in, out] Selector On input, supplies the pointer to last Selector that was
+ @param[in, out] Selector On input, supplies the pointer to last Selector that was
returned by GetNextSelector().
On output, returns one copy of the current entry Selector
- of a given DataType.
-
+ of a given DataType.
+
@retval EFI_SUCCESS The specified configuration data was obtained successfully.
@retval EFI_INVALID_PARAMETER One or more of the followings are TRUE:
- This is NULL.
@@ -2569,7 +2569,7 @@ EfiIpSecConfigSetData (
@retval EFI_NOT_FOUND The next configuration data entry was not found.
@retval EFI_UNSUPPORTED The specified DataType is not supported.
@retval EFI_BUFFER_TOO_SMALL The SelectorSize is too small for the result. This parameter
- has been updated with the size needed to complete the search
+ has been updated with the size needed to complete the search
request.
**/
@@ -2618,14 +2618,14 @@ EfiIpSecConfigGetNextSelector (
/**
Register an event that is to be signaled whenever a configuration process on the
- specified IPsec configuration information is done.
+ specified IPsec configuration information is done.
The register function is not surpport now and always returns EFI_UNSUPPORTED.
-
+
@param[in] This Pointer to the EFI_IPSEC_CONFIG_PROTOCOL instance.
@param[in] DataType The type of data to be registered the event for.
@param[in] Event The event to be registered.
-
+
@retval EFI_SUCCESS The event is registered successfully.
@retval EFI_INVALID_PARAMETER This is NULL or Event is NULL.
@retval EFI_ACCESS_DENIED The Event is already registered for the DataType.
@@ -2646,16 +2646,16 @@ EfiIpSecConfigRegisterNotify (
/**
Remove the specified event that was previously registered on the specified IPsec
- configuration data.
+ configuration data.
This function is not support now and alwasy return EFI_UNSUPPORTED.
@param[in] This Pointer to the EFI_IPSEC_CONFIG_PROTOCOL instance.
@param[in] DataType The configuration data type to remove the registered event for.
@param[in] Event The event to be unregistered.
-
+
@retval EFI_SUCCESS The event was removed successfully.
- @retval EFI_NOT_FOUND The Event specified by DataType could not be found in the
+ @retval EFI_NOT_FOUND The Event specified by DataType could not be found in the
database.
@retval EFI_INVALID_PARAMETER This is NULL or Event is NULL.
@retval EFI_UNSUPPORTED The notify registration is unsupported, or the specified
@@ -2677,10 +2677,10 @@ EfiIpSecConfigUnregisterNotify (
Copy whole data in specified EFI_SIPEC_CONFIG_SELECTOR and the Data to a buffer.
This function is a caller defined function, and it is called by the IpSecVisitConfigData().
- The orignal caller is IpSecConfigSave(), which calls the IpsecVisitConfigData() to
+ The orignal caller is IpSecConfigSave(), which calls the IpsecVisitConfigData() to
copy all types of IPsec Config datas into one buffer and store this buffer into firmware in
the form of several variables.
-
+
@param[in] Type A specified IPSEC_CONFIG_DATA_TYPE.
@param[in] Selector Points to a EFI_IPSEC_CONFIG_SELECTOR to be copied
to the buffer.
@@ -2708,7 +2708,7 @@ IpSecCopyPolicyEntry (
IPSEC_VAR_ITEM_HEADER DataHeader;
UINTN EntrySize;
UINT8 *TempPoint;
-
+
if (Type == IPsecConfigDataTypeSad) {
//
// Don't save automatically-generated SA entry into variable.
@@ -2724,7 +2724,7 @@ IpSecCopyPolicyEntry (
EntrySize = ALIGN_VARIABLE (EntrySize + SelectorSize);
EntrySize = ALIGN_VARIABLE (EntrySize + sizeof (SelectorHeader));
EntrySize = ALIGN_VARIABLE (EntrySize + DataSize);
-
+
//EntrySize = SelectorSize + DataSize + 2 * sizeof (SelectorHeader);
if (Buffer->Capacity - Buffer->Size < EntrySize) {
//
@@ -2732,7 +2732,7 @@ IpSecCopyPolicyEntry (
//
Buffer->Capacity += EntrySize;
TempPoint = AllocatePool (Buffer->Capacity);
-
+
if (TempPoint == NULL) {
return EFI_OUT_OF_RESOURCES;
}
@@ -2741,8 +2741,8 @@ IpSecCopyPolicyEntry (
//
CopyMem (TempPoint, Buffer->Ptr, Buffer->Size);
FreePool (Buffer->Ptr);
-
- Buffer->Ptr = TempPoint;
+
+ Buffer->Ptr = TempPoint;
}
mFixPolicyEntry[Type](Selector, Data);
@@ -2759,7 +2759,7 @@ IpSecCopyPolicyEntry (
sizeof (SelectorHeader)
);
Buffer->Size = ALIGN_VARIABLE (Buffer->Size + sizeof (SelectorHeader));
-
+
//
// Copy the selector into buffer.
//
@@ -2791,7 +2791,7 @@ IpSecCopyPolicyEntry (
DataSize
);
Buffer->Size = ALIGN_VARIABLE (Buffer->Size + DataSize);
-
+
mUnfixPolicyEntry[Type](Selector, Data);
return EFI_SUCCESS;
@@ -3002,7 +3002,7 @@ IpSecConfigSave (
Get the all IPSec configuration variables and store those variables
to the internal data structure.
- This founction is called by IpSecConfigInitialize() which is to intialize the
+ This founction is called by IpSecConfigInitialize() which is to intialize the
IPsecConfiguration Protocol.
@param[in] Private Point to IPSEC_PRIVATE_DATA.
@@ -3080,10 +3080,10 @@ IpSecConfigRestore (
Header = (IPSEC_VAR_ITEM_HEADER *) Ptr;
Type = (EFI_IPSEC_CONFIG_DATA_TYPE) (Header->Type & IPSEC_VAR_ITEM_HEADER_CONTENT_BIT);
ASSERT (((Header->Type & 0x80) == IPSEC_VAR_ITEM_HEADER_LOGO_BIT) && (Type < IPsecConfigDataTypeMaximum));
-
+
Selector = (EFI_IPSEC_CONFIG_SELECTOR *) ALIGN_POINTER (Header + 1, sizeof (UINTN));
Header = (IPSEC_VAR_ITEM_HEADER *) ALIGN_POINTER (
- (UINT8 *) Selector + Header->Size,
+ (UINT8 *) Selector + Header->Size,
sizeof (UINTN)
);
ASSERT (Header->Type == Type);
diff --git a/NetworkPkg/IpSecDxe/IpSecConfigImpl.h b/NetworkPkg/IpSecDxe/IpSecConfigImpl.h
index 23e68805ad..cc722e6a7b 100644
--- a/NetworkPkg/IpSecDxe/IpSecConfigImpl.h
+++ b/NetworkPkg/IpSecDxe/IpSecConfigImpl.h
@@ -1,7 +1,7 @@
/** @file
Definitions related to IPSEC_CONFIG_PROTOCOL implementations.
- 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
are licensed and made available under the terms and conditions of the BSD License
@@ -345,16 +345,16 @@ IpSecDuplicateProcessPolicy (
Find if the two SPD Selectors has subordinative.
Compare two SPD Selector by the fields of LocalAddressCount/RemoteAddressCount/
- NextLayerProtocol/LocalPort/LocalPortRange/RemotePort/RemotePortRange and the
+ NextLayerProtocol/LocalPort/LocalPortRange/RemotePort/RemotePortRange and the
Local Addresses and remote Addresses.
@param[in] Selector1 Pointer of first SPD Selector.
@param[in] Selector2 Pointer of second SPD Selector.
@retval TRUE The first SPD Selector is subordinate Selector of second SPD Selector.
- @retval FALSE The first SPD Selector is not subordinate Selector of second
+ @retval FALSE The first SPD Selector is not subordinate Selector of second
SPD Selector.
-
+
**/
BOOLEAN
IsSubSpdSelector (
diff --git a/NetworkPkg/IpSecDxe/IpSecCryptIo.c b/NetworkPkg/IpSecDxe/IpSecCryptIo.c
index 31fa4fb447..e0e210bcad 100644
--- a/NetworkPkg/IpSecDxe/IpSecCryptIo.c
+++ b/NetworkPkg/IpSecDxe/IpSecCryptIo.c
@@ -1,7 +1,7 @@
/** @file
Common interfaces to call Security library.
- 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
are licensed and made available under the terms and conditions of the BSD License
@@ -19,7 +19,7 @@
//
GLOBAL_REMOVE_IF_UNREFERENCED ENCRYPT_ALGORITHM mIpsecEncryptAlgorithmList[IPSEC_ENCRYPT_ALGORITHM_LIST_SIZE] = {
{IKE_EALG_NULL, 0, 0, 1, NULL, NULL, NULL, NULL},
- {IKE_EALG_NONE, 0, 0, 1, NULL, NULL, NULL, NULL},
+ {IKE_EALG_NONE, 0, 0, 1, NULL, NULL, NULL, NULL},
{IKE_EALG_3DESCBC, 24, 8, 8, TdesGetContextSize, TdesInit, TdesCbcEncrypt, TdesCbcDecrypt},
{IKE_EALG_AESCBC, 16, 16, 16, AesGetContextSize, AesInit, AesCbcEncrypt, AesCbcDecrypt}
};
@@ -186,7 +186,7 @@ IpSecGenerateIv (
if (IvSize != 0) {
return IpSecCryptoIoGenerateRandomBytes (IvBuffer, IvSize);
}
-
+
return EFI_SUCCESS;
}
@@ -196,7 +196,7 @@ IpSecGenerateIv (
@param[in] AlgorithmId The encryption algorithm ID.
@return the index.
-
+
**/
UINTN
IpSecGetIndexFromEncList (
@@ -204,13 +204,13 @@ IpSecGetIndexFromEncList (
)
{
UINT8 Index;
-
+
for (Index = 0; Index < IPSEC_ENCRYPT_ALGORITHM_LIST_SIZE; Index++) {
if (AlgorithmId == mIpsecEncryptAlgorithmList[Index].AlgorithmId) {
return Index;
}
}
-
+
return (UINTN) -1;
}
@@ -220,7 +220,7 @@ IpSecGetIndexFromEncList (
@param[in] AlgorithmId The encryption algorithm ID.
@return the index.
-
+
**/
UINTN
IpSecGetIndexFromAuthList (
@@ -228,7 +228,7 @@ IpSecGetIndexFromAuthList (
)
{
UINT8 Index;
-
+
for (Index = 0; Index < IPSEC_AUTH_ALGORITHM_LIST_SIZE; Index++) {
if (AlgorithmId == mIpsecAuthAlgorithmList[Index].AlgorithmId) {
//
@@ -237,7 +237,7 @@ IpSecGetIndexFromAuthList (
return Index;
}
}
-
+
return (UINTN) -1;
}
@@ -275,14 +275,14 @@ IpSecCryptoIoEncrypt (
IN UINTN InDataLength,
OUT UINT8 *OutData
)
-{
+{
UINTN Index;
UINTN ContextSize;
UINT8 *Context;
EFI_STATUS Status;
-
+
Status = EFI_UNSUPPORTED;
-
+
switch (AlgorithmId) {
case IKE_EALG_NULL:
@@ -323,7 +323,7 @@ IpSecCryptoIoEncrypt (
if (Context != NULL) {
FreePool (Context);
}
-
+
return Status;
}
@@ -361,7 +361,7 @@ IpSecCryptoIoDecrypt (
IN UINTN InDataLength,
OUT UINT8 *OutData
)
-{
+{
UINTN Index;
UINTN ContextSize;
UINT8 *Context;
@@ -397,7 +397,7 @@ IpSecCryptoIoDecrypt (
//
if (mIpsecEncryptAlgorithmList[Index].CipherInitiate (Context, Key, KeyBits)) {
if (mIpsecEncryptAlgorithmList[Index].CipherDecrypt (Context, InData, InDataLength, Ivec, OutData)) {
- Status = EFI_SUCCESS;
+ Status = EFI_SUCCESS;
}
}
break;
@@ -420,7 +420,7 @@ IpSecCryptoIoDecrypt (
the input algorithm ID. It computes all datas from InDataFragment and output
the result into the OutData buffer. If the OutDataSize is larger than the related
HMAC algorithm output size, return EFI_INVALID_PARAMETER.
-
+
@param[in] AlgorithmId The authentication Identification.
@param[in] Key Pointer of the authentication key.
@param[in] KeyLength The length of the Key in bytes.
@@ -519,8 +519,8 @@ IpSecCryptoIoHmac (
}
goto Exit;
- }
-
+ }
+
default:
return Status;
}
@@ -577,11 +577,11 @@ IpSecCryptoIoHash (
Status = EFI_UNSUPPORTED;
OutHashData = NULL;
-
+
OutHashSize = IpSecGetHmacDigestLength (AlgorithmId);
//
// If the expected hash data size is larger than the related Hash algorithm
- // output length, return EFI_INVALID_PARAMETER.
+ // output length, return EFI_INVALID_PARAMETER.
//
if (OutDataSize > OutHashSize) {
return EFI_INVALID_PARAMETER;
@@ -590,7 +590,7 @@ IpSecCryptoIoHash (
if (OutHashData == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
switch (AlgorithmId) {
case IKE_AALG_NONE:
@@ -611,7 +611,7 @@ IpSecCryptoIoHash (
Status = EFI_OUT_OF_RESOURCES;
goto Exit;
}
-
+
//
// Initiate Hash context and hash the input data.
//
@@ -631,13 +631,13 @@ IpSecCryptoIoHash (
// In some cases, like the Icv computing, the Icv size might be less than
// the key length size, so copy the part of hash data to the OutData.
//
- CopyMem (OutData, OutHashData, OutDataSize);
+ CopyMem (OutData, OutHashData, OutDataSize);
Status = EFI_SUCCESS;
}
-
- goto Exit;
- }
-
+
+ goto Exit;
+ }
+
default:
return Status;
}
@@ -685,10 +685,10 @@ IpSecCryptoIoDhGetPublicKey (
IN CONST UINT8 *Prime,
OUT UINT8 *PublicKey,
IN OUT UINTN *PublicKeySize
- )
+ )
{
EFI_STATUS Status;
-
+
*DhContext = DhNew ();
ASSERT (*DhContext != NULL);
if (!DhSetParameter (*DhContext, Generator, PrimeLength, Prime)) {
@@ -707,7 +707,7 @@ Exit:
DhFree (*DhContext);
DhContext = NULL;
}
-
+
return Status;
}
@@ -731,7 +731,7 @@ Exit:
**/
EFI_STATUS
IpSecCryptoIoDhComputeKey (
- IN OUT UINT8 *DhContext,
+ IN OUT UINT8 *DhContext,
IN CONST UINT8 *PeerPublicKey,
IN UINTN PeerPublicKeySize,
OUT UINT8 *Key,
@@ -752,13 +752,13 @@ IpSecCryptoIoDhComputeKey (
@retval EFI_SUCCESS The operation performs successfully.
@retval EFI_INVALID_PARAMETER The DhContext is NULL.
-
+
**/
EFI_STATUS
IpSecCryptoIoFreeDh (
IN OUT UINT8 **DhContext
)
-{
+{
if (*DhContext == NULL) {
return EFI_INVALID_PARAMETER;
}
@@ -807,7 +807,7 @@ IpSecCryptoIoGenerateRandomBytes (
@param[in] KeyPwdSize The size of Key Password in bytes.
@param[out] OutData The pointer to the signed data.
@param[in, out] OutDataSize Pointer to contain the size of out data.
-
+
**/
VOID
IpSecCryptoIoAuthDataWithCertificate (
@@ -824,7 +824,7 @@ IpSecCryptoIoAuthDataWithCertificate (
UINT8 *RsaContext;
UINT8 *Signature;
UINTN SigSize;
-
+
SigSize = 0;
RsaContext = NULL;
@@ -844,12 +844,12 @@ IpSecCryptoIoAuthDataWithCertificate (
//
// Sign data
//
- Signature = NULL;
+ Signature = NULL;
if (!RsaPkcs1Sign (RsaContext, InData, InDataSize, Signature, &SigSize)) {
Signature = AllocateZeroPool (SigSize);
} else {
return;
- }
+ }
RsaPkcs1Sign (RsaContext, InData, InDataSize, Signature, &SigSize);
@@ -876,7 +876,7 @@ IpSecCryptoIoAuthDataWithCertificate (
@retval TRUE Valid signature encoded in PKCS1-v1_5.
@retval FALSE Invalid signature or invalid RSA context.
-
+
**/
BOOLEAN
IpSecCryptoIoVerifySignDataByCertificate (
@@ -912,7 +912,7 @@ IpSecCryptoIoVerifySignDataByCertificate (
// Retrieve the RSA public Key from Certificate
//
RsaGetPublicKeyFromX509 ((CONST UINT8 *)InCert, CertLen, (VOID **)&RsaContext);
-
+
//
// Verify data
//
@@ -964,9 +964,9 @@ IpSecCryptoIoGetPublicKeyFromCert (
}
*PublicKeyLen = 0;
-
+
RsaGetKey (RsaContext, RsaKeyN, NULL, PublicKeyLen);
-
+
*PublicKey = AllocateZeroPool (*PublicKeyLen);
if (*PublicKey == NULL) {
Status = EFI_OUT_OF_RESOURCES;
@@ -992,10 +992,10 @@ EXIT:
@param[in] CertSize The size of the X509 certificate in bytes.
@param[out] CertSubject Pointer to the retrieved certificate subject.
@param[out] SubjectSize The size of Certificate Subject in bytes.
-
+
@retval EFI_SUCCESS Retrieved the certificate subject successfully.
@retval EFI_INVALID_PARAMETER The certificate is malformed.
-
+
**/
EFI_STATUS
IpSecCryptoIoGetSubjectFromCert (
diff --git a/NetworkPkg/IpSecDxe/IpSecCryptIo.h b/NetworkPkg/IpSecDxe/IpSecCryptIo.h
index 0ef83eb4ca..d21ae9d558 100644
--- a/NetworkPkg/IpSecDxe/IpSecCryptIo.h
+++ b/NetworkPkg/IpSecDxe/IpSecCryptIo.h
@@ -1,7 +1,7 @@
/** @file
Definitions related to the Cryptographic Operations in IPsec.
- Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 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
@@ -47,9 +47,9 @@
/**
Prototype of HMAC GetContextSize.
-
+
Retrieves the size, in bytes, of the context buffer required.
-
+
@return The size, in bytes, of the context buffer required.
**/
@@ -61,13 +61,13 @@ UINTN
/**
Prototype of HMAC Operation Initiating.
-
+
Initialization with a new context.
@param[out] Context Input Context.
@param[in] Key Pointer to the key for HMAC.
@param[in] KeySize The length of the Key in bytes.
-
+
@retval TRUE Initialization Successfully.
**/
@@ -251,7 +251,7 @@ BOOLEAN
/**
Prototype of Hash Update
-
+
Digests the input data and updates hash context.
This function performs digest on a data buffer of the specified size.
@@ -354,7 +354,7 @@ typedef struct _AUTH_ALGORITHM {
UINT8 AlgorithmId;
//
// The Key length of the Algorithm
- //
+ //
UINTN DigestLength;
//
// The ICV length of the Algorithm
@@ -578,7 +578,7 @@ IpSecCryptoIoDecrypt (
the input algorithm ID. It computes all datas from InDataFragment and output
the result into the OutData buffer. If the OutDataSize is larger than the related
HMAC algorithm output size, return EFI_INVALID_PARAMETER.
-
+
@param[in] AlgorithmId The authentication Identification.
@param[in] Key Pointer of the authentication key.
@param[in] KeyLength The length of the Key in bytes.
@@ -704,7 +704,7 @@ IpSecCryptoIoDhComputeKey (
@retval EFI_SUCCESS The operation performs successfully.
@retval EFI_INVALID_PARAMETER The DhContext is NULL.
-
+
**/
EFI_STATUS
IpSecCryptoIoFreeDh (
@@ -740,7 +740,7 @@ IpSecCryptoIoGenerateRandomBytes (
@param[in] KeyPwdSize The size of Key Password in bytes.
@param[out] OutData The pointer to the signed data.
@param[in, out] OutDataSize Pointer to contain the size of out data.
-
+
**/
VOID
IpSecCryptoIoAuthDataWithCertificate (
@@ -769,7 +769,7 @@ IpSecCryptoIoAuthDataWithCertificate (
@retval TRUE Valid signature encoded in PKCS1-v1_5.
@retval FALSE Invalid signature or invalid RSA context.
-
+
**/
BOOLEAN
IpSecCryptoIoVerifySignDataByCertificate (
@@ -810,10 +810,10 @@ IpSecCryptoIoGetPublicKeyFromCert (
@param[in] CertSize The size of the X509 certificate in bytes.
@param[out] CertSubject Pointer to the retrieved certificate subject.
@param[out] SubjectSize The size of Certificate Subject in bytes.
-
+
@retval EFI_SUCCESS Retrieved the certificate subject successfully.
@retval EFI_INVALID_PARAMETER The certificate is malformed.
-
+
**/
EFI_STATUS
IpSecCryptoIoGetSubjectFromCert (
diff --git a/NetworkPkg/IpSecDxe/IpSecDebug.c b/NetworkPkg/IpSecDxe/IpSecDebug.c
index 636e775969..30d190a3c8 100644
--- a/NetworkPkg/IpSecDxe/IpSecDebug.c
+++ b/NetworkPkg/IpSecDxe/IpSecDebug.c
@@ -1,7 +1,7 @@
/** @file
The Interfaces of IPsec debug information printing.
- 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
are licensed and made available under the terms and conditions of the BSD License
@@ -167,21 +167,21 @@ IkeDumpState (
)
{
if (Previous >= IKE_STATE_NUM || Current >= IKE_STATE_NUM) {
- return;
+ return;
}
-
+
if (Previous == Current) {
if (IkeVersion == 1) {
DEBUG ((DEBUG_INFO, "\n****Current state is %a\n", mIkev1StateStr[Previous]));
} else if (IkeVersion == 2) {
DEBUG ((DEBUG_INFO, "\n****Current state is %a\n", mIkev2StateStr[Previous]));
- }
+ }
} else {
if (IkeVersion == 1) {
DEBUG ((DEBUG_INFO, "\n****Change state from %a to %a\n", mIkev1StateStr[Previous], mIkev1StateStr[Current]));
} else {
DEBUG ((DEBUG_INFO, "\n****Change state from %a to %a\n", mIkev2StateStr[Previous], mIkev2StateStr[Current]));
- }
+ }
}
}
@@ -223,7 +223,7 @@ IpSecDumpPacket (
case IKE_XCG_TYPE_QM:
TypeStr = mExchangeStr[2];
break;
-
+
case IKE_XCG_TYPE_SA_INIT:
TypeStr = mExchangeStr[3];
break;
@@ -239,7 +239,7 @@ IpSecDumpPacket (
case IKE_XCG_TYPE_INFO2:
TypeStr = mExchangeStr[6];
break;
-
+
default:
TypeStr = mExchangeStr[7];
break;
@@ -275,7 +275,7 @@ IpSecDumpPacket (
@param[in] IkePayload Point to payload to be printed.
@param[in] IkeVersion The specified version of IKE.
-
+
**/
VOID
IpSecDumpPayload (
diff --git a/NetworkPkg/IpSecDxe/IpSecDebug.h b/NetworkPkg/IpSecDxe/IpSecDebug.h
index 16bbcd53c6..8b1c06c513 100644
--- a/NetworkPkg/IpSecDxe/IpSecDebug.h
+++ b/NetworkPkg/IpSecDxe/IpSecDebug.h
@@ -1,7 +1,7 @@
/** @file
The definition of functions and MACROs used for IPsec debug information printting.
- 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
are licensed and made available under the terms and conditions of the BSD License
@@ -57,7 +57,7 @@ IpSecDumpAddress (
VOID
IkeDumpState (
IN UINT32 Previous,
- IN UINT32 Current,
+ IN UINT32 Current,
IN UINT8 IkeVersion
);
@@ -81,7 +81,7 @@ IpSecDumpPacket (
@param[in] IkePayload Point to payload to be printed.
@param[in] IkeVersion The specified version of IKE.
-
+
**/
VOID
IpSecDumpPayload (
diff --git a/NetworkPkg/IpSecDxe/IpSecDriver.c b/NetworkPkg/IpSecDxe/IpSecDriver.c
index d8282b5e2f..f66f89a439 100644
--- a/NetworkPkg/IpSecDxe/IpSecDriver.c
+++ b/NetworkPkg/IpSecDxe/IpSecDriver.c
@@ -1,7 +1,7 @@
/** @file
Driver Binding Protocol for IPsec Driver.
- Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 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
@@ -28,7 +28,7 @@
@param[in] RemainingDevicePath Optional parameter used to pick a specific child
device to start.
@param[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
-
+
@retval EFI_SUCCES This driver supports this device.
@retval EFI_ALREADY_STARTED This driver is already running on this device.
@retval other This driver does not support this device.
@@ -45,7 +45,7 @@ IpSecSupported (
{
EFI_STATUS Status;
EFI_GUID *UdpServiceBindingGuid;
-
+
if (IpVersion == IP_VERSION_4) {
UdpServiceBindingGuid = &gEfiUdp4ServiceBindingProtocolGuid;
} else {
@@ -213,7 +213,7 @@ IpSecStop (
//
if (!IsListEmpty (&Private->Ikev2EstablishedList)) {
NET_LIST_FOR_EACH_SAFE (Entry, Next, &Private->Ikev2EstablishedList) {
- Ikev2SaSession = IKEV2_SA_SESSION_BY_SESSION (Entry);
+ Ikev2SaSession = IKEV2_SA_SESSION_BY_SESSION (Entry);
RemoveEntryList (&Ikev2SaSession->BySessionTable);
Ikev2SaSessionFree (Ikev2SaSession);
}
diff --git a/NetworkPkg/IpSecDxe/IpSecDxe.inf b/NetworkPkg/IpSecDxe/IpSecDxe.inf
index 583305b4f8..59215774e0 100644
--- a/NetworkPkg/IpSecDxe/IpSecDxe.inf
+++ b/NetworkPkg/IpSecDxe/IpSecDxe.inf
@@ -6,7 +6,7 @@
# packet-level security for IP datagram. It provides the IP packet protection via
# ESP and it supports IKEv2 for key negotiation.
#
-# Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2009 - 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
@@ -63,7 +63,7 @@
Ikev2/Info.c
Ikev2/Payload.c
Ikev2/Exchange.c
-
+
[Packages]
@@ -85,18 +85,18 @@
BaseCryptLib
DpcLib
UdpIoLib
- NetLib
+ NetLib
PcdLib
-
+
[Protocols]
gEfiIp4Config2ProtocolGuid ## SOMETIMES_CONSUMES
- gEfiUdp4ServiceBindingProtocolGuid ## SOMETIMES_CONSUMES
+ gEfiUdp4ServiceBindingProtocolGuid ## SOMETIMES_CONSUMES
gEfiUdp4ProtocolGuid ## SOMETIMES_CONSUMES
- gEfiUdp6ServiceBindingProtocolGuid ## SOMETIMES_CONSUMES
+ gEfiUdp6ServiceBindingProtocolGuid ## SOMETIMES_CONSUMES
gEfiUdp6ProtocolGuid ## SOMETIMES_CONSUMES
gEfiIpSecConfigProtocolGuid ## PRODUCES
gEfiIpSec2ProtocolGuid ## PRODUCES
-
+
[Pcd]
gEfiNetworkPkgTokenSpaceGuid.PcdIpsecCertificateEnabled ## SOMETIMES_CONSUMES
gEfiNetworkPkgTokenSpaceGuid.PcdIpsecUefiCaFile ## SOMETIMES_CONSUMES
diff --git a/NetworkPkg/IpSecDxe/IpSecDxe.uni b/NetworkPkg/IpSecDxe/IpSecDxe.uni
index 9203174541..55d29ae73d 100644
--- a/NetworkPkg/IpSecDxe/IpSecDxe.uni
+++ b/NetworkPkg/IpSecDxe/IpSecDxe.uni
@@ -6,13 +6,13 @@
// packet-level security for IP datagram. It provides the IP packet protection via
// ESP and it supports IKEv2 for key negotiation.
//
-// 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
// 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
// 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.
//
diff --git a/NetworkPkg/IpSecDxe/IpSecDxeExtra.uni b/NetworkPkg/IpSecDxe/IpSecDxeExtra.uni
index 35b0bb9042..806d00ae78 100644
--- a/NetworkPkg/IpSecDxe/IpSecDxeExtra.uni
+++ b/NetworkPkg/IpSecDxe/IpSecDxeExtra.uni
@@ -1,7 +1,7 @@
// /** @file
// IpSecDxe 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
// are licensed and made available under the terms and conditions of the BSD License
@@ -13,8 +13,8 @@
//
// **/
-#string STR_PROPERTIES_MODULE_NAME
-#language en-US
+#string STR_PROPERTIES_MODULE_NAME
+#language en-US
"IpSec DXE"
diff --git a/NetworkPkg/IpSecDxe/IpSecImpl.c b/NetworkPkg/IpSecDxe/IpSecImpl.c
index 625f154ff4..da98184208 100644
--- a/NetworkPkg/IpSecDxe/IpSecImpl.c
+++ b/NetworkPkg/IpSecDxe/IpSecImpl.c
@@ -2,7 +2,7 @@
The implementation of IPsec.
(C) Copyright 2015 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
are licensed and made available under the terms and conditions of the BSD License
@@ -1220,7 +1220,7 @@ IpSecTunnelOutboundPacket (
if (InnerHead == NULL) {
return NULL;
}
-
+
CopyMem (
InnerHead,
IpHead,
@@ -1236,7 +1236,7 @@ IpSecTunnelOutboundPacket (
if (InnerHead == NULL) {
return NULL;
}
-
+
CopyMem (
InnerHead,
IpHead,
@@ -1271,7 +1271,7 @@ IpSecTunnelOutboundPacket (
FreePool (InnerHead);
return NULL;
}
-
+
//
// 3. Check the Last Header, if it is TCP, UDP or ICMP recalcualate its pesudo
// CheckSum.
diff --git a/NetworkPkg/IpSecDxe/IpSecImpl.h b/NetworkPkg/IpSecDxe/IpSecImpl.h
index 89597bdc80..94cbaa77e3 100644
--- a/NetworkPkg/IpSecDxe/IpSecImpl.h
+++ b/NetworkPkg/IpSecDxe/IpSecImpl.h
@@ -1,7 +1,7 @@
/** @file
The definitions related to IPsec protocol implementation.
- Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 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
@@ -151,11 +151,11 @@ struct _IPSEC_PRIVATE_DATA {
/**
This function processes the inbound traffic with IPsec.
- It checks the received packet security property, trims the ESP/AH header, and then
+ It checks the received packet security property, trims the ESP/AH header, and then
returns without an IPsec protected IP Header and FragmentTable.
-
+
@param[in] IpVersion The version of IP.
- @param[in, out] IpHead Points to IP header containing the ESP/AH header
+ @param[in, out] IpHead Points to IP header containing the ESP/AH header
to be trimed on input, and without ESP/AH header
on return.
@param[in, out] LastHead The Last Header in IP header on return.
@@ -281,7 +281,7 @@ IpSecLookupSpdEntry (
IN VOID *IpHead,
IN UINT8 *IpPayload,
IN UINT8 Protocol,
- IN BOOLEAN IsOutbound,
+ IN BOOLEAN IsOutbound,
OUT EFI_IPSEC_ACTION *Action
);
diff --git a/NetworkPkg/IpSecDxe/IpSecMain.c b/NetworkPkg/IpSecDxe/IpSecMain.c
index a2fefa70d7..a193dd5a00 100644
--- a/NetworkPkg/IpSecDxe/IpSecMain.c
+++ b/NetworkPkg/IpSecDxe/IpSecMain.c
@@ -1,7 +1,7 @@
/** @file
The mian interface of IPsec Protocol.
- Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 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
@@ -70,9 +70,9 @@ IpSecProcess (
UINT8 OldLastHead;
BOOLEAN IsOutbound;
- if (OptionsBuffer == NULL ||
- OptionsLength == NULL ||
- FragmentTable == NULL ||
+ if (OptionsBuffer == NULL ||
+ OptionsLength == NULL ||
+ FragmentTable == NULL ||
FragmentCount == NULL
) {
return EFI_INVALID_PARAMETER;
@@ -83,7 +83,7 @@ IpSecProcess (
OldLastHead = *LastHead;
*RecycleSignal = NULL;
SpdList = &mConfigData[IPsecConfigDataTypeSpd];
-
+
if (!IsOutbound) {
//
// For inbound traffic, process the ipsec header of the packet.
@@ -108,7 +108,7 @@ IpSecProcess (
}
if (Status == EFI_SUCCESS) {
-
+
//
// Check the spd entry if the packet is accessible.
//
@@ -120,18 +120,18 @@ IpSecProcess (
Status = EFI_ACCESS_DENIED;
NET_LIST_FOR_EACH (Entry, SpdList) {
SpdEntry = IPSEC_SPD_ENTRY_FROM_LIST (Entry);
- if (IsSubSpdSelector (
+ if (IsSubSpdSelector (
(EFI_IPSEC_CONFIG_SELECTOR *) SpdSelector,
(EFI_IPSEC_CONFIG_SELECTOR *) SpdEntry->Selector
)) {
Status = EFI_SUCCESS;
}
- }
+ }
goto ON_EXIT;
- }
+ }
}
- Status = EFI_ACCESS_DENIED;
+ Status = EFI_ACCESS_DENIED;
NET_LIST_FOR_EACH (Entry, SpdList) {
//
@@ -145,7 +145,7 @@ IpSecProcess (
IpHead,
IpPayload,
OldLastHead,
- IsOutbound,
+ IsOutbound,
&Action
))) {
//
@@ -222,20 +222,20 @@ IpSecProcess (
goto ON_EXIT;
case EfiIPsecActionDiscard:
- goto ON_EXIT;
+ goto ON_EXIT;
}
}
-
+
//
// If don't find the related SPD entry, return the EFI_ACCESS_DENIED and discard it.
// But it the packet is NS/NA, it should be by passed even not find the related SPD entry.
//
- if (OldLastHead == IP6_ICMP &&
+ if (OldLastHead == IP6_ICMP &&
(*IpPayload == ICMP_V6_NEIGHBOR_SOLICIT || *IpPayload == ICMP_V6_NEIGHBOR_ADVERTISE)
){
Status = EFI_SUCCESS;
}
-
+
ON_EXIT:
return Status;
}
diff --git a/NetworkPkg/Mtftp6Dxe/ComponentName.c b/NetworkPkg/Mtftp6Dxe/ComponentName.c
index f4327abcf9..497c8bec93 100644
--- a/NetworkPkg/Mtftp6Dxe/ComponentName.c
+++ b/NetworkPkg/Mtftp6Dxe/ComponentName.c
@@ -1,7 +1,7 @@
/** @file
UEFI Component Name(2) protocol implementation for Mtftp6 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
are licensed and made available under the terms and conditions of the BSD License
@@ -233,10 +233,10 @@ Mtftp6ComponentNameGetDriverName (
@param Mtftp6[in] A pointer to the EFI_MTFTP6_PROTOCOL.
-
+
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
-
+
**/
EFI_STATUS
UpdateName (
@@ -261,7 +261,7 @@ UpdateName (
if (EFI_ERROR (Status)) {
return Status;
}
- UnicodeSPrint (HandleName, sizeof (HandleName),
+ UnicodeSPrint (HandleName, sizeof (HandleName),
L"MTFTPv6(ServerIp=%s, InitialServerPort=%d)",
Address,
Mtftp6ModeData.ConfigData.InitialServerPort
@@ -274,7 +274,7 @@ UpdateName (
FreeUnicodeStringTable (gMtftp6ControllerNameTable);
gMtftp6ControllerNameTable = NULL;
}
-
+
Status = AddUnicodeString2 (
"eng",
gMtftp6ComponentName.SupportedLanguages,
@@ -285,7 +285,7 @@ UpdateName (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
return AddUnicodeString2 (
"en",
gMtftp6ComponentName2.SupportedLanguages,
@@ -383,13 +383,13 @@ Mtftp6ComponentNameGetControllerName (
if (ChildHandle == NULL) {
return EFI_UNSUPPORTED;
}
-
- //
- // Make sure this driver produced ChildHandle
- //
+
+ //
+ // Make sure this driver produced ChildHandle
+ //
Status = EfiTestChildHandle (
ControllerHandle,
- ChildHandle,
+ ChildHandle,
&gEfiUdp6ProtocolGuid
);
if (EFI_ERROR (Status)) {
@@ -416,7 +416,7 @@ Mtftp6ComponentNameGetControllerName (
//
Status = UpdateName (Mtftp6);
if (EFI_ERROR (Status)) {
- return Status;
+ return Status;
}
return LookupUnicodeString2 (
diff --git a/NetworkPkg/Mtftp6Dxe/Mtftp6Driver.c b/NetworkPkg/Mtftp6Dxe/Mtftp6Driver.c
index 5f47938c2d..a4888c0c0e 100644
--- a/NetworkPkg/Mtftp6Dxe/Mtftp6Driver.c
+++ b/NetworkPkg/Mtftp6Dxe/Mtftp6Driver.c
@@ -2,7 +2,7 @@
Driver Binding functions and Service Binding functions
implementation for Mtftp6 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
are licensed and made available under the terms and conditions of the BSD License
@@ -238,7 +238,7 @@ Mtftp6CreateInstance (
/**
Callback function which provided by user to remove one node in NetDestroyLinkList process.
-
+
@param[in] Entry The entry to be removed.
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
@@ -473,7 +473,7 @@ Mtftp6DriverBindingStop (
EFI_STATUS Status;
LIST_ENTRY *List;
MTFTP6_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT Context;
-
+
//
// Locate the Nic handle to retrieve the Mtftp6 private data.
//
diff --git a/NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.uni b/NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.uni
index 5853d2e328..2624301055 100644
--- a/NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.uni
+++ b/NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.uni
@@ -4,13 +4,13 @@
// This module produces EFI MTFTPv6 Protocol which provides basic services for
// client-side unicast and/or multicast TFTP.
//
-// 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
// 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
// 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.
//
diff --git a/NetworkPkg/Mtftp6Dxe/Mtftp6Support.c b/NetworkPkg/Mtftp6Dxe/Mtftp6Support.c
index e6b4127b78..282a9c8e49 100644
--- a/NetworkPkg/Mtftp6Dxe/Mtftp6Support.c
+++ b/NetworkPkg/Mtftp6Dxe/Mtftp6Support.c
@@ -1,7 +1,7 @@
/** @file
Mtftp6 support functions 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
are licensed and made available under the terms and conditions of the BSD License
@@ -538,7 +538,7 @@ Mtftp6SendRequest (
Packet->OpCode = HTONS (Operation);
BufferLength -= sizeof (Packet->OpCode);
-
+
Cur = Packet->Rrq.Filename;
Status = AsciiStrCpyS ((CHAR8 *) Cur, BufferLength, (CHAR8 *) Token->Filename);
ASSERT_EFI_ERROR (Status);
@@ -555,17 +555,17 @@ Mtftp6SendRequest (
for (Index = 0; Index < Token->OptionCount; ++Index) {
OptionStrLength = AsciiStrLen ((CHAR8 *) Options[Index].OptionStr);
ValueStrLength = AsciiStrLen ((CHAR8 *) Options[Index].ValueStr);
-
+
Status = AsciiStrCpyS ((CHAR8 *) Cur, BufferLength, (CHAR8 *) Options[Index].OptionStr);
ASSERT_EFI_ERROR (Status);
BufferLength -= (UINT32) (OptionStrLength + 1);
Cur += OptionStrLength + 1;
-
+
Status = AsciiStrCpyS ((CHAR8 *) Cur, BufferLength, (CHAR8 *) Options[Index].ValueStr);
ASSERT_EFI_ERROR (Status);
BufferLength -= (UINT32) (ValueStrLength + 1);
Cur += ValueStrLength + 1;
-
+
}
//
diff --git a/NetworkPkg/NetworkPkg.dec b/NetworkPkg/NetworkPkg.dec
index 784e658b66..aae36226d5 100644
--- a/NetworkPkg/NetworkPkg.dec
+++ b/NetworkPkg/NetworkPkg.dec
@@ -42,7 +42,7 @@
# Include/Guid/TlsAuthConfigHii.h
gTlsAuthConfigGuid = { 0xb0eae4f8, 0x9a04, 0x4c6d, { 0xa7, 0x48, 0x79, 0x3d, 0xaa, 0xf, 0x65, 0xdf }}
-
+
# Include/Guid/TlsAuthentication.h
gEfiTlsCaCertificateGuid = { 0xfd2340D0, 0x3dab, 0x4349, { 0xa6, 0xc7, 0x3b, 0x4f, 0x12, 0xb4, 0x8e, 0xae }}
diff --git a/NetworkPkg/NetworkPkg.dsc b/NetworkPkg/NetworkPkg.dsc
index dcca5f9fba..cc8d6cabcf 100644
--- a/NetworkPkg/NetworkPkg.dsc
+++ b/NetworkPkg/NetworkPkg.dsc
@@ -57,7 +57,7 @@
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
- DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
+ DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
diff --git a/NetworkPkg/NetworkPkg.uni b/NetworkPkg/NetworkPkg.uni
index cdaee76f7e..5604b1bf32 100644
--- a/NetworkPkg/NetworkPkg.uni
+++ b/NetworkPkg/NetworkPkg.uni
@@ -3,13 +3,13 @@
//
// This package provides network modules that conform to UEFI 2.4 specification.
//
-// 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 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
// 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.
//
diff --git a/NetworkPkg/NetworkPkgExtra.uni b/NetworkPkg/NetworkPkgExtra.uni
index 339cb86ffb..84e851908f 100644
--- a/NetworkPkg/NetworkPkgExtra.uni
+++ b/NetworkPkg/NetworkPkgExtra.uni
@@ -1,7 +1,7 @@
// /** @file
// Network Package 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 are licensed and made available under
// the terms and conditions of the BSD License which accompanies this distribution.
@@ -13,7 +13,7 @@
//
// **/
-#string STR_PROPERTIES_PACKAGE_NAME
-#language en-US
+#string STR_PROPERTIES_PACKAGE_NAME
+#language en-US
"Network package"
diff --git a/NetworkPkg/TcpDxe/ComponentName.c b/NetworkPkg/TcpDxe/ComponentName.c
index 41eb5a5e13..7e1bef6adc 100644
--- a/NetworkPkg/TcpDxe/ComponentName.c
+++ b/NetworkPkg/TcpDxe/ComponentName.c
@@ -2,7 +2,7 @@
Implementation of protocols EFI_COMPONENT_NAME_PROTOCOL and
EFI_COMPONENT_NAME2_PROTOCOL.
- Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 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
@@ -231,10 +231,10 @@ TcpComponentNameGetDriverName (
@param Tcp4[in] A pointer to the EFI_TCP4_PROTOCOL.
-
+
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
-
+
**/
EFI_STATUS
UpdateTcp4Name (
@@ -276,7 +276,7 @@ UpdateTcp4Name (
FreeUnicodeStringTable (gTcpControllerNameTable);
gTcpControllerNameTable = NULL;
}
-
+
Status = AddUnicodeString2 (
"eng",
gTcpComponentName.SupportedLanguages,
@@ -287,7 +287,7 @@ UpdateTcp4Name (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
return AddUnicodeString2 (
"en",
gTcpComponentName2.SupportedLanguages,
@@ -302,10 +302,10 @@ UpdateTcp4Name (
@param Tcp6[in] A pointer to the EFI_TCP6_PROTOCOL.
-
+
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
-
+
**/
EFI_STATUS
UpdateTcp6Name (
@@ -343,7 +343,7 @@ UpdateTcp6Name (
FreeUnicodeStringTable (gTcpControllerNameTable);
gTcpControllerNameTable = NULL;
}
-
+
Status = AddUnicodeString2 (
"eng",
gTcpComponentName.SupportedLanguages,
@@ -354,7 +354,7 @@ UpdateTcp6Name (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
return AddUnicodeString2 (
"en",
gTcpComponentName2.SupportedLanguages,
diff --git a/NetworkPkg/TcpDxe/SockImpl.c b/NetworkPkg/TcpDxe/SockImpl.c
index c5fb176255..f68044f813 100644
--- a/NetworkPkg/TcpDxe/SockImpl.c
+++ b/NetworkPkg/TcpDxe/SockImpl.c
@@ -1,7 +1,7 @@
/** @file
Implementation of the Socket.
- 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
are licensed and made available under the terms and conditions of the BSD License
@@ -577,13 +577,13 @@ SockWakeRcvToken (
/**
Cancel the tokens in the specific token list.
- @param[in] Token Pointer to the Token. If NULL, all tokens
- in SpecifiedTokenList will be canceled.
+ @param[in] Token Pointer to the Token. If NULL, all tokens
+ in SpecifiedTokenList will be canceled.
@param[in, out] SpecifiedTokenList Pointer to the token list to be checked.
-
+
@retval EFI_SUCCESS Cancel the tokens in the specific token listsuccessfully.
@retval EFI_NOT_FOUND The Token is not found in SpecifiedTokenList.
-
+
**/
EFI_STATUS
SockCancelToken (
@@ -602,19 +602,19 @@ SockCancelToken (
if (IsListEmpty (SpecifiedTokenList) && Token != NULL) {
return EFI_NOT_FOUND;
}
-
+
//
// Iterate through the SpecifiedTokenList.
//
Entry = SpecifiedTokenList->ForwardLink;
while (Entry != SpecifiedTokenList) {
SockToken = NET_LIST_USER_STRUCT (Entry, SOCK_TOKEN, TokenList);
-
+
if (Token == NULL) {
SIGNAL_TOKEN (SockToken->Token, EFI_ABORTED);
RemoveEntryList (&SockToken->TokenList);
FreePool (SockToken);
-
+
Entry = SpecifiedTokenList->ForwardLink;
Status = EFI_SUCCESS;
} else {
@@ -622,18 +622,18 @@ SockCancelToken (
SIGNAL_TOKEN (Token, EFI_ABORTED);
RemoveEntryList (&(SockToken->TokenList));
FreePool (SockToken);
-
+
return EFI_SUCCESS;
}
Status = EFI_NOT_FOUND;
-
+
Entry = Entry->ForwardLink;
- }
+ }
}
ASSERT (IsListEmpty (SpecifiedTokenList) || Token != NULL);
-
+
return Status;
}
diff --git a/NetworkPkg/TcpDxe/SockImpl.h b/NetworkPkg/TcpDxe/SockImpl.h
index 80692b161e..b8ed3c703f 100644
--- a/NetworkPkg/TcpDxe/SockImpl.h
+++ b/NetworkPkg/TcpDxe/SockImpl.h
@@ -1,7 +1,7 @@
/** @file
The function declaration that provided for Socket Interface.
- 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
are licensed and made available under the terms and conditions of the BSD License
@@ -80,13 +80,13 @@ SockConnFlush (
/**
Cancel the tokens in the specific token list.
- @param[in] Token Pointer to the Token. If NULL, all tokens
- in SpecifiedTokenList will be canceled.
+ @param[in] Token Pointer to the Token. If NULL, all tokens
+ in SpecifiedTokenList will be canceled.
@param[in, out] SpecifiedTokenList Pointer to the token list to be checked.
-
+
@retval EFI_SUCCESS Cancel the tokens in the specific token listsuccessfully.
@retval EFI_NOT_FOUND The Token is not found in SpecifiedTokenList.
-
+
**/
EFI_STATUS
SockCancelToken (
diff --git a/NetworkPkg/TcpDxe/SockInterface.c b/NetworkPkg/TcpDxe/SockInterface.c
index 0dfc0a71d3..0a3c07835a 100644
--- a/NetworkPkg/TcpDxe/SockInterface.c
+++ b/NetworkPkg/TcpDxe/SockInterface.c
@@ -1,7 +1,7 @@
/** @file
Interface function of the Socket.
- 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
are licensed and made available under the terms and conditions of the BSD License
@@ -985,7 +985,7 @@ EFI_STATUS
SockCancel (
IN OUT SOCKET *Sock,
IN VOID *Token
- )
+ )
{
EFI_STATUS Status;
@@ -1008,7 +1008,7 @@ SockCancel (
Status = EFI_NOT_STARTED;
goto Exit;
}
-
+
//
// 1. Check ConnectionToken.
//
@@ -1039,7 +1039,7 @@ SockCancel (
if (Token != NULL && !EFI_ERROR (Status)) {
goto Exit;
}
-
+
//
// 4. Check SndTokenList.
//
@@ -1052,7 +1052,7 @@ SockCancel (
// 5. Check ProcessingSndTokenList.
//
Status = SockCancelToken (Token, &Sock->ProcessingSndTokenList);
-
+
Exit:
EfiReleaseLock (&(Sock->Lock));
return Status;
diff --git a/NetworkPkg/TcpDxe/TcpDispatcher.c b/NetworkPkg/TcpDxe/TcpDispatcher.c
index 9a352b1531..ce8441d720 100644
--- a/NetworkPkg/TcpDxe/TcpDispatcher.c
+++ b/NetworkPkg/TcpDxe/TcpDispatcher.c
@@ -2,7 +2,7 @@
The implementation of a dispatch routine for processing TCP requests.
(C) Copyright 2014 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
are licensed and made available under the terms and conditions of the BSD License
@@ -360,7 +360,7 @@ TcpAttachPcb (
} else {
IpProtocolGuid = &gEfiIp6ProtocolGuid;
}
-
+
Tcb = AllocateZeroPool (sizeof (TCP_CB));
if (Tcb == NULL) {
@@ -398,7 +398,7 @@ TcpAttachPcb (
IpIoRemoveIp (IpIo, Tcb->IpInfo);
return Status;
}
-
+
InitializeListHead (&Tcb->List);
InitializeListHead (&Tcb->SndQue);
InitializeListHead (&Tcb->RcvQue);
@@ -430,7 +430,7 @@ TcpDetachPcb (
ASSERT (Tcb != NULL);
TcpFlushPcb (Tcb);
-
+
IpIoRemoveIp (ProtoData->TcpService->IpIo, Tcb->IpInfo);
FreePool (Tcb);
diff --git a/NetworkPkg/TcpDxe/TcpDriver.c b/NetworkPkg/TcpDxe/TcpDriver.c
index 6f815ef841..2d4b16cd9e 100644
--- a/NetworkPkg/TcpDxe/TcpDriver.c
+++ b/NetworkPkg/TcpDxe/TcpDriver.c
@@ -1,7 +1,7 @@
/** @file
The driver binding and service binding protocol for the TCP 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
are licensed and made available under the terms and conditions of the BSD License
@@ -365,7 +365,7 @@ ON_ERROR:
/**
Callback function which provided by user to remove one node in NetDestroyLinkList process.
-
+
@param[in] Entry The entry to be removed.
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
@@ -410,7 +410,7 @@ TcpDestroyChildEntryInHandleBuffer (
@param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number
of children is zero stop the entire bus driver.
@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
@retval EFI_SUCCESS The resources used by the instance were cleaned up.
@@ -545,7 +545,7 @@ Tcp4DriverBindingSupported (
if (!EFI_ERROR (Status)) {
return EFI_ALREADY_STARTED;
}
-
+
//
// Test for the Ip4ServiceBinding Protocol
//
@@ -662,7 +662,7 @@ Tcp6DriverBindingSupported (
if (!EFI_ERROR (Status)) {
return EFI_ALREADY_STARTED;
}
-
+
//
// Test for the Ip6ServiceBinding Protocol
//
diff --git a/NetworkPkg/TcpDxe/TcpDxe.inf b/NetworkPkg/TcpDxe/TcpDxe.inf
index fde0dcecbe..3d1344b0f2 100644
--- a/NetworkPkg/TcpDxe/TcpDxe.inf
+++ b/NetworkPkg/TcpDxe/TcpDxe.inf
@@ -2,11 +2,11 @@
# TCPv4 I/O and TCPv6 I/O services.
#
# This module provides EFI TCPv4 Protocol and EFI TCPv6 Protocol to send and receive data stream.
-# It might provide TCPv4 Protocol or TCPv6 Protocol or both of them that depends on
+# It might provide TCPv4 Protocol or TCPv6 Protocol or both of them that depends on
# which network stack has been loaded in system.
#
#
-# 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
# are licensed and made available under the terms and conditions of the BSD License
diff --git a/NetworkPkg/TcpDxe/TcpDxe.uni b/NetworkPkg/TcpDxe/TcpDxe.uni
index 112f017d81..2f559dee97 100644
--- a/NetworkPkg/TcpDxe/TcpDxe.uni
+++ b/NetworkPkg/TcpDxe/TcpDxe.uni
@@ -5,13 +5,13 @@
// It might provide TCPv4 Protocol or TCPv6 Protocol or both of them that depends on
// which network stack has been loaded in system.
//
-// 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
// 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
// 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.
//
diff --git a/NetworkPkg/TcpDxe/TcpDxeExtra.uni b/NetworkPkg/TcpDxe/TcpDxeExtra.uni
index 097203cbdb..94ce1d8261 100644
--- a/NetworkPkg/TcpDxe/TcpDxeExtra.uni
+++ b/NetworkPkg/TcpDxe/TcpDxeExtra.uni
@@ -1,7 +1,7 @@
// /** @file
// TcpDxe 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
// are licensed and made available under the terms and conditions of the BSD License
@@ -13,8 +13,8 @@
//
// **/
-#string STR_PROPERTIES_MODULE_NAME
-#language en-US
+#string STR_PROPERTIES_MODULE_NAME
+#language en-US
"TCP DXE"
diff --git a/NetworkPkg/TcpDxe/TcpInput.c b/NetworkPkg/TcpDxe/TcpInput.c
index 92a0ab8c35..5b74fdcdc3 100644
--- a/NetworkPkg/TcpDxe/TcpInput.c
+++ b/NetworkPkg/TcpDxe/TcpInput.c
@@ -1,7 +1,7 @@
/** @file
TCP input process 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
are licensed and made available under the terms and conditions of the BSD License
@@ -436,7 +436,7 @@ TcpDeliverData (
NetbufFree (Nbuf);
return -1;
}
-
+
ASSERT (Nbuf->Tcp == NULL);
if (TCP_SEQ_GT (Seg->Seq, Seq)) {
@@ -775,18 +775,18 @@ TcpInput (
Head = (TCP_HEAD *) NetbufGetByte (Nbuf, 0, NULL);
ASSERT (Head != NULL);
-
+
if (Nbuf->TotalSize < sizeof (TCP_HEAD)) {
DEBUG ((EFI_D_NET, "TcpInput: received a malformed packet\n"));
goto DISCARD;
}
-
+
Len = Nbuf->TotalSize - (Head->HeadLen << 2);
if ((Head->HeadLen < 5) || (Len < 0)) {
DEBUG ((EFI_D_NET, "TcpInput: received a malformed packet\n"));
-
+
goto DISCARD;
}
@@ -1322,7 +1322,7 @@ TcpInput (
goto DISCARD;
}
-
+
Tcb->SndUna = Seg->Ack;
if (TCP_FLG_ON (Tcb->CtrlFlag, TCP_CTRL_SND_URG) &&
@@ -1564,7 +1564,7 @@ StepSix:
goto DISCARD;
}
-
+
if (TcpDeliverData (Tcb) == -1) {
goto RESET_THEN_DROP;
}
@@ -1664,7 +1664,7 @@ TcpIcmpInput (
if (Nbuf->TotalSize < sizeof (TCP_HEAD)) {
goto CLEAN_EXIT;
}
-
+
Head = (TCP_HEAD *) NetbufGetByte (Nbuf, 0, NULL);
ASSERT (Head != NULL);
diff --git a/NetworkPkg/TcpDxe/TcpMain.c b/NetworkPkg/TcpDxe/TcpMain.c
index e349d2dce6..b108985e29 100644
--- a/NetworkPkg/TcpDxe/TcpMain.c
+++ b/NetworkPkg/TcpDxe/TcpMain.c
@@ -2,7 +2,7 @@
Implementation of EFI_TCP4_PROTOCOL and EFI_TCP6_PROTOCOL.
(C) Copyright 2014 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
are licensed and made available under the terms and conditions of the BSD License
@@ -153,7 +153,7 @@ Tcp4Configure (
if (IP4_IS_LOCAL_BROADCAST (NTOHL (Ip))) {
return EFI_INVALID_PARAMETER;
}
-
+
if (TcpConfigData->AccessPoint.ActiveFlag && (0 == TcpConfigData->AccessPoint.RemotePort || (Ip == 0))) {
return EFI_INVALID_PARAMETER;
}
@@ -162,7 +162,7 @@ Tcp4Configure (
CopyMem (&Ip, &TcpConfigData->AccessPoint.StationAddress, sizeof (IP4_ADDR));
CopyMem (&SubnetMask, &TcpConfigData->AccessPoint.SubnetMask, sizeof (IP4_ADDR));
- if (!IP4_IS_VALID_NETMASK (NTOHL (SubnetMask)) ||
+ if (!IP4_IS_VALID_NETMASK (NTOHL (SubnetMask)) ||
(SubnetMask != 0 && !NetIp4IsUnicast (NTOHL (Ip), NTOHL (SubnetMask)))) {
return EFI_INVALID_PARAMETER;
}
diff --git a/NetworkPkg/TcpDxe/TcpOutput.c b/NetworkPkg/TcpDxe/TcpOutput.c
index 1697514a92..5c5da9338c 100644
--- a/NetworkPkg/TcpDxe/TcpOutput.c
+++ b/NetworkPkg/TcpDxe/TcpOutput.c
@@ -1,7 +1,7 @@
/** @file
TCP output process 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
are licensed and made available under the terms and conditions of the BSD License
@@ -295,7 +295,7 @@ TcpTransmitSegment (
ASSERT ((Nbuf != NULL) && (Nbuf->Tcp == NULL));
if (TcpVerifySegment (Nbuf) == 0) {
- return -1;
+ return -1;
}
DataLen = Nbuf->TotalSize;
@@ -642,7 +642,7 @@ TcpGetSegment (
NetbufFree (Nbuf);
return NULL;
}
-
+
return Nbuf;
}
@@ -688,10 +688,10 @@ TcpRetransmit (
"TcpRetransmit: retransmission without regard to the receiver window for TCB %p\n",
Tcb)
);
-
+
} else if (TCP_SEQ_GEQ (Tcb->SndWl2 + Tcb->SndWnd, Seq)) {
Len = TCP_SUB_SEQ (Tcb->SndWl2 + Tcb->SndWnd, Seq);
-
+
} else {
DEBUG (
(EFI_D_WARN,
diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.c b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.c
index 403afbb815..9cdad09fb4 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.c
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.c
@@ -1,7 +1,7 @@
/** @file
The DriverEntryPoint for TlsAuthConfigDxe driver.
- 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
are licensed and made available under the terms and conditions of the BSD License
@@ -128,7 +128,7 @@ TlsAuthConfigDxeDriverEntryPoint (
ON_ERROR:
TlsAuthConfigFormUnload (PrivateData);
-
+
return Status;
}
diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
index cbdd5f0664..31450b3e4a 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
@@ -1,7 +1,7 @@
/** @file
The Miscellaneous Routines for TlsAuthConfigDxe driver.
-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
are licensed and made available under the terms and conditions of the BSD License
@@ -1560,7 +1560,7 @@ TlsAuthConfigAccessCallback (
HiiGetBrowserData (&gTlsAuthConfigGuid, mTlsAuthConfigStorageName, BufferSize, (UINT8 *) IfrNvData);
if ((Action != EFI_BROWSER_ACTION_CHANGED) &&
- (Action != EFI_BROWSER_ACTION_CHANGING) &&
+ (Action != EFI_BROWSER_ACTION_CHANGING) &&
(Action != EFI_BROWSER_ACTION_FORM_CLOSE)) {
Status = EFI_UNSUPPORTED;
goto EXIT;
@@ -1593,10 +1593,10 @@ TlsAuthConfigAccessCallback (
break;
case KEY_TLS_AUTH_CONFIG_ENROLL_CERT_FROM_FILE:
//
- // If the file is already opened, clean the file related resource first.
+ // If the file is already opened, clean the file related resource first.
//
CleanFileContext (Private);
-
+
ChooseFile( NULL, NULL, UpdateCAFromFile, &File);
break;
diff --git a/NetworkPkg/TlsDxe/TlsImpl.c b/NetworkPkg/TlsDxe/TlsImpl.c
index a026075f36..ea83dbd04f 100644
--- a/NetworkPkg/TlsDxe/TlsImpl.c
+++ b/NetworkPkg/TlsDxe/TlsImpl.c
@@ -106,7 +106,7 @@ TlsEncryptPacket (
BufferInPtr += TLS_RECORD_HEADER_LENGTH + RecordHeaderIn->Length;
RecordCount ++;
}
-
+
//
// Allocate enough buffer to hold TLS Ciphertext.
//
diff --git a/NetworkPkg/Udp6Dxe/ComponentName.c b/NetworkPkg/Udp6Dxe/ComponentName.c
index 93c2003f34..7330c50fb7 100644
--- a/NetworkPkg/Udp6Dxe/ComponentName.c
+++ b/NetworkPkg/Udp6Dxe/ComponentName.c
@@ -1,7 +1,7 @@
/** @file
UEFI Component Name(2) protocol implementation for UDP6 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
are licensed and made available under the terms and conditions of the BSD License
@@ -237,10 +237,10 @@ Udp6ComponentNameGetDriverName (
@param Udp6[in] A pointer to the EFI_UDP6_PROTOCOL.
-
+
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
-
+
**/
EFI_STATUS
UpdateName (
diff --git a/NetworkPkg/Udp6Dxe/Udp6Driver.c b/NetworkPkg/Udp6Dxe/Udp6Driver.c
index f9d528e68f..0647c0214f 100644
--- a/NetworkPkg/Udp6Dxe/Udp6Driver.c
+++ b/NetworkPkg/Udp6Dxe/Udp6Driver.c
@@ -177,7 +177,7 @@ EXIT:
/**
Callback function which provided by user to remove one node in NetDestroyLinkList process.
-
+
@param[in] Entry The entry to be removed.
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
@@ -296,7 +296,7 @@ Udp6DriverBindingStop (
&Udp6Service->ServiceBinding,
NULL
);
-
+
Udp6CleanService (Udp6Service);
FreePool (Udp6Service);
}
@@ -405,7 +405,7 @@ Udp6ServiceBindingCreateChild (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
//
diff --git a/NetworkPkg/Udp6Dxe/Udp6Dxe.inf b/NetworkPkg/Udp6Dxe/Udp6Dxe.inf
index 05dc5ef4fe..fe88c548c9 100644
--- a/NetworkPkg/Udp6Dxe/Udp6Dxe.inf
+++ b/NetworkPkg/Udp6Dxe/Udp6Dxe.inf
@@ -1,10 +1,10 @@
## @file Udp6Dxe.inf
# UDP packet service based on IPv6 stack.
-#
+#
# This module produces EFI UDPv6 Protocol which provides simple packet-oriented
# services to transmit and receive UDP packets.
-#
-# 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
# are licensed and made available under the terms and conditions of the BSD License
diff --git a/NetworkPkg/Udp6Dxe/Udp6Dxe.uni b/NetworkPkg/Udp6Dxe/Udp6Dxe.uni
index 5f1f19bdba..88a93abf40 100644
--- a/NetworkPkg/Udp6Dxe/Udp6Dxe.uni
+++ b/NetworkPkg/Udp6Dxe/Udp6Dxe.uni
@@ -4,13 +4,13 @@
// This module produces EFI UDPv6 Protocol which provides simple packet-oriented
// services to transmit and receive UDP packets.
//
-// 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
// 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
// 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.
//
diff --git a/NetworkPkg/Udp6Dxe/Udp6DxeExtra.uni b/NetworkPkg/Udp6Dxe/Udp6DxeExtra.uni
index 1185113f3c..3566e1f2f3 100644
--- a/NetworkPkg/Udp6Dxe/Udp6DxeExtra.uni
+++ b/NetworkPkg/Udp6Dxe/Udp6DxeExtra.uni
@@ -1,7 +1,7 @@
// /** @file
// Udp6Dxe 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
// are licensed and made available under the terms and conditions of the BSD License
@@ -13,8 +13,8 @@
//
// **/
-#string STR_PROPERTIES_MODULE_NAME
-#language en-US
+#string STR_PROPERTIES_MODULE_NAME
+#language en-US
"UDP6 DXE"
diff --git a/NetworkPkg/Udp6Dxe/Udp6Impl.c b/NetworkPkg/Udp6Dxe/Udp6Impl.c
index d014e2dcbc..25336362b0 100644
--- a/NetworkPkg/Udp6Dxe/Udp6Impl.c
+++ b/NetworkPkg/Udp6Dxe/Udp6Impl.c
@@ -372,7 +372,7 @@ ON_ERROR:
IpIoDestroy (Udp6Service->IpIo);
Udp6Service->IpIo = NULL;
-
+
return Status;
}
@@ -398,7 +398,7 @@ Udp6CleanService (
//
IpIoDestroy (Udp6Service->IpIo);
Udp6Service->IpIo = NULL;
-
+
ZeroMem (Udp6Service, sizeof (UDP6_SERVICE_DATA));
}
@@ -1621,7 +1621,7 @@ Udp6Demultiplex (
NetbufFree (Packet);
return;
}
-
+
//
// Get the datagram header from the packet buffer.
//
@@ -1873,7 +1873,7 @@ Udp6IcmpHandler (
NetbufFree (Packet);
return;
}
-
+
Udp6Header = (EFI_UDP_HEADER *) NetbufGetByte (Packet, 0, NULL);
ASSERT (Udp6Header != NULL);
if (Udp6Header == NULL) {
@@ -1975,7 +1975,7 @@ Udp6NetVectorExtFree (
IN VOID *Context
)
{
-}
+}
/**
Find the key in the netmap.
diff --git a/NetworkPkg/Udp6Dxe/Udp6Impl.h b/NetworkPkg/Udp6Dxe/Udp6Impl.h
index 09f315f50b..ff59e80cd4 100644
--- a/NetworkPkg/Udp6Dxe/Udp6Impl.h
+++ b/NetworkPkg/Udp6Dxe/Udp6Impl.h
@@ -1,7 +1,7 @@
/** @file
Udp6 driver's whole implementation and internal data structures.
- 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
are licensed and made available under the terms and conditions of the BSD License
@@ -144,7 +144,7 @@ Udp6CreateService (
IN EFI_HANDLE ImageHandle,
IN EFI_HANDLE ControllerHandle
);
-
+
/**
This function cleans the udp instance.
@@ -155,7 +155,7 @@ VOID
Udp6CleanInstance (
IN OUT UDP6_INSTANCE_DATA *Instance
);
-
+
/**
This function intializes the new created udp instance.
diff --git a/NetworkPkg/Udp6Dxe/Udp6Main.c b/NetworkPkg/Udp6Dxe/Udp6Main.c
index e9d94dd00c..71684bc285 100644
--- a/NetworkPkg/Udp6Dxe/Udp6Main.c
+++ b/NetworkPkg/Udp6Dxe/Udp6Main.c
@@ -284,7 +284,7 @@ Udp6Configure (
ASSERT (IsListEmpty (&Instance->DeliveredDgramQue));
}
-
+
ON_EXIT:
gBS->RestoreTPL (OldTpl);
@@ -384,7 +384,7 @@ Udp6Groups (
Status = NetMapIterate (&Instance->McastIps, Udp6LeaveGroup, MulticastAddress);
if ((MulticastAddress != NULL) && (Status == EFI_ABORTED)) {
Status = EFI_SUCCESS;
- }
+ }
}
ON_EXIT:
@@ -535,7 +535,7 @@ Udp6Transmit (
Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
}
-
+
ConfigData = &Instance->ConfigData;
//
diff --git a/NetworkPkg/UefiPxeBcDxe/ComponentName.c b/NetworkPkg/UefiPxeBcDxe/ComponentName.c
index 6e48d4aa18..40af1dac0e 100644
--- a/NetworkPkg/UefiPxeBcDxe/ComponentName.c
+++ b/NetworkPkg/UefiPxeBcDxe/ComponentName.c
@@ -1,7 +1,7 @@
/** @file
UEFI Component Name(2) protocol implementation for UefiPxeBc 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
are licensed and made available under the terms and conditions of the BSD License
@@ -324,7 +324,7 @@ PxeBcComponentNameGetControllerName (
if (ControllerHandle == NULL || ChildHandle != NULL) {
return EFI_UNSUPPORTED;
}
-
+
NicHandle = PxeBcGetNicByIp4Children (ControllerHandle);
if (NicHandle == NULL) {
NicHandle = PxeBcGetNicByIp6Children (ControllerHandle);
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c b/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c
index 1f8895fdaa..46a13c5b1f 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c
@@ -1,7 +1,7 @@
/** @file
Boot functions implementation for UefiPxeBc Driver.
- Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
This program and the accompanying materials
@@ -102,14 +102,14 @@ PxeBcSelectBootPrompt (
//
// According to the PXE specification 2.1, Table 2-1 PXE DHCP Options,
// we must not consider a boot prompt or boot menu if all of the following hold:
- // - the PXE_DISCOVERY_CONTROL tag(6) is present inside the Vendor Options(43), and has bit 3 set
+ // - the PXE_DISCOVERY_CONTROL tag(6) is present inside the Vendor Options(43), and has bit 3 set
// - a boot file name has been presented in the initial DHCP or ProxyDHCP offer packet.
//
if (IS_DISABLE_PROMPT_MENU (VendorOpt->DiscoverCtrl) &&
Cache->Dhcp4.OptList[PXEBC_DHCP4_TAG_INDEX_BOOTFILE] != NULL) {
return EFI_ABORTED;
}
-
+
if (!IS_VALID_BOOT_PROMPT (VendorOpt->BitMap)) {
return EFI_TIMEOUT;
}
@@ -471,7 +471,7 @@ PxeBcDhcp4BootInfo (
UINT16 Value;
PXEBC_VENDOR_OPTION *VendorOpt;
PXEBC_BOOT_SVR_ENTRY *Entry;
-
+
PxeBc = &Private->PxeBc;
Mode = PxeBc->Mode;
Status = EFI_SUCCESS;
@@ -789,8 +789,8 @@ PxeBcExtractDiscoverInfo (
if (Info->IpCnt >= 1) {
*DiscoverInfo = AllocatePool (sizeof (*Info) + (Info->IpCnt - 1) * sizeof (**SrvList));
if (*DiscoverInfo == NULL) {
- return EFI_OUT_OF_RESOURCES;
- }
+ return EFI_OUT_OF_RESOURCES;
+ }
CopyMem (*DiscoverInfo, Info, sizeof (*Info));
Info = *DiscoverInfo;
}
@@ -951,7 +951,7 @@ PxeBcDiscoverBootFile (
&Mode->ProxyOffer.Dhcpv4,
&Mode->PxeReply.Dhcpv4,
Private->PxeReply.Dhcp4.Packet.Ack.Length
- );
+ );
}
Mode->ProxyOfferReceived = TRUE;
}
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c
index bb65445fc9..140e687736 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c
@@ -438,7 +438,7 @@ PxeBcCacheDhcp4Packet (
if (Dst->Size < Src->Length) {
return EFI_BUFFER_TOO_SMALL;
}
-
+
CopyMem (&Dst->Dhcp4, &Src->Dhcp4, Src->Length);
Dst->Length = Src->Length;
@@ -492,7 +492,7 @@ PxeBcParseDhcp4Packet (
);
}
//
- // 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.
//
Option = Options[PXEBC_DHCP4_TAG_INDEX_OVERLOAD];
@@ -657,7 +657,7 @@ PxeBcCopyDhcp4Ack (
CopyMem (&Mode->DhcpAck.Dhcpv4, &Ack->Dhcp4, Ack->Length);
Mode->DhcpAckReceived = TRUE;
}
-
+
return EFI_SUCCESS;
}
@@ -695,7 +695,7 @@ PxeBcCopyProxyOffer (
if (EFI_ERROR(Status)) {
return Status;
}
-
+
PxeBcParseDhcp4Packet (&Private->ProxyOffer.Dhcp4);
//
@@ -871,7 +871,7 @@ PxeBcCacheDhcp4Offer (
//
Private->OfferIndex[OfferType][Private->OfferCount[OfferType]] = Private->OfferNum;
Private->OfferCount[OfferType]++;
- } else if ((OfferType == PxeOfferTypeProxyPxe10 || OfferType == PxeOfferTypeProxyWfm11a) &&
+ } else if ((OfferType == PxeOfferTypeProxyPxe10 || OfferType == PxeOfferTypeProxyWfm11a) &&
Private->OfferCount[OfferType] < 1) {
//
// Only cache the first PXE10/WFM11a offer, and discard the others.
@@ -1274,7 +1274,7 @@ PxeBcDhcp4CallBack (
Status = EFI_ABORTED;
break;
}
-
+
if (Mode->SendGUID) {
//
// Send the system Guid instead of the MAC address as the hardware address if required.
@@ -1310,7 +1310,7 @@ PxeBcDhcp4CallBack (
case Dhcp4SelectOffer:
ASSERT (NewPacket != NULL);
-
+
//
// Select offer by the default policy or by order, and record the SelectIndex
// and SelectProxyType.
@@ -1586,7 +1586,7 @@ PxeBcDhcp4Discover (
}
}
ON_EXIT:
-
+
if (Token.ResponseList != NULL) {
FreePool (Token.ResponseList);
}
@@ -1606,7 +1606,7 @@ ON_EXIT:
**/
EFI_STATUS
-PxeBcSetIp4Policy (
+PxeBcSetIp4Policy (
IN PXEBC_PRIVATE_DATA *Private
)
{
@@ -1626,7 +1626,7 @@ PxeBcSetIp4Policy (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
if (Policy != Ip4Config2PolicyStatic) {
Policy = Ip4Config2PolicyStatic;
Status= Ip4Config2->SetData (
@@ -1637,7 +1637,7 @@ PxeBcSetIp4Policy (
);
if (EFI_ERROR (Status)) {
return Status;
- }
+ }
}
return EFI_SUCCESS;
@@ -1713,7 +1713,7 @@ PxeBcDhcp4Dora (
if (Status == EFI_TIMEOUT && Private->OfferNum > 0) {
Status = EFI_NO_RESPONSE;
}
-
+
goto ON_EXIT;
}
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h
index 27794c911a..742fdde5e7 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h
@@ -1,7 +1,7 @@
/** @file
Functions declaration related with DHCPv4 for UefiPxeBc 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
are licensed and made available under the terms and conditions of the BSD License
@@ -108,7 +108,7 @@ typedef enum {
#define IS_VALID_BOOT_SERVERS(x) \
((((x)[0]) & BIT (PXEBC_VENDOR_TAG_BOOT_SERVERS)) \
- == BIT (PXEBC_VENDOR_TAG_BOOT_SERVERS))
+ == BIT (PXEBC_VENDOR_TAG_BOOT_SERVERS))
#define IS_VALID_BOOT_PROMPT(x) \
((((x)[0]) & BIT (PXEBC_VENDOR_TAG_MENU_PROMPT)) \
@@ -346,7 +346,7 @@ PxeBcDhcp4Discover (
**/
EFI_STATUS
-PxeBcSetIp4Policy (
+PxeBcSetIp4Policy (
IN PXEBC_PRIVATE_DATA *Private
);
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
index 7c2baa8eac..c06b0242bb 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
@@ -236,13 +236,13 @@ PxeBcFreeBootFileOption (
@retval EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
@retval Others Other errors as indicated.
-
+
**/
EFI_STATUS
PxeBcDns6 (
IN PXEBC_PRIVATE_DATA *Private,
IN CHAR16 *HostName,
- OUT EFI_IPv6_ADDRESS *IpAddress
+ OUT EFI_IPv6_ADDRESS *IpAddress
)
{
EFI_STATUS Status;
@@ -252,7 +252,7 @@ PxeBcDns6 (
EFI_HANDLE Dns6Handle;
EFI_IPv6_ADDRESS *DnsServerList;
BOOLEAN IsDone;
-
+
Dns6 = NULL;
Dns6Handle = NULL;
DnsServerList = Private->DnsServer;
@@ -269,8 +269,8 @@ PxeBcDns6 (
);
if (EFI_ERROR (Status)) {
goto Exit;
- }
-
+ }
+
Status = gBS->OpenProtocol (
Dns6Handle,
&gEfiDns6ProtocolGuid,
@@ -331,7 +331,7 @@ PxeBcDns6 (
//
// Name resolution is done, check result.
//
- Status = Token.Status;
+ Status = Token.Status;
if (!EFI_ERROR (Status)) {
if (Token.RspData.H2AData == NULL) {
Status = EFI_DEVICE_ERROR;
@@ -347,7 +347,7 @@ PxeBcDns6 (
IP6_COPY_ADDRESS (IpAddress, Token.RspData.H2AData->IpList);
Status = EFI_SUCCESS;
}
-
+
Exit:
FreePool (HostName);
@@ -363,7 +363,7 @@ Exit:
if (Dns6 != NULL) {
Dns6->Configure (Dns6, NULL);
-
+
gBS->CloseProtocol (
Dns6Handle,
&gEfiDns6ProtocolGuid,
@@ -384,8 +384,8 @@ Exit:
if (DnsServerList != NULL) {
FreePool (DnsServerList);
}
-
- return Status;
+
+ return Status;
}
/**
@@ -474,14 +474,14 @@ PxeBcExtractBootFileUrl (
while (*ServerAddress != '\0' && *ServerAddress != PXEBC_ADDR_END_DELIMITER) {
ServerAddress++;
}
-
+
if (*ServerAddress != PXEBC_ADDR_END_DELIMITER) {
FreePool (TmpStr);
return EFI_INVALID_PARAMETER;
}
-
+
*ServerAddress = '\0';
-
+
//
// Convert the string of server address to Ipv6 address format and store it.
//
@@ -941,7 +941,7 @@ PxeBcRequestBootService (
//
// Find Server ID Option from ProxyOffer.
//
- if (Private->OfferBuffer[Index].Dhcp6.OfferType == PxeOfferTypeProxyBinl) {
+ if (Private->OfferBuffer[Index].Dhcp6.OfferType == PxeOfferTypeProxyBinl) {
Option = PxeBcDhcp6SeekOption (
IndexOffer->Dhcp6.Option,
IndexOffer->Length - 4,
@@ -950,7 +950,7 @@ PxeBcRequestBootService (
if (Option == NULL) {
return EFI_NOT_FOUND;
}
-
+
//
// Add Server ID Option.
//
@@ -979,7 +979,7 @@ PxeBcRequestBootService (
}
//
- // Update Elapsed option in the package
+ // Update Elapsed option in the package
//
Option = PxeBcDhcp6SeekOption (
Discover->DhcpOptions,
@@ -989,7 +989,7 @@ PxeBcRequestBootService (
if (Option != NULL) {
CalcElapsedTime (Private);
WriteUnaligned16 ((UINT16*)(Option + 4), HTONS((UINT16) Private->ElapsedTime));
- }
+ }
Status = PxeBc->UdpWrite (
PxeBc,
@@ -1023,7 +1023,7 @@ PxeBcRequestBootService (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
Status = PxeBc->UdpRead (
PxeBc,
EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP | EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP,
@@ -1051,7 +1051,7 @@ PxeBcRequestBootService (
Reply->Length = (UINT32) ReadSize;
return EFI_SUCCESS;
-
+
ON_ERROR:
if (Discover != NULL) {
FreePool (Discover);
@@ -1208,7 +1208,7 @@ PxeBcCacheDhcp6Offer (
//
Private->OfferIndex[OfferType][Private->OfferCount[OfferType]] = Private->OfferNum;
Private->OfferCount[OfferType]++;
- } else if ((OfferType == PxeOfferTypeProxyPxe10 || OfferType == PxeOfferTypeProxyWfm11a) &&
+ } else if ((OfferType == PxeOfferTypeProxyPxe10 || OfferType == PxeOfferTypeProxyWfm11a) &&
Private->OfferCount[OfferType] < 1) {
//
// Only cache the first PXE10/WFM11a offer, and discard the others.
@@ -1499,7 +1499,7 @@ PxeBcUnregisterIp6Address (
/**
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
route is found in IP6 route table, the address will be filed in GatewayAddr and return.
@@ -1510,7 +1510,7 @@ PxeBcUnregisterIp6Address (
@retval EFI_SUCCESS Found a valid gateway address successfully.
@retval EFI_TIMEOUT The operation is time out.
@retval Other Unexpect error happened.
-
+
**/
EFI_STATUS
PxeBcCheckRouteTable (
@@ -1571,13 +1571,13 @@ PxeBcCheckRouteTable (
if (Ip6ModeData.IcmpTypeList != NULL) {
FreePool (Ip6ModeData.IcmpTypeList);
}
-
+
if (GatewayIsFound || RetryCount == TimeOutInSecond) {
break;
}
-
+
RetryCount++;
-
+
//
// Delay 1 second then recheck it again.
//
@@ -1602,19 +1602,19 @@ PxeBcCheckRouteTable (
Ip6->Poll (Ip6);
}
}
-
+
ON_EXIT:
if (TimeOutEvt != NULL) {
gBS->CloseEvent (TimeOutEvt);
}
-
+
if (GatewayIsFound) {
Status = EFI_SUCCESS;
} else if (RetryCount == TimeOutInSecond) {
Status = EFI_TIMEOUT;
}
- return Status;
+ return Status;
}
/**
@@ -1668,7 +1668,7 @@ PxeBcRegisterIp6Address (
if (EFI_ERROR (Status)) {
NoGateway = TRUE;
}
-
+
//
// There is no channel between IP6 and PXE driver about address setting,
// so it has to set the new address by Ip6ConfigProtocol manually.
@@ -1767,7 +1767,7 @@ PxeBcRegisterIp6Address (
goto ON_EXIT;
}
}
-
+
//
// Set the default gateway address back if needed.
//
@@ -1854,7 +1854,7 @@ PxeBcSetIp6Policy (
/**
This function will register the station IP address and flush IP instance to start using the new IP address.
-
+
@param[in] Private The pointer to PXEBC_PRIVATE_DATA.
@retval EFI_SUCCESS The new IP address has been configured successfully.
@@ -1868,7 +1868,7 @@ PxeBcSetIp6Address (
{
EFI_STATUS Status;
EFI_DHCP6_PROTOCOL *Dhcp6;
-
+
Dhcp6 = Private->Dhcp6;
CopyMem (&Private->StationIp.v6, &Private->TmpStationIp.v6, sizeof (EFI_IPv6_ADDRESS));
@@ -1972,7 +1972,7 @@ PxeBcDhcp6CallBack (
Status = EFI_ABORTED;
break;
}
-
+
//
// Record the first Solicate msg time
//
@@ -2011,7 +2011,7 @@ PxeBcDhcp6CallBack (
Status = EFI_ABORTED;
break;
}
-
+
//
// Store the request packet as seed packet for discover.
//
@@ -2188,7 +2188,7 @@ PxeBcDhcp6Discover (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
Status = PxeBc->UdpRead (
PxeBc,
EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP,
@@ -2345,13 +2345,13 @@ PxeBcDhcp6Sarr (
}
do {
-
+
TimerStatus = gBS->CheckEvent (Timer);
if (!EFI_ERROR (TimerStatus)) {
Status = Dhcp6->Start (Dhcp6);
}
} while (TimerStatus == EFI_NOT_READY);
-
+
gBS->CloseEvent (Timer);
}
if (EFI_ERROR (Status)) {
@@ -2376,7 +2376,7 @@ PxeBcDhcp6Sarr (
// DHCP6 doesn't have an option to specify the router address on the subnet, the only way to get the
// router address in IP6 is the router discovery mechanism (the RS and RA, which only be handled when
// the IP policy is Automatic). So we just hold the station IP address here and leave the IP policy as
- // Automatic, until we get the server IP address. This could let IP6 driver finish the router discovery
+ // Automatic, until we get the server IP address. This could let IP6 driver finish the router discovery
// to find a valid router address.
//
CopyMem (&Private->TmpStationIp.v6, &Mode.Ia->IaAddress[0].IpAddress, sizeof (EFI_IPv6_ADDRESS));
@@ -2394,6 +2394,6 @@ PxeBcDhcp6Sarr (
Dhcp6->Stop (Dhcp6);
return Status;
}
-
+
return EFI_SUCCESS;
}
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.h b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.h
index 39efcfaa77..f3dcd89743 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.h
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.h
@@ -1,7 +1,7 @@
/** @file
Functions declaration related with DHCPv6 for UefiPxeBc 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
are licensed and made available under the terms and conditions of the BSD License
@@ -253,7 +253,7 @@ PxeBcSetIp6Policy (
/**
This function will register the station IP address and flush IP instance to start using the new IP address.
-
+
@param[in] Private The pointer to PXEBC_PRIVATE_DATA.
@retval EFI_SUCCESS The new IP address has been configured successfully.
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c b/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c
index 8dd787be1a..bc9dc914f3 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c
@@ -256,7 +256,7 @@ PxeBcDestroyIp4Children (
);
FreePool (Private->Ip4Nic->DevicePath);
- if (Private->Snp != NULL) {
+ if (Private->Snp != NULL) {
//
// Close SNP from the child virtual handle
//
@@ -266,7 +266,7 @@ PxeBcDestroyIp4Children (
This->DriverBindingHandle,
Private->Ip4Nic->Controller
);
-
+
gBS->UninstallProtocolInterface (
Private->Ip4Nic->Controller,
&gEfiSimpleNetworkProtocolGuid,
@@ -416,7 +416,7 @@ PxeBcDestroyIp6Children (
NULL
);
FreePool (Private->Ip6Nic->DevicePath);
-
+
if (Private->Snp != NULL) {
//
// Close SNP from the child virtual handle
@@ -489,7 +489,7 @@ PxeBcCheckIpv6Support (
//
// Get the NIC handle by SNP protocol.
- //
+ //
Handle = NetLibGetSnpHandle (ControllerHandle, NULL);
if (Handle == NULL) {
return EFI_NOT_FOUND;
@@ -535,7 +535,7 @@ PxeBcCheckIpv6Support (
if (EFI_ERROR (Status) || InfoBlock == NULL) {
FreePool (InfoBlock);
return EFI_NOT_FOUND;
- }
+ }
*Ipv6Support = ((EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT *) InfoBlock)->Ipv6Support;
FreePool (InfoBlock);
@@ -814,7 +814,7 @@ PxeBcCreateIp4Children (
}
//
- // Open SNP on the child handle BY_DRIVER. It will prevent any additionally
+ // Open SNP on the child handle BY_DRIVER. It will prevent any additionally
// layering to perform the experiment.
//
Status = gBS->OpenProtocol (
@@ -951,7 +951,7 @@ PxeBcCreateIp6Children (
if (Private->Snp != NULL) {
for (Index = 0; Index < Private->Snp->Mode->HwAddressSize; Index++) {
Private->IaId |= (Private->Snp->Mode->CurrentAddress.Addr[Index] << ((Index << 3) & 31));
- }
+ }
}
//
@@ -1140,7 +1140,7 @@ PxeBcCreateIp6Children (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
if (Private->Snp != NULL) {
//
// Install SNP protocol on purpose is for some OS loader backward
@@ -1157,7 +1157,7 @@ PxeBcCreateIp6Children (
}
//
- // Open SNP on the child handle BY_DRIVER. It will prevent any additionally
+ // Open SNP on the child handle BY_DRIVER. It will prevent any additionally
// layering to perform the experiment.
//
Status = gBS->OpenProtocol (
@@ -1293,7 +1293,7 @@ PxeBcDriverEntryPoint (
@param[in] RemainingDevicePath Optional parameter used to pick a specific child
device to be started.
@param[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
-
+
@retval EFI_SUCCESS This driver supports this device.
@retval EFI_UNSUPPORTED This driver does not support this device.
@@ -1310,7 +1310,7 @@ PxeBcSupported (
EFI_STATUS Status;
EFI_GUID *DhcpServiceBindingGuid;
EFI_GUID *MtftpServiceBindingGuid;
-
+
if (IpVersion == IP_VERSION_4) {
DhcpServiceBindingGuid = &gEfiDhcp4ServiceBindingProtocolGuid;
MtftpServiceBindingGuid = &gEfiMtftp4ServiceBindingProtocolGuid;
@@ -1453,7 +1453,7 @@ PxeBcStart (
//
// Install PxeBaseCodePrivate protocol onto the real NIC handler.
- // PxeBaseCodePrivate protocol is only used to keep the relationship between
+ // PxeBaseCodePrivate protocol is only used to keep the relationship between
// NIC handle and virtual child handles.
// gEfiCallerIdGuid will be used as its protocol guid.
//
@@ -1470,7 +1470,7 @@ PxeBcStart (
//
// Try to locate SNP protocol.
//
- NetLibGetSnpHandle(ControllerHandle, &Private->Snp);
+ NetLibGetSnpHandle(ControllerHandle, &Private->Snp);
}
if (IpVersion == IP_VERSION_4) {
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c
index b828d24288..13396903f5 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c
@@ -91,7 +91,7 @@ EfiPxeBcStart (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
//
// Configure block size for TFTP as a default value to handle all link layers.
//
@@ -144,7 +144,7 @@ EfiPxeBcStart (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
//
// Configure block size for TFTP as a default value to handle all link layers.
//
@@ -206,10 +206,10 @@ EfiPxeBcStart (
}
//
- //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
- //configuration and has not been completed, the Dhcp4 state machine
- //will not be in the right state for the PXE to start a new round D.O.R.A.
+ //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
+ //configuration and has not been completed, the Dhcp4 state machine
+ //will not be in the right state for the PXE to start a new round D.O.R.A.
//so we need to switch it's policy to static.
//
Status = PxeBcSetIp4Policy (Private);
@@ -745,13 +745,13 @@ ON_EXIT:
if (NewCreatedInfo != NULL && NewCreatedInfo != &DefaultInfo) {
FreePool (NewCreatedInfo);
}
-
+
if (Mode->UsingIpv6) {
Private->Udp6Read->Configure (Private->Udp6Read, &Private->Udp6CfgData);
} else {
Private->Udp4Read->Configure (Private->Udp4Read, &Private->Udp4CfgData);
}
-
+
//
// Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP
// receive filter list emptied and the filter set to EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP.
@@ -1093,7 +1093,7 @@ EfiPxeBcUdpWrite (
DoNotFragment = TRUE;
}
- if (!Mode->UsingIpv6 && GatewayIp != NULL && Mode->SubnetMask.Addr[0] != 0 &&
+ if (!Mode->UsingIpv6 && GatewayIp != NULL && Mode->SubnetMask.Addr[0] != 0 &&
!NetIp4IsUnicast (NTOHL (GatewayIp->Addr[0]), EFI_NTOHL(Mode->SubnetMask))) {
//
// Gateway is provided but it's not a unicast IPv4 address, while it will be ignored for IPv6.
@@ -1659,13 +1659,13 @@ EfiPxeBcSetIpFilter (
//
Udp4Cfg = &Private->Udp4CfgData;
if ((AcceptPromiscuous != Udp4Cfg->AcceptPromiscuous) ||
- (AcceptBroadcast != Udp4Cfg->AcceptBroadcast) || MultiCastUpdate) {
+ (AcceptBroadcast != Udp4Cfg->AcceptBroadcast) || MultiCastUpdate) {
//
// Clear the UDP4 instance configuration, all joined groups will be left
// during the operation.
//
Private->Udp4Read->Configure (Private->Udp4Read, NULL);
-
+
//
// Configure the UDP instance with the new configuration.
//
@@ -1675,7 +1675,7 @@ EfiPxeBcSetIpFilter (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
//
// In not Promiscuous mode, need to join the new multicast group.
//
@@ -1704,7 +1704,7 @@ EfiPxeBcSetIpFilter (
// during the operation.
//
Private->Udp6Read->Configure (Private->Udp6Read, NULL);
-
+
//
// Configure the UDP instance with the new configuration.
//
@@ -1713,7 +1713,7 @@ EfiPxeBcSetIpFilter (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
//
// In not Promiscuous mode, need to join the new multicast group.
//
@@ -2023,13 +2023,13 @@ EfiPxeBcSetStationIP (
}
if (!Mode->UsingIpv6 && NewStationIp != NULL) {
- if (IP4_IS_UNSPECIFIED(NTOHL (NewStationIp->Addr[0])) ||
+ if (IP4_IS_UNSPECIFIED(NTOHL (NewStationIp->Addr[0])) ||
IP4_IS_LOCAL_BROADCAST(NTOHL (NewStationIp->Addr[0])) ||
(NewSubnetMask != NULL && NewSubnetMask->Addr[0] != 0 && !NetIp4IsUnicast (NTOHL (NewStationIp->Addr[0]), NTOHL (NewSubnetMask->Addr[0])))) {
return EFI_INVALID_PARAMETER;
}
}
-
+
if (!Mode->Started) {
return EFI_NOT_STARTED;
}
@@ -2058,7 +2058,7 @@ EfiPxeBcSetStationIP (
if (!EFI_ERROR (Status)) {
Private->IsAddressOk = TRUE;
}
-
+
ON_EXIT:
return Status;
}
@@ -2343,14 +2343,14 @@ EfiPxeLoadFile (
if (This == NULL || BufferSize == NULL || FilePath == NULL || !IsDevicePathEnd (FilePath)) {
return EFI_INVALID_PARAMETER;
}
-
+
//
// Only support BootPolicy
//
if (!BootPolicy) {
return EFI_UNSUPPORTED;
}
-
+
VirtualNic = PXEBC_VIRTUAL_NIC_FROM_LOADFILE (This);
Private = VirtualNic->Private;
PxeBc = &Private->PxeBc;
@@ -2403,7 +2403,7 @@ EfiPxeLoadFile (
} else {
//
// The DHCP4 can have only one configured child instance so we need to stop
- // reset the DHCP4 child before we return. Otherwise these programs which
+ // reset the DHCP4 child before we return. Otherwise these programs which
// also need to use DHCP4 will be impacted.
//
if (!PxeBc->Mode->UsingIpv6) {
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.h b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.h
index 7f1ecfbe6b..0bb5d51e93 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.h
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.h
@@ -2,7 +2,7 @@
This EFI_PXE_BASE_CODE_PROTOCOL and EFI_LOAD_FILE_PROTOCOL.
interfaces declaration.
- Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2007 - 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
@@ -107,7 +107,7 @@ struct _PXEBC_PRIVATE_DATA {
EFI_HANDLE Image;
PXEBC_PRIVATE_PROTOCOL Id;
- EFI_SIMPLE_NETWORK_PROTOCOL *Snp;
+ EFI_SIMPLE_NETWORK_PROTOCOL *Snp;
PXEBC_VIRTUAL_NIC *Ip4Nic;
PXEBC_VIRTUAL_NIC *Ip6Nic;
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c b/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c
index 4b6f8c9c7f..60509fc9e6 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c
@@ -48,7 +48,7 @@ PxeBcFlushStationIp (
//
CopyMem (&Private->Udp6CfgData.StationAddress, StationIp, sizeof (EFI_IPv6_ADDRESS));
CopyMem (&Private->Ip6CfgData.StationAddress, StationIp, sizeof (EFI_IPv6_ADDRESS));
-
+
//
// Reconfigure the Ip6 instance to capture background ICMP6 packets with new station Ip address.
//
@@ -79,7 +79,7 @@ PxeBcFlushStationIp (
CopyMem (&Private->Udp4CfgData.StationAddress, StationIp, sizeof (EFI_IPv4_ADDRESS));
CopyMem (&Private->Ip4CfgData.StationAddress, StationIp, sizeof (EFI_IPv4_ADDRESS));
}
-
+
if (SubnetMask != NULL) {
//
// Overwrite Udp4CfgData/Ip4CfgData SubnetMask.
@@ -97,7 +97,7 @@ PxeBcFlushStationIp (
Mode->RouteTable[0].SubnetMask.Addr[0] = SubnetMask->Addr[0];
Mode->RouteTable[0].GwAddr.Addr[0] = 0;
}
-
+
if (StationIp != NULL || SubnetMask != NULL) {
//
// Reconfigure the Ip4 instance to capture background ICMP packets with new station Ip address.
@@ -306,7 +306,7 @@ PxeBcIcmpErrorDpcHandle (
//
goto ON_RECYCLE;
}
-
+
//
// The protocol has been configured to only receive ICMP packet.
//
@@ -482,7 +482,7 @@ PxeBcIcmp6ErrorDpcHandle (
ON_RECYCLE:
gBS->SignalEvent (RxData->RecycleSignal);
-
+
ON_EXIT:
Private->Icmp6Token.Status = EFI_NOT_READY;
Ip6->Receive (Ip6, &Private->Icmp6Token);
@@ -517,7 +517,7 @@ PxeBcIcmp6ErrorUpdate (
@param[in, out] SrcPort The pointer to the source port.
@param[in] DoNotFragment If TRUE, fragment is not enabled.
Otherwise, fragment is enabled.
- @param[in] Ttl The time to live field of the IP header.
+ @param[in] Ttl The time to live field of the IP header.
@param[in] ToS The type of service field of the IP header.
@retval EFI_SUCCESS Successfully configured this instance.
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.h b/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.h
index 17bee5c279..3f1a22ba8b 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.h
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.h
@@ -1,7 +1,7 @@
/** @file
Support functions declaration for UefiPxeBc Driver.
- Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2007 - 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
@@ -135,7 +135,7 @@ PxeBcIcmp6ErrorUpdate (
@param[in, out] SrcPort The pointer to the source port.
@param[in] DoNotFragment If TRUE, fragment is not enabled.
Otherwise, fragment is enabled.
- @param[in] Ttl The time to live field of the IP header.
+ @param[in] Ttl The time to live field of the IP header.
@param[in] ToS The type of service field of the IP header.
@retval EFI_SUCCESS Successfully configured this instance.
@@ -453,7 +453,7 @@ PxeBcUintnToAscDecWithFormat (
@param[in] Number Numeric value to be converted.
@param[in] Buffer Pointer to the buffer for ASCII string.
@param[in] BufferSize The maxsize of the buffer.
-
+
@return Length The actual length of the ASCII string.
**/
diff --git a/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf b/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
index 6d1102b6b7..d95cf06ab1 100644
--- a/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+++ b/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
@@ -1,12 +1,12 @@
## @file
# Access PXE-compatible devices for network access and network booting.
-#
+#
# This driver provides PXE Base Code Protocol which is used to accessing
# PXE-compatible device for network access or booting. It could work together
# with an IPv4 stack, an IPv6 stack or both.
#
#
-# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 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
@@ -73,7 +73,7 @@
[Protocols]
## TO_START
## SOMETIMES_CONSUMES
- gEfiDevicePathProtocolGuid
+ gEfiDevicePathProtocolGuid
gEfiNetworkInterfaceIdentifierProtocolGuid_31 ## SOMETIMES_CONSUMES
gEfiArpServiceBindingProtocolGuid ## TO_START
gEfiArpProtocolGuid ## TO_START
diff --git a/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.uni b/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.uni
index 1a1c9593a4..d84ec8534b 100644
--- a/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.uni
+++ b/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.uni
@@ -5,13 +5,13 @@
// PXE-compatible device for network access or booting. It could work together
// with an IPv4 stack, an IPv6 stack or both.
//
-// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2007 - 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
// which 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.
//
diff --git a/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxeExtra.uni b/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxeExtra.uni
index ef45972576..6aeed63290 100644
--- a/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxeExtra.uni
+++ b/NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxeExtra.uni
@@ -1,7 +1,7 @@
// /** @file
// UefiPxeBcDxe 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
// are licensed and made available under the terms and conditions of the BSD License
@@ -13,8 +13,8 @@
//
// **/
-#string STR_PROPERTIES_MODULE_NAME
-#language en-US
+#string STR_PROPERTIES_MODULE_NAME
+#language en-US
"Uefi PXE DXE"