]> git.proxmox.com Git - mirror_edk2.git/commitdiff
NetworkPkg: Clean up source files
authorLiming Gao <liming.gao@intel.com>
Wed, 27 Jun 2018 13:12:32 +0000 (21:12 +0800)
committerLiming Gao <liming.gao@intel.com>
Thu, 28 Jun 2018 03:19:49 +0000 (11:19 +0800)
1. Do not use tab characters
2. No trailing white space in one line
3. All files must end with CRLF

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
180 files changed:
NetworkPkg/Application/IpsecConfig/Indexer.c
NetworkPkg/Application/IpsecConfig/IpSecConfig.inf
NetworkPkg/Application/IpsecConfig/IpSecConfig.uni
NetworkPkg/Application/IpsecConfig/IpSecConfigExtra.uni
NetworkPkg/Application/IpsecConfig/Match.h
NetworkPkg/Application/IpsecConfig/PolicyEntryOperation.c
NetworkPkg/Application/VConfig/VConfig.c
NetworkPkg/Application/VConfig/VConfig.uni
NetworkPkg/Application/VConfig/VConfigExtra.uni
NetworkPkg/Dhcp6Dxe/ComponentName.c
NetworkPkg/Dhcp6Dxe/Dhcp6Driver.c
NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.uni
NetworkPkg/Dhcp6Dxe/Dhcp6DxeExtra.uni
NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c
NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h
NetworkPkg/Dhcp6Dxe/Dhcp6Io.c
NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c
NetworkPkg/DnsDxe/ComponentName.c
NetworkPkg/DnsDxe/DnsDhcp.c
NetworkPkg/DnsDxe/DnsDhcp.h
NetworkPkg/DnsDxe/DnsDriver.c
NetworkPkg/DnsDxe/DnsDriver.h
NetworkPkg/DnsDxe/DnsDxe.inf
NetworkPkg/DnsDxe/DnsDxe.uni
NetworkPkg/DnsDxe/DnsDxeExtra.uni
NetworkPkg/DnsDxe/DnsImpl.c
NetworkPkg/DnsDxe/DnsImpl.h
NetworkPkg/DnsDxe/DnsProtocol.c
NetworkPkg/HttpBootDxe/HttpBootClient.c
NetworkPkg/HttpBootDxe/HttpBootClient.h
NetworkPkg/HttpBootDxe/HttpBootComponentName.c
NetworkPkg/HttpBootDxe/HttpBootComponentName.h
NetworkPkg/HttpBootDxe/HttpBootConfig.c
NetworkPkg/HttpBootDxe/HttpBootConfigVfr.vfr
NetworkPkg/HttpBootDxe/HttpBootDhcp4.c
NetworkPkg/HttpBootDxe/HttpBootDhcp4.h
NetworkPkg/HttpBootDxe/HttpBootDhcp6.c
NetworkPkg/HttpBootDxe/HttpBootDhcp6.h
NetworkPkg/HttpBootDxe/HttpBootDxe.c
NetworkPkg/HttpBootDxe/HttpBootDxe.h
NetworkPkg/HttpBootDxe/HttpBootDxe.inf
NetworkPkg/HttpBootDxe/HttpBootDxe.uni
NetworkPkg/HttpBootDxe/HttpBootDxeExtra.uni
NetworkPkg/HttpBootDxe/HttpBootImpl.c
NetworkPkg/HttpBootDxe/HttpBootImpl.h
NetworkPkg/HttpBootDxe/HttpBootSupport.c
NetworkPkg/HttpBootDxe/HttpBootSupport.h
NetworkPkg/HttpDxe/ComponentName.c
NetworkPkg/HttpDxe/HttpDns.c
NetworkPkg/HttpDxe/HttpDns.h
NetworkPkg/HttpDxe/HttpDriver.c
NetworkPkg/HttpDxe/HttpDriver.h
NetworkPkg/HttpDxe/HttpDxe.inf
NetworkPkg/HttpDxe/HttpDxe.uni
NetworkPkg/HttpDxe/HttpDxeExtra.uni
NetworkPkg/HttpDxe/HttpImpl.c
NetworkPkg/HttpDxe/HttpImpl.h
NetworkPkg/HttpDxe/HttpProto.c
NetworkPkg/HttpDxe/HttpProto.h
NetworkPkg/HttpDxe/HttpsSupport.c
NetworkPkg/HttpDxe/HttpsSupport.h
NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.c
NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.uni
NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxeExtra.uni
NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c
NetworkPkg/IScsiDxe/ComponentName.c
NetworkPkg/IScsiDxe/IScsiCHAP.c
NetworkPkg/IScsiDxe/IScsiCHAP.h
NetworkPkg/IScsiDxe/IScsiConfig.c
NetworkPkg/IScsiDxe/IScsiConfigStrings.uni
NetworkPkg/IScsiDxe/IScsiConfigVfr.vfr
NetworkPkg/IScsiDxe/IScsiDhcp.c
NetworkPkg/IScsiDxe/IScsiDhcp6.c
NetworkPkg/IScsiDxe/IScsiDns.h
NetworkPkg/IScsiDxe/IScsiDriver.c
NetworkPkg/IScsiDxe/IScsiDriver.h
NetworkPkg/IScsiDxe/IScsiDxe.inf
NetworkPkg/IScsiDxe/IScsiDxe.uni
NetworkPkg/IScsiDxe/IScsiDxeExtra.uni
NetworkPkg/IScsiDxe/IScsiExtScsiPassThru.c
NetworkPkg/IScsiDxe/IScsiIbft.c
NetworkPkg/IScsiDxe/IScsiIbft.h
NetworkPkg/IScsiDxe/IScsiImpl.h
NetworkPkg/IScsiDxe/IScsiMisc.c
NetworkPkg/IScsiDxe/IScsiMisc.h
NetworkPkg/IScsiDxe/IScsiProto.c
NetworkPkg/IScsiDxe/IScsiProto.h
NetworkPkg/Include/Guid/HttpBootConfigHii.h
NetworkPkg/Include/Guid/HttpTlsCipherList.h
NetworkPkg/Include/Guid/IScsiConfigHii.h
NetworkPkg/Include/Guid/Ip6ConfigHii.h
NetworkPkg/Ip6Dxe/ComponentName.c
NetworkPkg/Ip6Dxe/Ip6Common.c
NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h
NetworkPkg/Ip6Dxe/Ip6ConfigNv.c
NetworkPkg/Ip6Dxe/Ip6Driver.c
NetworkPkg/Ip6Dxe/Ip6Dxe.inf
NetworkPkg/Ip6Dxe/Ip6Dxe.uni
NetworkPkg/Ip6Dxe/Ip6DxeExtra.uni
NetworkPkg/Ip6Dxe/Ip6Icmp.c
NetworkPkg/Ip6Dxe/Ip6If.c
NetworkPkg/Ip6Dxe/Ip6Input.c
NetworkPkg/Ip6Dxe/Ip6Nd.c
NetworkPkg/IpSecDxe/ComponentName.c
NetworkPkg/IpSecDxe/IetfConstants.c
NetworkPkg/IpSecDxe/Ike.h
NetworkPkg/IpSecDxe/IkeCommon.c
NetworkPkg/IpSecDxe/IkeCommon.h
NetworkPkg/IpSecDxe/IkePacket.c
NetworkPkg/IpSecDxe/IkePacket.h
NetworkPkg/IpSecDxe/IkeService.c
NetworkPkg/IpSecDxe/Ikev2/ChildSa.c
NetworkPkg/IpSecDxe/Ikev2/Exchange.c
NetworkPkg/IpSecDxe/Ikev2/Ikev2.h
NetworkPkg/IpSecDxe/Ikev2/Info.c
NetworkPkg/IpSecDxe/Ikev2/Payload.c
NetworkPkg/IpSecDxe/Ikev2/Payload.h
NetworkPkg/IpSecDxe/Ikev2/Sa.c
NetworkPkg/IpSecDxe/Ikev2/Utility.c
NetworkPkg/IpSecDxe/Ikev2/Utility.h
NetworkPkg/IpSecDxe/IpSecConfigImpl.c
NetworkPkg/IpSecDxe/IpSecConfigImpl.h
NetworkPkg/IpSecDxe/IpSecCryptIo.c
NetworkPkg/IpSecDxe/IpSecCryptIo.h
NetworkPkg/IpSecDxe/IpSecDebug.c
NetworkPkg/IpSecDxe/IpSecDebug.h
NetworkPkg/IpSecDxe/IpSecDriver.c
NetworkPkg/IpSecDxe/IpSecDxe.inf
NetworkPkg/IpSecDxe/IpSecDxe.uni
NetworkPkg/IpSecDxe/IpSecDxeExtra.uni
NetworkPkg/IpSecDxe/IpSecImpl.c
NetworkPkg/IpSecDxe/IpSecImpl.h
NetworkPkg/IpSecDxe/IpSecMain.c
NetworkPkg/Mtftp6Dxe/ComponentName.c
NetworkPkg/Mtftp6Dxe/Mtftp6Driver.c
NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.uni
NetworkPkg/Mtftp6Dxe/Mtftp6Support.c
NetworkPkg/NetworkPkg.dec
NetworkPkg/NetworkPkg.dsc
NetworkPkg/NetworkPkg.uni
NetworkPkg/NetworkPkgExtra.uni
NetworkPkg/TcpDxe/ComponentName.c
NetworkPkg/TcpDxe/SockImpl.c
NetworkPkg/TcpDxe/SockImpl.h
NetworkPkg/TcpDxe/SockInterface.c
NetworkPkg/TcpDxe/TcpDispatcher.c
NetworkPkg/TcpDxe/TcpDriver.c
NetworkPkg/TcpDxe/TcpDxe.inf
NetworkPkg/TcpDxe/TcpDxe.uni
NetworkPkg/TcpDxe/TcpDxeExtra.uni
NetworkPkg/TcpDxe/TcpInput.c
NetworkPkg/TcpDxe/TcpMain.c
NetworkPkg/TcpDxe/TcpOutput.c
NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.c
NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
NetworkPkg/TlsDxe/TlsImpl.c
NetworkPkg/Udp6Dxe/ComponentName.c
NetworkPkg/Udp6Dxe/Udp6Driver.c
NetworkPkg/Udp6Dxe/Udp6Dxe.inf
NetworkPkg/Udp6Dxe/Udp6Dxe.uni
NetworkPkg/Udp6Dxe/Udp6DxeExtra.uni
NetworkPkg/Udp6Dxe/Udp6Impl.c
NetworkPkg/Udp6Dxe/Udp6Impl.h
NetworkPkg/Udp6Dxe/Udp6Main.c
NetworkPkg/UefiPxeBcDxe/ComponentName.c
NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c
NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c
NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h
NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.h
NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c
NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c
NetworkPkg/UefiPxeBcDxe/PxeBcImpl.h
NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c
NetworkPkg/UefiPxeBcDxe/PxeBcSupport.h
NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.uni
NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxeExtra.uni

index 353b22e06a8777118b35d9b9b8c622ead8b41060..56d2bfe1e9d83cc5403793aad8a881a8f567caf7 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The implementation of construct ENTRY_INDEXER in IpSecConfig application.\r
 \r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -50,7 +50,7 @@ ConstructSpdIndexer (
   if (ValueStr == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   Value64 = StrToUInteger (ValueStr, &Status);\r
   if (!EFI_ERROR (Status)) {\r
     Indexer->Index = (UINTN) Value64;\r
index 02371e535da758b4498e2f8fb876183a0dcb0bc4..a9c9bb7eaed6871f83c913a45009e4f8cdaabc94 100644 (file)
@@ -1,10 +1,10 @@
 ## @file\r
 #  Shell application IpSecConfig.\r
-#  \r
+#\r
 #  This application is used to set and retrieve security and policy related information\r
 #  for the EFI IPsec protocol driver.\r
 #\r
-#  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
index 3dab95869904928e4255ed2abb4360abf35e4925..92599ff221487a1a96e2b7e02387681080de364a 100644 (file)
@@ -4,13 +4,13 @@
 // This application is used to set and retrieve security and policy related information\r
 // for the EFI IPsec protocol driver.\r
 //\r
-// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
 // which accompanies this distribution. The full text of the license may be found at\r
 // http://opensource.org/licenses/bsd-license.php.\r
-// \r
+//\r
 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 //\r
index 53008576c0a3ca9d64205ba91d4ca886732f56d9..88e1d758544f770da02b85de10cb8df807ac5267 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // IpSecConfig Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -13,8 +13,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "IpSec Config App"\r
 \r
 \r
index 1d73c5cfbc46ea86f4eecd77a9f3c53edc99820e..a8cc1e9a298e27a5a78934b6348118aad426766e 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
-  The internal structure and function declaration of \r
+  The internal structure and function declaration of\r
   match policy entry function in IpSecConfig application.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
index 06eb30c091c957eba788c12f5fe68a973ec82358..7ecb8adc629a5c9a7c96c22e694037da7da25a9c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The implementation of policy entry operation function in IpSecConfig application.\r
 \r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -1875,7 +1875,7 @@ EditOperatePolicyEntry (
                                Selector\r
                                );\r
       ASSERT_EFI_ERROR (Status);\r
-      \r
+\r
       if (CreateNew) {\r
         //\r
         // Edit the entry to a new one. So, we need delete the old entry.\r
index d00a041f492837bd6ea5877457b10299570b0ecf..ad2c43c3cf586fc8151e828554919ea067d82130 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Shell application for VLAN configuration.\r
 \r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -618,7 +618,7 @@ VlanConfigMain (
   EFI_STATUS    Status;\r
 \r
   mImageHandle = ImageHandle;\r
-  \r
+\r
   //\r
   // Retrieve HII package list from ImageHandle\r
   //\r
index 3647cace5181ab23c3160aebc0f17cd2b9061b4f..eba25a1889e43f29828db5e87987cf91b52358f3 100644 (file)
@@ -3,13 +3,13 @@
 //\r
 // It is shell application which is used to get and set VLAN configuration.\r
 //\r
-// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
 // which accompanies this distribution. The full text of the license may be found at\r
 // http://opensource.org/licenses/bsd-license.php.\r
-// \r
+//\r
 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 //\r
index c5fed8bc2fddf048337a19fd6e5f808de8fc968b..6179bae27adfe59c787eb0c641d72dcb880f9989 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // VConfig Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -13,8 +13,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "Vlan Config App"\r
 \r
 \r
index ba612156a09f1001807eff58127731d258799848..9b834167f535cdaf7f1a5ab0d6d1af225f944a0e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   UEFI Component Name(2) protocol implementation for Dhcp6 driver.\r
 \r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -247,10 +247,10 @@ Dhcp6ComponentNameGetDriverName (
 \r
   @param  Dhcp6[in]                   A pointer to the EFI_DHCP6_PROTOCOL.\r
 \r
-  \r
+\r
   @retval EFI_SUCCESS                 Update the ControllerNameTable of this instance successfully.\r
   @retval EFI_INVALID_PARAMETER       The input parameter is invalid.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 UpdateName (\r
@@ -272,12 +272,12 @@ UpdateName (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   if (gDhcp6ControllerNameTable != NULL) {\r
     FreeUnicodeStringTable (gDhcp6ControllerNameTable);\r
     gDhcp6ControllerNameTable = NULL;\r
   }\r
-  \r
+\r
   if (Dhcp6ModeData.Ia == NULL) {\r
     HandleName = L"DHCPv6 (No configured IA)";\r
   } else {\r
@@ -304,7 +304,7 @@ UpdateName (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   return AddUnicodeString2 (\r
            "en",\r
            gDhcp6ComponentName2.SupportedLanguages,\r
@@ -401,13 +401,13 @@ Dhcp6ComponentNameGetControllerName (
   if (ChildHandle == NULL) {\r
     return EFI_UNSUPPORTED;\r
   }\r
-  \r
-  // \r
-  // Make sure this driver produced ChildHandle \r
-  // \r
+\r
+  //\r
+  // Make sure this driver produced ChildHandle\r
+  //\r
   Status = EfiTestChildHandle (\r
              ControllerHandle,\r
-             ChildHandle, \r
+             ChildHandle,\r
              &gEfiUdp6ProtocolGuid\r
              );\r
   if (EFI_ERROR (Status)) {\r
@@ -420,7 +420,7 @@ Dhcp6ComponentNameGetControllerName (
   Status = gBS->OpenProtocol (\r
                   ChildHandle,\r
                   &gEfiDhcp6ProtocolGuid,\r
-                  (VOID **)&Dhcp6, \r
+                  (VOID **)&Dhcp6,\r
                   NULL,\r
                   NULL,\r
                   EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
index de53a1a9b4125c6723af85e163a1dd669c28eb46..eaa18fcff3df03e3acfe0d18d3502264a8eb0276 100644 (file)
@@ -2,7 +2,7 @@
   Driver Binding functions and Service Binding functions\r
   implementationfor for Dhcp6 Driver.\r
 \r
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -328,7 +328,7 @@ Dhcp6CreateInstance (
 \r
 /**\r
   Callback function which provided by user to remove one node in NetDestroyLinkList process.\r
-  \r
+\r
   @param[in]    Entry           The entry to be removed.\r
   @param[in]    Context         Pointer to the callback context corresponds to the Context in NetDestroyLinkList.\r
 \r
@@ -352,7 +352,7 @@ Dhcp6DestroyChildEntry (
 \r
   Instance = NET_LIST_USER_STRUCT_S (Entry, DHCP6_INSTANCE, Link, DHCP6_INSTANCE_SIGNATURE);\r
   ServiceBinding = (EFI_SERVICE_BINDING_PROTOCOL *) Context;\r
-  \r
+\r
   return ServiceBinding->DestroyChild (ServiceBinding, Instance->Handle);\r
 }\r
 \r
@@ -558,7 +558,7 @@ Dhcp6DriverBindingStop (
   if (!IsListEmpty (&Service->Child)) {\r
     //\r
     // Destroy all the children instances before destory the service.\r
-    //  \r
+    //\r
     List = &Service->Child;\r
     Status = NetDestroyLinkList (\r
                List,\r
@@ -591,7 +591,7 @@ Dhcp6DriverBindingStop (
     Dhcp6DestroyService (Service);\r
     Status = EFI_SUCCESS;\r
   }\r
-  \r
+\r
 ON_EXIT:\r
   return Status;\r
 }\r
index 40a6ee788991fd2e1d6cec829cf405864e1a7cdf..03c2ca1ddfed7bc3f89bff12d129aba092626664 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 #  Client-side DHCPv6 services.\r
-#  \r
+#\r
 #  This driver produces EFI DHCPv6 Protocol which is used to get IPv6 addresses\r
 #  and other configuration parameters from DHCPv6 servers.\r
 #\r
 #  (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
-#  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -74,9 +74,9 @@
   gEfiDhcp6ProtocolGuid                              ## BY_START\r
   gEfiIp6ConfigProtocolGuid                          ## TO_START\r
 \r
-[Guids]  \r
+[Guids]\r
   gZeroGuid                   ## SOMETIMES_CONSUMES   ## GUID\r
\r
+\r
 [Pcd]\r
   gEfiNetworkPkgTokenSpaceGuid.PcdDhcp6UidType       ## SOMETIMES_CONSUMES\r
 \r
index 34ecd6c6efc3fca5d8dc519f2bade3728cbefadd..ff542838f053f30932fcf060ca1e31948d43ca6f 100644 (file)
@@ -4,13 +4,13 @@
 // This driver produces EFI DHCPv6 Protocol which is used to get IPv6 addresses\r
 // and other configuration parameters from DHCPv6 servers.\r
 //\r
-// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
 // which accompanies this distribution. The full text of the license may be found at\r
 // http://opensource.org/licenses/bsd-license.php.\r
-// \r
+//\r
 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 //\r
index ca9fa0c22ea1ccc6abd1116852e74f5cc888efe8..8eb806460074f91edbc1933d37bd7ff60bf2b3d8 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // Dhcp6Dxe Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -13,8 +13,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "DHCP6 DXE"\r
 \r
 \r
index b479421f83c9b0b6dd90ce0530ef12b51ab8a1cb..9ace833b98f7a922e6dc27990ee61bfc69029f23 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This EFI_DHCP6_PROTOCOL interface implementation.\r
 \r
-  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -237,7 +237,7 @@ EfiDhcp6Stop (
     }\r
     Status = Instance->UdpSts;\r
   }\r
-  \r
+\r
 ON_EXIT:\r
   //\r
   // Clean up the session data for the released Ia.\r
@@ -678,7 +678,7 @@ EfiDhcp6InfoRequest (
       return Status;\r
     }\r
 \r
-    do {  \r
+    do {\r
       TimerStatus = gBS->CheckEvent (Timer);\r
       if (!EFI_ERROR (TimerStatus)) {\r
         Status = Dhcp6StartInfoRequest (\r
@@ -694,7 +694,7 @@ EfiDhcp6InfoRequest (
                    );\r
       }\r
     } while (TimerStatus == EFI_NOT_READY);\r
-    \r
+\r
     gBS->CloseEvent (Timer);\r
   }\r
   if (EFI_ERROR (Status)) {\r
index 7110bf88de3d91ac55c296285e5ee0b6144d0c77..f21b79668a8b0caf105d4301e9c8c3d42681f467 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Dhcp6 internal data structure and definition declaration.\r
 \r
-  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -132,7 +132,7 @@ struct _DHCP6_INSTANCE {
   BOOLEAN                       MediaPresent;\r
   //\r
   // StartTime is used to calculate the 'elapsed-time' option. Refer to RFC3315,\r
-  // the elapsed-time is amount of time since the client began its current DHCP transaction. \r
+  // the elapsed-time is amount of time since the client began its current DHCP transaction.\r
   //\r
   UINT64                        StartTime;\r
 };\r
index 5cdeac6d5cfe30bfbe67e1e685323c185361a76e..5ad2ac38bf89376bb716d8084d53470c1386b6ed 100644 (file)
@@ -2,7 +2,7 @@
   Dhcp6 internal functions implementation.\r
 \r
   (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -372,7 +372,7 @@ Dhcp6CleanupRetry (
 \r
   @retval   TRUE      The control block is in Instance's retry list.\r
   @retval   FALSE     The control block is NOT in Instance's retry list.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 Dhcp6IsValidTxCb (\r
@@ -1767,12 +1767,12 @@ Dhcp6StartInfoRequest (
   if (EFI_ERROR (Status) && (Status != EFI_ALREADY_STARTED)) {\r
     goto ON_ERROR;\r
   }\r
-  \r
+\r
   gBS->RestoreTPL (OldTpl);\r
   return EFI_SUCCESS;\r
-  \r
+\r
 ON_ERROR:\r
-  gBS->RestoreTPL (OldTpl); \r
+  gBS->RestoreTPL (OldTpl);\r
   RemoveEntryList (&InfCb->Link);\r
   FreePool (InfCb);\r
 \r
@@ -1896,7 +1896,7 @@ Dhcp6SendInfoRequestMsg (
   //\r
   Packet->Length += (UINT32) (Cursor - Packet->Dhcp6.Option);\r
   ASSERT (Packet->Size > Packet->Length + 8);\r
-  \r
+\r
   //\r
   // Clear initial time for current transaction.\r
   //\r
@@ -2232,15 +2232,15 @@ Dhcp6HandleReplyMsg (
       }\r
     } else if (Status == EFI_NOT_FOUND) {\r
       //\r
-      // Refer to RFC3315 Chapter 18.1.8, for each IA in the original Renew or Rebind message, \r
+      // Refer to RFC3315 Chapter 18.1.8, for each IA in the original Renew or Rebind message,\r
       // the client sends a Renew or Rebind if the IA is not in the Reply message.\r
       // Return EFI_SUCCESS so we can continue to restart the Renew/Rebind process.\r
       //\r
       return EFI_SUCCESS;\r
     }\r
-    \r
+\r
     goto ON_EXIT;\r
-    \r
+\r
   } else if (Option != NULL) {\r
     //\r
     // Any error status code option is found.\r
@@ -2289,7 +2289,7 @@ Dhcp6HandleReplyMsg (
     case Dhcp6StsNoBinding:\r
       if (Instance->IaCb.Ia->State == Dhcp6Renewing || Instance->IaCb.Ia->State == Dhcp6Rebinding) {\r
         //\r
-        // Refer to RFC3315 Chapter 18.1.8, for each IA in the original Renew or Rebind message, the client \r
+        // Refer to RFC3315 Chapter 18.1.8, for each IA in the original Renew or Rebind message, the client\r
         // sends a Request message if the IA contained a Status Code option with the NoBinding status.\r
         //\r
         Status = Dhcp6SendRequestMsg(Instance);\r
@@ -2308,7 +2308,7 @@ Dhcp6HandleReplyMsg (
   }\r
 \r
   return EFI_SUCCESS;\r
-  \r
+\r
 ON_EXIT:\r
 \r
   if (!EFI_ERROR(Status)) {\r
@@ -2318,7 +2318,7 @@ ON_EXIT:
                FALSE\r
                );\r
   }\r
-  \r
+\r
   return Status;\r
 }\r
 \r
index a65ed6d5892b59c861ab6181e632b67a37a6413d..10a99a00d4b5595c93547501d7f8a2dcbe457400 100644 (file)
@@ -2,7 +2,7 @@
   Dhcp6 support functions implementation.\r
 \r
   (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -68,7 +68,7 @@ Dhcp6GenerateClientId (
     //\r
     //\r
     //  The format of DUID-UUID:\r
-    //   \r
+    //\r
     //    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\r
     //   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\r
     //   |          DUID-Type (4)        |    UUID (128 bits)            |\r
@@ -91,16 +91,16 @@ Dhcp6GenerateClientId (
     // sizeof (Duid-type + UUID-size) = 18 bytes\r
     //\r
     Duid->Length = (UINT16) (18);\r
-  \r
+\r
     //\r
     // Set the Duid-type and copy UUID.\r
     //\r
     WriteUnaligned16 ((UINT16 *) (Duid->Duid), HTONS (Dhcp6DuidTypeUuid));\r
-  \r
+\r
     CopyMem (Duid->Duid + 2, &Uuid, sizeof(EFI_GUID));\r
 \r
   } else {\r
-      \r
+\r
     //\r
     //\r
     //  The format of DUID-LLT:\r
@@ -135,12 +135,12 @@ Dhcp6GenerateClientId (
     if (Duid == NULL) {\r
       return NULL;\r
     }\r
-  \r
+\r
     //\r
     // sizeof (Duid-type + hardware-type + time) = 8 bytes\r
     //\r
     Duid->Length = (UINT16) (Mode->HwAddressSize + 8);\r
-  \r
+\r
     //\r
     // Set the Duid-type, hardware-type, time and copy the hardware address.\r
     //\r
@@ -687,7 +687,7 @@ Dhcp6AppendIaAddrOption (
   //      .                        IAaddr-options                         .\r
   //      .                                                               .\r
   //      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\r
-  \r
+\r
   //\r
   // Fill the value of Ia Address option type\r
   //\r
@@ -1000,7 +1000,7 @@ Dhcp6SeekIaOption (
 }\r
 \r
 /**\r
-  Check whether the incoming IPv6 address in IaAddr is one of the maintained \r
+  Check whether the incoming IPv6 address in IaAddr is one of the maintained\r
   addresses in the IA control blcok.\r
 \r
   @param[in]  IaAddr            The pointer to the IA Address to be checked.\r
@@ -1019,7 +1019,7 @@ Dhcp6AddrIsInCurrentIa (
   UINT32    Index;\r
 \r
   ASSERT (IaAddr != NULL && CurrentIa != NULL);\r
-  \r
+\r
   for (Index = 0; Index < CurrentIa->IaAddressCount; Index++) {\r
     if (EFI_IP6_EQUAL(&IaAddr->IpAddress, &CurrentIa->IaAddress[Index].IpAddress)) {\r
       return TRUE;\r
@@ -1303,7 +1303,7 @@ EFI_STATUS
 Dhcp6GetMappingTimeOut (\r
   IN  EFI_IP6_CONFIG_PROTOCOL       *Ip6Cfg,\r
   OUT UINTN                         *TimeOut\r
-  ) \r
+  )\r
 {\r
   EFI_STATUS            Status;\r
   UINTN                 DataSize;\r
@@ -1323,8 +1323,8 @@ Dhcp6GetMappingTimeOut (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   *TimeOut = TICKS_PER_SECOND * DadXmits.DupAddrDetectTransmits + DHCP6_DAD_ADDITIONAL_DELAY;\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
index d976bc684984fe958284d6627a4a90a19a4c8856..cd4eea6a8bb7d9cbc14f5a1a44c72fee9d3525fd 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Implementation of EFI_COMPONENT_NAME_PROTOCOL and EFI_COMPONENT_NAME2_PROTOCOL protocol.\r
 \r
-Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -101,7 +101,7 @@ DnsComponentNameGetControllerName (
 ///\r
 /// Component Name Protocol instance\r
 ///\r
-GLOBAL_REMOVE_IF_UNREFERENCED \r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
 EFI_COMPONENT_NAME_PROTOCOL  gDnsComponentName = {\r
   DnsComponentNameGetDriverName,\r
   DnsComponentNameGetControllerName,\r
@@ -111,7 +111,7 @@ EFI_COMPONENT_NAME_PROTOCOL  gDnsComponentName = {
 ///\r
 /// Component Name 2 Protocol instance\r
 ///\r
-GLOBAL_REMOVE_IF_UNREFERENCED \r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
 EFI_COMPONENT_NAME2_PROTOCOL  gDnsComponentName2 = {\r
   (EFI_COMPONENT_NAME2_GET_DRIVER_NAME)     DnsComponentNameGetDriverName,\r
   (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) DnsComponentNameGetControllerName,\r
@@ -121,7 +121,7 @@ EFI_COMPONENT_NAME2_PROTOCOL  gDnsComponentName2 = {
 ///\r
 /// Table of driver names\r
 ///\r
-GLOBAL_REMOVE_IF_UNREFERENCED \r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
 EFI_UNICODE_STRING_TABLE mDnsDriverNameTable[] = {\r
   { "eng;en", (CHAR16 *)L"DNS Network Service Driver" },\r
   { NULL, NULL }\r
@@ -173,10 +173,10 @@ DnsComponentNameGetDriverName (
 \r
   @param  Dns4                       A pointer to the EFI_DNS4_PROTOCOL.\r
 \r
-  \r
+\r
   @retval EFI_SUCCESS                Update the ControllerNameTable of this instance successfully.\r
   @retval EFI_INVALID_PARAMETER      The input parameter is invalid.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 UpdateDns4Name (\r
@@ -190,7 +190,7 @@ UpdateDns4Name (
   if (Dns4 == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // Format the child name into the string buffer as:\r
   // DNSv4 (StationIp=?, LocalPort=?)\r
@@ -199,7 +199,7 @@ UpdateDns4Name (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   UnicodeSPrint (\r
     HandleName,\r
     sizeof (HandleName),\r
@@ -222,7 +222,7 @@ UpdateDns4Name (
     FreeUnicodeStringTable (gDnsControllerNameTable);\r
     gDnsControllerNameTable = NULL;\r
   }\r
-  \r
+\r
   Status = AddUnicodeString2 (\r
              "eng",\r
              gDnsComponentName.SupportedLanguages,\r
@@ -233,7 +233,7 @@ UpdateDns4Name (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   return AddUnicodeString2 (\r
            "en",\r
            gDnsComponentName2.SupportedLanguages,\r
@@ -248,10 +248,10 @@ UpdateDns4Name (
 \r
   @param  Dns6                       A pointer to the EFI_DNS6_PROTOCOL.\r
 \r
-  \r
+\r
   @retval EFI_SUCCESS                Update the ControllerNameTable of this instance successfully.\r
   @retval EFI_INVALID_PARAMETER      The input parameter is invalid.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 UpdateDns6Name (\r
@@ -266,7 +266,7 @@ UpdateDns6Name (
   if (Dns6 == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // Format the child name into the string buffer as:\r
   // DNSv6 (StationIp=?, LocalPort=?)\r
@@ -282,7 +282,7 @@ UpdateDns6Name (
   }\r
   UnicodeSPrint (\r
     HandleName,\r
-    sizeof (HandleName), \r
+    sizeof (HandleName),\r
     L"DNSv6 (StationIp=%s, LocalPort=%d)",\r
     Address,\r
     ModeData.DnsConfigData.LocalPort\r
@@ -299,7 +299,7 @@ UpdateDns6Name (
     FreeUnicodeStringTable (gDnsControllerNameTable);\r
     gDnsControllerNameTable = NULL;\r
   }\r
-  \r
+\r
   Status = AddUnicodeString2 (\r
              "eng",\r
              gDnsComponentName.SupportedLanguages,\r
@@ -310,7 +310,7 @@ UpdateDns6Name (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   return AddUnicodeString2 (\r
            "en",\r
            gDnsComponentName2.SupportedLanguages,\r
@@ -373,7 +373,7 @@ DnsComponentNameGetControllerName (
   EFI_STATUS                    Status;\r
   EFI_DNS4_PROTOCOL             *Dns4;\r
   EFI_DNS6_PROTOCOL             *Dns6;\r
-  \r
+\r
   //\r
   // ChildHandle must be NULL for a Device Driver\r
   //\r
index 951477b78c9e7a6199b1074b31674e9ae35b6460..df8f615911bdb78f072e18a02d6745759d2d91d9 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Functions implementation related with DHCPv4/v6 for DNS driver.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -48,7 +48,7 @@ DnsInitSeedPacket (
 }\r
 \r
 /**\r
-  The common notify function. \r
+  The common notify function.\r
 \r
   @param[in]  Event   The event signaled.\r
   @param[in]  Context The context.\r
@@ -149,16 +149,16 @@ ParseDhcp4Ack (
   }\r
 \r
   gBS->FreePool (OptionList);\r
-  \r
+\r
   return Status;\r
 }\r
 \r
 /**\r
-  EFI_DHCP6_INFO_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol \r
+  EFI_DHCP6_INFO_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol\r
   instance to intercept events that occurs in the DHCPv6 Information Request\r
   exchange process.\r
 \r
-  @param  This                  Pointer to the EFI_DHCP6_PROTOCOL instance that \r
+  @param  This                  Pointer to the EFI_DHCP6_PROTOCOL instance that\r
                                 is used to configure this  callback function.\r
   @param  Context               Pointer to the context that is initialized in\r
                                 the EFI_DHCP6_PROTOCOL.InfoRequest().\r
@@ -186,11 +186,11 @@ ParseDhcp6Ack (
   EFI_IPv6_ADDRESS            *ServerList;\r
   UINT32                      Index;\r
   UINT32                      Count;\r
\r
+\r
   OptionCount = 0;\r
   ServerCount = 0;\r
   ServerList  = NULL;\r
-  \r
+\r
   Status      = This->Parse (This, Packet, &OptionCount, NULL);\r
   if (Status != EFI_BUFFER_TOO_SMALL) {\r
     return EFI_DEVICE_ERROR;\r
@@ -206,7 +206,7 @@ ParseDhcp6Ack (
     gBS->FreePool (OptionList);\r
     return EFI_DEVICE_ERROR;\r
   }\r
-  \r
+\r
   DnsServerInfor = (DNS6_SERVER_INFOR *) Context;\r
 \r
   for (Index = 0; Index < OptionCount; Index++) {\r
@@ -223,7 +223,7 @@ ParseDhcp6Ack (
         gBS->FreePool (OptionList);\r
         return Status;\r
       }\r
-      \r
+\r
       ServerCount = OptionList[Index]->OpLen/16;\r
       ServerList = AllocatePool (ServerCount * sizeof (EFI_IPv6_ADDRESS));\r
       if (ServerList == NULL) {\r
@@ -241,7 +241,7 @@ ParseDhcp6Ack (
   }\r
 \r
   gBS->FreePool (OptionList);\r
-  \r
+\r
   return Status;\r
 \r
 }\r
@@ -270,10 +270,10 @@ GetDns4ServerFromDhcp4 (
   EFI_HANDLE                          Image;\r
   EFI_HANDLE                          Controller;\r
   EFI_STATUS                          MediaStatus;\r
-  EFI_HANDLE                          MnpChildHandle;  \r
+  EFI_HANDLE                          MnpChildHandle;\r
   EFI_MANAGED_NETWORK_PROTOCOL        *Mnp;\r
   EFI_MANAGED_NETWORK_CONFIG_DATA     MnpConfigData;\r
-  EFI_HANDLE                          Dhcp4Handle;  \r
+  EFI_HANDLE                          Dhcp4Handle;\r
   EFI_DHCP4_PROTOCOL                  *Dhcp4;\r
   EFI_IP4_CONFIG2_PROTOCOL            *Ip4Config2;\r
   UINTN                               DataSize;\r
@@ -286,13 +286,13 @@ GetDns4ServerFromDhcp4 (
   EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN    Token;\r
   BOOLEAN                             IsDone;\r
   UINTN                               Index;\r
-  \r
+\r
   Image                      = Instance->Service->ImageHandle;\r
   Controller                 = Instance->Service->ControllerHandle;\r
 \r
   MnpChildHandle             = NULL;\r
   Mnp                        = NULL;\r
-  \r
+\r
   Dhcp4Handle                = NULL;\r
   Dhcp4                      = NULL;\r
 \r
@@ -304,11 +304,11 @@ GetDns4ServerFromDhcp4 (
   ZeroMem ((UINT8 *) ParaList, sizeof (ParaList));\r
 \r
   ZeroMem (&MnpConfigData, sizeof (EFI_MANAGED_NETWORK_CONFIG_DATA));\r
-  \r
+\r
   ZeroMem (&DnsServerInfor, sizeof (DNS4_SERVER_INFOR));\r
-  \r
+\r
   ZeroMem (&Token, sizeof (EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN));\r
-  \r
+\r
   DnsServerInfor.ServerCount = DnsServerCount;\r
 \r
   IsDone = FALSE;\r
@@ -346,7 +346,7 @@ GetDns4ServerFromDhcp4 (
   if (EFI_ERROR (Status)) {\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   MnpConfigData.ReceivedQueueTimeoutValue = 0;\r
   MnpConfigData.TransmitQueueTimeoutValue = 0;\r
   MnpConfigData.ProtocolTypeFilter        = IP4_ETHER_PROTO;\r
@@ -362,7 +362,7 @@ GetDns4ServerFromDhcp4 (
   if (EFI_ERROR (Status)) {\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   //\r
   // Create a DHCP4 child instance and get the protocol.\r
   //\r
@@ -395,7 +395,7 @@ GetDns4ServerFromDhcp4 (
   if (EFI_ERROR (Status)) {\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   Status = Ip4Config2->GetData (Ip4Config2, Ip4Config2DataTypeInterfaceInfo, &DataSize, Data);\r
   if (EFI_ERROR (Status) && Status != EFI_BUFFER_TOO_SMALL) {\r
     goto ON_EXIT;\r
@@ -413,7 +413,7 @@ GetDns4ServerFromDhcp4 (
   }\r
 \r
   InterfaceInfo = (EFI_IP4_CONFIG2_INTERFACE_INFO *)Data;\r
-  \r
+\r
   //\r
   // Build required Token.\r
   //\r
@@ -427,13 +427,13 @@ GetDns4ServerFromDhcp4 (
   if (EFI_ERROR (Status)) {\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   SetMem (&Token.RemoteAddress, sizeof (EFI_IPv4_ADDRESS), 0xff);\r
-  \r
+\r
   Token.RemotePort = 67;\r
 \r
   Token.ListenPointCount = 1;\r
-  \r
+\r
   Token.ListenPoints = AllocateZeroPool (Token.ListenPointCount * sizeof (EFI_DHCP4_LISTEN_POINT));\r
   if (Token.ListenPoints == NULL) {\r
     Status = EFI_OUT_OF_RESOURCES;\r
@@ -447,9 +447,9 @@ GetDns4ServerFromDhcp4 (
     CopyMem (&(Token.ListenPoints[0].ListenAddress), &(Instance->Dns4CfgData.StationIp), sizeof (EFI_IPv4_ADDRESS));\r
     CopyMem (&(Token.ListenPoints[0].SubnetMask), &(Instance->Dns4CfgData.SubnetMask), sizeof (EFI_IPv4_ADDRESS));\r
   }\r
-  \r
+\r
   Token.ListenPoints[0].ListenPort = 68;\r
-  \r
+\r
   Token.TimeoutValue = DNS_TIME_TO_GETMAP;\r
 \r
   DnsInitSeedPacket (&SeedPacket, InterfaceInfo);\r
@@ -459,35 +459,35 @@ GetDns4ServerFromDhcp4 (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   ParaList[0]->OpCode  = DHCP4_TAG_TYPE;\r
   ParaList[0]->Length  = 1;\r
   ParaList[0]->Data[0] = DHCP4_MSG_REQUEST;\r
-  \r
+\r
   ParaList[1] = AllocateZeroPool (sizeof (EFI_DHCP4_PACKET_OPTION));\r
   if (ParaList[1] == NULL) {\r
     Status = EFI_OUT_OF_RESOURCES;\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   ParaList[1]->OpCode  = DHCP4_TAG_PARA_LIST;\r
   ParaList[1]->Length  = 1;\r
   ParaList[1]->Data[0] = DHCP4_TAG_DNS_SERVER;\r
 \r
-  Status = Dhcp4->Build (Dhcp4, &SeedPacket, 0, NULL, 2, ParaList, &Token.Packet); \r
+  Status = Dhcp4->Build (Dhcp4, &SeedPacket, 0, NULL, 2, ParaList, &Token.Packet);\r
 \r
   Token.Packet->Dhcp4.Header.Xid      = HTONL(NET_RANDOM (NetRandomInitSeed ()));\r
-  \r
+\r
   Token.Packet->Dhcp4.Header.Reserved = HTONS ((UINT16)0x8000);\r
-  \r
+\r
   if (Instance->Dns4CfgData.UseDefaultSetting) {\r
     CopyMem (&(Token.Packet->Dhcp4.Header.ClientAddr), &(InterfaceInfo->StationAddress), sizeof (EFI_IPv4_ADDRESS));\r
   } else {\r
     CopyMem (&(Token.Packet->Dhcp4.Header.ClientAddr), &(Instance->Dns4CfgData.StationIp), sizeof (EFI_IPv4_ADDRESS));\r
   }\r
-  \r
-  CopyMem (Token.Packet->Dhcp4.Header.ClientHwAddr, &(InterfaceInfo->HwAddress), InterfaceInfo->HwAddressSize); \r
-  \r
+\r
+  CopyMem (Token.Packet->Dhcp4.Header.ClientHwAddr, &(InterfaceInfo->HwAddress), InterfaceInfo->HwAddressSize);\r
+\r
   Token.Packet->Dhcp4.Header.HwAddrLen = (UINT8)(InterfaceInfo->HwAddressSize);\r
 \r
   //\r
@@ -504,7 +504,7 @@ GetDns4ServerFromDhcp4 (
   do {\r
     Status = Mnp->Poll (Mnp);\r
   } while (!IsDone);\r
-  \r
+\r
   //\r
   // Parse the ACK to get required information if received done.\r
   //\r
@@ -520,7 +520,7 @@ GetDns4ServerFromDhcp4 (
   } else {\r
     Status = Token.Status;\r
   }\r
-  \r
+\r
 ON_EXIT:\r
 \r
   if (Data != NULL) {\r
@@ -540,15 +540,15 @@ ON_EXIT:
   if (Token.Packet) {\r
     FreePool (Token.Packet);\r
   }\r
-  \r
+\r
   if (Token.ResponseList != NULL) {\r
     FreePool (Token.ResponseList);\r
   }\r
-  \r
+\r
   if (Token.CompletionEvent != NULL) {\r
     gBS->CloseEvent (Token.CompletionEvent);\r
   }\r
-  \r
+\r
   if (Dhcp4 != NULL) {\r
     Dhcp4->Stop (Dhcp4);\r
     Dhcp4->Configure (Dhcp4, NULL);\r
@@ -560,7 +560,7 @@ ON_EXIT:
            Controller\r
            );\r
   }\r
-  \r
+\r
   if (Dhcp4Handle != NULL) {\r
     NetLibDestroyServiceChild (\r
       Controller,\r
@@ -580,14 +580,14 @@ ON_EXIT:
            Controller\r
            );\r
   }\r
-  \r
+\r
   NetLibDestroyServiceChild (\r
     Controller,\r
     Image,\r
     &gEfiManagedNetworkServiceBindingProtocolGuid,\r
     MnpChildHandle\r
     );\r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -729,14 +729,14 @@ GetDns6ServerFromDhcp6 (
       }\r
     } while (TimerStatus == EFI_NOT_READY);\r
   }\r
-  \r
+\r
   *DnsServerList  = DnsServerInfor.ServerList;\r
 \r
 ON_EXIT:\r
 \r
   if (Oro != NULL) {\r
     FreePool (Oro);\r
-  }  \r
+  }\r
 \r
   if (Timer != NULL) {\r
     gBS->CloseEvent (Timer);\r
@@ -759,6 +759,6 @@ ON_EXIT:
     );\r
 \r
   return Status;\r
-  \r
+\r
 }\r
 \r
index 9c61f84c5c34f352c3407517149f5cc7e2989e73..29683b00a2ab68ec92f4b7cfac8f94b1884d705c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Functions implementation related with DHCPv4/v6 for DNS driver.\r
 \r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -78,11 +78,11 @@ ParseDhcp4Ack (
   );\r
 \r
 /**\r
-  EFI_DHCP6_INFO_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol \r
+  EFI_DHCP6_INFO_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol\r
   instance to intercept events that occurs in the DHCPv6 Information Request\r
   exchange process.\r
 \r
-  @param  This                  Pointer to the EFI_DHCP6_PROTOCOL instance that \r
+  @param  This                  Pointer to the EFI_DHCP6_PROTOCOL instance that\r
                                 is used to configure this  callback function.\r
   @param  Context               Pointer to the context that is initialized in\r
                                 the EFI_DHCP6_PROTOCOL.InfoRequest().\r
@@ -143,5 +143,5 @@ GetDns6ServerFromDhcp6 (
   OUT UINT32                     *DnsServerCount,\r
   OUT EFI_IPv6_ADDRESS           **DnsServerList\r
   );\r
-  \r
-#endif
\ No newline at end of file
+\r
+#endif\r
index 5dc9afe4489175eb7947441c604a9a47518c8377..1f9b924c0b375971760b98bcf3a34691b2f08240 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 The driver binding and service binding protocol for DnsDxe driver.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -56,9 +56,9 @@ DnsDestroyInstance (
   )\r
 {\r
   ZeroMem (&Instance->Dns4CfgData, sizeof (EFI_DNS4_CONFIG_DATA));\r
-  \r
+\r
   ZeroMem (&Instance->Dns6CfgData, sizeof (EFI_DNS6_CONFIG_DATA));\r
-  \r
+\r
   if (!NetMapIsEmpty (&Instance->Dns4TxTokens)) {\r
     Dns4InstanceCancelToken (Instance, NULL);\r
   }\r
@@ -66,11 +66,11 @@ DnsDestroyInstance (
   if (!NetMapIsEmpty (&Instance->Dns6TxTokens)) {\r
     Dns6InstanceCancelToken (Instance, NULL);\r
   }\r
-  \r
+\r
   if (Instance->UdpIo!= NULL) {\r
     UdpIoFreeIo (Instance->UdpIo);\r
   }\r
-  \r
+\r
   FreePool (Instance);\r
 }\r
 \r
@@ -93,7 +93,7 @@ DnsCreateInstance (
   DNS_INSTANCE            *DnsIns;\r
 \r
   *Instance = NULL;\r
-  \r
+\r
   DnsIns = AllocateZeroPool (sizeof (DNS_INSTANCE));\r
   if (DnsIns == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
@@ -104,7 +104,7 @@ DnsCreateInstance (
   DnsIns->State     = DNS_STATE_UNCONFIGED;\r
   DnsIns->InDestroy = FALSE;\r
   DnsIns->Service   = Service;\r
-  \r
+\r
   if (Service->IpVersion == IP_VERSION_4) {\r
     CopyMem (&DnsIns->Dns4, &mDns4Protocol, sizeof (DnsIns->Dns4));\r
     NetMapInit (&DnsIns->Dns4TxTokens);\r
@@ -124,7 +124,7 @@ DnsCreateInstance (
     FreePool (DnsIns);\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   *Instance = DnsIns;\r
 \r
   return EFI_SUCCESS;\r
@@ -132,7 +132,7 @@ DnsCreateInstance (
 \r
 /**\r
   Callback function which provided by user to remove one node in NetDestroyLinkList process.\r
-  \r
+\r
   @param[in]    Entry           The entry to be removed.\r
   @param[in]    Context         Pointer to the callback context corresponds to the Context in NetDestroyLinkList.\r
 \r
@@ -202,7 +202,7 @@ DnsDestroyService (
   )\r
 {\r
   UdpIoFreeIo (DnsSb->ConnectUdp);\r
-  \r
+\r
   if (DnsSb->TimerToGetMap != NULL){\r
     gBS->CloseEvent (DnsSb->TimerToGetMap);\r
   }\r
@@ -241,7 +241,7 @@ DnsCreateService (
 {\r
   EFI_STATUS             Status;\r
   DNS_SERVICE            *DnsSb;\r
-  \r
+\r
   Status    = EFI_SUCCESS;\r
   DnsSb     = NULL;\r
 \r
@@ -259,7 +259,7 @@ DnsCreateService (
   } else {\r
     DnsSb->ServiceBinding = mDns6ServiceBinding;\r
   }\r
-  \r
+\r
   DnsSb->Dns4ChildrenNum = 0;\r
   InitializeListHead (&DnsSb->Dns4ChildrenList);\r
 \r
@@ -270,9 +270,9 @@ DnsCreateService (
   DnsSb->ImageHandle      = Image;\r
 \r
   DnsSb->TimerToGetMap    = NULL;\r
-  \r
+\r
   DnsSb->Timer            = NULL;\r
\r
+\r
   DnsSb->IpVersion        = IpVersion;\r
 \r
   //\r
@@ -290,7 +290,7 @@ DnsCreateService (
     FreePool (DnsSb);\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Create the timer to retransmit packets.\r
   //\r
@@ -308,7 +308,7 @@ DnsCreateService (
     FreePool (DnsSb);\r
     return Status;\r
   }\r
-  \r
+\r
   DnsSb->ConnectUdp = NULL;\r
   DnsSb->ConnectUdp = UdpIoCreateIo (\r
                         Controller,\r
@@ -339,7 +339,7 @@ DnsCreateService (
   @retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.\r
 \r
 **/\r
-EFI_STATUS \r
+EFI_STATUS\r
 EFIAPI\r
 DnsUnload (\r
   IN EFI_HANDLE  ImageHandle\r
@@ -357,7 +357,7 @@ DnsUnload (
   ItemServerIp4 = NULL;\r
   ItemCache6    = NULL;\r
   ItemServerIp6 = NULL;\r
-  \r
+\r
   //\r
   // Disconnect the driver specified by ImageHandle\r
   //\r
@@ -373,7 +373,7 @@ DnsUnload (
     if (mDriverData->Timer != NULL) {\r
       gBS->CloseEvent (mDriverData->Timer);\r
     }\r
-    \r
+\r
     while (!IsListEmpty (&mDriverData->Dns4CacheList)) {\r
       Entry = NetListRemoveHead (&mDriverData->Dns4CacheList);\r
       ItemCache4 = NET_LIST_USER_STRUCT (Entry, DNS4_CACHE, AllCacheLink);\r
@@ -409,10 +409,10 @@ DnsUnload (
       ItemServerIp6 = NET_LIST_USER_STRUCT (Entry, DNS6_SERVER_IP, AllServerLink);\r
       FreePool (ItemServerIp6);\r
     }\r
-    \r
+\r
     FreePool (mDriverData);\r
   }\r
\r
+\r
   return Status;\r
 }\r
 \r
@@ -490,7 +490,7 @@ DnsDriverEntryPoint (
   if (EFI_ERROR (Status)) {\r
     goto Error3;\r
   }\r
-  \r
+\r
   Status = gBS->SetTimer (mDriverData->Timer, TimerPeriodic, TICKS_PER_SECOND);\r
   if (EFI_ERROR (Status)) {\r
     goto Error4;\r
@@ -500,7 +500,7 @@ DnsDriverEntryPoint (
   InitializeListHead (&mDriverData->Dns4ServerList);\r
   InitializeListHead (&mDriverData->Dns6CacheList);\r
   InitializeListHead (&mDriverData->Dns6ServerList);\r
-  \r
+\r
   return Status;\r
 \r
   Error4:\r
@@ -508,18 +508,18 @@ DnsDriverEntryPoint (
 \r
   Error3:\r
     FreePool (mDriverData);\r
\r
-  Error2: \r
+\r
+  Error2:\r
      gBS->UninstallMultipleProtocolInterfaces (\r
            gDns6DriverBinding.DriverBindingHandle,\r
            &gEfiDriverBindingProtocolGuid,\r
-           &gDns6DriverBinding,         \r
+           &gDns6DriverBinding,\r
            &gEfiComponentName2ProtocolGuid,\r
            &gDnsComponentName2,\r
            &gEfiComponentNameProtocolGuid,\r
            &gDnsComponentName,\r
            NULL\r
-           ); \r
+           );\r
 \r
   Error1:\r
     gBS->UninstallMultipleProtocolInterfaces (\r
@@ -532,38 +532,38 @@ DnsDriverEntryPoint (
            &gDnsComponentName,\r
            NULL\r
            );\r
-  \r
+\r
   return Status;\r
 }\r
 \r
 /**\r
-  Tests to see if this driver supports a given controller. If a child device is provided, \r
+  Tests to see if this driver supports a given controller. If a child device is provided,\r
   it further tests to see if this driver supports creating a handle for the specified child device.\r
 \r
-  This function checks to see if the driver specified by This supports the device specified by \r
-  ControllerHandle. Drivers will typically use the device path attached to \r
-  ControllerHandle and/or the services from the bus I/O abstraction attached to \r
-  ControllerHandle to determine if the driver supports ControllerHandle. This function \r
-  may be called many times during platform initialization. In order to reduce boot times, the tests \r
-  performed by this function must be very small, and take as little time as possible to execute. This \r
-  function must not change the state of any hardware devices, and this function must be aware that the \r
-  device specified by ControllerHandle may already be managed by the same driver or a \r
-  different driver. This function must match its calls to AllocatePages() with FreePages(), \r
-  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().  \r
-  Because ControllerHandle may have been previously started by the same driver, if a protocol is \r
-  already in the opened state, then it must not be closed with CloseProtocol(). This is required \r
+  This function checks to see if the driver specified by This supports the device specified by\r
+  ControllerHandle. Drivers will typically use the device path attached to\r
+  ControllerHandle and/or the services from the bus I/O abstraction attached to\r
+  ControllerHandle to determine if the driver supports ControllerHandle. This function\r
+  may be called many times during platform initialization. In order to reduce boot times, the tests\r
+  performed by this function must be very small, and take as little time as possible to execute. This\r
+  function must not change the state of any hardware devices, and this function must be aware that the\r
+  device specified by ControllerHandle may already be managed by the same driver or a\r
+  different driver. This function must match its calls to AllocatePages() with FreePages(),\r
+  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().\r
+  Because ControllerHandle may have been previously started by the same driver, if a protocol is\r
+  already in the opened state, then it must not be closed with CloseProtocol(). This is required\r
   to guarantee the state of ControllerHandle is not modified by this function.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to test. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to test. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For bus drivers, if this parameter is not NULL, then \r
-                                   the bus driver must determine if the bus controller specified \r
-                                   by ControllerHandle and the child controller specified \r
-                                   by RemainingDevicePath are both supported by this \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For bus drivers, if this parameter is not NULL, then\r
+                                   the bus driver must determine if the bus controller specified\r
+                                   by ControllerHandle and the child controller specified\r
+                                   by RemainingDevicePath are both supported by this\r
                                    bus driver.\r
 \r
   @retval EFI_SUCCESS              The device specified by ControllerHandle and\r
@@ -622,28 +622,28 @@ Dns4DriverBindingSupported (
   Starts a device controller or a bus controller.\r
 \r
   The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
-  As a result, much of the error checking on the parameters to Start() has been moved into this \r
-  common boot service. It is legal to call Start() from other locations, \r
+  As a result, much of the error checking on the parameters to Start() has been moved into this\r
+  common boot service. It is legal to call Start() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE.\r
   2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
      EFI_DEVICE_PATH_PROTOCOL.\r
   3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
-     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.  \r
+     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to start. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to start. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For a bus driver, if this parameter is NULL, then handles \r
-                                   for all the children of Controller are created by this driver.  \r
-                                   If this parameter is not NULL and the first Device Path Node is \r
-                                   not the End of Device Path Node, then only the handle for the \r
-                                   child device specified by the first Device Path Node of \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For a bus driver, if this parameter is NULL, then handles\r
+                                   for all the children of Controller are created by this driver.\r
+                                   If this parameter is not NULL and the first Device Path Node is\r
+                                   not the End of Device Path Node, then only the handle for the\r
+                                   child device specified by the first Device Path Node of\r
                                    RemainingDevicePath is created by this driver.\r
-                                   If the first Device Path Node of RemainingDevicePath is \r
+                                   If the first Device Path Node of RemainingDevicePath is\r
                                    the End of Device Path Node, no child handle is created by this\r
                                    driver.\r
 \r
@@ -668,14 +668,14 @@ Dns4DriverBindingStart (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   ASSERT (DnsSb != NULL);\r
-  \r
+\r
   Status = gBS->SetTimer (DnsSb->Timer, TimerPeriodic, TICKS_PER_SECOND);\r
   if (EFI_ERROR (Status)) {\r
     goto ON_ERROR;\r
   }\r
-  \r
+\r
   //\r
   // Install the Dns4ServiceBinding Protocol onto ControllerHandle.\r
   //\r
@@ -699,10 +699,10 @@ ON_ERROR:
 \r
 /**\r
   Stops a device controller or a bus controller.\r
-  \r
-  The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r
-  As a result, much of the error checking on the parameters to Stop() has been moved \r
-  into this common boot service. It is legal to call Stop() from other locations, \r
+\r
+  The Stop() function is designed to be invoked from the EFI boot service DisconnectController().\r
+  As a result, much of the error checking on the parameters to Stop() has been moved\r
+  into this common boot service. It is legal to call Stop() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
      same driver's Start() function.\r
@@ -710,13 +710,13 @@ ON_ERROR:
      EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
      Start() function, and the Start() function must have called OpenProtocol() on\r
      ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
-  \r
+\r
   @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must \r
-                                support a bus specific I/O protocol for the driver \r
+  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must\r
+                                support a bus specific I/O protocol for the driver\r
                                 to use to stop the device.\r
   @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.\r
-  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL \r
+  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL\r
                                 if NumberOfChildren is 0.\r
 \r
   @retval EFI_SUCCESS           The device was stopped.\r
@@ -788,7 +788,7 @@ Dns4DriverBindingStop (
            );\r
 \r
     DnsDestroyService (DnsSb);\r
-    \r
+\r
     if (gDnsControllerNameTable != NULL) {\r
       FreeUnicodeStringTable (gDnsControllerNameTable);\r
       gDnsControllerNameTable = NULL;\r
@@ -801,33 +801,33 @@ Dns4DriverBindingStop (
 }\r
 \r
 /**\r
-  Tests to see if this driver supports a given controller. If a child device is provided, \r
+  Tests to see if this driver supports a given controller. If a child device is provided,\r
   it further tests to see if this driver supports creating a handle for the specified child device.\r
 \r
-  This function checks to see if the driver specified by This supports the device specified by \r
-  ControllerHandle. Drivers will typically use the device path attached to \r
-  ControllerHandle and/or the services from the bus I/O abstraction attached to \r
-  ControllerHandle to determine if the driver supports ControllerHandle. This function \r
-  may be called many times during platform initialization. In order to reduce boot times, the tests \r
-  performed by this function must be very small, and take as little time as possible to execute. This \r
-  function must not change the state of any hardware devices, and this function must be aware that the \r
-  device specified by ControllerHandle may already be managed by the same driver or a \r
-  different driver. This function must match its calls to AllocatePages() with FreePages(), \r
-  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().  \r
-  Because ControllerHandle may have been previously started by the same driver, if a protocol is \r
-  already in the opened state, then it must not be closed with CloseProtocol(). This is required \r
+  This function checks to see if the driver specified by This supports the device specified by\r
+  ControllerHandle. Drivers will typically use the device path attached to\r
+  ControllerHandle and/or the services from the bus I/O abstraction attached to\r
+  ControllerHandle to determine if the driver supports ControllerHandle. This function\r
+  may be called many times during platform initialization. In order to reduce boot times, the tests\r
+  performed by this function must be very small, and take as little time as possible to execute. This\r
+  function must not change the state of any hardware devices, and this function must be aware that the\r
+  device specified by ControllerHandle may already be managed by the same driver or a\r
+  different driver. This function must match its calls to AllocatePages() with FreePages(),\r
+  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().\r
+  Because ControllerHandle may have been previously started by the same driver, if a protocol is\r
+  already in the opened state, then it must not be closed with CloseProtocol(). This is required\r
   to guarantee the state of ControllerHandle is not modified by this function.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to test. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to test. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For bus drivers, if this parameter is not NULL, then \r
-                                   the bus driver must determine if the bus controller specified \r
-                                   by ControllerHandle and the child controller specified \r
-                                   by RemainingDevicePath are both supported by this \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For bus drivers, if this parameter is not NULL, then\r
+                                   the bus driver must determine if the bus controller specified\r
+                                   by ControllerHandle and the child controller specified\r
+                                   by RemainingDevicePath are both supported by this\r
                                    bus driver.\r
 \r
   @retval EFI_SUCCESS              The device specified by ControllerHandle and\r
@@ -886,28 +886,28 @@ Dns6DriverBindingSupported (
   Starts a device controller or a bus controller.\r
 \r
   The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
-  As a result, much of the error checking on the parameters to Start() has been moved into this \r
-  common boot service. It is legal to call Start() from other locations, \r
+  As a result, much of the error checking on the parameters to Start() has been moved into this\r
+  common boot service. It is legal to call Start() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE.\r
   2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
      EFI_DEVICE_PATH_PROTOCOL.\r
   3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
-     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.  \r
+     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to start. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to start. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For a bus driver, if this parameter is NULL, then handles \r
-                                   for all the children of Controller are created by this driver.  \r
-                                   If this parameter is not NULL and the first Device Path Node is \r
-                                   not the End of Device Path Node, then only the handle for the \r
-                                   child device specified by the first Device Path Node of \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For a bus driver, if this parameter is NULL, then handles\r
+                                   for all the children of Controller are created by this driver.\r
+                                   If this parameter is not NULL and the first Device Path Node is\r
+                                   not the End of Device Path Node, then only the handle for the\r
+                                   child device specified by the first Device Path Node of\r
                                    RemainingDevicePath is created by this driver.\r
-                                   If the first Device Path Node of RemainingDevicePath is \r
+                                   If the first Device Path Node of RemainingDevicePath is\r
                                    the End of Device Path Node, no child handle is created by this\r
                                    driver.\r
 \r
@@ -932,14 +932,14 @@ Dns6DriverBindingStart (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   ASSERT (DnsSb != NULL);\r
-  \r
+\r
   Status = gBS->SetTimer (DnsSb->Timer, TimerPeriodic, TICKS_PER_SECOND);\r
   if (EFI_ERROR (Status)) {\r
     goto ON_ERROR;\r
   }\r
-  \r
+\r
   //\r
   // Install the Dns6ServiceBinding Protocol onto ControllerHandle\r
   //\r
@@ -964,10 +964,10 @@ ON_ERROR:
 \r
 /**\r
   Stops a device controller or a bus controller.\r
-  \r
-  The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r
-  As a result, much of the error checking on the parameters to Stop() has been moved \r
-  into this common boot service. It is legal to call Stop() from other locations, \r
+\r
+  The Stop() function is designed to be invoked from the EFI boot service DisconnectController().\r
+  As a result, much of the error checking on the parameters to Stop() has been moved\r
+  into this common boot service. It is legal to call Stop() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
      same driver's Start() function.\r
@@ -975,13 +975,13 @@ ON_ERROR:
      EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
      Start() function, and the Start() function must have called OpenProtocol() on\r
      ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
-  \r
+\r
   @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must \r
-                                support a bus specific I/O protocol for the driver \r
+  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must\r
+                                support a bus specific I/O protocol for the driver\r
                                 to use to stop the device.\r
   @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.\r
-  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL \r
+  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL\r
                                 if NumberOfChildren is 0.\r
 \r
   @retval EFI_SUCCESS           The device was stopped.\r
@@ -1053,12 +1053,12 @@ Dns6DriverBindingStop (
            );\r
 \r
     DnsDestroyService (DnsSb);\r
-    \r
+\r
     if (gDnsControllerNameTable != NULL) {\r
       FreeUnicodeStringTable (gDnsControllerNameTable);\r
       gDnsControllerNameTable = NULL;\r
     }\r
-    \r
+\r
     Status = EFI_SUCCESS;\r
   }\r
 \r
@@ -1067,14 +1067,14 @@ Dns6DriverBindingStop (
 \r
 /**\r
   Creates a child handle and installs a protocol.\r
-  \r
-  The CreateChild() function installs a protocol on ChildHandle. \r
-  If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. \r
+\r
+  The CreateChild() function installs a protocol on ChildHandle.\r
+  If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.\r
   If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.\r
 \r
   @param[in] This        Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r
   @param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL,\r
-                         then a new handle is created. If it is a pointer to an existing UEFI handle, \r
+                         then a new handle is created. If it is a pointer to an existing UEFI handle,\r
                          then the protocol is added to the existing UEFI handle.\r
 \r
   @retval EFI_SUCCES            The protocol was added to ChildHandle.\r
@@ -1142,7 +1142,7 @@ Dns4ServiceBindingCreateChild (
            &Instance->Dns4,\r
            NULL\r
            );\r
-    \r
+\r
     goto ON_ERROR;\r
   }\r
 \r
@@ -1167,14 +1167,14 @@ Dns4ServiceBindingCreateChild (
            gDns4DriverBinding.DriverBindingHandle,\r
            ChildHandle\r
            );\r
-    \r
+\r
      gBS->UninstallMultipleProtocolInterfaces (\r
             Instance->ChildHandle,\r
             &gEfiDns4ProtocolGuid,\r
             &Instance->Dns4,\r
             NULL\r
             );\r
-    \r
+\r
     goto ON_ERROR;\r
   }\r
 \r
@@ -1198,9 +1198,9 @@ ON_ERROR:
 \r
 /**\r
   Destroys a child handle with a protocol installed on it.\r
-  \r
-  The DestroyChild() function does the opposite of CreateChild(). It removes a protocol \r
-  that was installed by CreateChild() from ChildHandle. If the removed protocol is the \r
+\r
+  The DestroyChild() function does the opposite of CreateChild(). It removes a protocol\r
+  that was installed by CreateChild() from ChildHandle. If the removed protocol is the\r
   last protocol on ChildHandle, then ChildHandle is destroyed.\r
 \r
   @param[in] This        Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r
@@ -1260,7 +1260,7 @@ Dns4ServiceBindingDestroyChild (
   }\r
 \r
   OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
-  \r
+\r
   Instance->InDestroy = TRUE;\r
 \r
   //\r
@@ -1292,7 +1292,7 @@ Dns4ServiceBindingDestroyChild (
                   );\r
 \r
   OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
-  \r
+\r
   if (EFI_ERROR (Status)) {\r
     Instance->InDestroy = FALSE;\r
     gBS->RestoreTPL (OldTpl);\r
@@ -1310,14 +1310,14 @@ Dns4ServiceBindingDestroyChild (
 \r
 /**\r
   Creates a child handle and installs a protocol.\r
-  \r
-  The CreateChild() function installs a protocol on ChildHandle. \r
-  If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. \r
+\r
+  The CreateChild() function installs a protocol on ChildHandle.\r
+  If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.\r
   If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.\r
 \r
   @param[in] This        Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r
   @param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL,\r
-                         then a new handle is created. If it is a pointer to an existing UEFI handle, \r
+                         then a new handle is created. If it is a pointer to an existing UEFI handle,\r
                          then the protocol is added to the existing UEFI handle.\r
 \r
   @retval EFI_SUCCES            The protocol was added to ChildHandle.\r
@@ -1385,7 +1385,7 @@ Dns6ServiceBindingCreateChild (
            &Instance->Dns6,\r
            NULL\r
            );\r
-    \r
+\r
     goto ON_ERROR;\r
   }\r
 \r
@@ -1410,14 +1410,14 @@ Dns6ServiceBindingCreateChild (
            gDns6DriverBinding.DriverBindingHandle,\r
            ChildHandle\r
            );\r
-    \r
+\r
      gBS->UninstallMultipleProtocolInterfaces (\r
             Instance->ChildHandle,\r
             &gEfiDns6ProtocolGuid,\r
             &Instance->Dns6,\r
             NULL\r
             );\r
-    \r
+\r
     goto ON_ERROR;\r
   }\r
 \r
@@ -1441,9 +1441,9 @@ ON_ERROR:
 \r
 /**\r
   Destroys a child handle with a protocol installed on it.\r
-  \r
-  The DestroyChild() function does the opposite of CreateChild(). It removes a protocol \r
-  that was installed by CreateChild() from ChildHandle. If the removed protocol is the \r
+\r
+  The DestroyChild() function does the opposite of CreateChild(). It removes a protocol\r
+  that was installed by CreateChild() from ChildHandle. If the removed protocol is the\r
   last protocol on ChildHandle, then ChildHandle is destroyed.\r
 \r
   @param[in] This        Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r
index 49f6a1d8a3c22abff59d66d9ef552c543f1687ba..23b27913a157fa40715b3640de3679b8db988f6b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 The header files of the driver binding and service binding protocol for DnsDxe driver.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -35,11 +35,11 @@ typedef struct _DNS_INSTANCE DNS_INSTANCE;
 \r
 #define DNS_SERVICE_SIGNATURE    SIGNATURE_32 ('D', 'N', 'S', 'S')\r
 \r
-#define DNS_INSTANCE_SIGNATURE   SIGNATURE_32 ('D', 'N', 'S', 'I') \r
+#define DNS_INSTANCE_SIGNATURE   SIGNATURE_32 ('D', 'N', 'S', 'I')\r
 \r
 struct _DNS_DRIVER_DATA {\r
   EFI_EVENT                     Timer; /// Ticking timer for DNS cache update.\r
-  \r
+\r
   LIST_ENTRY                    Dns4CacheList;\r
   LIST_ENTRY                    Dns4ServerList;\r
 \r
@@ -59,7 +59,7 @@ struct _DNS_SERVICE {
 \r
   EFI_HANDLE                    ControllerHandle;\r
   EFI_HANDLE                    ImageHandle;\r
-  \r
+\r
   EFI_EVENT                     TimerToGetMap;\r
 \r
   EFI_EVENT                     Timer; /// Ticking timer for packet retransmission.\r
@@ -71,10 +71,10 @@ struct _DNS_SERVICE {
 struct _DNS_INSTANCE {\r
   UINT32                        Signature;\r
   LIST_ENTRY                    Link;\r
-  \r
+\r
   EFI_DNS4_PROTOCOL             Dns4;\r
   EFI_DNS6_PROTOCOL             Dns6;\r
-  \r
+\r
   INTN                          State;\r
   BOOLEAN                       InDestroy;\r
 \r
@@ -139,7 +139,7 @@ DnsCreateInstance (
 \r
 /**\r
   Callback function which provided by user to remove one node in NetDestroyLinkList process.\r
-  \r
+\r
   @param[in]    Entry           The entry to be removed.\r
   @param[in]    Context         Pointer to the callback context corresponds to the Context in NetDestroyLinkList.\r
 \r
@@ -218,7 +218,7 @@ DnsCreateService (
   @retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.\r
 \r
 **/\r
-EFI_STATUS \r
+EFI_STATUS\r
 EFIAPI\r
 DnsUnload (\r
   IN EFI_HANDLE  ImageHandle\r
@@ -243,33 +243,33 @@ DnsDriverEntryPoint (
   );\r
 \r
 /**\r
-  Tests to see if this driver supports a given controller. If a child device is provided, \r
+  Tests to see if this driver supports a given controller. If a child device is provided,\r
   it further tests to see if this driver supports creating a handle for the specified child device.\r
 \r
-  This function checks to see if the driver specified by This supports the device specified by \r
-  ControllerHandle. Drivers will typically use the device path attached to \r
-  ControllerHandle and/or the services from the bus I/O abstraction attached to \r
-  ControllerHandle to determine if the driver supports ControllerHandle. This function \r
-  may be called many times during platform initialization. In order to reduce boot times, the tests \r
-  performed by this function must be very small, and take as little time as possible to execute. This \r
-  function must not change the state of any hardware devices, and this function must be aware that the \r
-  device specified by ControllerHandle may already be managed by the same driver or a \r
-  different driver. This function must match its calls to AllocatePages() with FreePages(), \r
-  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().  \r
-  Because ControllerHandle may have been previously started by the same driver, if a protocol is \r
-  already in the opened state, then it must not be closed with CloseProtocol(). This is required \r
+  This function checks to see if the driver specified by This supports the device specified by\r
+  ControllerHandle. Drivers will typically use the device path attached to\r
+  ControllerHandle and/or the services from the bus I/O abstraction attached to\r
+  ControllerHandle to determine if the driver supports ControllerHandle. This function\r
+  may be called many times during platform initialization. In order to reduce boot times, the tests\r
+  performed by this function must be very small, and take as little time as possible to execute. This\r
+  function must not change the state of any hardware devices, and this function must be aware that the\r
+  device specified by ControllerHandle may already be managed by the same driver or a\r
+  different driver. This function must match its calls to AllocatePages() with FreePages(),\r
+  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().\r
+  Because ControllerHandle may have been previously started by the same driver, if a protocol is\r
+  already in the opened state, then it must not be closed with CloseProtocol(). This is required\r
   to guarantee the state of ControllerHandle is not modified by this function.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to test. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to test. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For bus drivers, if this parameter is not NULL, then \r
-                                   the bus driver must determine if the bus controller specified \r
-                                   by ControllerHandle and the child controller specified \r
-                                   by RemainingDevicePath are both supported by this \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For bus drivers, if this parameter is not NULL, then\r
+                                   the bus driver must determine if the bus controller specified\r
+                                   by ControllerHandle and the child controller specified\r
+                                   by RemainingDevicePath are both supported by this\r
                                    bus driver.\r
 \r
   @retval EFI_SUCCESS              The device specified by ControllerHandle and\r
@@ -296,28 +296,28 @@ Dns4DriverBindingSupported (
   Starts a device controller or a bus controller.\r
 \r
   The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
-  As a result, much of the error checking on the parameters to Start() has been moved into this \r
-  common boot service. It is legal to call Start() from other locations, \r
+  As a result, much of the error checking on the parameters to Start() has been moved into this\r
+  common boot service. It is legal to call Start() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE.\r
   2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
      EFI_DEVICE_PATH_PROTOCOL.\r
   3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
-     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.  \r
+     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to start. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to start. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For a bus driver, if this parameter is NULL, then handles \r
-                                   for all the children of Controller are created by this driver.  \r
-                                   If this parameter is not NULL and the first Device Path Node is \r
-                                   not the End of Device Path Node, then only the handle for the \r
-                                   child device specified by the first Device Path Node of \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For a bus driver, if this parameter is NULL, then handles\r
+                                   for all the children of Controller are created by this driver.\r
+                                   If this parameter is not NULL and the first Device Path Node is\r
+                                   not the End of Device Path Node, then only the handle for the\r
+                                   child device specified by the first Device Path Node of\r
                                    RemainingDevicePath is created by this driver.\r
-                                   If the first Device Path Node of RemainingDevicePath is \r
+                                   If the first Device Path Node of RemainingDevicePath is\r
                                    the End of Device Path Node, no child handle is created by this\r
                                    driver.\r
 \r
@@ -337,10 +337,10 @@ Dns4DriverBindingStart (
 \r
 /**\r
   Stops a device controller or a bus controller.\r
-  \r
-  The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r
-  As a result, much of the error checking on the parameters to Stop() has been moved \r
-  into this common boot service. It is legal to call Stop() from other locations, \r
+\r
+  The Stop() function is designed to be invoked from the EFI boot service DisconnectController().\r
+  As a result, much of the error checking on the parameters to Stop() has been moved\r
+  into this common boot service. It is legal to call Stop() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
      same driver's Start() function.\r
@@ -348,13 +348,13 @@ Dns4DriverBindingStart (
      EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
      Start() function, and the Start() function must have called OpenProtocol() on\r
      ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
-  \r
+\r
   @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must \r
-                                support a bus specific I/O protocol for the driver \r
+  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must\r
+                                support a bus specific I/O protocol for the driver\r
                                 to use to stop the device.\r
   @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.\r
-  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL \r
+  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL\r
                                 if NumberOfChildren is 0.\r
 \r
   @retval EFI_SUCCESS           The device was stopped.\r
@@ -371,33 +371,33 @@ Dns4DriverBindingStop (
   );\r
 \r
 /**\r
-  Tests to see if this driver supports a given controller. If a child device is provided, \r
+  Tests to see if this driver supports a given controller. If a child device is provided,\r
   it further tests to see if this driver supports creating a handle for the specified child device.\r
 \r
-  This function checks to see if the driver specified by This supports the device specified by \r
-  ControllerHandle. Drivers will typically use the device path attached to \r
-  ControllerHandle and/or the services from the bus I/O abstraction attached to \r
-  ControllerHandle to determine if the driver supports ControllerHandle. This function \r
-  may be called many times during platform initialization. In order to reduce boot times, the tests \r
-  performed by this function must be very small, and take as little time as possible to execute. This \r
-  function must not change the state of any hardware devices, and this function must be aware that the \r
-  device specified by ControllerHandle may already be managed by the same driver or a \r
-  different driver. This function must match its calls to AllocatePages() with FreePages(), \r
-  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().  \r
-  Because ControllerHandle may have been previously started by the same driver, if a protocol is \r
-  already in the opened state, then it must not be closed with CloseProtocol(). This is required \r
+  This function checks to see if the driver specified by This supports the device specified by\r
+  ControllerHandle. Drivers will typically use the device path attached to\r
+  ControllerHandle and/or the services from the bus I/O abstraction attached to\r
+  ControllerHandle to determine if the driver supports ControllerHandle. This function\r
+  may be called many times during platform initialization. In order to reduce boot times, the tests\r
+  performed by this function must be very small, and take as little time as possible to execute. This\r
+  function must not change the state of any hardware devices, and this function must be aware that the\r
+  device specified by ControllerHandle may already be managed by the same driver or a\r
+  different driver. This function must match its calls to AllocatePages() with FreePages(),\r
+  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().\r
+  Because ControllerHandle may have been previously started by the same driver, if a protocol is\r
+  already in the opened state, then it must not be closed with CloseProtocol(). This is required\r
   to guarantee the state of ControllerHandle is not modified by this function.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to test. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to test. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For bus drivers, if this parameter is not NULL, then \r
-                                   the bus driver must determine if the bus controller specified \r
-                                   by ControllerHandle and the child controller specified \r
-                                   by RemainingDevicePath are both supported by this \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For bus drivers, if this parameter is not NULL, then\r
+                                   the bus driver must determine if the bus controller specified\r
+                                   by ControllerHandle and the child controller specified\r
+                                   by RemainingDevicePath are both supported by this\r
                                    bus driver.\r
 \r
   @retval EFI_SUCCESS              The device specified by ControllerHandle and\r
@@ -424,28 +424,28 @@ Dns6DriverBindingSupported (
   Starts a device controller or a bus controller.\r
 \r
   The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
-  As a result, much of the error checking on the parameters to Start() has been moved into this \r
-  common boot service. It is legal to call Start() from other locations, \r
+  As a result, much of the error checking on the parameters to Start() has been moved into this\r
+  common boot service. It is legal to call Start() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE.\r
   2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
      EFI_DEVICE_PATH_PROTOCOL.\r
   3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
-     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.  \r
+     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to start. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to start. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For a bus driver, if this parameter is NULL, then handles \r
-                                   for all the children of Controller are created by this driver.  \r
-                                   If this parameter is not NULL and the first Device Path Node is \r
-                                   not the End of Device Path Node, then only the handle for the \r
-                                   child device specified by the first Device Path Node of \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For a bus driver, if this parameter is NULL, then handles\r
+                                   for all the children of Controller are created by this driver.\r
+                                   If this parameter is not NULL and the first Device Path Node is\r
+                                   not the End of Device Path Node, then only the handle for the\r
+                                   child device specified by the first Device Path Node of\r
                                    RemainingDevicePath is created by this driver.\r
-                                   If the first Device Path Node of RemainingDevicePath is \r
+                                   If the first Device Path Node of RemainingDevicePath is\r
                                    the End of Device Path Node, no child handle is created by this\r
                                    driver.\r
 \r
@@ -465,10 +465,10 @@ Dns6DriverBindingStart (
 \r
 /**\r
   Stops a device controller or a bus controller.\r
-  \r
-  The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r
-  As a result, much of the error checking on the parameters to Stop() has been moved \r
-  into this common boot service. It is legal to call Stop() from other locations, \r
+\r
+  The Stop() function is designed to be invoked from the EFI boot service DisconnectController().\r
+  As a result, much of the error checking on the parameters to Stop() has been moved\r
+  into this common boot service. It is legal to call Stop() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
      same driver's Start() function.\r
@@ -476,13 +476,13 @@ Dns6DriverBindingStart (
      EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
      Start() function, and the Start() function must have called OpenProtocol() on\r
      ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
-  \r
+\r
   @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must \r
-                                support a bus specific I/O protocol for the driver \r
+  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must\r
+                                support a bus specific I/O protocol for the driver\r
                                 to use to stop the device.\r
   @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.\r
-  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL \r
+  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL\r
                                 if NumberOfChildren is 0.\r
 \r
   @retval EFI_SUCCESS           The device was stopped.\r
@@ -500,14 +500,14 @@ Dns6DriverBindingStop (
 \r
 /**\r
   Creates a child handle and installs a protocol.\r
-  \r
-  The CreateChild() function installs a protocol on ChildHandle. \r
-  If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. \r
+\r
+  The CreateChild() function installs a protocol on ChildHandle.\r
+  If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.\r
   If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.\r
 \r
   @param[in] This        Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r
   @param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL,\r
-                         then a new handle is created. If it is a pointer to an existing UEFI handle, \r
+                         then a new handle is created. If it is a pointer to an existing UEFI handle,\r
                          then the protocol is added to the existing UEFI handle.\r
 \r
   @retval EFI_SUCCES            The protocol was added to ChildHandle.\r
@@ -526,9 +526,9 @@ Dns4ServiceBindingCreateChild (
 \r
 /**\r
   Destroys a child handle with a protocol installed on it.\r
-  \r
-  The DestroyChild() function does the opposite of CreateChild(). It removes a protocol \r
-  that was installed by CreateChild() from ChildHandle. If the removed protocol is the \r
+\r
+  The DestroyChild() function does the opposite of CreateChild(). It removes a protocol\r
+  that was installed by CreateChild() from ChildHandle. If the removed protocol is the\r
   last protocol on ChildHandle, then ChildHandle is destroyed.\r
 \r
   @param[in] This        Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r
@@ -551,14 +551,14 @@ Dns4ServiceBindingDestroyChild (
 \r
 /**\r
   Creates a child handle and installs a protocol.\r
-  \r
-  The CreateChild() function installs a protocol on ChildHandle. \r
-  If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. \r
+\r
+  The CreateChild() function installs a protocol on ChildHandle.\r
+  If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.\r
   If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.\r
 \r
   @param[in] This        Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r
   @param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL,\r
-                         then a new handle is created. If it is a pointer to an existing UEFI handle, \r
+                         then a new handle is created. If it is a pointer to an existing UEFI handle,\r
                          then the protocol is added to the existing UEFI handle.\r
 \r
   @retval EFI_SUCCES            The protocol was added to ChildHandle.\r
@@ -577,9 +577,9 @@ Dns6ServiceBindingCreateChild (
 \r
 /**\r
   Destroys a child handle with a protocol installed on it.\r
-  \r
-  The DestroyChild() function does the opposite of CreateChild(). It removes a protocol \r
-  that was installed by CreateChild() from ChildHandle. If the removed protocol is the \r
+\r
+  The DestroyChild() function does the opposite of CreateChild(). It removes a protocol\r
+  that was installed by CreateChild() from ChildHandle. If the removed protocol is the\r
   last protocol on ChildHandle, then ChildHandle is destroyed.\r
 \r
   @param[in] This        Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r
index 01d44a6f1d0e9d0d58e69e2bdce98e097c3f4eb4..c2b50ddabd0fea311de81abf68eed7848b393a0d 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # Implementation of EFI_DNS4_PROTOCOL and EFI_DNS6_PROTOCOL interfaces.\r
 #\r
-# Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -37,8 +37,8 @@
   DnsProtocol.c\r
   DnsDhcp.h\r
   DnsDhcp.c\r
-  \r
-  \r
+\r
+\r
 [LibraryClasses]\r
   BaseLib\r
   UefiLib\r
@@ -52,7 +52,7 @@
   DpcLib\r
   PrintLib\r
   UdpIoLib\r
-  \r
+\r
 \r
 [Protocols]\r
   gEfiDns4ServiceBindingProtocolGuid              ## BY_START\r
@@ -64,7 +64,7 @@
   gEfiIp4Config2ProtocolGuid                      ## SOMETIMES_CONSUMES\r
   gEfiManagedNetworkServiceBindingProtocolGuid    ## SOMETIMES_CONSUMES\r
   gEfiManagedNetworkProtocolGuid                  ## SOMETIMES_CONSUMES\r
-  \r
+\r
   gEfiDns6ServiceBindingProtocolGuid              ## BY_START\r
   gEfiDns6ProtocolGuid                            ## BY_START\r
   gEfiUdp6ServiceBindingProtocolGuid              ## TO_START\r
index fc1116aaa562d4c5948ba4391dce29130e13c8c2..051f4a5b729d2554fbfcab713876d1cf2686e356 100644 (file)
@@ -2,15 +2,15 @@
 // UEFI DNS DXE Driver.\r
 //\r
 // This driver provides UEFI 2.5 DNS protocols. It could work with an IPv4 and IPv6 stack.\r
-// \r
 //\r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+//\r
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
 // which accompanies this distribution. The full text of the license may be found at\r
 // http://opensource.org/licenses/bsd-license.php.\r
-// \r
+//\r
 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 //\r
index ab262d609ce4aafcc8b509c329820d0ff3f1fe76..8d95570097d44d917acdd745ca4b01aee62db62e 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // DnsDxe Localized Strings and Content\r
 //\r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -13,8 +13,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "UEFI DNS DXE"\r
 \r
 \r
index 7057bfbbec9c5a91655c586ab42a09d2ff4d611b..89ea755cb2b95b094f81e76e352cb771e18a0e44 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 DnsDxe support functions implementation.\r
-  \r
-Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>\r
+\r
+Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -45,7 +45,7 @@ Dns4RemoveTokenEntry (
 \r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   return EFI_NOT_FOUND;\r
 }\r
 \r
@@ -57,7 +57,7 @@ Dns4RemoveTokenEntry (
 \r
   @retval EFI_SUCCESS           Remove TokenEntry from TokenMap sucessfully.\r
   @retval EFI_NOT_FOUND         TokenEntry is not found in TokenMap.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 Dns6RemoveTokenEntry (\r
@@ -80,7 +80,7 @@ Dns6RemoveTokenEntry (
 \r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   return EFI_NOT_FOUND;\r
 }\r
 \r
@@ -219,24 +219,24 @@ EFI_STATUS
 EFIAPI\r
 GetDns4TokenEntry (\r
   IN     NET_MAP                   *TokensMap,\r
-  IN     EFI_DNS4_COMPLETION_TOKEN *Token, \r
+  IN     EFI_DNS4_COMPLETION_TOKEN *Token,\r
      OUT DNS4_TOKEN_ENTRY          **TokenEntry\r
   )\r
 {\r
   LIST_ENTRY              *Entry;\r
-  \r
+\r
   NET_MAP_ITEM            *Item;\r
-  \r
+\r
   NET_LIST_FOR_EACH (Entry, &TokensMap->Used) {\r
     Item = NET_LIST_USER_STRUCT (Entry, NET_MAP_ITEM, Link);\r
-    *TokenEntry = (DNS4_TOKEN_ENTRY *) (Item->Key);  \r
+    *TokenEntry = (DNS4_TOKEN_ENTRY *) (Item->Key);\r
     if ((*TokenEntry)->Token == Token) {\r
       return EFI_SUCCESS;\r
     }\r
   }\r
-  \r
+\r
   *TokenEntry = NULL;\r
-  \r
+\r
   return EFI_NOT_FOUND;\r
 }\r
 \r
@@ -255,24 +255,24 @@ EFI_STATUS
 EFIAPI\r
 GetDns6TokenEntry (\r
   IN     NET_MAP                   *TokensMap,\r
-  IN     EFI_DNS6_COMPLETION_TOKEN *Token, \r
+  IN     EFI_DNS6_COMPLETION_TOKEN *Token,\r
      OUT DNS6_TOKEN_ENTRY          **TokenEntry\r
   )\r
 {\r
   LIST_ENTRY              *Entry;\r
-  \r
+\r
   NET_MAP_ITEM            *Item;\r
-  \r
+\r
   NET_LIST_FOR_EACH (Entry, &TokensMap->Used) {\r
     Item = NET_LIST_USER_STRUCT (Entry, NET_MAP_ITEM, Link);\r
-    *TokenEntry = (DNS6_TOKEN_ENTRY *) (Item->Key);  \r
+    *TokenEntry = (DNS6_TOKEN_ENTRY *) (Item->Key);\r
     if ((*TokenEntry)->Token == Token) {\r
       return EFI_SUCCESS;\r
     }\r
   }\r
-  \r
+\r
   *TokenEntry =NULL;\r
-  \r
+\r
   return EFI_NOT_FOUND;\r
 }\r
 \r
@@ -325,7 +325,7 @@ Dns4InstanceCancelToken (
   }\r
 \r
   ASSERT ((TokenEntry != NULL) || (0 == NetMapGetCount (&Instance->Dns4TxTokens)));\r
-  \r
+\r
   if (NetMapIsEmpty (&Instance->Dns4TxTokens)) {\r
     Instance->UdpIo->Protocol.Udp4->Cancel (Instance->UdpIo->Protocol.Udp4, &Instance->UdpIo->RecvRequest->Token.Udp4);\r
   }\r
@@ -382,7 +382,7 @@ Dns6InstanceCancelToken (
   }\r
 \r
   ASSERT ((TokenEntry != NULL) || (0 == NetMapGetCount (&Instance->Dns6TxTokens)));\r
-  \r
+\r
   if (NetMapIsEmpty (&Instance->Dns6TxTokens)) {\r
     Instance->UdpIo->Protocol.Udp6->Cancel (Instance->UdpIo->Protocol.Udp6, &Instance->UdpIo->RecvRequest->Token.Udp6);\r
   }\r
@@ -526,9 +526,9 @@ DnsDummyExtFree (
 \r
 /**\r
   Poll the UDP to get the IP4 default address, which may be retrieved\r
-  by DHCP. \r
-  \r
-  The default time out value is 5 seconds. If IP has retrieved the default address, \r
+  by DHCP.\r
+\r
+  The default time out value is 5 seconds. If IP has retrieved the default address,\r
   the UDP is reconfigured.\r
 \r
   @param  Instance               The DNS instance\r
@@ -657,10 +657,10 @@ Dns6GetMapping (
 \r
 /**\r
   Configure the UDP.\r
-  \r
+\r
   @param  Instance               The DNS session\r
   @param  UdpIo                  The UDP_IO instance\r
-  \r
+\r
   @retval EFI_SUCCESS            The UDP is successfully configured for the\r
                                  session.\r
 \r
@@ -699,13 +699,13 @@ Dns4ConfigUdp (
   if ((Status == EFI_NO_MAPPING) && Dns4GetMapping (Instance, UdpIo, &UdpConfig)) {\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   return Status;\r
 }\r
 \r
 /**\r
   Configure the UDP.\r
-  \r
+\r
   @param  Instance               The DNS session\r
   @param  UdpIo                  The UDP_IO instance\r
 \r
@@ -742,24 +742,24 @@ Dns6ConfigUdp (
   if ((Status == EFI_NO_MAPPING) && Dns6GetMapping (Instance, UdpIo, &UdpConfig)) {\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   return Status;\r
 }\r
 \r
 /**\r
   Update Dns4 cache to shared list of caches of all DNSv4 instances.\r
-  \r
+\r
   @param  Dns4CacheList      All Dns4 cache list.\r
-  @param  DeleteFlag         If FALSE, this function is to add one entry to the DNS Cache. \r
-                             If TRUE, this function will delete matching DNS Cache entry. \r
-  @param  Override           If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter. \r
+  @param  DeleteFlag         If FALSE, this function is to add one entry to the DNS Cache.\r
+                             If TRUE, this function will delete matching DNS Cache entry.\r
+  @param  Override           If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter.\r
                              If FALSE, EFI_ACCESS_DENIED will be returned if the entry to be added is already exists.\r
   @param  DnsCacheEntry      Entry Pointer to DNS Cache entry.\r
 \r
   @retval EFI_SUCCESS        Update Dns4 cache successfully.\r
-  @retval Others             Failed to update Dns4 cache.   \r
-  \r
-**/ \r
+  @retval Others             Failed to update Dns4 cache.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 UpdateDns4Cache (\r
@@ -769,14 +769,14 @@ UpdateDns4Cache (
   IN EFI_DNS4_CACHE_ENTRY   DnsCacheEntry\r
   )\r
 {\r
-  DNS4_CACHE    *NewDnsCache;  \r
+  DNS4_CACHE    *NewDnsCache;\r
   DNS4_CACHE    *Item;\r
   LIST_ENTRY    *Entry;\r
   LIST_ENTRY    *Next;\r
 \r
   NewDnsCache = NULL;\r
   Item        = NULL;\r
-  \r
+\r
   //\r
   // Search the database for the matching EFI_DNS_CACHE_ENTRY\r
   //\r
@@ -796,14 +796,14 @@ UpdateDns4Cache (
         FreePool (Item->DnsCache.HostName);\r
         FreePool (Item->DnsCache.IpAddress);\r
         FreePool (Item);\r
-        \r
+\r
         return EFI_SUCCESS;\r
       } else if (Override) {\r
         //\r
         // Update this one\r
         //\r
         Item->DnsCache.Timeout = DnsCacheEntry.Timeout;\r
-        \r
+\r
         return EFI_SUCCESS;\r
       }else {\r
         return EFI_ACCESS_DENIED;\r
@@ -815,18 +815,18 @@ UpdateDns4Cache (
   // Add new one\r
   //\r
   NewDnsCache = AllocatePool (sizeof (DNS4_CACHE));\r
-  if (NewDnsCache == NULL) { \r
+  if (NewDnsCache == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   InitializeListHead (&NewDnsCache->AllCacheLink);\r
-   \r
+\r
   NewDnsCache->DnsCache.HostName = AllocatePool (StrSize (DnsCacheEntry.HostName));\r
-  if (NewDnsCache->DnsCache.HostName == NULL) { \r
+  if (NewDnsCache->DnsCache.HostName == NULL) {\r
     FreePool (NewDnsCache);\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   CopyMem (NewDnsCache->DnsCache.HostName, DnsCacheEntry.HostName, StrSize (DnsCacheEntry.HostName));\r
 \r
   NewDnsCache->DnsCache.IpAddress = AllocatePool (sizeof (EFI_IPv4_ADDRESS));\r
@@ -839,25 +839,25 @@ UpdateDns4Cache (
   CopyMem (NewDnsCache->DnsCache.IpAddress, DnsCacheEntry.IpAddress, sizeof (EFI_IPv4_ADDRESS));\r
 \r
   NewDnsCache->DnsCache.Timeout = DnsCacheEntry.Timeout;\r
-  \r
+\r
   InsertTailList (Dns4CacheList, &NewDnsCache->AllCacheLink);\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
 /**\r
-  Update Dns6 cache to shared list of caches of all DNSv6 instances. \r
+  Update Dns6 cache to shared list of caches of all DNSv6 instances.\r
 \r
   @param  Dns6CacheList      All Dns6 cache list.\r
-  @param  DeleteFlag         If FALSE, this function is to add one entry to the DNS Cache. \r
-                             If TRUE, this function will delete matching DNS Cache entry. \r
-  @param  Override           If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter. \r
+  @param  DeleteFlag         If FALSE, this function is to add one entry to the DNS Cache.\r
+                             If TRUE, this function will delete matching DNS Cache entry.\r
+  @param  Override           If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter.\r
                              If FALSE, EFI_ACCESS_DENIED will be returned if the entry to be added is already exists.\r
   @param  DnsCacheEntry      Entry Pointer to DNS Cache entry.\r
-  \r
+\r
   @retval EFI_SUCCESS        Update Dns6 cache successfully.\r
   @retval Others             Failed to update Dns6 cache.\r
-**/ \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 UpdateDns6Cache (\r
@@ -867,14 +867,14 @@ UpdateDns6Cache (
   IN EFI_DNS6_CACHE_ENTRY   DnsCacheEntry\r
   )\r
 {\r
-  DNS6_CACHE    *NewDnsCache;  \r
+  DNS6_CACHE    *NewDnsCache;\r
   DNS6_CACHE    *Item;\r
   LIST_ENTRY    *Entry;\r
   LIST_ENTRY    *Next;\r
 \r
   NewDnsCache = NULL;\r
   Item        = NULL;\r
-  \r
+\r
   //\r
   // Search the database for the matching EFI_DNS_CACHE_ENTRY\r
   //\r
@@ -890,18 +890,18 @@ UpdateDns6Cache (
         // Delete matching DNS Cache entry\r
         //\r
         RemoveEntryList (&Item->AllCacheLink);\r
-        \r
+\r
         FreePool (Item->DnsCache.HostName);\r
         FreePool (Item->DnsCache.IpAddress);\r
         FreePool (Item);\r
-        \r
+\r
         return EFI_SUCCESS;\r
       } else if (Override) {\r
         //\r
         // Update this one\r
         //\r
         Item->DnsCache.Timeout = DnsCacheEntry.Timeout;\r
-        \r
+\r
         return EFI_SUCCESS;\r
       }else {\r
         return EFI_ACCESS_DENIED;\r
@@ -913,18 +913,18 @@ UpdateDns6Cache (
   // Add new one\r
   //\r
   NewDnsCache = AllocatePool (sizeof (DNS6_CACHE));\r
-  if (NewDnsCache == NULL) { \r
+  if (NewDnsCache == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   InitializeListHead (&NewDnsCache->AllCacheLink);\r
-   \r
+\r
   NewDnsCache->DnsCache.HostName = AllocatePool (StrSize (DnsCacheEntry.HostName));\r
-  if (NewDnsCache->DnsCache.HostName == NULL) { \r
+  if (NewDnsCache->DnsCache.HostName == NULL) {\r
     FreePool (NewDnsCache);\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   CopyMem (NewDnsCache->DnsCache.HostName, DnsCacheEntry.HostName, StrSize (DnsCacheEntry.HostName));\r
 \r
   NewDnsCache->DnsCache.IpAddress = AllocatePool (sizeof (EFI_IPv6_ADDRESS));\r
@@ -933,26 +933,26 @@ UpdateDns6Cache (
     FreePool (NewDnsCache);\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   CopyMem (NewDnsCache->DnsCache.IpAddress, DnsCacheEntry.IpAddress, sizeof (EFI_IPv6_ADDRESS));\r
 \r
   NewDnsCache->DnsCache.Timeout = DnsCacheEntry.Timeout;\r
-  \r
+\r
   InsertTailList (Dns6CacheList, &NewDnsCache->AllCacheLink);\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
 /**\r
-  Add Dns4 ServerIp to common list of addresses of all configured DNSv4 server. \r
+  Add Dns4 ServerIp to common list of addresses of all configured DNSv4 server.\r
 \r
-  @param  Dns4ServerList    Common list of addresses of all configured DNSv4 server.  \r
-  @param  ServerIp          DNS server Ip.  \r
+  @param  Dns4ServerList    Common list of addresses of all configured DNSv4 server.\r
+  @param  ServerIp          DNS server Ip.\r
 \r
   @retval EFI_SUCCESS       Add Dns4 ServerIp to common list successfully.\r
   @retval Others            Failed to add Dns4 ServerIp to common list.\r
-  \r
-**/ \r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 AddDns4ServerIp (\r
@@ -960,14 +960,14 @@ AddDns4ServerIp (
   IN EFI_IPv4_ADDRESS           ServerIp\r
   )\r
 {\r
-  DNS4_SERVER_IP    *NewServerIp;  \r
+  DNS4_SERVER_IP    *NewServerIp;\r
   DNS4_SERVER_IP    *Item;\r
   LIST_ENTRY        *Entry;\r
   LIST_ENTRY        *Next;\r
 \r
   NewServerIp = NULL;\r
   Item        = NULL;\r
-  \r
+\r
   //\r
   // Search the database for the matching ServerIp\r
   //\r
@@ -976,7 +976,7 @@ AddDns4ServerIp (
     if (CompareMem (&Item->Dns4ServerIp, &ServerIp, sizeof (EFI_IPv4_ADDRESS)) == 0) {\r
       //\r
       // Already done.\r
-      // \r
+      //\r
       return EFI_SUCCESS;\r
     }\r
   }\r
@@ -985,29 +985,29 @@ AddDns4ServerIp (
   // Add new one\r
   //\r
   NewServerIp = AllocatePool (sizeof (DNS4_SERVER_IP));\r
-  if (NewServerIp == NULL) { \r
+  if (NewServerIp == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   InitializeListHead (&NewServerIp->AllServerLink);\r
-   \r
+\r
   CopyMem (&NewServerIp->Dns4ServerIp, &ServerIp, sizeof (EFI_IPv4_ADDRESS));\r
-  \r
+\r
   InsertTailList (Dns4ServerList, &NewServerIp->AllServerLink);\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
 /**\r
-  Add Dns6 ServerIp to common list of addresses of all configured DNSv6 server. \r
+  Add Dns6 ServerIp to common list of addresses of all configured DNSv6 server.\r
 \r
-  @param  Dns6ServerList    Common list of addresses of all configured DNSv6 server.  \r
-  @param  ServerIp          DNS server Ip.  \r
+  @param  Dns6ServerList    Common list of addresses of all configured DNSv6 server.\r
+  @param  ServerIp          DNS server Ip.\r
 \r
   @retval EFI_SUCCESS       Add Dns6 ServerIp to common list successfully.\r
   @retval Others            Failed to add Dns6 ServerIp to common list.\r
-  \r
-**/ \r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 AddDns6ServerIp (\r
@@ -1015,14 +1015,14 @@ AddDns6ServerIp (
   IN EFI_IPv6_ADDRESS           ServerIp\r
   )\r
 {\r
-  DNS6_SERVER_IP    *NewServerIp;  \r
+  DNS6_SERVER_IP    *NewServerIp;\r
   DNS6_SERVER_IP    *Item;\r
   LIST_ENTRY        *Entry;\r
   LIST_ENTRY        *Next;\r
 \r
   NewServerIp = NULL;\r
   Item        = NULL;\r
-  \r
+\r
   //\r
   // Search the database for the matching ServerIp\r
   //\r
@@ -1031,7 +1031,7 @@ AddDns6ServerIp (
     if (CompareMem (&Item->Dns6ServerIp, &ServerIp, sizeof (EFI_IPv6_ADDRESS)) == 0) {\r
       //\r
       // Already done.\r
-      // \r
+      //\r
       return EFI_SUCCESS;\r
     }\r
   }\r
@@ -1040,32 +1040,32 @@ AddDns6ServerIp (
   // Add new one\r
   //\r
   NewServerIp = AllocatePool (sizeof (DNS6_SERVER_IP));\r
-  if (NewServerIp == NULL) { \r
+  if (NewServerIp == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   InitializeListHead (&NewServerIp->AllServerLink);\r
-   \r
+\r
   CopyMem (&NewServerIp->Dns6ServerIp, &ServerIp, sizeof (EFI_IPv6_ADDRESS));\r
-  \r
+\r
   InsertTailList (Dns6ServerList, &NewServerIp->AllServerLink);\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
 /**\r
   Find out whether the response is valid or invalid.\r
 \r
-  @param  TokensMap       All DNS transmittal Tokens entry.  \r
-  @param  Identification  Identification for queried packet.  \r
+  @param  TokensMap       All DNS transmittal Tokens entry.\r
+  @param  Identification  Identification for queried packet.\r
   @param  Type            Type for queried packet.\r
   @param  Class           Class for queried packet.\r
   @param  Item            Return corresponding Token entry.\r
 \r
   @retval TRUE            The response is valid.\r
   @retval FALSE           The response is invalid.\r
-  \r
-**/ \r
+\r
+**/\r
 BOOLEAN\r
 IsValidDnsResponse (\r
   IN     NET_MAP      *TokensMap,\r
@@ -1087,7 +1087,7 @@ IsValidDnsResponse (
     *Item = NET_LIST_USER_STRUCT (Entry, NET_MAP_ITEM, Link);\r
     Packet = (NET_BUF *) ((*Item)->Value);\r
     if (Packet == NULL){\r
-      \r
+\r
       continue;\r
     } else {\r
       TxString = NetbufGetByte (Packet, 0, NULL);\r
@@ -1095,17 +1095,17 @@ IsValidDnsResponse (
       DnsHeader = (DNS_HEADER *) TxString;\r
       QueryName = (CHAR8 *) (TxString + sizeof (*DnsHeader));\r
       QuerySection = (DNS_QUERY_SECTION *) (QueryName + AsciiStrLen (QueryName) + 1);\r
-        \r
+\r
       if (NTOHS (DnsHeader->Identification) == Identification &&\r
-          NTOHS (QuerySection->Type) == Type && \r
+          NTOHS (QuerySection->Type) == Type &&\r
           NTOHS (QuerySection->Class) == Class) {\r
         return TRUE;\r
       }\r
-    } \r
+    }\r
   }\r
-  \r
+\r
   *Item = NULL;\r
-  \r
+\r
   return FALSE;\r
 }\r
 \r
@@ -1114,12 +1114,12 @@ IsValidDnsResponse (
 \r
   @param  Instance              The DNS instance\r
   @param  RxString              Received buffer.\r
-  @param  Completed             Flag to indicate that Dns response is valid. \r
-  \r
+  @param  Completed             Flag to indicate that Dns response is valid.\r
+\r
   @retval EFI_SUCCESS           Parse Dns Response successfully.\r
   @retval Others                Failed to parse Dns Response.\r
-  \r
-**/ \r
+\r
+**/\r
 EFI_STATUS\r
 ParseDnsResponse (\r
   IN OUT DNS_INSTANCE              *Instance,\r
@@ -1128,10 +1128,10 @@ ParseDnsResponse (
   )\r
 {\r
   DNS_HEADER            *DnsHeader;\r
-  \r
+\r
   CHAR8                 *QueryName;\r
   DNS_QUERY_SECTION     *QuerySection;\r
-  \r
+\r
   CHAR8                 *AnswerName;\r
   DNS_ANSWER_SECTION    *AnswerSection;\r
   UINT8                 *AnswerData;\r
@@ -1139,12 +1139,12 @@ ParseDnsResponse (
   NET_MAP_ITEM          *Item;\r
   DNS4_TOKEN_ENTRY      *Dns4TokenEntry;\r
   DNS6_TOKEN_ENTRY      *Dns6TokenEntry;\r
-  \r
+\r
   UINT32                IpCount;\r
   UINT32                RRCount;\r
   UINT32                AnswerSectionNum;\r
   UINT32                CNameTtl;\r
-  \r
+\r
   EFI_IPv4_ADDRESS      *HostAddr4;\r
   EFI_IPv6_ADDRESS      *HostAddr6;\r
 \r
@@ -1157,33 +1157,33 @@ ParseDnsResponse (
   EFI_STATUS            Status;\r
 \r
   EFI_TPL               OldTpl;\r
-  \r
+\r
   Item             = NULL;\r
   Dns4TokenEntry   = NULL;\r
   Dns6TokenEntry   = NULL;\r
-  \r
+\r
   IpCount          = 0;\r
   RRCount          = 0;\r
   AnswerSectionNum = 0;\r
   CNameTtl         = 0;\r
-  \r
+\r
   HostAddr4        = NULL;\r
   HostAddr6        = NULL;\r
-  \r
+\r
   Dns4CacheEntry   = NULL;\r
   Dns6CacheEntry   = NULL;\r
-  \r
+\r
   Dns4RR           = NULL;\r
   Dns6RR           = NULL;\r
 \r
   *Completed       = TRUE;\r
   Status           = EFI_SUCCESS;\r
-  \r
+\r
   //\r
   // Get header\r
   //\r
   DnsHeader = (DNS_HEADER *) RxString;\r
-  \r
+\r
   DnsHeader->Identification = NTOHS (DnsHeader->Identification);\r
   DnsHeader->Flags.Uint16 = NTOHS (DnsHeader->Flags.Uint16);\r
   DnsHeader->QuestionsNum = NTOHS (DnsHeader->QuestionsNum);\r
@@ -1215,8 +1215,8 @@ ParseDnsResponse (
   //\r
   if (Instance->Service->IpVersion == IP_VERSION_4) {\r
     if (!IsValidDnsResponse (\r
-           &Instance->Dns4TxTokens, \r
-           DnsHeader->Identification, \r
+           &Instance->Dns4TxTokens,\r
+           DnsHeader->Identification,\r
            QuerySection->Type,\r
            QuerySection->Class,\r
            &Item\r
@@ -1229,8 +1229,8 @@ ParseDnsResponse (
     Dns4TokenEntry = (DNS4_TOKEN_ENTRY *) (Item->Key);\r
   } else {\r
     if (!IsValidDnsResponse (\r
-           &Instance->Dns6TxTokens, \r
-           DnsHeader->Identification, \r
+           &Instance->Dns6TxTokens,\r
+           DnsHeader->Identification,\r
            QuerySection->Type,\r
            QuerySection->Class,\r
            &Item\r
@@ -1242,7 +1242,7 @@ ParseDnsResponse (
     ASSERT (Item != NULL);\r
     Dns6TokenEntry = (DNS6_TOKEN_ENTRY *) (Item->Key);\r
   }\r
-   \r
+\r
   //\r
   // Continue Check Some Errors.\r
   //\r
@@ -1252,14 +1252,14 @@ ParseDnsResponse (
     // The domain name referenced in the query does not exist.\r
     //\r
     if (DnsHeader->Flags.Bits.RCode == DNS_FLAGS_RCODE_NAME_ERROR) {\r
-      Status = EFI_NOT_FOUND; \r
+      Status = EFI_NOT_FOUND;\r
     } else {\r
       Status = EFI_DEVICE_ERROR;\r
     }\r
-    \r
+\r
     goto ON_COMPLETE;\r
   }\r
-  \r
+\r
   //\r
   // Do some buffer allocations.\r
   //\r
@@ -1352,7 +1352,7 @@ ParseDnsResponse (
       Status = EFI_UNSUPPORTED;\r
       goto ON_EXIT;\r
     }\r
-    \r
+\r
     //\r
     // Get Answer section.\r
     //\r
@@ -1388,7 +1388,7 @@ ParseDnsResponse (
         goto ON_EXIT;\r
       }\r
       CopyMem (Dns4RR[RRCount].RData, AnswerData, Dns4RR[RRCount].DataLength);\r
-      \r
+\r
       RRCount ++;\r
       Status = EFI_SUCCESS;\r
     } else if (Instance->Service->IpVersion == IP_VERSION_6 && Dns6TokenEntry->GeneralLookUp) {\r
@@ -1414,12 +1414,12 @@ ParseDnsResponse (
         goto ON_EXIT;\r
       }\r
       CopyMem (Dns6RR[RRCount].RData, AnswerData, Dns6RR[RRCount].DataLength);\r
-      \r
+\r
       RRCount ++;\r
       Status = EFI_SUCCESS;\r
     } else {\r
       //\r
-      // It's not the GeneralLookUp querying. \r
+      // It's not the GeneralLookUp querying.\r
       // Check the Query type, parse the response packet.\r
       //\r
       switch (AnswerSection->Type) {\r
@@ -1433,12 +1433,12 @@ ParseDnsResponse (
           Status = EFI_ABORTED;\r
           goto ON_EXIT;\r
         }\r
-        \r
+\r
         HostAddr4 = Dns4TokenEntry->Token->RspData.H2AData->IpList;\r
         AnswerData = (UINT8 *) AnswerSection + sizeof (*AnswerSection);\r
         CopyMem (&HostAddr4[IpCount], AnswerData, sizeof (EFI_IPv4_ADDRESS));\r
 \r
-        // \r
+        //\r
         // Allocate new CacheEntry pool to update DNS cache dynamically.\r
         //\r
         Dns4CacheEntry = AllocateZeroPool (sizeof (EFI_DNS4_CACHE_ENTRY));\r
@@ -1464,15 +1464,15 @@ ParseDnsResponse (
         } else {\r
           Dns4CacheEntry->Timeout = MAX (CNameTtl, AnswerSection->Ttl);\r
         }\r
-        \r
+\r
         UpdateDns4Cache (&mDriverData->Dns4CacheList, FALSE, TRUE, *Dns4CacheEntry);\r
 \r
-        // \r
+        //\r
         // Free allocated CacheEntry pool.\r
         //\r
         FreePool (Dns4CacheEntry->HostName);\r
         Dns4CacheEntry->HostName = NULL;\r
-        \r
+\r
         FreePool (Dns4CacheEntry->IpAddress);\r
         Dns4CacheEntry->IpAddress = NULL;\r
 \r
@@ -1492,12 +1492,12 @@ ParseDnsResponse (
           Status = EFI_ABORTED;\r
           goto ON_EXIT;\r
         }\r
-        \r
+\r
         HostAddr6 = Dns6TokenEntry->Token->RspData.H2AData->IpList;\r
         AnswerData = (UINT8 *) AnswerSection + sizeof (*AnswerSection);\r
         CopyMem (&HostAddr6[IpCount], AnswerData, sizeof (EFI_IPv6_ADDRESS));\r
 \r
-        // \r
+        //\r
         // Allocate new CacheEntry pool to update DNS cache dynamically.\r
         //\r
         Dns6CacheEntry = AllocateZeroPool (sizeof (EFI_DNS6_CACHE_ENTRY));\r
@@ -1523,28 +1523,28 @@ ParseDnsResponse (
         } else {\r
           Dns6CacheEntry->Timeout = MAX (CNameTtl, AnswerSection->Ttl);\r
         }\r
-        \r
+\r
         UpdateDns6Cache (&mDriverData->Dns6CacheList, FALSE, TRUE, *Dns6CacheEntry);\r
 \r
-        // \r
+        //\r
         // Free allocated CacheEntry pool.\r
         //\r
         FreePool (Dns6CacheEntry->HostName);\r
         Dns6CacheEntry->HostName = NULL;\r
-        \r
+\r
         FreePool (Dns6CacheEntry->IpAddress);\r
         Dns6CacheEntry->IpAddress = NULL;\r
 \r
         FreePool (Dns6CacheEntry);\r
         Dns6CacheEntry = NULL;\r
-        \r
+\r
         IpCount ++;\r
         Status = EFI_SUCCESS;\r
         break;\r
       case DNS_TYPE_CNAME:\r
         //\r
-        // According RFC 1034 - 3.6.2, if the query name is an alias, the name server will include the CNAME \r
-        // record in the response and restart the query at the domain name specified in the data field of the \r
+        // According RFC 1034 - 3.6.2, if the query name is an alias, the name server will include the CNAME\r
+        // record in the response and restart the query at the domain name specified in the data field of the\r
         // CNAME record. So, just record the TTL value of the CNAME, then skip to parse the next record.\r
         //\r
         CNameTtl = AnswerSection->Ttl;\r
@@ -1554,7 +1554,7 @@ ParseDnsResponse (
         goto ON_EXIT;\r
       }\r
     }\r
-    \r
+\r
     //\r
     // Find next one\r
     //\r
@@ -1564,7 +1564,7 @@ ParseDnsResponse (
 \r
   if (Instance->Service->IpVersion == IP_VERSION_4) {\r
     ASSERT (Dns4TokenEntry != NULL);\r
-    \r
+\r
     if (Dns4TokenEntry->GeneralLookUp) {\r
       Dns4TokenEntry->Token->RspData.GLookupData->RRCount = RRCount;\r
     } else {\r
@@ -1589,7 +1589,7 @@ ParseDnsResponse (
       }\r
     }\r
   }\r
-  \r
+\r
 ON_COMPLETE:\r
   //\r
   // Parsing is complete, free the sending packet and signal Event here.\r
@@ -1597,7 +1597,7 @@ ON_COMPLETE:
   if (Item != NULL && Item->Value != NULL) {\r
     NetbufFree ((NET_BUF *) (Item->Value));\r
   }\r
-  \r
+\r
   if (Instance->Service->IpVersion == IP_VERSION_4) {\r
     ASSERT (Dns4TokenEntry != NULL);\r
     Dns4RemoveTokenEntry (&Instance->Dns4TxTokens, Dns4TokenEntry);\r
@@ -1635,10 +1635,10 @@ ON_EXIT:
                 FreePool (Dns4TokenEntry->Token->RspData.GLookupData->RRList[RRCount].RData);\r
               }\r
             }\r
-            \r
+\r
             FreePool (Dns4TokenEntry->Token->RspData.GLookupData->RRList);\r
           }\r
-          \r
+\r
           FreePool (Dns4TokenEntry->Token->RspData.GLookupData);\r
         }\r
       } else {\r
@@ -1646,7 +1646,7 @@ ON_EXIT:
           if (Dns4TokenEntry->Token->RspData.H2AData->IpList != NULL) {\r
             FreePool (Dns4TokenEntry->Token->RspData.H2AData->IpList);\r
           }\r
-          \r
+\r
           FreePool (Dns4TokenEntry->Token->RspData.H2AData);\r
         }\r
       }\r
@@ -1666,10 +1666,10 @@ ON_EXIT:
                 FreePool (Dns6TokenEntry->Token->RspData.GLookupData->RRList[RRCount].RData);\r
               }\r
             }\r
-            \r
+\r
             FreePool (Dns6TokenEntry->Token->RspData.GLookupData->RRList);\r
           }\r
-          \r
+\r
           FreePool (Dns6TokenEntry->Token->RspData.GLookupData);\r
         }\r
       } else {\r
@@ -1677,7 +1677,7 @@ ON_EXIT:
           if (Dns6TokenEntry->Token->RspData.H2AData->IpList != NULL) {\r
             FreePool (Dns6TokenEntry->Token->RspData.H2AData->IpList);\r
           }\r
-          \r
+\r
           FreePool (Dns6TokenEntry->Token->RspData.H2AData);\r
         }\r
       }\r
@@ -1705,9 +1705,9 @@ ON_EXIT:
       }\r
 \r
       FreePool (Dns6CacheEntry);\r
-    }    \r
+    }\r
   }\r
-  \r
+\r
   gBS->RestoreTPL (OldTpl);\r
   return Status;\r
 }\r
@@ -1720,7 +1720,7 @@ ON_EXIT:
   @param  IoStatus              The status of the UDP receive\r
   @param  Context               The opaque parameter to the function.\r
 \r
-**/  \r
+**/\r
 VOID\r
 EFIAPI\r
 DnsOnPacketReceived (\r
@@ -1735,7 +1735,7 @@ DnsOnPacketReceived (
   UINT8                     *RcvString;\r
 \r
   BOOLEAN                   Completed;\r
-  \r
+\r
   Instance  = (DNS_INSTANCE *) Context;\r
   NET_CHECK_SIGNATURE (Instance, DNS_INSTANCE_SIGNATURE);\r
 \r
@@ -1751,10 +1751,10 @@ DnsOnPacketReceived (
   if (Packet->TotalSize <= sizeof (DNS_HEADER)) {\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   RcvString = NetbufGetByte (Packet, 0, NULL);\r
   ASSERT (RcvString != NULL);\r
-  \r
+\r
   //\r
   // Parse Dns Response\r
   //\r
@@ -1820,7 +1820,7 @@ DnsOnPacketSent (
       }\r
     }\r
   }\r
-  \r
+\r
   NetbufFree (Packet);\r
 }\r
 \r
@@ -1851,14 +1851,14 @@ DoDnsQuery (
       return Status;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Transmit the DNS packet.\r
   //\r
   NET_GET_REF (Packet);\r
 \r
   Status = UdpIoSendDatagram (Instance->UdpIo, Packet, NULL, NULL, DnsOnPacketSent, Instance);\r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -1866,9 +1866,9 @@ DoDnsQuery (
   Construct the Packet according query section.\r
 \r
   @param  Instance              The DNS instance\r
-  @param  QueryName             Queried Name  \r
-  @param  Type                  Queried Type \r
-  @param  Class                 Queried Class \r
+  @param  QueryName             Queried Name\r
+  @param  Type                  Queried Type\r
+  @param  Class                 Queried Class\r
   @param  Packet                The packet for query\r
 \r
   @retval EFI_SUCCESS           The packet is constructed.\r
@@ -1900,7 +1900,7 @@ ConstructDNSQuery (
   //\r
   // Fill header\r
   //\r
-  DnsHeader = (DNS_HEADER *) Frag.Bulk; \r
+  DnsHeader = (DNS_HEADER *) Frag.Bulk;\r
   DnsHeader->Identification = (UINT16)NET_RANDOM (NetRandomInitSeed());\r
   DnsHeader->Flags.Uint16 = 0x0000;\r
   DnsHeader->Flags.Bits.RD = 1;\r
@@ -1927,7 +1927,7 @@ ConstructDNSQuery (
   Frag.Len = (UINT32) (Frag.Len + AsciiStrLen (QueryName));\r
   *(Frag.Bulk + Frag.Len) = 0;\r
   Frag.Len ++;\r
-  \r
+\r
   //\r
   // Rest query section\r
   //\r
@@ -1946,7 +1946,7 @@ ConstructDNSQuery (
     FreePool (Frag.Bulk);\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   //\r
   // Store the UdpIo in ProtoData.\r
   //\r
@@ -1959,7 +1959,7 @@ ConstructDNSQuery (
   Retransmit the packet.\r
 \r
   @param  Instance              The DNS instance\r
-  @param  Packet                Retransmit the packet \r
+  @param  Packet                Retransmit the packet\r
 \r
   @retval EFI_SUCCESS           The packet is retransmitted.\r
   @retval Others                Failed to retransmit.\r
@@ -1972,7 +1972,7 @@ DnsRetransmit (
   )\r
 {\r
   EFI_STATUS      Status;\r
-  \r
+\r
   UINT8           *Buffer;\r
 \r
   ASSERT (Packet != NULL);\r
@@ -2064,7 +2064,7 @@ DnsOnTimerRetransmit (
           Dns4TokenEntry->Token->Status = EFI_TIMEOUT;\r
           gBS->SignalEvent (Dns4TokenEntry->Token->Event);\r
           DispatchDpc ();\r
-          \r
+\r
           //\r
           // Free the sending packet.\r
           //\r
@@ -2075,7 +2075,7 @@ DnsOnTimerRetransmit (
           EntryNetMap = Instance->Dns4TxTokens.Used.ForwardLink;\r
         }\r
       }\r
-    } \r
+    }\r
   }else {\r
     //\r
     // Iterate through all the children of the DNS service instance. Time\r
@@ -2083,7 +2083,7 @@ DnsOnTimerRetransmit (
     //\r
     NET_LIST_FOR_EACH_SAFE (Entry, Next, &Service->Dns6ChildrenList) {\r
       Instance = NET_LIST_USER_STRUCT (Entry, DNS_INSTANCE, Link);\r
-      \r
+\r
       EntryNetMap = Instance->Dns6TxTokens.Used.ForwardLink;\r
       while (EntryNetMap != &Instance->Dns6TxTokens.Used) {\r
         ItemNetMap = NET_LIST_USER_STRUCT (EntryNetMap, NET_MAP_ITEM, Link);\r
@@ -2108,7 +2108,7 @@ DnsOnTimerRetransmit (
           Dns6TokenEntry->Token->Status = EFI_TIMEOUT;\r
           gBS->SignalEvent (Dns6TokenEntry->Token->Event);\r
           DispatchDpc ();\r
-          \r
+\r
           //\r
           // Free the sending packet.\r
           //\r
@@ -2117,10 +2117,10 @@ DnsOnTimerRetransmit (
           }\r
 \r
           EntryNetMap = Instance->Dns6TxTokens.Used.ForwardLink;\r
-        } \r
+        }\r
       }\r
     }\r
-  } \r
+  }\r
 }\r
 \r
 /**\r
@@ -2152,7 +2152,7 @@ DnsOnTimerUpdate (
     Item4 = NET_LIST_USER_STRUCT (Entry, DNS4_CACHE, AllCacheLink);\r
     Item4->DnsCache.Timeout--;\r
   }\r
-  \r
+\r
   Entry = mDriverData->Dns4CacheList.ForwardLink;\r
   while (Entry != &mDriverData->Dns4CacheList) {\r
     Item4 = NET_LIST_USER_STRUCT (Entry, DNS4_CACHE, AllCacheLink);\r
@@ -2166,7 +2166,7 @@ DnsOnTimerUpdate (
       Entry = Entry->ForwardLink;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Iterate through all the DNS6 cache list.\r
   //\r
@@ -2174,7 +2174,7 @@ DnsOnTimerUpdate (
     Item6 = NET_LIST_USER_STRUCT (Entry, DNS6_CACHE, AllCacheLink);\r
     Item6->DnsCache.Timeout--;\r
   }\r
-  \r
+\r
   Entry = mDriverData->Dns6CacheList.ForwardLink;\r
   while (Entry != &mDriverData->Dns6CacheList) {\r
     Item6 = NET_LIST_USER_STRUCT (Entry, DNS6_CACHE, AllCacheLink);\r
index 3c6296cb65ad4d5df0daa76beaf1d26018f01502..90dc0549038428859190500088263a6f1d92affa 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 DnsDxe support functions implementation.\r
-   \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
+\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -95,22 +95,22 @@ typedef union _DNS_FLAGS  DNS_FLAGS;
 \r
 typedef struct {\r
   LIST_ENTRY             AllCacheLink;\r
-  EFI_DNS4_CACHE_ENTRY   DnsCache;     \r
+  EFI_DNS4_CACHE_ENTRY   DnsCache;\r
 } DNS4_CACHE;\r
 \r
 typedef struct {\r
   LIST_ENTRY             AllCacheLink;\r
-  EFI_DNS6_CACHE_ENTRY   DnsCache;     \r
+  EFI_DNS6_CACHE_ENTRY   DnsCache;\r
 } DNS6_CACHE;\r
 \r
 typedef struct {\r
   LIST_ENTRY             AllServerLink;\r
-  EFI_IPv4_ADDRESS       Dns4ServerIp;     \r
+  EFI_IPv4_ADDRESS       Dns4ServerIp;\r
 } DNS4_SERVER_IP;\r
 \r
 typedef struct {\r
   LIST_ENTRY             AllServerLink;\r
-  EFI_IPv6_ADDRESS       Dns6ServerIp;       \r
+  EFI_IPv6_ADDRESS       Dns6ServerIp;\r
 } DNS6_SERVER_IP;\r
 \r
 typedef struct {\r
@@ -206,7 +206,7 @@ Dns4RemoveTokenEntry (
 \r
   @retval EFI_SUCCESS           Remove TokenEntry from TokenMap sucessfully.\r
   @retval EFI_NOT_FOUND         TokenEntry is not found in TokenMap.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 Dns6RemoveTokenEntry (\r
@@ -277,7 +277,7 @@ EFI_STATUS
 EFIAPI\r
 GetDns4TokenEntry (\r
   IN     NET_MAP                   *TokensMap,\r
-  IN     EFI_DNS4_COMPLETION_TOKEN *Token, \r
+  IN     EFI_DNS4_COMPLETION_TOKEN *Token,\r
      OUT DNS4_TOKEN_ENTRY          **TokenEntry\r
   );\r
 \r
@@ -296,7 +296,7 @@ EFI_STATUS
 EFIAPI\r
 GetDns6TokenEntry (\r
   IN     NET_MAP                   *TokensMap,\r
-  IN     EFI_DNS6_COMPLETION_TOKEN *Token, \r
+  IN     EFI_DNS6_COMPLETION_TOKEN *Token,\r
      OUT DNS6_TOKEN_ENTRY          **TokenEntry\r
   );\r
 \r
@@ -406,9 +406,9 @@ DnsDummyExtFree (
 \r
 /**\r
   Poll the UDP to get the IP4 default address, which may be retrieved\r
-  by DHCP. \r
-  \r
-  The default time out value is 5 seconds. If IP has retrieved the default address, \r
+  by DHCP.\r
+\r
+  The default time out value is 5 seconds. If IP has retrieved the default address,\r
   the UDP is reconfigured.\r
 \r
   @param  Instance               The DNS instance\r
@@ -447,10 +447,10 @@ Dns6GetMapping (
 \r
 /**\r
   Configure the UDP.\r
-  \r
+\r
   @param  Instance               The DNS session\r
   @param  UdpIo                  The UDP_IO instance\r
-  \r
+\r
   @retval EFI_SUCCESS            The UDP is successfully configured for the\r
                                  session.\r
 \r
@@ -463,7 +463,7 @@ Dns4ConfigUdp (
 \r
 /**\r
   Configure the UDP.\r
-  \r
+\r
   @param  Instance               The DNS session\r
   @param  UdpIo                  The UDP_IO instance\r
 \r
@@ -479,17 +479,17 @@ Dns6ConfigUdp (
 \r
 /**\r
   Update Dns4 cache to shared list of caches of all DNSv4 instances.\r
-  \r
+\r
   @param  Dns4CacheList      All Dns4 cache list.\r
-  @param  DeleteFlag         If FALSE, this function is to add one entry to the DNS Cache. \r
-                             If TRUE, this function will delete matching DNS Cache entry. \r
-  @param  Override           If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter. \r
+  @param  DeleteFlag         If FALSE, this function is to add one entry to the DNS Cache.\r
+                             If TRUE, this function will delete matching DNS Cache entry.\r
+  @param  Override           If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter.\r
                              If FALSE, EFI_ACCESS_DENIED will be returned if the entry to be added is already exists.\r
   @param  DnsCacheEntry      Entry Pointer to DNS Cache entry.\r
 \r
   @retval EFI_SUCCESS        Update Dns4 cache successfully.\r
-  @retval Others             Failed to update Dns4 cache.   \r
-  \r
+  @retval Others             Failed to update Dns4 cache.\r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -501,18 +501,18 @@ UpdateDns4Cache (
   );\r
 \r
 /**\r
-  Update Dns6 cache to shared list of caches of all DNSv6 instances. \r
+  Update Dns6 cache to shared list of caches of all DNSv6 instances.\r
 \r
   @param  Dns6CacheList      All Dns6 cache list.\r
-  @param  DeleteFlag         If FALSE, this function is to add one entry to the DNS Cache. \r
-                             If TRUE, this function will delete matching DNS Cache entry. \r
-  @param  Override           If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter. \r
+  @param  DeleteFlag         If FALSE, this function is to add one entry to the DNS Cache.\r
+                             If TRUE, this function will delete matching DNS Cache entry.\r
+  @param  Override           If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter.\r
                              If FALSE, EFI_ACCESS_DENIED will be returned if the entry to be added is already exists.\r
   @param  DnsCacheEntry      Entry Pointer to DNS Cache entry.\r
-  \r
+\r
   @retval EFI_SUCCESS        Update Dns6 cache successfully.\r
   @retval Others             Failed to update Dns6 cache.\r
-**/ \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 UpdateDns6Cache (\r
@@ -523,14 +523,14 @@ UpdateDns6Cache (
   );\r
 \r
 /**\r
-  Add Dns4 ServerIp to common list of addresses of all configured DNSv4 server. \r
+  Add Dns4 ServerIp to common list of addresses of all configured DNSv4 server.\r
 \r
-  @param  Dns4ServerList    Common list of addresses of all configured DNSv4 server.  \r
-  @param  ServerIp          DNS server Ip.  \r
+  @param  Dns4ServerList    Common list of addresses of all configured DNSv4 server.\r
+  @param  ServerIp          DNS server Ip.\r
 \r
   @retval EFI_SUCCESS       Add Dns4 ServerIp to common list successfully.\r
   @retval Others            Failed to add Dns4 ServerIp to common list.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -540,15 +540,15 @@ AddDns4ServerIp (
   );\r
 \r
 /**\r
-  Add Dns6 ServerIp to common list of addresses of all configured DNSv6 server. \r
+  Add Dns6 ServerIp to common list of addresses of all configured DNSv6 server.\r
 \r
-  @param  Dns6ServerList    Common list of addresses of all configured DNSv6 server.  \r
-  @param  ServerIp          DNS server Ip.  \r
+  @param  Dns6ServerList    Common list of addresses of all configured DNSv6 server.\r
+  @param  ServerIp          DNS server Ip.\r
 \r
   @retval EFI_SUCCESS       Add Dns6 ServerIp to common list successfully.\r
   @retval Others            Failed to add Dns6 ServerIp to common list.\r
-  \r
-**/ \r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 AddDns6ServerIp (\r
@@ -559,16 +559,16 @@ AddDns6ServerIp (
 /**\r
   Find out whether the response is valid or invalid.\r
 \r
-  @param  TokensMap       All DNS transmittal Tokens entry.  \r
-  @param  Identification  Identification for queried packet.  \r
+  @param  TokensMap       All DNS transmittal Tokens entry.\r
+  @param  Identification  Identification for queried packet.\r
   @param  Type            Type for queried packet.\r
   @param  Class           Class for queried packet.\r
   @param  Item            Return corresponding Token entry.\r
 \r
   @retval TRUE            The response is valid.\r
   @retval FALSE           The response is invalid.\r
-  \r
-**/ \r
+\r
+**/\r
 BOOLEAN\r
 IsValidDnsResponse (\r
   IN     NET_MAP      *TokensMap,\r
@@ -583,12 +583,12 @@ IsValidDnsResponse (
 \r
   @param  Instance              The DNS instance\r
   @param  RxString              Received buffer.\r
-  @param  Completed             Flag to indicate that Dns response is valid. \r
-  \r
+  @param  Completed             Flag to indicate that Dns response is valid.\r
+\r
   @retval EFI_SUCCESS           Parse Dns Response successfully.\r
   @retval Others                Failed to parse Dns Response.\r
-  \r
-**/ \r
+\r
+**/\r
 EFI_STATUS\r
 ParseDnsResponse (\r
   IN OUT DNS_INSTANCE              *Instance,\r
@@ -604,7 +604,7 @@ ParseDnsResponse (
   @param  IoStatus              The status of the UDP receive\r
   @param  Context               The opaque parameter to the function.\r
 \r
-**/  \r
+**/\r
 VOID\r
 EFIAPI\r
 DnsOnPacketReceived (\r
@@ -652,9 +652,9 @@ DoDnsQuery (
   Construct the Packet according query section.\r
 \r
   @param  Instance              The DNS instance\r
-  @param  QueryName             Queried Name  \r
-  @param  Type                  Queried Type \r
-  @param  Class                 Queried Class \r
+  @param  QueryName             Queried Name\r
+  @param  Type                  Queried Type\r
+  @param  Class                 Queried Class\r
   @param  Packet                The packet for query\r
 \r
   @retval EFI_SUCCESS           The packet is constructed.\r
@@ -674,7 +674,7 @@ ConstructDNSQuery (
   Retransmit the packet.\r
 \r
   @param  Instance              The DNS instance\r
-  @param  Packet                Retransmit the packet \r
+  @param  Packet                Retransmit the packet\r
 \r
   @retval EFI_SUCCESS           The packet is retransmitted.\r
   @retval Others                Failed to retransmit.\r
@@ -748,7 +748,7 @@ Dns4GetModeData (
   @retval EFI_SUCCESS             The operation completed successfully.\r
   @retval EFI_UNSUPPORTED         The designated protocol is not supported.\r
   @retval EFI_INVALID_PARAMTER    Thisis NULL.\r
-                                  The StationIp address provided in DnsConfigData is not a \r
+                                  The StationIp address provided in DnsConfigData is not a\r
                                   valid unicast.\r
                                   DnsServerList is NULL while DnsServerListCount\r
                                   is not ZERO.\r
@@ -758,8 +758,8 @@ Dns4GetModeData (
                                   allocated.\r
   @retval EFI_DEVICE_ERROR        An unexpected system or network error occurred. The\r
                                   EFI DNSv4 Protocol instance is not configured.\r
-  @retval EFI_ALREADY_STARTED     Second call to Configure() with DnsConfigData. To \r
-                                  reconfigure the instance the caller must call Configure() \r
+  @retval EFI_ALREADY_STARTED     Second call to Configure() with DnsConfigData. To\r
+                                  reconfigure the instance the caller must call Configure()\r
                                   with NULL first to return driver to unconfigured state.\r
 **/\r
 EFI_STATUS\r
@@ -800,7 +800,7 @@ Dns4HostNameToIp (
 /**\r
   IPv4 address to host name translation also known as Reverse DNS lookup.\r
 \r
-  The IpToHostName() function is used to translate the host address to host name. A type PTR \r
+  The IpToHostName() function is used to translate the host address to host name. A type PTR\r
   query is used to get the primary name of the host. Support of this function is optional.\r
 \r
   @param[in]  This                Pointer to EFI_DNS4_PROTOCOL instance.\r
@@ -828,7 +828,7 @@ Dns4IpToHostName (
   );\r
 \r
 /**\r
-  Retrieve arbitrary information from the DNS server. \r
+  Retrieve arbitrary information from the DNS server.\r
 \r
   This GeneralLookup() function retrieves arbitrary information from the DNS. The caller\r
   supplies a QNAME, QTYPE, and QCLASS, and all of the matching RRs are returned. All\r
@@ -859,7 +859,7 @@ EFIAPI
 Dns4GeneralLookUp (\r
   IN  EFI_DNS4_PROTOCOL                *This,\r
   IN  CHAR8                            *QName,\r
-  IN  UINT16                           QType, \r
+  IN  UINT16                           QType,\r
   IN  UINT16                           QClass,\r
   IN  EFI_DNS4_COMPLETION_TOKEN        *Token\r
   );\r
@@ -965,7 +965,7 @@ Dns4Cancel (
   This function is used to retrieve DNS mode data for this DNS instance.\r
 \r
   @param[in]   This                Pointer to EFI_DNS6_PROTOCOL instance.\r
-  @param[out]  DnsModeData         Pointer to the caller-allocated storage for the \r
+  @param[out]  DnsModeData         Pointer to the caller-allocated storage for the\r
                                    EFI_DNS6_MODE_DATA data.\r
 \r
   @retval EFI_SUCCESS             The operation completed successfully.\r
@@ -989,7 +989,7 @@ Dns6GetModeData (
   EFI DNSv6 Protocol driver instance. Reset the DNS instance if DnsConfigData is NULL.\r
 \r
   @param[in]  This                Pointer to EFI_DNS6_PROTOCOL instance.\r
-  @param[in]  DnsConfigData       Pointer to the configuration data structure. All associated \r
+  @param[in]  DnsConfigData       Pointer to the configuration data structure. All associated\r
                                   storage to be allocated and released by caller.\r
 \r
   @retval EFI_SUCCESS             The operation completed successfully.\r
@@ -1001,8 +1001,8 @@ Dns6GetModeData (
   @retval EFI_DEVICE_ERROR        An unexpected system or network error occurred. The\r
                                   EFI DNSv6 Protocol instance is not configured.\r
   @retval EFI_UNSUPPORTED         The designated protocol is not supported.\r
-  @retval EFI_ALREADY_STARTED     Second call to Configure() with DnsConfigData. To \r
-                                  reconfigure the instance the caller must call Configure() with \r
+  @retval EFI_ALREADY_STARTED     Second call to Configure() with DnsConfigData. To\r
+                                  reconfigure the instance the caller must call Configure() with\r
                                   NULL first to return driver to unconfigured state.\r
 **/\r
 EFI_STATUS\r
@@ -1107,7 +1107,7 @@ EFIAPI
 Dns6GeneralLookUp (\r
   IN  EFI_DNS6_PROTOCOL                *This,\r
   IN  CHAR8                            *QName,\r
-  IN  UINT16                           QType, \r
+  IN  UINT16                           QType,\r
   IN  UINT16                           QClass,\r
   IN  EFI_DNS6_COMPLETION_TOKEN        *Token\r
   );\r
index 1fcaabdf95e570cab7b46ac56d1fdc950c3281fe..b8d074998242c82f6e9fc1ce03aedb85a155aac7 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Implementation of EFI_DNS4_PROTOCOL and EFI_DNS6_PROTOCOL interfaces.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -59,14 +59,14 @@ Dns4GetModeData (
   )\r
 {\r
   DNS_INSTANCE         *Instance;\r
-  \r
+\r
   EFI_TPL              OldTpl;\r
 \r
   UINTN                Index;\r
-  \r
+\r
   LIST_ENTRY           *Entry;\r
   LIST_ENTRY           *Next;\r
-  \r
+\r
   DNS4_SERVER_IP       *ServerItem;\r
   EFI_IPv4_ADDRESS     *ServerList;\r
   DNS4_CACHE           *CacheItem;\r
@@ -78,24 +78,24 @@ Dns4GetModeData (
   CacheItem  = NULL;\r
   CacheList  = NULL;\r
   Status     = EFI_SUCCESS;\r
-  \r
-    \r
+\r
+\r
   if ((This == NULL) || (DnsModeData == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
   OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
-    \r
+\r
   Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL4 (This);\r
   if (Instance->State == DNS_STATE_UNCONFIGED) {\r
     Status = EFI_NOT_STARTED;\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   ZeroMem (DnsModeData, sizeof (EFI_DNS4_MODE_DATA));\r
 \r
   //\r
-  // Get the current configuration data of this instance. \r
+  // Get the current configuration data of this instance.\r
   //\r
   Status = Dns4CopyConfigure (&DnsModeData->DnsConfigData, &Instance->Dns4CfgData);\r
   if (EFI_ERROR (Status)) {\r
@@ -116,7 +116,7 @@ Dns4GetModeData (
     Dns4CleanConfigure (&DnsModeData->DnsConfigData);\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   Index = 0;\r
   NET_LIST_FOR_EACH_SAFE (Entry, Next, &mDriverData->Dns4ServerList) {\r
     ServerItem = NET_LIST_USER_STRUCT (Entry, DNS4_SERVER_IP, AllServerLink);\r
@@ -140,7 +140,7 @@ Dns4GetModeData (
     FreePool (ServerList);\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   Index =0;\r
   NET_LIST_FOR_EACH_SAFE (Entry, Next, &mDriverData->Dns4CacheList) {\r
     CacheItem = NET_LIST_USER_STRUCT (Entry, DNS4_CACHE, AllCacheLink);\r
@@ -165,7 +165,7 @@ ON_EXIT:
   @retval EFI_SUCCESS             The operation completed successfully.\r
   @retval EFI_UNSUPPORTED         The designated protocol is not supported.\r
   @retval EFI_INVALID_PARAMTER    Thisis NULL.\r
-                                  The StationIp address provided in DnsConfigData is not a \r
+                                  The StationIp address provided in DnsConfigData is not a\r
                                   valid unicast.\r
                                   DnsServerList is NULL while DnsServerListCount\r
                                   is not ZERO.\r
@@ -175,8 +175,8 @@ ON_EXIT:
                                   allocated.\r
   @retval EFI_DEVICE_ERROR        An unexpected system or network error occurred. The\r
                                   EFI DNSv4 Protocol instance is not configured.\r
-  @retval EFI_ALREADY_STARTED     Second call to Configure() with DnsConfigData. To \r
-                                  reconfigure the instance the caller must call Configure() \r
+  @retval EFI_ALREADY_STARTED     Second call to Configure() with DnsConfigData. To\r
+                                  reconfigure the instance the caller must call Configure()\r
                                   with NULL first to return driver to unconfigured state.\r
 **/\r
 EFI_STATUS\r
@@ -188,19 +188,19 @@ Dns4Configure (
 {\r
   EFI_STATUS                Status;\r
   DNS_INSTANCE              *Instance;\r
-  \r
+\r
   EFI_TPL                   OldTpl;\r
   IP4_ADDR                  Ip;\r
   IP4_ADDR                  Netmask;\r
 \r
   UINT32                    ServerListCount;\r
-  EFI_IPv4_ADDRESS          *ServerList;                  \r
+  EFI_IPv4_ADDRESS          *ServerList;\r
 \r
   Status     = EFI_SUCCESS;\r
   ServerList = NULL;\r
-    \r
-  if (This == NULL || \r
-     (DnsConfigData != NULL && ((DnsConfigData->DnsServerListCount != 0 && DnsConfigData->DnsServerList == NULL) || \r
+\r
+  if (This == NULL ||\r
+     (DnsConfigData != NULL && ((DnsConfigData->DnsServerListCount != 0 && DnsConfigData->DnsServerList == NULL) ||\r
                                 (DnsConfigData->DnsServerListCount == 0 && DnsConfigData->DnsServerList != NULL)))) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -215,7 +215,7 @@ Dns4Configure (
 \r
   if (DnsConfigData == NULL) {\r
     ZeroMem (&Instance->SessionDnsServer, sizeof (EFI_IP_ADDRESS));\r
-    \r
+\r
     //\r
     // Reset the Instance if ConfigData is NULL\r
     //\r
@@ -226,12 +226,12 @@ Dns4Configure (
     if (Instance->UdpIo != NULL){\r
       UdpIoCleanIo (Instance->UdpIo);\r
     }\r
-    \r
+\r
     if (Instance->Dns4CfgData.DnsServerList != NULL) {\r
       FreePool (Instance->Dns4CfgData.DnsServerList);\r
     }\r
     ZeroMem (&Instance->Dns4CfgData, sizeof (EFI_DNS4_CONFIG_DATA));\r
-    \r
+\r
     Instance->State = DNS_STATE_UNCONFIGED;\r
   } else {\r
     //\r
@@ -255,14 +255,14 @@ Dns4Configure (
     }\r
 \r
     if (DnsConfigData->DnsServerListCount == 0) {\r
-      gBS->RestoreTPL (OldTpl); \r
-      \r
+      gBS->RestoreTPL (OldTpl);\r
+\r
       //\r
       // The DNS instance will retrieve DNS server from DHCP Server\r
       //\r
       Status = GetDns4ServerFromDhcp4 (\r
                  Instance,\r
-                 &ServerListCount, \r
+                 &ServerListCount,\r
                  &ServerList\r
                  );\r
       if (EFI_ERROR (Status)) {\r
@@ -270,7 +270,7 @@ Dns4Configure (
       }\r
 \r
       ASSERT(ServerList != NULL);\r
-      \r
+\r
       OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
 \r
       CopyMem (&Instance->SessionDnsServer.v4, &ServerList[0], sizeof (EFI_IPv4_ADDRESS));\r
@@ -301,7 +301,7 @@ Dns4Configure (
       }\r
       goto ON_EXIT;\r
     }\r
-    \r
+\r
     Instance->State = DNS_STATE_CONFIGED;\r
   }\r
 \r
@@ -339,42 +339,42 @@ Dns4HostNameToIp (
   )\r
 {\r
   EFI_STATUS            Status;\r
-  \r
+\r
   DNS_INSTANCE          *Instance;\r
-  \r
+\r
   EFI_DNS4_CONFIG_DATA  *ConfigData;\r
-  \r
+\r
   UINTN                 Index;\r
   DNS4_CACHE            *Item;\r
   LIST_ENTRY            *Entry;\r
   LIST_ENTRY            *Next;\r
-  \r
+\r
   CHAR8                 *QueryName;\r
-  \r
+\r
   DNS4_TOKEN_ENTRY      *TokenEntry;\r
   NET_BUF               *Packet;\r
-  \r
+\r
   EFI_TPL               OldTpl;\r
-  \r
+\r
   Status     = EFI_SUCCESS;\r
   Item       = NULL;\r
   QueryName  = NULL;\r
   TokenEntry = NULL;\r
   Packet     = NULL;\r
-  \r
+\r
   //\r
   // Validate the parameters\r
   //\r
   if ((This == NULL) || (HostName == NULL) || Token == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   OldTpl   = gBS->RaiseTPL (TPL_CALLBACK);\r
-  \r
+\r
   Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL4 (This);\r
-  \r
+\r
   ConfigData = &(Instance->Dns4CfgData);\r
-  \r
+\r
   if (Instance->State != DNS_STATE_CONFIGED) {\r
     Status = EFI_NOT_STARTED;\r
     goto ON_EXIT;\r
@@ -395,9 +395,9 @@ Dns4HostNameToIp (
   if (Token->RetryInterval == 0) {\r
     Token->RetryInterval = ConfigData->RetryInterval;\r
   }\r
-  \r
+\r
   //\r
-  // Minimum interval of retry is 2 second. If the retry interval is less than 2 second, then use the 2 second. \r
+  // Minimum interval of retry is 2 second. If the retry interval is less than 2 second, then use the 2 second.\r
   //\r
   if (Token->RetryInterval < DNS_DEFAULT_TIMEOUT) {\r
     Token->RetryInterval = DNS_DEFAULT_TIMEOUT;\r
@@ -428,7 +428,7 @@ Dns4HostNameToIp (
         if (Token->RspData.H2AData != NULL) {\r
           FreePool (Token->RspData.H2AData);\r
         }\r
-        \r
+\r
         Status = EFI_OUT_OF_RESOURCES;\r
         goto ON_EXIT;\r
       }\r
@@ -438,12 +438,12 @@ Dns4HostNameToIp (
         Item = NET_LIST_USER_STRUCT (Entry, DNS4_CACHE, AllCacheLink);\r
         if ((UINT32)Index < Token->RspData.H2AData->IpCount && StrCmp (HostName, Item->DnsCache.HostName) == 0) {\r
           CopyMem ((Token->RspData.H2AData->IpList) + Index, Item->DnsCache.IpAddress, sizeof (EFI_IPv4_ADDRESS));\r
-          Index++; \r
+          Index++;\r
         }\r
       }\r
-         \r
+\r
       Token->Status = EFI_SUCCESS;\r
-          \r
+\r
       if (Token->Event != NULL) {\r
         gBS->SignalEvent (Token->Event);\r
         DispatchDpc ();\r
@@ -451,7 +451,7 @@ Dns4HostNameToIp (
 \r
       Status = Token->Status;\r
       goto ON_EXIT;\r
-    } \r
+    }\r
   }\r
 \r
   //\r
@@ -462,7 +462,7 @@ Dns4HostNameToIp (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   TokenEntry->PacketToLive = Token->RetryInterval;\r
   TokenEntry->Token = Token;\r
   TokenEntry->QueryHostName = AllocateZeroPool (StrSize (HostName));\r
@@ -470,9 +470,9 @@ Dns4HostNameToIp (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   CopyMem (TokenEntry->QueryHostName, HostName, StrSize (HostName));\r
-  \r
+\r
   //\r
   // Construct QName.\r
   //\r
@@ -481,12 +481,12 @@ Dns4HostNameToIp (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   //\r
   // Construct DNS Query Packet.\r
   //\r
   Status = ConstructDNSQuery (Instance, QueryName, DNS_TYPE_A, DNS_CLASS_INET, &Packet);\r
-  if (EFI_ERROR (Status)) { \r
+  if (EFI_ERROR (Status)) {\r
     goto ON_EXIT;\r
   }\r
 \r
@@ -499,7 +499,7 @@ Dns4HostNameToIp (
   if (EFI_ERROR (Status)) {\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   //\r
   // Dns Query Ip\r
   //\r
@@ -507,7 +507,7 @@ Dns4HostNameToIp (
   if (EFI_ERROR (Status)) {\r
     Dns4RemoveTokenEntry (&Instance->Dns4TxTokens, TokenEntry);\r
   }\r
-  \r
+\r
 ON_EXIT:\r
 \r
   if (EFI_ERROR (Status)) {\r
@@ -515,19 +515,19 @@ ON_EXIT:
       if (TokenEntry->QueryHostName != NULL) {\r
         FreePool (TokenEntry->QueryHostName);\r
       }\r
-      \r
+\r
       FreePool (TokenEntry);\r
     }\r
-    \r
+\r
     if (Packet != NULL) {\r
       NetbufFree (Packet);\r
     }\r
   }\r
-  \r
+\r
   if (QueryName != NULL) {\r
     FreePool (QueryName);\r
   }\r
-  \r
+\r
   gBS->RestoreTPL (OldTpl);\r
   return Status;\r
 }\r
@@ -535,7 +535,7 @@ ON_EXIT:
 /**\r
   IPv4 address to host name translation also known as Reverse DNS lookup.\r
 \r
-  The IpToHostName() function is used to translate the host address to host name. A type PTR \r
+  The IpToHostName() function is used to translate the host address to host name. A type PTR\r
   query is used to get the primary name of the host. Support of this function is optional.\r
 \r
   @param[in]  This                Pointer to EFI_DNS4_PROTOCOL instance.\r
@@ -566,7 +566,7 @@ Dns4IpToHostName (
 }\r
 \r
 /**\r
-  Retrieve arbitrary information from the DNS server. \r
+  Retrieve arbitrary information from the DNS server.\r
 \r
   This GeneralLookup() function retrieves arbitrary information from the DNS. The caller\r
   supplies a QNAME, QTYPE, and QCLASS, and all of the matching RRs are returned. All\r
@@ -597,37 +597,37 @@ EFIAPI
 Dns4GeneralLookUp (\r
   IN  EFI_DNS4_PROTOCOL                *This,\r
   IN  CHAR8                            *QName,\r
-  IN  UINT16                           QType, \r
+  IN  UINT16                           QType,\r
   IN  UINT16                           QClass,\r
   IN  EFI_DNS4_COMPLETION_TOKEN        *Token\r
   )\r
 {\r
   EFI_STATUS            Status;\r
-  \r
+\r
   DNS_INSTANCE          *Instance;\r
-  \r
+\r
   EFI_DNS4_CONFIG_DATA  *ConfigData;\r
-  \r
+\r
   DNS4_TOKEN_ENTRY      *TokenEntry;\r
   NET_BUF               *Packet;\r
-  \r
+\r
   EFI_TPL               OldTpl;\r
-  \r
+\r
   Status     = EFI_SUCCESS;\r
   TokenEntry = NULL;\r
   Packet     = NULL;\r
-  \r
+\r
   //\r
   // Validate the parameters\r
   //\r
   if ((This == NULL) || (QName == NULL) || Token == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   OldTpl   = gBS->RaiseTPL (TPL_CALLBACK);\r
-  \r
+\r
   Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL4 (This);\r
-  \r
+\r
   ConfigData = &(Instance->Dns4CfgData);\r
 \r
   if (Instance->State != DNS_STATE_CONFIGED) {\r
@@ -636,14 +636,14 @@ Dns4GeneralLookUp (
   }\r
 \r
   Token->Status = EFI_NOT_READY;\r
-  \r
+\r
   //\r
   // If zero, use the parameter configured through Dns.Configure() interface.\r
   //\r
   if (Token->RetryCount == 0) {\r
     Token->RetryCount = ConfigData->RetryCount;\r
   }\r
-  \r
+\r
   //\r
   // If zero, use the parameter configured through Dns.Configure() interface.\r
   //\r
@@ -652,7 +652,7 @@ Dns4GeneralLookUp (
   }\r
 \r
   //\r
-  // Minimum interval of retry is 2 second. If the retry interval is less than 2 second, then use the 2 second. \r
+  // Minimum interval of retry is 2 second. If the retry interval is less than 2 second, then use the 2 second.\r
   //\r
   if (Token->RetryInterval < DNS_DEFAULT_TIMEOUT) {\r
     Token->RetryInterval = DNS_DEFAULT_TIMEOUT;\r
@@ -666,7 +666,7 @@ Dns4GeneralLookUp (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   TokenEntry->PacketToLive = Token->RetryInterval;\r
   TokenEntry->GeneralLookUp = TRUE;\r
   TokenEntry->Token = Token;\r
@@ -679,7 +679,7 @@ Dns4GeneralLookUp (
     if (TokenEntry != NULL) {\r
       FreePool (TokenEntry);\r
     }\r
-    \r
+\r
     goto ON_EXIT;\r
   }\r
 \r
@@ -693,12 +693,12 @@ Dns4GeneralLookUp (
     if (TokenEntry != NULL) {\r
       FreePool (TokenEntry);\r
     }\r
-    \r
+\r
     NetbufFree (Packet);\r
-    \r
+\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   //\r
   // Dns Query Ip\r
   //\r
@@ -709,10 +709,10 @@ Dns4GeneralLookUp (
     if (TokenEntry != NULL) {\r
       FreePool (TokenEntry);\r
     }\r
-    \r
+\r
     NetbufFree (Packet);\r
   }\r
-  \r
+\r
 ON_EXIT:\r
   gBS->RestoreTPL (OldTpl);\r
   return Status;\r
@@ -753,15 +753,15 @@ Dns4UpdateDnsCache (
   IN EFI_DNS4_CACHE_ENTRY   DnsCacheEntry\r
   )\r
 {\r
-  EFI_STATUS    Status; \r
+  EFI_STATUS    Status;\r
   EFI_TPL       OldTpl;\r
 \r
   Status = EFI_SUCCESS;\r
-  \r
+\r
   if (DnsCacheEntry.HostName == NULL || DnsCacheEntry.IpAddress == NULL || DnsCacheEntry.Timeout == 0) {\r
-    return EFI_INVALID_PARAMETER; \r
+    return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
 \r
   //\r
@@ -770,7 +770,7 @@ Dns4UpdateDnsCache (
   Status = UpdateDns4Cache (&mDriverData->Dns4CacheList, DeleteFlag, Override, DnsCacheEntry);\r
 \r
   gBS->RestoreTPL (OldTpl);\r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -817,7 +817,7 @@ Dns4Poll (
   }\r
 \r
   Udp = Instance->UdpIo->Protocol.Udp4;\r
-  \r
+\r
   return Udp->Poll (Udp);\r
 }\r
 \r
@@ -890,7 +890,7 @@ Dns4Cancel (
   This function is used to retrieve DNS mode data for this DNS instance.\r
 \r
   @param[in]   This                Pointer to EFI_DNS6_PROTOCOL instance.\r
-  @param[out]  DnsModeData         Pointer to the caller-allocated storage for the \r
+  @param[out]  DnsModeData         Pointer to the caller-allocated storage for the\r
                                    EFI_DNS6_MODE_DATA data.\r
 \r
   @retval EFI_SUCCESS             The operation completed successfully.\r
@@ -908,11 +908,11 @@ Dns6GetModeData (
   )\r
 {\r
   DNS_INSTANCE         *Instance;\r
-  \r
+\r
   EFI_TPL              OldTpl;\r
 \r
   UINTN                Index;\r
-  \r
+\r
   LIST_ENTRY           *Entry;\r
   LIST_ENTRY           *Next;\r
 \r
@@ -933,7 +933,7 @@ Dns6GetModeData (
   }\r
 \r
   OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
-    \r
+\r
   Instance  = DNS_INSTANCE_FROM_THIS_PROTOCOL6 (This);\r
   if (Instance->State == DNS_STATE_UNCONFIGED) {\r
     Status =  EFI_NOT_STARTED;\r
@@ -943,13 +943,13 @@ Dns6GetModeData (
   ZeroMem (DnsModeData, sizeof (EFI_DNS6_MODE_DATA));\r
 \r
   //\r
-  // Get the current configuration data of this instance. \r
+  // Get the current configuration data of this instance.\r
   //\r
   Status = Dns6CopyConfigure (&DnsModeData->DnsConfigData, &Instance->Dns6CfgData);\r
   if (EFI_ERROR (Status)) {\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   //\r
   // Get the DnsServerCount and DnsServerList\r
   //\r
@@ -964,7 +964,7 @@ Dns6GetModeData (
     Dns6CleanConfigure (&DnsModeData->DnsConfigData);\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   Index = 0;\r
   NET_LIST_FOR_EACH_SAFE (Entry, Next, &mDriverData->Dns6ServerList) {\r
     ServerItem = NET_LIST_USER_STRUCT (Entry, DNS6_SERVER_IP, AllServerLink);\r
@@ -988,7 +988,7 @@ Dns6GetModeData (
     FreePool (ServerList);\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   Index =0;\r
   NET_LIST_FOR_EACH_SAFE (Entry, Next, &mDriverData->Dns6CacheList) {\r
     CacheItem = NET_LIST_USER_STRUCT (Entry, DNS6_CACHE, AllCacheLink);\r
@@ -996,7 +996,7 @@ Dns6GetModeData (
     Index++;\r
   }\r
   DnsModeData->DnsCacheList = CacheList;\r
-  \r
+\r
 ON_EXIT:\r
   gBS->RestoreTPL (OldTpl);\r
   return Status;\r
@@ -1009,7 +1009,7 @@ ON_EXIT:
   EFI DNSv6 Protocol driver instance. Reset the DNS instance if DnsConfigData is NULL.\r
 \r
   @param[in]  This                Pointer to EFI_DNS6_PROTOCOL instance.\r
-  @param[in]  DnsConfigData       Pointer to the configuration data structure. All associated \r
+  @param[in]  DnsConfigData       Pointer to the configuration data structure. All associated\r
                                   storage to be allocated and released by caller.\r
 \r
   @retval EFI_SUCCESS             The operation completed successfully.\r
@@ -1021,8 +1021,8 @@ ON_EXIT:
   @retval EFI_DEVICE_ERROR        An unexpected system or network error occurred. The\r
                                   EFI DNSv6 Protocol instance is not configured.\r
   @retval EFI_UNSUPPORTED         The designated protocol is not supported.\r
-  @retval EFI_ALREADY_STARTED     Second call to Configure() with DnsConfigData. To \r
-                                  reconfigure the instance the caller must call Configure() with \r
+  @retval EFI_ALREADY_STARTED     Second call to Configure() with DnsConfigData. To\r
+                                  reconfigure the instance the caller must call Configure() with\r
                                   NULL first to return driver to unconfigured state.\r
 **/\r
 EFI_STATUS\r
@@ -1034,17 +1034,17 @@ Dns6Configure (
 {\r
   EFI_STATUS                Status;\r
   DNS_INSTANCE              *Instance;\r
-  \r
+\r
   EFI_TPL                   OldTpl;\r
 \r
   UINT32                    ServerListCount;\r
-  EFI_IPv6_ADDRESS          *ServerList; \r
+  EFI_IPv6_ADDRESS          *ServerList;\r
 \r
   Status     = EFI_SUCCESS;\r
   ServerList = NULL;\r
 \r
-  if (This == NULL || \r
-     (DnsConfigData != NULL && ((DnsConfigData->DnsServerCount != 0 && DnsConfigData->DnsServerList == NULL) || \r
+  if (This == NULL ||\r
+     (DnsConfigData != NULL && ((DnsConfigData->DnsServerCount != 0 && DnsConfigData->DnsServerList == NULL) ||\r
                                 (DnsConfigData->DnsServerCount == 0 && DnsConfigData->DnsServerList != NULL)))) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -1075,7 +1075,7 @@ Dns6Configure (
       FreePool (Instance->Dns6CfgData.DnsServerList);\r
     }\r
     ZeroMem (&Instance->Dns6CfgData, sizeof (EFI_DNS6_CONFIG_DATA));\r
-    \r
+\r
     Instance->State = DNS_STATE_UNCONFIGED;\r
   } else {\r
     //\r
@@ -1099,14 +1099,14 @@ Dns6Configure (
       //\r
       Status = GetDns6ServerFromDhcp6 (\r
                  Instance->Service->ImageHandle,\r
-                 Instance->Service->ControllerHandle, \r
-                 &ServerListCount, \r
+                 Instance->Service->ControllerHandle,\r
+                 &ServerListCount,\r
                  &ServerList\r
                  );\r
       if (EFI_ERROR (Status)) {\r
         goto ON_EXIT;\r
       }\r
-      \r
+\r
       ASSERT(ServerList != NULL);\r
 \r
       OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
@@ -1141,7 +1141,7 @@ Dns6Configure (
       }\r
       goto ON_EXIT;\r
     }\r
-    \r
+\r
     Instance->State = DNS_STATE_CONFIGED;\r
   }\r
 \r
@@ -1181,23 +1181,23 @@ Dns6HostNameToIp (
   )\r
 {\r
   EFI_STATUS            Status;\r
-  \r
+\r
   DNS_INSTANCE          *Instance;\r
 \r
   EFI_DNS6_CONFIG_DATA  *ConfigData;\r
-  \r
-  UINTN                 Index; \r
+\r
+  UINTN                 Index;\r
   DNS6_CACHE            *Item;\r
   LIST_ENTRY            *Entry;\r
   LIST_ENTRY            *Next;\r
-  \r
+\r
   CHAR8                 *QueryName;\r
-  \r
+\r
   DNS6_TOKEN_ENTRY      *TokenEntry;\r
   NET_BUF               *Packet;\r
-  \r
+\r
   EFI_TPL               OldTpl;\r
-  \r
+\r
   Status     = EFI_SUCCESS;\r
   Item       = NULL;\r
   QueryName  = NULL;\r
@@ -1212,9 +1212,9 @@ Dns6HostNameToIp (
   }\r
 \r
   OldTpl   = gBS->RaiseTPL (TPL_CALLBACK);\r
-  \r
+\r
   Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL6 (This);\r
-  \r
+\r
   ConfigData = &(Instance->Dns6CfgData);\r
 \r
   if (Instance->State != DNS_STATE_CONFIGED) {\r
@@ -1237,9 +1237,9 @@ Dns6HostNameToIp (
   if (Token->RetryInterval == 0) {\r
     Token->RetryInterval = ConfigData->RetryInterval;\r
   }\r
-  \r
+\r
   //\r
-  // Minimum interval of retry is 2 second. If the retry interval is less than 2 second, then use the 2 second. \r
+  // Minimum interval of retry is 2 second. If the retry interval is less than 2 second, then use the 2 second.\r
   //\r
   if (Token->RetryInterval < DNS_DEFAULT_TIMEOUT) {\r
     Token->RetryInterval = DNS_DEFAULT_TIMEOUT;\r
@@ -1270,7 +1270,7 @@ Dns6HostNameToIp (
         if (Token->RspData.H2AData != NULL) {\r
           FreePool (Token->RspData.H2AData);\r
         }\r
-        \r
+\r
         Status = EFI_OUT_OF_RESOURCES;\r
         goto ON_EXIT;\r
       }\r
@@ -1283,17 +1283,17 @@ Dns6HostNameToIp (
           Index++;\r
         }\r
       }\r
-         \r
+\r
       Token->Status = EFI_SUCCESS;\r
-          \r
+\r
       if (Token->Event != NULL) {\r
         gBS->SignalEvent (Token->Event);\r
         DispatchDpc ();\r
       }\r
-      \r
+\r
       Status = Token->Status;\r
       goto ON_EXIT;\r
-    } \r
+    }\r
   }\r
 \r
   //\r
@@ -1304,7 +1304,7 @@ Dns6HostNameToIp (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   TokenEntry->PacketToLive = Token->RetryInterval;\r
   TokenEntry->Token = Token;\r
   TokenEntry->QueryHostName = AllocateZeroPool (StrSize (HostName));\r
@@ -1312,7 +1312,7 @@ Dns6HostNameToIp (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   CopyMem (TokenEntry->QueryHostName, HostName, StrSize (HostName));\r
 \r
   //\r
@@ -1323,7 +1323,7 @@ Dns6HostNameToIp (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   //\r
   // Construct DNS Query Packet.\r
   //\r
@@ -1341,7 +1341,7 @@ Dns6HostNameToIp (
   if (EFI_ERROR (Status)) {\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   //\r
   // Dns Query Ip\r
   //\r
@@ -1349,7 +1349,7 @@ Dns6HostNameToIp (
   if (EFI_ERROR (Status)) {\r
     Dns6RemoveTokenEntry (&Instance->Dns6TxTokens, TokenEntry);\r
   }\r
-  \r
+\r
 ON_EXIT:\r
 \r
   if (EFI_ERROR (Status)) {\r
@@ -1357,19 +1357,19 @@ ON_EXIT:
       if (TokenEntry->QueryHostName != NULL) {\r
         FreePool (TokenEntry->QueryHostName);\r
       }\r
-      \r
+\r
       FreePool (TokenEntry);\r
     }\r
-    \r
+\r
     if (Packet != NULL) {\r
       NetbufFree (Packet);\r
     }\r
   }\r
-  \r
+\r
   if (QueryName != NULL) {\r
     FreePool (QueryName);\r
   }\r
-  \r
+\r
   gBS->RestoreTPL (OldTpl);\r
   return Status;\r
 }\r
@@ -1442,37 +1442,37 @@ EFIAPI
 Dns6GeneralLookUp (\r
   IN  EFI_DNS6_PROTOCOL                 *This,\r
   IN  CHAR8                             *QName,\r
-  IN  UINT16                            QType, \r
+  IN  UINT16                            QType,\r
   IN  UINT16                            QClass,\r
   IN  EFI_DNS6_COMPLETION_TOKEN         *Token\r
   )\r
 {\r
   EFI_STATUS            Status;\r
-  \r
+\r
   DNS_INSTANCE          *Instance;\r
-  \r
+\r
   EFI_DNS6_CONFIG_DATA  *ConfigData;\r
-  \r
+\r
   DNS6_TOKEN_ENTRY      *TokenEntry;\r
   NET_BUF               *Packet;\r
-  \r
+\r
   EFI_TPL               OldTpl;\r
-  \r
+\r
   Status     = EFI_SUCCESS;\r
   TokenEntry = NULL;\r
   Packet     = NULL;\r
-  \r
+\r
   //\r
   // Validate the parameters\r
   //\r
   if ((This == NULL) || (QName == NULL) || Token == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   OldTpl   = gBS->RaiseTPL (TPL_CALLBACK);\r
-  \r
+\r
   Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL6 (This);\r
-  \r
+\r
   ConfigData = &(Instance->Dns6CfgData);\r
 \r
   if (Instance->State != DNS_STATE_CONFIGED) {\r
@@ -1481,14 +1481,14 @@ Dns6GeneralLookUp (
   }\r
 \r
   Token->Status = EFI_NOT_READY;\r
-  \r
+\r
   //\r
   // If zero, use the parameter configured through Dns.Configure() interface.\r
   //\r
   if (Token->RetryCount == 0) {\r
     Token->RetryCount = ConfigData->RetryCount;\r
   }\r
-  \r
+\r
   //\r
   // If zero, use the parameter configured through Dns.Configure() interface.\r
   //\r
@@ -1497,7 +1497,7 @@ Dns6GeneralLookUp (
   }\r
 \r
   //\r
-  // Minimum interval of retry is 2 second. If the retry interval is less than 2 second, then use the 2 second. \r
+  // Minimum interval of retry is 2 second. If the retry interval is less than 2 second, then use the 2 second.\r
   //\r
   if (Token->RetryInterval < DNS_DEFAULT_TIMEOUT) {\r
     Token->RetryInterval = DNS_DEFAULT_TIMEOUT;\r
@@ -1511,7 +1511,7 @@ Dns6GeneralLookUp (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   TokenEntry->PacketToLive = Token->RetryInterval;\r
   TokenEntry->GeneralLookUp = TRUE;\r
   TokenEntry->Token = Token;\r
@@ -1524,7 +1524,7 @@ Dns6GeneralLookUp (
     if (TokenEntry != NULL) {\r
       FreePool (TokenEntry);\r
     }\r
-    \r
+\r
     goto ON_EXIT;\r
   }\r
 \r
@@ -1538,12 +1538,12 @@ Dns6GeneralLookUp (
     if (TokenEntry != NULL) {\r
       FreePool (TokenEntry);\r
     }\r
-    \r
+\r
     NetbufFree (Packet);\r
-    \r
+\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   //\r
   // Dns Query Ip\r
   //\r
@@ -1554,10 +1554,10 @@ Dns6GeneralLookUp (
     if (TokenEntry != NULL) {\r
       FreePool (TokenEntry);\r
     }\r
-    \r
+\r
     NetbufFree (Packet);\r
   }\r
-  \r
+\r
 ON_EXIT:\r
   gBS->RestoreTPL (OldTpl);\r
   return Status;\r
@@ -1599,24 +1599,24 @@ Dns6UpdateDnsCache (
   IN EFI_DNS6_CACHE_ENTRY   DnsCacheEntry\r
   )\r
 {\r
-  EFI_STATUS    Status; \r
+  EFI_STATUS    Status;\r
   EFI_TPL       OldTpl;\r
 \r
   Status = EFI_SUCCESS;\r
-  \r
+\r
   if (DnsCacheEntry.HostName == NULL || DnsCacheEntry.IpAddress == NULL || DnsCacheEntry.Timeout == 0) {\r
-    return EFI_INVALID_PARAMETER; \r
+    return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
 \r
   //\r
   // Update Dns6Cache here.\r
   //\r
   Status = UpdateDns6Cache (&mDriverData->Dns6CacheList, DeleteFlag, Override, DnsCacheEntry);\r
-  \r
+\r
   gBS->RestoreTPL (OldTpl);\r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -1665,7 +1665,7 @@ Dns6Poll (
   }\r
 \r
   Udp = Instance->UdpIo->Protocol.Udp6;\r
-  \r
+\r
   return Udp->Poll (Udp);\r
 }\r
 \r
index 1d1e47008da23ee1fb8c9ba2037c1ed3b407c9f0..90a6acb0d4ed4203e154c04289e1e9635c0d0fe8 100644 (file)
@@ -3,12 +3,12 @@
 \r
 Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+http://opensource.org/licenses/bsd-license.php.\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -23,7 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   @retval EFI_SUCCESS              Device patch successfully updated.\r
   @retval EFI_OUT_OF_RESOURCES     Could not allocate needed resources.\r
   @retval Others                   Unexpected error happened.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 HttpBootUpdateDevicePath (\r
@@ -39,7 +39,7 @@ HttpBootUpdateDevicePath (
 \r
   TmpIpDevicePath  = NULL;\r
   TmpDnsDevicePath = NULL;\r
-  \r
+\r
   //\r
   // Update the IP node with DHCP assigned information.\r
   //\r
@@ -67,13 +67,13 @@ HttpBootUpdateDevicePath (
     SetDevicePathNodeLength (Node, sizeof (IPv6_DEVICE_PATH));\r
     Node->Ipv6.PrefixLength    = IP6_PREFIX_LENGTH;\r
     Node->Ipv6.RemotePort      = Private->Port;\r
-    Node->Ipv6.Protocol        = EFI_IP_PROTO_TCP; \r
+    Node->Ipv6.Protocol        = EFI_IP_PROTO_TCP;\r
     Node->Ipv6.IpAddressOrigin = 0;\r
     CopyMem (&Node->Ipv6.LocalIpAddress, &Private->StationIp.v6, sizeof (EFI_IPv6_ADDRESS));\r
     CopyMem (&Node->Ipv6.RemoteIpAddress, &Private->ServerIp.v6, sizeof (EFI_IPv6_ADDRESS));\r
     CopyMem (&Node->Ipv6.GatewayIpAddress, &Private->GatewayIp.v6, sizeof (EFI_IPv6_ADDRESS));\r
   }\r
-  \r
+\r
   TmpIpDevicePath = AppendDevicePathNode (Private->ParentDevicePath, (EFI_DEVICE_PATH_PROTOCOL*) Node);\r
   FreePool (Node);\r
   if (TmpIpDevicePath == NULL) {\r
@@ -95,7 +95,7 @@ HttpBootUpdateDevicePath (
     SetDevicePathNodeLength (Node, Length);\r
     Node->Dns.IsIPv6 = Private->UsingIpv6 ? 0x01 : 0x00;\r
     CopyMem ((UINT8*) Node + sizeof (EFI_DEVICE_PATH_PROTOCOL) + sizeof (Node->Dns.IsIPv6), Private->DnsServerIp, Private->DnsServerCount * sizeof (EFI_IP_ADDRESS));\r
-    \r
+\r
     TmpDnsDevicePath = AppendDevicePathNode (TmpIpDevicePath, (EFI_DEVICE_PATH_PROTOCOL*) Node);\r
     FreePool (Node);\r
     FreePool (TmpIpDevicePath);\r
@@ -150,7 +150,7 @@ HttpBootUpdateDevicePath (
     if (EFI_ERROR (Status)) {\r
       return Status;\r
     }\r
-    \r
+\r
     FreePool (Private->Ip4Nic->DevicePath);\r
     Private->Ip4Nic->DevicePath = NewDevicePath;\r
   } else {\r
@@ -169,7 +169,7 @@ HttpBootUpdateDevicePath (
     FreePool (Private->Ip6Nic->DevicePath);\r
     Private->Ip6Nic->DevicePath = NewDevicePath;\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -201,7 +201,7 @@ HttpBootDhcp4ExtractUriInfo (
   ASSERT (SelectIndex < HTTP_BOOT_OFFER_MAX_NUM);\r
 \r
   DnsServerIndex = 0;\r
-  \r
+\r
   Status = EFI_SUCCESS;\r
 \r
   //\r
@@ -213,7 +213,7 @@ HttpBootDhcp4ExtractUriInfo (
     //\r
     // In Corporate environment, we need a HttpOffer.\r
     //\r
-    if ((SelectOffer->OfferType == HttpOfferTypeDhcpIpUri) || \r
+    if ((SelectOffer->OfferType == HttpOfferTypeDhcpIpUri) ||\r
         (SelectOffer->OfferType == HttpOfferTypeDhcpIpUriDns) ||\r
         (SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns)) {\r
       HttpOffer = SelectOffer;\r
@@ -246,7 +246,7 @@ HttpBootDhcp4ExtractUriInfo (
     return Status;\r
   }\r
 \r
-  if ((SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns) || \r
+  if ((SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns) ||\r
       (SelectOffer->OfferType == HttpOfferTypeDhcpDns) ||\r
       (SelectOffer->OfferType == HttpOfferTypeDhcpIpUriDns)) {\r
     Option = SelectOffer->OptList[HTTP_BOOT_DHCP4_TAG_INDEX_DNS_SERVER];\r
@@ -265,10 +265,10 @@ HttpBootDhcp4ExtractUriInfo (
     for (DnsServerIndex = 0; DnsServerIndex < Private->DnsServerCount; DnsServerIndex++) {\r
       CopyMem (&(Private->DnsServerIp[DnsServerIndex].v4), &(((EFI_IPv4_ADDRESS *) Option->Data)[DnsServerIndex]), sizeof (EFI_IPv4_ADDRESS));\r
     }\r
-    \r
+\r
     //\r
     // Configure the default DNS server if server assigned.\r
-    //    \r
+    //\r
     Status = HttpBootRegisterIp4Dns (\r
                Private,\r
                Option->Length,\r
@@ -292,7 +292,7 @@ HttpBootDhcp4ExtractUriInfo (
   if (EFI_ERROR (Status) || Private->Port == 0) {\r
     Private->Port = 80;\r
   }\r
-  \r
+\r
   //\r
   // All boot informations are valid here.\r
   //\r
@@ -402,7 +402,7 @@ HttpBootDhcp6ExtractUriInfo (
     return Status;\r
   }\r
 \r
-  if ((SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns) || \r
+  if ((SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns) ||\r
       (SelectOffer->OfferType == HttpOfferTypeDhcpDns) ||\r
       (SelectOffer->OfferType == HttpOfferTypeDhcpIpUriDns)) {\r
     Option = SelectOffer->OptList[HTTP_BOOT_DHCP6_IDX_DNS_SERVER];\r
@@ -434,9 +434,9 @@ HttpBootDhcp6ExtractUriInfo (
       goto Error;\r
     }\r
   }\r
-  \r
+\r
   //\r
-  // Extract the HTTP server Ip from URL. This is used to Check route table \r
+  // Extract the HTTP server Ip from URL. This is used to Check route table\r
   // whether can send message to HTTP Server Ip through the GateWay.\r
   //\r
   Status = HttpUrlGetIp6 (\r
@@ -444,7 +444,7 @@ HttpBootDhcp6ExtractUriInfo (
              Private->BootFileUriParser,\r
              &IpAddr\r
              );\r
-  \r
+\r
   if (EFI_ERROR (Status)) {\r
     //\r
     // The Http server address is expressed by Name Ip, so perform DNS resolution\r
@@ -464,23 +464,23 @@ HttpBootDhcp6ExtractUriInfo (
       Status = EFI_OUT_OF_RESOURCES;\r
       goto Error;\r
     }\r
-    \r
+\r
     AsciiStrToUnicodeStrS (HostName, HostNameStr, HostNameSize);\r
 \r
     if (HostName != NULL) {\r
       FreePool (HostName);\r
     }\r
-    \r
+\r
     Status = HttpBootDns (Private, HostNameStr, &IpAddr);\r
     FreePool (HostNameStr);\r
     if (EFI_ERROR (Status)) {\r
       AsciiPrint ("\n  Error: Could not retrieve the host address from DNS server.\n");\r
       goto Error;\r
-    }  \r
-  } \r
-  \r
+    }\r
+  }\r
+\r
   CopyMem (&Private->ServerIp.v6, &IpAddr, sizeof (EFI_IPv6_ADDRESS));\r
-  \r
+\r
   //\r
   // Extract the port from URL, and use default HTTP port 80 if not provided.\r
   //\r
@@ -492,7 +492,7 @@ HttpBootDhcp6ExtractUriInfo (
   if (EFI_ERROR (Status) || Private->Port == 0) {\r
     Private->Port = 80;\r
   }\r
-  \r
+\r
   //\r
   // All boot informations are valid here.\r
   //\r
@@ -504,7 +504,7 @@ HttpBootDhcp6ExtractUriInfo (
   if (EFI_ERROR (Status)) {\r
     goto Error;\r
   }\r
-  \r
+\r
   return Status;\r
 \r
 Error:\r
@@ -512,7 +512,7 @@ Error:
     FreePool (Private->DnsServerIp);\r
     Private->DnsServerIp = NULL;\r
   }\r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -532,7 +532,7 @@ HttpBootDiscoverBootInfo (
   )\r
 {\r
   EFI_STATUS              Status;\r
-  \r
+\r
   //\r
   // Start D.O.R.A/S.A.R.R exchange to acquire station ip address and\r
   // other Http boot information.\r
@@ -557,7 +557,7 @@ HttpBootDiscoverBootInfo (
   @param[in]    EventType      Indicate the Event type that occurs in the current callback.\r
   @param[in]    Message        HTTP message which will be send to, or just received from HTTP server.\r
   @param[in]    Context        The Callback Context pointer.\r
-  \r
+\r
   @retval EFI_SUCCESS          Tells the HttpIo to continue the HTTP process.\r
   @retval Others               Tells the HttpIo to abort the current HTTP process.\r
 **/\r
@@ -706,7 +706,7 @@ HttpBootFreeCacheList (
   LIST_ENTRY                  *Entry;\r
   LIST_ENTRY                  *NextEntry;\r
   HTTP_BOOT_CACHE_CONTENT     *Cache;\r
-  \r
+\r
   NET_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Private->CacheList) {\r
     Cache = NET_LIST_USER_STRUCT (Entry, HTTP_BOOT_CACHE_CONTENT, Link);\r
     RemoveEntryList (&Cache->Link);\r
@@ -746,7 +746,7 @@ HttpBootGetFileFromCache (
   HTTP_BOOT_CACHE_CONTENT     *Cache;\r
   HTTP_BOOT_ENTITY_DATA       *EntityData;\r
   UINTN                       CopyedSize;\r
-  \r
+\r
   if (Uri == NULL || BufferSize == NULL || Buffer == NULL || ImageType == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -808,7 +808,7 @@ HttpBootGetFileFromCache (
 \r
   @retval EFI_SUCCESS              Continue to parser the message body.\r
   @retval Others                   Abort the parse.\r
\r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -878,7 +878,7 @@ HttpBootGetBootFileCallback (
 \r
 /**\r
   This function download the boot file by using UEFI HTTP protocol.\r
-  \r
+\r
   @param[in]       Private         The pointer to the driver's private data.\r
   @param[in]       HeaderOnly      Only request the response header, it could save a lot of time if\r
                                    the caller only want to know the size of the requested file.\r
@@ -926,7 +926,7 @@ HttpBootGetBootFile (
   CHAR16                     *Url;\r
   BOOLEAN                    IdentityMode;\r
   UINTN                      ReceivedSize;\r
-  \r
+\r
   ASSERT (Private != NULL);\r
   ASSERT (Private->HttpCreated);\r
 \r
@@ -1116,7 +1116,7 @@ HttpBootGetBootFile (
     Cache->ResponseData = ResponseData;\r
     Cache->ImageType = *ImageType;\r
   }\r
-  \r
+\r
   //\r
   // 3.3 Init a message-body parser from the header information.\r
   //\r
@@ -1278,7 +1278,7 @@ HttpBootGetBootFile (
   }\r
 \r
   return Status;\r
-  \r
+\r
 ERROR_6:\r
   if (Parser != NULL) {\r
     HttpFreeMsgParser (Parser);\r
@@ -1287,7 +1287,7 @@ ERROR_6:
     FreePool (Context.Block);\r
   }\r
   HttpBootFreeCache (Cache);\r
-  \r
+\r
 ERROR_5:\r
   if (ResponseData != NULL) {\r
     FreePool (ResponseData);\r
index dd58719b40797a33546d8f24c367189374e1ae51..f8d0db7847b232002f2a6cea147c9af73d6ec68d 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
   Declaration of the boot file download function.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+http://opensource.org/licenses/bsd-license.php.\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -98,7 +98,7 @@ HttpBootCreateHttpIo (
 \r
 /**\r
   This function download the boot file by using UEFI HTTP protocol.\r
-  \r
+\r
   @param[in]       Private         The pointer to the driver's private data.\r
   @param[in]       HeaderOnly      Only request the response header, it could save a lot of time if\r
                                    the caller only want to know the size of the requested file.\r
index 2c39089da3f7bb8912649798a07f2a1c2045918f..d8988a3521515b67b0ea651e5b520d7e198e57ab 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Implementation of EFI_COMPONENT_NAME_PROTOCOL and EFI_COMPONENT_NAME2_PROTOCOL protocol.\r
 \r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+http://opensource.org/licenses/bsd-license.php.\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -17,7 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 ///\r
 /// Component Name Protocol instance\r
 ///\r
-GLOBAL_REMOVE_IF_UNREFERENCED \r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
 EFI_COMPONENT_NAME_PROTOCOL  gHttpBootDxeComponentName = {\r
   (EFI_COMPONENT_NAME_GET_DRIVER_NAME)    HttpBootDxeComponentNameGetDriverName,\r
   (EFI_COMPONENT_NAME_GET_CONTROLLER_NAME)HttpBootDxeComponentNameGetControllerName,\r
@@ -27,7 +27,7 @@ EFI_COMPONENT_NAME_PROTOCOL  gHttpBootDxeComponentName = {
 ///\r
 /// Component Name 2 Protocol instance\r
 ///\r
-GLOBAL_REMOVE_IF_UNREFERENCED \r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
 EFI_COMPONENT_NAME2_PROTOCOL  gHttpBootDxeComponentName2 = {\r
   HttpBootDxeComponentNameGetDriverName,\r
   HttpBootDxeComponentNameGetControllerName,\r
@@ -37,7 +37,7 @@ EFI_COMPONENT_NAME2_PROTOCOL  gHttpBootDxeComponentName2 = {
 ///\r
 /// Table of driver names\r
 ///\r
-GLOBAL_REMOVE_IF_UNREFERENCED \r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
 EFI_UNICODE_STRING_TABLE mHttpBootDxeDriverNameTable[] = {\r
   { "eng;en", (CHAR16 *)L"UEFI HTTP Boot Driver" },\r
   { NULL, NULL }\r
@@ -46,7 +46,7 @@ EFI_UNICODE_STRING_TABLE mHttpBootDxeDriverNameTable[] = {
 ///\r
 /// Table of controller names\r
 ///\r
-GLOBAL_REMOVE_IF_UNREFERENCED \r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
 EFI_UNICODE_STRING_TABLE mHttpBootDxeControllerNameTable[] = {\r
   { "eng;en", (CHAR16 *)L"UEFI Http Boot Controller" },\r
   { NULL, NULL }\r
@@ -148,7 +148,7 @@ HttpBootDxeComponentNameGetControllerName (
   if (ControllerHandle == NULL || ChildHandle != NULL) {\r
     return EFI_UNSUPPORTED;\r
   }\r
-  \r
+\r
   NicHandle = HttpBootGetNicByIp4Children (ControllerHandle);\r
   if (NicHandle == NULL) {\r
     NicHandle = HttpBootGetNicByIp6Children(ControllerHandle);\r
index 3fce9b75ab6ce23ddde7e69e83835a3bba3ee9c9..1baf3fa69301d2e70a75e89b1d951a1629b3a248 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
-  Declaration of HTTP boot driver's EFI_COMPONENT_NAME_PROTOCOL and \r
+  Declaration of HTTP boot driver's EFI_COMPONENT_NAME_PROTOCOL and\r
   EFI_COMPONENT_NAME2_PROTOCOL function.\r
 \r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+http://opensource.org/licenses/bsd-license.php.\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index 81fceb2fd6bd8e0f6fc9094935c7033a5ee37f2f..b95abc624b4efa124bb9f058f3d9dab9ff21adc7 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Helper functions for configuring or getting the parameters relating to HTTP Boot.\r
 \r
-Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -24,7 +24,7 @@ CHAR16  mHttpBootConfigStorageName[]     = L"HTTP_BOOT_CONFIG_IFR_NVDATA";
   @param[in]  UsingIpv6           Set to TRUE if creating boot option for IPv6.\r
   @param[in]  Description         The description text of the boot option.\r
   @param[in]  Uri                 The URI string of the boot file.\r
-  \r
+\r
   @retval EFI_SUCCESS             The boot option is created successfully.\r
   @retval Others                  Failed to create new boot option.\r
 \r
@@ -72,7 +72,7 @@ HttpBootAddBootOption (
   if ((StrLen (Uri) != 0) && (StrnCmp (Uri, L"http://", 7) != 0) && (StrnCmp (Uri, L"https://", 8) != 0)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // Create a new device path by appending the IP node and URI node to\r
   // the driver's parent device path\r
@@ -154,7 +154,7 @@ ON_EXIT:
 }\r
 \r
 /**\r
-   \r
+\r
   This function allows the caller to request the current\r
   configuration for one or more named elements. The resulting\r
   string is in <ConfigAltResp> format. Also, any and all alternative\r
@@ -183,7 +183,7 @@ ON_EXIT:
                          to the most recent "&" before the first\r
                          failing name / value pair (or the beginning\r
                          of the string if the failure is in the first\r
-                         name / value pair) if the request was not successful.                        \r
+                         name / value pair) if the request was not successful.\r
 \r
   @param[out] Results    A null-terminated Unicode string in\r
                          <ConfigAltResp> format which has all values\r
@@ -204,7 +204,7 @@ ON_EXIT:
                                   would result in this type of\r
                                   error. In this case, the\r
                                   Progress parameter would be\r
-                                  set to NULL. \r
+                                  set to NULL.\r
 \r
   @retval EFI_NOT_FOUND           Routing data doesn't match any\r
                                   known driver. Progress set to the\r
@@ -249,7 +249,7 @@ HttpBootFormExtractConfig (
   if ((Request != NULL) && !HiiIsConfigHdrMatch (Request, &gHttpBootConfigGuid, mHttpBootConfigStorageName)) {\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
+\r
   ConfigRequestHdr = NULL;\r
   ConfigRequest    = NULL;\r
   AllocatedRequest = FALSE;\r
@@ -289,7 +289,7 @@ HttpBootFormExtractConfig (
                                 Results,\r
                                 Progress\r
                                 );\r
-  \r
+\r
   //\r
   // Free the allocated config request string.\r
   //\r
@@ -310,7 +310,7 @@ HttpBootFormExtractConfig (
 }\r
 \r
 /**\r
-   \r
+\r
   This function applies changes in a driver's configuration.\r
   Input is a Configuration, which has the routing data for this\r
   driver followed by name / value configuration pairs. The driver\r
@@ -323,8 +323,8 @@ HttpBootFormExtractConfig (
   @param[in]  This           Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
 \r
   @param[in]  Configuration  A null-terminated Unicode string in\r
-                             <ConfigString> format. \r
-  \r
+                             <ConfigString> format.\r
+\r
   @param[out] Progress       A pointer to a string filled in with the\r
                              offset of the most recent '&' before the\r
                              first failing name / value pair (or the\r
@@ -335,16 +335,16 @@ HttpBootFormExtractConfig (
 \r
   @retval EFI_SUCCESS             The results have been distributed or are\r
                                   awaiting distribution.\r
-  \r
+\r
   @retval EFI_OUT_OF_RESOURCES    Not enough memory to store the\r
                                   parts of the results that must be\r
                                   stored awaiting possible future\r
                                   protocols.\r
-  \r
+\r
   @retval EFI_INVALID_PARAMETERS  Passing in a NULL for the\r
                                   Results parameter would result\r
                                   in this type of error.\r
-  \r
+\r
   @retval EFI_NOT_FOUND           Target for the specified routing data\r
                                   was not found.\r
 \r
@@ -381,7 +381,7 @@ HttpBootFormRouteConfig (
 \r
   CallbackInfo = HTTP_BOOT_FORM_CALLBACK_INFO_FROM_CONFIG_ACCESS (This);\r
   Private      = HTTP_BOOT_PRIVATE_DATA_FROM_CALLBACK_INFO (CallbackInfo);\r
-  \r
+\r
   BufferSize = sizeof (HTTP_BOOT_CONFIG_IFR_NVDATA);\r
   ZeroMem (&CallbackInfo->HttpBootNvData, BufferSize);\r
 \r
@@ -405,12 +405,12 @@ HttpBootFormRouteConfig (
     CallbackInfo->HttpBootNvData.Description,\r
     CallbackInfo->HttpBootNvData.Uri\r
     );\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
 /**\r
-   \r
+\r
   This function is called to provide results data to the driver.\r
   This data consists of a unique key that is used to identify\r
   which data is either being passed back or being asked for.\r
@@ -419,7 +419,7 @@ HttpBootFormRouteConfig (
   @param[in]       Action        Specifies the type of action taken by the browser.\r
   @param[in]       QuestionId    A unique value which is sent to the original\r
                                  exporting driver so that it can identify the type\r
-                                 of data to expect. The format of the data tends to \r
+                                 of data to expect. The format of the data tends to\r
                                  vary based on the opcode that generated the callback.\r
   @param[in]       Type          The type of value for the question.\r
   @param[in, out]  Value         A pointer to the data being sent to the original\r
@@ -456,17 +456,17 @@ HttpBootFormCallback (
   UriLen   = 0;\r
   AsciiUri = NULL;\r
   Status   = EFI_SUCCESS;\r
-  \r
+\r
   if (This == NULL || Value == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
   CallbackInfo = HTTP_BOOT_FORM_CALLBACK_INFO_FROM_CONFIG_ACCESS (This);\r
-  \r
+\r
   if (Action != EFI_BROWSER_ACTION_CHANGING) {\r
     return EFI_UNSUPPORTED;\r
   }\r
-  \r
+\r
   switch (QuestionId) {\r
   case KEY_INITIATOR_URI:\r
     //\r
@@ -474,8 +474,8 @@ HttpBootFormCallback (
     //\r
     Uri = HiiGetString (CallbackInfo->RegisteredHandle, Value->string, NULL);\r
     if(Uri == NULL) {\r
-       return EFI_INVALID_PARAMETER;\r
-    }        \r
+      return EFI_INVALID_PARAMETER;\r
+    }\r
 \r
     //\r
     // The URI should be either an empty string (for corporate environment) ,or http(s) for home environment.\r
@@ -492,7 +492,7 @@ HttpBootFormCallback (
       UnicodeStrToAsciiStrS (Uri, AsciiUri, UriLen);\r
 \r
       Status = HttpBootCheckUriScheme (AsciiUri);\r
-      \r
+\r
       if (Status == EFI_INVALID_PARAMETER) {\r
 \r
         DEBUG ((EFI_D_ERROR, "HttpBootFormCallback: %r.\n", Status));\r
@@ -503,11 +503,11 @@ HttpBootFormCallback (
           L"ERROR: Unsupported URI!",\r
           L"Only supports HTTP and HTTPS",\r
           NULL\r
-          ); \r
+          );\r
       } else if (Status == EFI_ACCESS_DENIED) {\r
-      \r
+\r
         DEBUG ((EFI_D_ERROR, "HttpBootFormCallback: %r.\n", Status));\r
-      \r
+\r
         CreatePopUp (\r
           EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,\r
           &Key,\r
@@ -524,8 +524,8 @@ HttpBootFormCallback (
 \r
     if (AsciiUri != NULL) {\r
       FreePool (AsciiUri);\r
-    }   \r
-    \r
+    }\r
+\r
     break;\r
 \r
   default:\r
@@ -561,7 +561,7 @@ HttpBootConfigFormInit (
   if (CallbackInfo->Initilized) {\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   CallbackInfo->Signature = HTTP_BOOT_FORM_CALLBACK_INFO_SIGNATURE;\r
 \r
   //\r
@@ -586,7 +586,7 @@ HttpBootConfigFormInit (
   CallbackInfo->ConfigAccess.ExtractConfig = HttpBootFormExtractConfig;\r
   CallbackInfo->ConfigAccess.RouteConfig   = HttpBootFormRouteConfig;\r
   CallbackInfo->ConfigAccess.Callback      = HttpBootFormCallback;\r
-  \r
+\r
   //\r
   // Install Device Path Protocol and Config Access protocol to driver handle.\r
   //\r
@@ -623,25 +623,25 @@ HttpBootConfigFormInit (
   Status = NetLibGetMacString (Private->Controller, NULL, &MacString);\r
   if (!EFI_ERROR (Status)) {\r
     OldMenuString = HiiGetString (\r
-                      CallbackInfo->RegisteredHandle, \r
-                      STRING_TOKEN (STR_HTTP_BOOT_CONFIG_FORM_HELP), \r
+                      CallbackInfo->RegisteredHandle,\r
+                      STRING_TOKEN (STR_HTTP_BOOT_CONFIG_FORM_HELP),\r
                       NULL\r
                       );\r
     UnicodeSPrint (MenuString, 128, L"%s (MAC:%s)", OldMenuString, MacString);\r
     HiiSetString (\r
-      CallbackInfo->RegisteredHandle, \r
-      STRING_TOKEN (STR_HTTP_BOOT_CONFIG_FORM_HELP), \r
-      MenuString, \r
+      CallbackInfo->RegisteredHandle,\r
+      STRING_TOKEN (STR_HTTP_BOOT_CONFIG_FORM_HELP),\r
+      MenuString,\r
       NULL\r
       );\r
-    \r
+\r
     FreePool (MacString);\r
     FreePool (OldMenuString);\r
 \r
     CallbackInfo->Initilized = TRUE;\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
 Error:\r
 \r
   HttpBootConfigFormUnload (Private);\r
index 7e8ddae33d761fda024e73298bf8379464124810..9c65d64d937ec0cac6e32767beb901686e380695 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   VFR file used by the HTTP Boot configuration component.\r
 \r
-  Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -24,7 +24,7 @@ formset
   varstore HTTP_BOOT_CONFIG_IFR_NVDATA,\r
     name = HTTP_BOOT_CONFIG_IFR_NVDATA,\r
     guid = HTTP_BOOT_CONFIG_GUID;\r
-  \r
+\r
   form formid = FORMID_MAIN_FORM,\r
     title  = STRING_TOKEN(STR_HTTP_BOOT_CONFIG_FORM_TITLE);\r
 \r
index 229e6cb0ec6a73791a9c25a55ff30cb90caf31fc..78d161ae9548cc5c473847a1288b825df9b591f2 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Functions implementation related with DHCPv4 for HTTP boot driver.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+http://opensource.org/licenses/bsd-license.php.\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -267,7 +267,7 @@ HttpBootParseDhcp4Packet (
   HTTP_BOOT_OFFER_TYPE           OfferType;\r
   EFI_IPv4_ADDRESS               IpAddr;\r
   BOOLEAN                        FileFieldOverloaded;\r
-  \r
+\r
   IsDnsOffer     = FALSE;\r
   IpExpressedUri = FALSE;\r
   IsProxyOffer   = FALSE;\r
@@ -291,7 +291,7 @@ HttpBootParseDhcp4Packet (
                        );\r
   }\r
   //\r
-  // Second, Check if bootfilename and serverhostname is overloaded to carry DHCP options refers to rfc-2132. \r
+  // Second, Check if bootfilename and serverhostname is overloaded to carry DHCP options refers to rfc-2132.\r
   // If yes, try to parse options from the BootFileName field, then ServerName field.\r
   //\r
   Option = Options[HTTP_BOOT_DHCP4_TAG_INDEX_OVERLOAD];\r
@@ -379,7 +379,7 @@ HttpBootParseDhcp4Packet (
   }\r
 \r
   //\r
-  // Try to retrieve the IP of HTTP server from URI. \r
+  // Try to retrieve the IP of HTTP server from URI.\r
   //\r
   if (IsHttpOffer) {\r
     Status = HttpParseUrl (\r
@@ -428,7 +428,7 @@ HttpBootParseDhcp4Packet (
       return EFI_DEVICE_ERROR;\r
     }\r
   }\r
-  \r
+\r
   Cache4->OfferType = OfferType;\r
   return EFI_SUCCESS;\r
 }\r
@@ -506,70 +506,70 @@ HttpBootSelectDhcpOffer (
     // The offer with DNS server address takes priority here.\r
     //\r
     if (Private->OfferCount[HttpOfferTypeDhcpDns] > 0) {\r
-      \r
+\r
       Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpDns][0] + 1;\r
-      \r
+\r
     } else if (Private->OfferCount[HttpOfferTypeDhcpIpUriDns] > 0) {\r
-    \r
+\r
       Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpIpUriDns][0] + 1;\r
-      \r
+\r
     } else if (Private->OfferCount[HttpOfferTypeDhcpNameUriDns] > 0) {\r
-    \r
+\r
       Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpNameUriDns][0] + 1;\r
-      \r
+\r
     }  else if (Private->OfferCount[HttpOfferTypeDhcpOnly] > 0) {\r
-    \r
+\r
       Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpOnly][0] + 1;\r
-      \r
+\r
     }  else if (Private->OfferCount[HttpOfferTypeDhcpIpUri] > 0) {\r
-    \r
+\r
       Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpIpUri][0] + 1;\r
     }\r
-    \r
+\r
   } else {\r
     //\r
     // We are in corporate environment.\r
     //\r
     // Priority1: HttpOfferTypeDhcpIpUri or HttpOfferTypeDhcpIpUriDns\r
-    // Priority2: HttpOfferTypeDhcpNameUriDns                      \r
-    // Priority3: HttpOfferTypeDhcpOnly + HttpOfferTypeProxyIpUri  \r
-    // Priority4: HttpOfferTypeDhcpDns  + HttpOfferTypeProxyIpUri  \r
+    // Priority2: HttpOfferTypeDhcpNameUriDns\r
+    // Priority3: HttpOfferTypeDhcpOnly + HttpOfferTypeProxyIpUri\r
+    // Priority4: HttpOfferTypeDhcpDns  + HttpOfferTypeProxyIpUri\r
     // Priority5: HttpOfferTypeDhcpDns  + HttpOfferTypeProxyNameUri\r
-    // Priority6: HttpOfferTypeDhcpDns  + HttpOfferTypeDhcpNameUri \r
-    //    \r
+    // Priority6: HttpOfferTypeDhcpDns  + HttpOfferTypeDhcpNameUri\r
+    //\r
     if (Private->OfferCount[HttpOfferTypeDhcpIpUri] > 0) {\r
-      \r
+\r
       Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpIpUri][0] + 1;\r
-      \r
+\r
     } else if (Private->OfferCount[HttpOfferTypeDhcpIpUriDns] > 0) {\r
-      \r
+\r
       Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpIpUriDns][0] + 1;\r
-      \r
+\r
     }else if (Private->OfferCount[HttpOfferTypeDhcpNameUriDns] > 0) {\r
-    \r
+\r
       Private->SelectIndex = Private->OfferIndex[HttpOfferTypeDhcpNameUriDns][0] + 1;\r
-      \r
+\r
     } else if (Private->OfferCount[HttpOfferTypeDhcpOnly] > 0 &&\r
                Private->OfferCount[HttpOfferTypeProxyIpUri] > 0) {\r
-               \r
+\r
       Private->SelectIndex     = Private->OfferIndex[HttpOfferTypeDhcpOnly][0] + 1;\r
       Private->SelectProxyType = HttpOfferTypeProxyIpUri;\r
-      \r
+\r
     } else if (Private->OfferCount[HttpOfferTypeDhcpDns] > 0 &&\r
                Private->OfferCount[HttpOfferTypeProxyIpUri] > 0) {\r
-               \r
+\r
       Private->SelectIndex     = Private->OfferIndex[HttpOfferTypeDhcpDns][0] + 1;\r
       Private->SelectProxyType = HttpOfferTypeProxyIpUri;\r
-      \r
+\r
     } else if (Private->OfferCount[HttpOfferTypeDhcpDns] > 0 &&\r
                Private->OfferCount[HttpOfferTypeProxyNameUri] > 0) {\r
-               \r
+\r
       Private->SelectIndex     = Private->OfferIndex[HttpOfferTypeDhcpDns][0] + 1;\r
       Private->SelectProxyType = HttpOfferTypeProxyNameUri;\r
-      \r
+\r
     } else if (Private->OfferCount[HttpOfferTypeDhcpDns] > 0 &&\r
                Private->OfferCount[HttpOfferTypeDhcpNameUri] > 0) {\r
-               \r
+\r
       Private->SelectIndex     = Private->OfferIndex[HttpOfferTypeDhcpDns][0] + 1;\r
       Private->SelectProxyType = HttpOfferTypeDhcpNameUri;\r
     }\r
@@ -614,14 +614,14 @@ HttpBootDhcp4CallBack (
   EFI_STATUS                           Status;\r
   BOOLEAN                              Received;\r
 \r
-  if ((Dhcp4Event != Dhcp4SendDiscover) && \r
-      (Dhcp4Event != Dhcp4RcvdOffer) && \r
-      (Dhcp4Event != Dhcp4SendRequest) && \r
-      (Dhcp4Event != Dhcp4RcvdAck) && \r
+  if ((Dhcp4Event != Dhcp4SendDiscover) &&\r
+      (Dhcp4Event != Dhcp4RcvdOffer) &&\r
+      (Dhcp4Event != Dhcp4SendRequest) &&\r
+      (Dhcp4Event != Dhcp4RcvdAck) &&\r
       (Dhcp4Event != Dhcp4SelectOffer)) {\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   Private = (HTTP_BOOT_PRIVATE_DATA *) Context;\r
 \r
   //\r
@@ -636,14 +636,14 @@ HttpBootDhcp4CallBack (
     Value = HTONS (HTTP_BOOT_DHCP4_PACKET_MAX_SIZE);\r
     CopyMem (MaxMsgSize->Data, &Value, sizeof (Value));\r
   }\r
-  \r
+\r
   //\r
   // Callback to user if any packets sent or received.\r
   //\r
   if (Private->HttpBootCallback != NULL && Dhcp4Event != Dhcp4SelectOffer) {\r
     Received = (BOOLEAN) (Dhcp4Event == Dhcp4RcvdOffer || Dhcp4Event == Dhcp4RcvdAck);\r
     Status = Private->HttpBootCallback->Callback (\r
-               Private->HttpBootCallback, \r
+               Private->HttpBootCallback,\r
                HttpBootDhcp4,\r
                Received,\r
                Packet->Length,\r
@@ -676,7 +676,7 @@ HttpBootDhcp4CallBack (
 \r
   case Dhcp4SelectOffer:\r
     //\r
-    // Select offer according to the priority in UEFI spec, and record the SelectIndex \r
+    // Select offer according to the priority in UEFI spec, and record the SelectIndex\r
     // and SelectProxyType.\r
     //\r
     HttpBootSelectDhcpOffer (Private);\r
@@ -687,7 +687,7 @@ HttpBootDhcp4CallBack (
       *NewPacket = &Private->OfferBuffer[Private->SelectIndex - 1].Dhcp4.Packet.Offer;\r
     }\r
     break;\r
-    \r
+\r
   default:\r
     break;\r
   }\r
@@ -697,7 +697,7 @@ HttpBootDhcp4CallBack (
 \r
 /**\r
   This function will register the IPv4 gateway address to the network device.\r
-  \r
+\r
   @param[in]  Private             The pointer to HTTP_BOOT_PRIVATE_DATA.\r
 \r
   @retval     EFI_SUCCESS         The new IP configuration has been configured successfully.\r
@@ -736,7 +736,7 @@ HttpBootRegisterIp4Gateway (
 \r
 /**\r
   This function will register the default DNS addresses to the network device.\r
-  \r
+\r
   @param[in]  Private             The pointer to HTTP_BOOT_PRIVATE_DATA.\r
   @param[in]  DataLength          Size of the buffer pointed to by DnsServerData in bytes.\r
   @param[in]  DnsServerData       Point a list of DNS server address in an array\r
@@ -754,11 +754,11 @@ HttpBootRegisterIp4Dns (
   )\r
 {\r
   EFI_IP4_CONFIG2_PROTOCOL        *Ip4Config2;\r
-  \r
+\r
   ASSERT (!Private->UsingIpv6);\r
 \r
   Ip4Config2 = Private->Ip4Config2;\r
-  \r
+\r
   return Ip4Config2->SetData (\r
                        Ip4Config2,\r
                        Ip4Config2DataTypeDnsServer,\r
@@ -810,7 +810,7 @@ HttpBootSetIp4Policy (
                           );\r
     if (EFI_ERROR (Status)) {\r
       return Status;\r
-    } \r
+    }\r
   }\r
 \r
   return EFI_SUCCESS;\r
@@ -837,7 +837,7 @@ HttpBootDhcp4Dora (
   EFI_DHCP4_CONFIG_DATA        Config;\r
   EFI_STATUS                   Status;\r
   EFI_DHCP4_MODE_DATA          Mode;\r
-  \r
+\r
   Dhcp4 = Private->Dhcp4;\r
   ASSERT (Dhcp4 != NULL);\r
 \r
index 0b2cafbf50988e3c55ffc20bee5691a9051cc7ff..4eb3f94af773d0047ecaf57db0d80ebb7733ff72 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Functions declaration related with DHCPv4 for HTTP boot driver.\r
 \r
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+http://opensource.org/licenses/bsd-license.php.\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -28,7 +28,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define HTTP_BOOT_DHCP4_OVERLOAD_SERVER_NAME   2\r
 \r
 ///\r
-/// HTTP Tag definition that identifies the processor \r
+/// HTTP Tag definition that identifies the processor\r
 /// and programming environment of the client system.\r
 /// These identifiers are defined by IETF:\r
 /// http://www.ietf.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xml\r
@@ -236,7 +236,7 @@ HttpBootDhcp4Dora (
 \r
 /**\r
   This function will register the default DNS addresses to the network device.\r
-  \r
+\r
   @param[in]  Private             The pointer to HTTP_BOOT_PRIVATE_DATA.\r
   @param[in]  DataLength          Size of the buffer pointed to by DnsServerData in bytes.\r
   @param[in]  DnsServerData       Point a list of DNS server address in an array\r
index 4eea895368b992b8a5810877f01f6d100ca81c8e..fd2c648b8439027d15b54e32205a5cbe369f86db 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Functions implementation related with DHCPv6 for HTTP boot driver.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+http://opensource.org/licenses/bsd-license.php.\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -192,14 +192,14 @@ HttpBootParseDhcp6Packet (
   EFI_STATUS                     Status;\r
   UINT32                         Offset;\r
   UINT32                         Length;\r
-  \r
+\r
   IsDnsOffer     = FALSE;\r
   IpExpressedUri = FALSE;\r
   IsProxyOffer   = TRUE;\r
   IsHttpOffer    = FALSE;\r
   Offer        = &Cache6->Packet.Offer;\r
   Options      = Cache6->OptList;\r
-  \r
+\r
   ZeroMem (Cache6->OptList, sizeof (Cache6->OptList));\r
 \r
   Option  = (EFI_DHCP6_PACKET_OPTION *) (Offer->Dhcp6.Option);\r
@@ -270,9 +270,9 @@ HttpBootParseDhcp6Packet (
   if (IsHttpOffer && Options[HTTP_BOOT_DHCP6_IDX_BOOT_FILE_URL] == NULL) {\r
     return EFI_DEVICE_ERROR;\r
   }\r
\r
+\r
   //\r
-  // Try to retrieve the IP of HTTP server from URI. \r
+  // Try to retrieve the IP of HTTP server from URI.\r
   //\r
   if (IsHttpOffer) {\r
     Status = HttpParseUrl (\r
@@ -318,7 +318,7 @@ HttpBootParseDhcp6Packet (
       return EFI_DEVICE_ERROR;\r
     }\r
   }\r
-  \r
+\r
   Cache6->OfferType = OfferType;\r
   return EFI_SUCCESS;\r
 }\r
@@ -345,7 +345,7 @@ HttpBootCacheDhcp6Packet (
 \r
   CopyMem (&Dst->Dhcp6, &Src->Dhcp6, Src->Length);\r
   Dst->Length = Src->Length;\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -397,7 +397,7 @@ HttpBootCacheDhcp6Offer (
   Private->OfferIndex[OfferType][Private->OfferCount[OfferType]] = Private->OfferNum;\r
   Private->OfferCount[OfferType]++;\r
   Private->OfferNum++;\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -435,7 +435,7 @@ HttpBootDhcp6CallBack (
   EFI_DHCP6_PACKET                *SelectAd;\r
   EFI_STATUS                      Status;\r
   BOOLEAN                         Received;\r
-  \r
+\r
   if ((Dhcp6Event != Dhcp6SendSolicit) &&\r
     (Dhcp6Event != Dhcp6RcvdAdvertise) &&\r
     (Dhcp6Event != Dhcp6SendRequest) &&\r
@@ -445,13 +445,13 @@ HttpBootDhcp6CallBack (
   }\r
 \r
   ASSERT (Packet != NULL);\r
-  \r
+\r
   Private     = (HTTP_BOOT_PRIVATE_DATA *) Context;\r
   Status = EFI_SUCCESS;\r
   if (Private->HttpBootCallback != NULL && Dhcp6Event != Dhcp6SelectAdvertise) {\r
     Received = (BOOLEAN) (Dhcp6Event == Dhcp6RcvdAdvertise || Dhcp6Event == Dhcp6RcvdReply);\r
     Status = Private->HttpBootCallback->Callback (\r
-               Private->HttpBootCallback, \r
+               Private->HttpBootCallback,\r
                HttpBootDhcp6,\r
                Received,\r
                Packet->Length,\r
@@ -462,7 +462,7 @@ HttpBootDhcp6CallBack (
     }\r
   }\r
   switch (Dhcp6Event) {\r
-   \r
+\r
   case Dhcp6RcvdAdvertise:\r
     Status = EFI_NOT_READY;\r
     if (Packet->Length > HTTP_BOOT_DHCP6_PACKET_MAX_SIZE) {\r
@@ -500,17 +500,17 @@ HttpBootDhcp6CallBack (
       CopyMem (*NewPacket, SelectAd, SelectAd->Size);\r
     }\r
     break;\r
-     \r
+\r
   default:\r
     break;\r
   }\r
 \r
-  return Status;   \r
+  return Status;\r
 }\r
 \r
 /**\r
   Check whether IP driver could route the message which will be sent to ServerIp address.\r
-  \r
+\r
   This function will check the IP6 route table every 1 seconds until specified timeout is expired, if a valid\r
   route is found in IP6 route table, the address will be filed in GatewayAddr and return.\r
 \r
@@ -521,7 +521,7 @@ HttpBootDhcp6CallBack (
   @retval     EFI_SUCCESS         Found a valid gateway address successfully.\r
   @retval     EFI_TIMEOUT         The operation is time out.\r
   @retval     Other               Unexpect error happened.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 HttpBootCheckRouteTable (\r
@@ -553,7 +553,7 @@ HttpBootCheckRouteTable (
     if (EFI_ERROR (Status)) {\r
       goto ON_EXIT;\r
     }\r
-    \r
+\r
     //\r
     // Find out the gateway address which can route the message which send to ServerIp.\r
     //\r
@@ -583,13 +583,13 @@ HttpBootCheckRouteTable (
     if (Ip6ModeData.IcmpTypeList != NULL) {\r
       FreePool (Ip6ModeData.IcmpTypeList);\r
     }\r
-    \r
+\r
     if (GatewayIsFound || RetryCount == TimeOutInSecond) {\r
       break;\r
     }\r
-    \r
+\r
     RetryCount++;\r
-    \r
+\r
     //\r
     // Delay 1 second then recheck it again.\r
     //\r
@@ -614,19 +614,19 @@ HttpBootCheckRouteTable (
       Ip6->Poll (Ip6);\r
     }\r
   }\r
-  \r
+\r
 ON_EXIT:\r
   if (TimeOutEvt != NULL) {\r
     gBS->CloseEvent (TimeOutEvt);\r
   }\r
-  \r
+\r
   if (GatewayIsFound) {\r
     Status = EFI_SUCCESS;\r
   } else if (RetryCount == TimeOutInSecond) {\r
     Status = EFI_TIMEOUT;\r
   }\r
 \r
-  return Status; \r
+  return Status;\r
 }\r
 \r
 /**\r
@@ -650,7 +650,7 @@ HttpBootSetIp6Policy (
 \r
   Ip6Config       = Private->Ip6Config;\r
   DataSize        = sizeof (EFI_IP6_CONFIG_POLICY);\r
-  \r
+\r
   //\r
   // Get and store the current policy of IP6 driver.\r
   //\r
@@ -681,7 +681,7 @@ HttpBootSetIp6Policy (
 \r
 /**\r
   This function will register the default DNS addresses to the network device.\r
-  \r
+\r
   @param[in]  Private             The pointer to HTTP_BOOT_PRIVATE_DATA.\r
   @param[in]  DataLength          Size of the buffer pointed to by DnsServerData in bytes.\r
   @param[in]  DnsServerData       Point a list of DNS server address in an array\r
@@ -699,11 +699,11 @@ HttpBootSetIp6Dns (
   )\r
 {\r
   EFI_IP6_CONFIG_PROTOCOL        *Ip6Config;\r
-  \r
+\r
   ASSERT (Private->UsingIpv6);\r
 \r
   Ip6Config = Private->Ip6Config;\r
-  \r
+\r
   return Ip6Config->SetData (\r
                       Ip6Config,\r
                       Ip6ConfigDataTypeDnsServer,\r
@@ -714,7 +714,7 @@ HttpBootSetIp6Dns (
 \r
 /**\r
   This function will register the IPv6 gateway address to the network device.\r
-  \r
+\r
   @param[in]  Private             The pointer to HTTP_BOOT_PRIVATE_DATA.\r
 \r
   @retval     EFI_SUCCESS         The new IP configuration has been configured successfully.\r
@@ -731,9 +731,9 @@ HttpBootSetIp6Gateway (
 \r
   ASSERT (Private->UsingIpv6);\r
   Ip6Config = Private->Ip6Config;\r
\r
+\r
   //\r
-  // Set the default gateway address. \r
+  // Set the default gateway address.\r
   //\r
   if (!Private->NoGateway && !NetIp6IsUnspecifiedAddr (&Private->GatewayIp.v6)) {\r
     Status = Ip6Config->SetData (\r
@@ -752,7 +752,7 @@ HttpBootSetIp6Gateway (
 \r
 /**\r
   This function will register the station IP address.\r
-  \r
+\r
   @param[in]  Private             The pointer to HTTP_BOOT_PRIVATE_DATA.\r
 \r
   @retval     EFI_SUCCESS         The new IP address has been configured successfully.\r
@@ -772,29 +772,29 @@ HttpBootSetIp6Address (
   EFI_IPv6_ADDRESS                   *Ip6Addr;\r
   EFI_IPv6_ADDRESS                   GatewayAddr;\r
   EFI_IP6_CONFIG_DATA                Ip6CfgData;\r
-  EFI_EVENT                          MappedEvt; \r
+  EFI_EVENT                          MappedEvt;\r
   UINTN                              DataSize;\r
   BOOLEAN                            IsAddressOk;\r
   UINTN                              Index;\r
 \r
   ASSERT (Private->UsingIpv6);\r
-  \r
+\r
   MappedEvt   = NULL;\r
   IsAddressOk = FALSE;\r
   Ip6Addr     = NULL;\r
   Ip6Cfg      = Private->Ip6Config;\r
   Ip6         = Private->Ip6;\r
-  \r
+\r
   ZeroMem (&CfgAddr, sizeof (EFI_IP6_CONFIG_MANUAL_ADDRESS));\r
   CopyMem (&CfgAddr, &Private->StationIp.v6, sizeof (EFI_IPv6_ADDRESS));\r
   ZeroMem (&Ip6CfgData, sizeof (EFI_IP6_CONFIG_DATA));\r
-  \r
+\r
   Ip6CfgData.AcceptIcmpErrors    = TRUE;\r
   Ip6CfgData.DefaultProtocol     = IP6_ICMP;\r
   Ip6CfgData.HopLimit            = HTTP_BOOT_DEFAULT_HOPLIMIT;\r
   Ip6CfgData.ReceiveTimeout      = HTTP_BOOT_DEFAULT_LIFETIME;\r
   Ip6CfgData.TransmitTimeout     = HTTP_BOOT_DEFAULT_LIFETIME;\r
-    \r
+\r
   Status = Ip6->Configure (Ip6, &Ip6CfgData);\r
   if (EFI_ERROR (Status)) {\r
     goto ON_EXIT;\r
@@ -823,7 +823,7 @@ HttpBootSetIp6Address (
   if (EFI_ERROR (Status)) {\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   //\r
   // Create a notify event to set address flag when DAD if IP6 driver succeeded.\r
   //\r
@@ -837,7 +837,7 @@ HttpBootSetIp6Address (
   if (EFI_ERROR (Status)) {\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   //\r
   // Set static host ip6 address. This is a asynchronous process.\r
   //\r
@@ -855,7 +855,7 @@ HttpBootSetIp6Address (
                      Ip6ConfigDataTypeManualAddress,\r
                      sizeof (EFI_IP6_CONFIG_MANUAL_ADDRESS),\r
                      &CfgAddr\r
-                     ); \r
+                     );\r
   if (EFI_ERROR (Status) && Status != EFI_NOT_READY) {\r
     goto ON_EXIT;\r
   } else if (Status == EFI_NOT_READY) {\r
@@ -879,7 +879,7 @@ HttpBootSetIp6Address (
       Status = EFI_DEVICE_ERROR;\r
       goto ON_EXIT;\r
     }\r
-    \r
+\r
     Ip6Addr = AllocatePool (DataSize);\r
     if (Ip6Addr == NULL) {\r
       return EFI_OUT_OF_RESOURCES;\r
@@ -903,9 +903,9 @@ HttpBootSetIp6Address (
     if (Index == DataSize / sizeof (EFI_IPv6_ADDRESS)) {\r
       Status = EFI_ABORTED;\r
       goto ON_EXIT;\r
-    } \r
+    }\r
   }\r
-    \r
+\r
 ON_EXIT:\r
   if (MappedEvt != NULL) {\r
     Ip6Cfg->UnregisterDataNotify (\r
@@ -919,8 +919,8 @@ ON_EXIT:
   if (Ip6Addr != NULL) {\r
     FreePool (Ip6Addr);\r
   }\r
-  \r
-  return Status;    \r
+\r
+  return Status;\r
 }\r
 \r
 /**\r
@@ -954,15 +954,15 @@ HttpBootDhcp6Sarr (
   //\r
   OptCount = HttpBootBuildDhcp6Options (Private, OptList, Buffer);\r
   ASSERT (OptCount >0);\r
-  \r
+\r
   Retransmit = AllocateZeroPool (sizeof (EFI_DHCP6_RETRANSMISSION));\r
   if (Retransmit == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   ZeroMem (&Mode, sizeof (EFI_DHCP6_MODE_DATA));\r
   ZeroMem (&Config, sizeof (EFI_DHCP6_CONFIG_DATA));\r
-  \r
+\r
   Config.OptionCount           = OptCount;\r
   Config.OptionList            = OptList;\r
   Config.Dhcp6Callback         = HttpBootDhcp6CallBack;\r
@@ -977,7 +977,7 @@ HttpBootDhcp6Sarr (
   Retransmit->Mrc              = 4;\r
   Retransmit->Mrt              = 32;\r
   Retransmit->Mrd              = 60;\r
-  \r
+\r
   //\r
   // Configure the DHCPv6 instance for HTTP boot.\r
   //\r
@@ -993,7 +993,7 @@ HttpBootDhcp6Sarr (
   Private->SelectIndex   = 0;\r
   ZeroMem (Private->OfferCount, sizeof (Private->OfferCount));\r
   ZeroMem (Private->OfferIndex, sizeof (Private->OfferIndex));\r
-  \r
+\r
   //\r
   // Start DHCPv6 S.A.R.R. process to acquire IPv6 address.\r
   //\r
@@ -1001,7 +1001,7 @@ HttpBootDhcp6Sarr (
   if (EFI_ERROR (Status)) {\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   //\r
   // Get the acquired IPv6 address and store them.\r
   //\r
@@ -1009,14 +1009,14 @@ HttpBootDhcp6Sarr (
   if (EFI_ERROR (Status)) {\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   ASSERT (Mode.Ia->State == Dhcp6Bound);\r
   CopyMem (&Private->StationIp.v6, &Mode.Ia->IaAddress[0].IpAddress, sizeof (EFI_IPv6_ADDRESS));\r
-  \r
+\r
   AsciiPrint ("\n  Station IPv6 address is ");\r
   HttpBootShowIp6Addr (&Private->StationIp.v6);\r
   AsciiPrint ("\n");\r
-  \r
+\r
 ON_EXIT:\r
   if (EFI_ERROR (Status)) {\r
     Dhcp6->Stop (Dhcp6);\r
@@ -1032,7 +1032,7 @@ ON_EXIT:
     }\r
   }\r
 \r
-  return Status; \r
-    \r
+  return Status;\r
+\r
 }\r
 \r
index 9f2989831e3bb00aa7017c2be0aa797b8cd90ecd..d775a603047506ae528cf07cc5f3ebfff164184a 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Functions declaration related with DHCPv6 for HTTP boot driver.\r
 \r
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+http://opensource.org/licenses/bsd-license.php.\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -127,7 +127,7 @@ HttpBootSetIp6Policy (
 \r
 /**\r
   This function will register the default DNS addresses to the network device.\r
-  \r
+\r
   @param[in]  Private             The pointer to HTTP_BOOT_PRIVATE_DATA.\r
   @param[in]  DataLength          Size of the buffer pointed to by DnsServerData in bytes.\r
   @param[in]  DnsServerData       Point a list of DNS server address in an array\r
@@ -146,7 +146,7 @@ HttpBootSetIp6Dns (
 \r
 /**\r
   This function will register the IPv6 gateway address to the network device.\r
-  \r
+\r
   @param[in]  Private             The pointer to HTTP_BOOT_PRIVATE_DATA.\r
 \r
   @retval     EFI_SUCCESS         The new IP configuration has been configured successfully.\r
@@ -160,7 +160,7 @@ HttpBootSetIp6Gateway (
 \r
 /**\r
   This function will register the station IP address.\r
-  \r
+\r
   @param[in]  Private             The pointer to HTTP_BOOT_PRIVATE_DATA.\r
 \r
   @retval     EFI_SUCCESS         The new IP address has been configured successfully.\r
index 8a61f51cc87b5fc5a5294946bb385b4f6072373b..7ec06f960ddeaeb14804dce4e1659e46024b9098 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
   Driver Binding functions implementation for UEFI HTTP boot.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+http://opensource.org/licenses/bsd-license.php.\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -75,7 +75,7 @@ HttpBootCheckIpv6Support (
 \r
   //\r
   // Get the NIC handle by SNP protocol.\r
-  //  \r
+  //\r
   Handle = NetLibGetSnpHandle (Private->Controller, NULL);\r
   if (Handle == NULL) {\r
     return EFI_NOT_FOUND;\r
@@ -121,11 +121,11 @@ HttpBootCheckIpv6Support (
   if (EFI_ERROR (Status) || InfoBlock == NULL) {\r
     FreePool (InfoBlock);\r
     return EFI_NOT_FOUND;\r
-  }  \r
+  }\r
 \r
   *Ipv6Support = ((EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT *) InfoBlock)->Ipv6Support;\r
   FreePool (InfoBlock);\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -167,14 +167,14 @@ HttpBootDestroyIp4Children (
   }\r
 \r
   if (Private->Ip4Nic != NULL) {\r
-    \r
+\r
     gBS->CloseProtocol (\r
            Private->Controller,\r
            &gEfiCallerIdGuid,\r
            This->DriverBindingHandle,\r
            Private->Ip4Nic->Controller\r
            );\r
-    \r
+\r
     gBS->UninstallMultipleProtocolInterfaces (\r
            Private->Ip4Nic->Controller,\r
            &gEfiLoadFileProtocolGuid,\r
@@ -204,7 +204,7 @@ HttpBootDestroyIp6Children (
 {\r
   ASSERT (This != NULL);\r
   ASSERT (Private != NULL);\r
-  \r
+\r
   if (Private->Ip6Child != NULL) {\r
     gBS->CloseProtocol (\r
            Private->Ip6Child,\r
@@ -241,16 +241,16 @@ HttpBootDestroyIp6Children (
     HttpIoDestroyIo(&Private->HttpIo);\r
     Private->HttpCreated = FALSE;\r
   }\r
-  \r
+\r
   if (Private->Ip6Nic != NULL) {\r
-    \r
+\r
     gBS->CloseProtocol (\r
            Private->Controller,\r
            &gEfiCallerIdGuid,\r
            This->DriverBindingHandle,\r
            Private->Ip6Nic->Controller\r
            );\r
-    \r
+\r
     gBS->UninstallMultipleProtocolInterfaces (\r
            Private->Ip6Nic->Controller,\r
            &gEfiLoadFileProtocolGuid,\r
@@ -265,33 +265,33 @@ HttpBootDestroyIp6Children (
 }\r
 \r
 /**\r
-  Tests to see if this driver supports a given controller. If a child device is provided, \r
+  Tests to see if this driver supports a given controller. If a child device is provided,\r
   it further tests to see if this driver supports creating a handle for the specified child device.\r
 \r
-  This function checks to see if the driver specified by This supports the device specified by \r
-  ControllerHandle. Drivers will typically use the device path attached to \r
-  ControllerHandle and/or the services from the bus I/O abstraction attached to \r
-  ControllerHandle to determine if the driver supports ControllerHandle. This function \r
-  may be called many times during platform initialization. In order to reduce boot times, the tests \r
-  performed by this function must be very small, and take as little time as possible to execute. This \r
-  function must not change the state of any hardware devices, and this function must be aware that the \r
-  device specified by ControllerHandle may already be managed by the same driver or a \r
-  different driver. This function must match its calls to AllocatePages() with FreePages(), \r
-  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().  \r
-  Because ControllerHandle may have been previously started by the same driver, if a protocol is \r
-  already in the opened state, then it must not be closed with CloseProtocol(). This is required \r
+  This function checks to see if the driver specified by This supports the device specified by\r
+  ControllerHandle. Drivers will typically use the device path attached to\r
+  ControllerHandle and/or the services from the bus I/O abstraction attached to\r
+  ControllerHandle to determine if the driver supports ControllerHandle. This function\r
+  may be called many times during platform initialization. In order to reduce boot times, the tests\r
+  performed by this function must be very small, and take as little time as possible to execute. This\r
+  function must not change the state of any hardware devices, and this function must be aware that the\r
+  device specified by ControllerHandle may already be managed by the same driver or a\r
+  different driver. This function must match its calls to AllocatePages() with FreePages(),\r
+  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().\r
+  Because ControllerHandle may have been previously started by the same driver, if a protocol is\r
+  already in the opened state, then it must not be closed with CloseProtocol(). This is required\r
   to guarantee the state of ControllerHandle is not modified by this function.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to test. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to test. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For bus drivers, if this parameter is not NULL, then \r
-                                   the bus driver must determine if the bus controller specified \r
-                                   by ControllerHandle and the child controller specified \r
-                                   by RemainingDevicePath are both supported by this \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For bus drivers, if this parameter is not NULL, then\r
+                                   the bus driver must determine if the bus controller specified\r
+                                   by ControllerHandle and the child controller specified\r
+                                   by RemainingDevicePath are both supported by this\r
                                    bus driver.\r
 \r
   @retval EFI_SUCCESS              The device specified by ControllerHandle and\r
@@ -315,7 +315,7 @@ HttpBootIp4DxeDriverBindingSupported (
   )\r
 {\r
   EFI_STATUS                    Status;\r
-  \r
+\r
   //\r
   // Try to open the DHCP4, HTTP4 and Device Path protocol.\r
   //\r
@@ -360,28 +360,28 @@ HttpBootIp4DxeDriverBindingSupported (
   Starts a device controller or a bus controller.\r
 \r
   The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
-  As a result, much of the error checking on the parameters to Start() has been moved into this \r
-  common boot service. It is legal to call Start() from other locations, \r
+  As a result, much of the error checking on the parameters to Start() has been moved into this\r
+  common boot service. It is legal to call Start() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE.\r
   2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
      EFI_DEVICE_PATH_PROTOCOL.\r
   3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
-     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.  \r
+     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to start. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to start. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For a bus driver, if this parameter is NULL, then handles \r
-                                   for all the children of Controller are created by this driver.  \r
-                                   If this parameter is not NULL and the first Device Path Node is \r
-                                   not the End of Device Path Node, then only the handle for the \r
-                                   child device specified by the first Device Path Node of \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For a bus driver, if this parameter is NULL, then handles\r
+                                   for all the children of Controller are created by this driver.\r
+                                   If this parameter is not NULL and the first Device Path Node is\r
+                                   not the End of Device Path Node, then only the handle for the\r
+                                   child device specified by the first Device Path Node of\r
                                    RemainingDevicePath is created by this driver.\r
-                                   If the first Device Path Node of RemainingDevicePath is \r
+                                   If the first Device Path Node of RemainingDevicePath is\r
                                    the End of Device Path Node, no child handle is created by this\r
                                    driver.\r
 \r
@@ -421,7 +421,7 @@ HttpBootIp4DxeDriverBindingStart (
     Private = HTTP_BOOT_PRIVATE_DATA_FROM_ID(Id);\r
   } else {\r
     FirstStart = TRUE;\r
-  \r
+\r
     //\r
     // Initialize the private data structure.\r
     //\r
@@ -483,16 +483,16 @@ HttpBootIp4DxeDriverBindingStart (
     if (EFI_ERROR (Status)) {\r
       goto ON_ERROR;\r
     }\r
-      \r
+\r
   }\r
-  \r
+\r
   if (Private->Ip4Nic != NULL) {\r
     //\r
     // Already created before\r
     //\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   Private->Ip4Nic = AllocateZeroPool (sizeof (HTTP_BOOT_VIRTUAL_NIC));\r
   if (Private->Ip4Nic == NULL) {\r
     Status = EFI_OUT_OF_RESOURCES;\r
@@ -501,7 +501,7 @@ HttpBootIp4DxeDriverBindingStart (
   Private->Ip4Nic->Private     = Private;\r
   Private->Ip4Nic->ImageHandle = This->DriverBindingHandle;\r
   Private->Ip4Nic->Signature   = HTTP_BOOT_VIRTUAL_NIC_SIGNATURE;\r
-  \r
+\r
   //\r
   // Create DHCP4 child instance.\r
   //\r
@@ -514,7 +514,7 @@ HttpBootIp4DxeDriverBindingStart (
   if (EFI_ERROR (Status)) {\r
     goto ON_ERROR;\r
   }\r
-  \r
+\r
   Status = gBS->OpenProtocol (\r
                   Private->Dhcp4Child,\r
                   &gEfiDhcp4ProtocolGuid,\r
@@ -526,7 +526,7 @@ HttpBootIp4DxeDriverBindingStart (
   if (EFI_ERROR (Status)) {\r
     goto ON_ERROR;\r
   }\r
-  \r
+\r
   //\r
   // Get the Ip4Config2 protocol, it's required to configure the default gateway address.\r
   //\r
@@ -541,7 +541,7 @@ HttpBootIp4DxeDriverBindingStart (
   if (EFI_ERROR (Status)) {\r
     goto ON_ERROR;\r
   }\r
-  \r
+\r
   //\r
   // Append IPv4 device path node.\r
   //\r
@@ -560,7 +560,7 @@ HttpBootIp4DxeDriverBindingStart (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto ON_ERROR;\r
   }\r
-  \r
+\r
   //\r
   // Append URI device path node.\r
   //\r
@@ -579,7 +579,7 @@ HttpBootIp4DxeDriverBindingStart (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto ON_ERROR;\r
   }\r
-  \r
+\r
   //\r
   // Create a child handle for the HTTP boot and install DevPath and Load file protocol on it.\r
   //\r
@@ -595,7 +595,7 @@ HttpBootIp4DxeDriverBindingStart (
   if (EFI_ERROR (Status)) {\r
     goto ON_ERROR;\r
   }\r
-  \r
+\r
   //\r
   // Open the Caller Id child to setup a parent-child relationship between\r
   // real NIC handle and the HTTP boot Ipv4 NIC handle.\r
@@ -611,9 +611,9 @@ HttpBootIp4DxeDriverBindingStart (
   if (EFI_ERROR (Status)) {\r
     goto ON_ERROR;\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
-    \r
+\r
 ON_ERROR:\r
   if (Private != NULL) {\r
     if (FirstStart) {\r
@@ -623,7 +623,7 @@ ON_ERROR:
              &Private->Id\r
              );\r
     }\r
-    \r
+\r
     HttpBootDestroyIp4Children (This, Private);\r
     HttpBootConfigFormUnload (Private);\r
 \r
@@ -638,10 +638,10 @@ ON_ERROR:
 \r
 /**\r
   Stops a device controller or a bus controller.\r
-  \r
-  The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r
-  As a result, much of the error checking on the parameters to Stop() has been moved \r
-  into this common boot service. It is legal to call Stop() from other locations, \r
+\r
+  The Stop() function is designed to be invoked from the EFI boot service DisconnectController().\r
+  As a result, much of the error checking on the parameters to Stop() has been moved\r
+  into this common boot service. It is legal to call Stop() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
      same driver's Start() function.\r
@@ -649,13 +649,13 @@ ON_ERROR:
      EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
      Start() function, and the Start() function must have called OpenProtocol() on\r
      ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
-  \r
+\r
   @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must \r
-                                support a bus specific I/O protocol for the driver \r
+  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must\r
+                                support a bus specific I/O protocol for the driver\r
                                 to use to stop the device.\r
   @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.\r
-  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL \r
+  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL\r
                                 if NumberOfChildren is 0.\r
 \r
   @retval EFI_SUCCESS           The device was stopped.\r
@@ -729,7 +729,7 @@ HttpBootIp4DxeDriverBindingStop (
   // Destory all child instance and uninstall protocol interface.\r
   //\r
   HttpBootDestroyIp4Children (This, Private);\r
-  \r
+\r
   if (Private->Ip4Nic == NULL && Private->Ip6Nic == NULL) {\r
     //\r
     // Release the cached data.\r
@@ -740,7 +740,7 @@ HttpBootIp4DxeDriverBindingStop (
     // Unload the config form.\r
     //\r
     HttpBootConfigFormUnload (Private);\r
-    \r
+\r
     gBS->UninstallProtocolInterface (\r
            NicHandle,\r
            &gEfiCallerIdGuid,\r
@@ -754,33 +754,33 @@ HttpBootIp4DxeDriverBindingStop (
 }\r
 \r
 /**\r
-  Tests to see if this driver supports a given controller. If a child device is provided, \r
+  Tests to see if this driver supports a given controller. If a child device is provided,\r
   it further tests to see if this driver supports creating a handle for the specified child device.\r
 \r
-  This function checks to see if the driver specified by This supports the device specified by \r
-  ControllerHandle. Drivers will typically use the device path attached to \r
-  ControllerHandle and/or the services from the bus I/O abstraction attached to \r
-  ControllerHandle to determine if the driver supports ControllerHandle. This function \r
-  may be called many times during platform initialization. In order to reduce boot times, the tests \r
-  performed by this function must be very small, and take as little time as possible to execute. This \r
-  function must not change the state of any hardware devices, and this function must be aware that the \r
-  device specified by ControllerHandle may already be managed by the same driver or a \r
-  different driver. This function must match its calls to AllocatePages() with FreePages(), \r
-  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().  \r
-  Because ControllerHandle may have been previously started by the same driver, if a protocol is \r
-  already in the opened state, then it must not be closed with CloseProtocol(). This is required \r
+  This function checks to see if the driver specified by This supports the device specified by\r
+  ControllerHandle. Drivers will typically use the device path attached to\r
+  ControllerHandle and/or the services from the bus I/O abstraction attached to\r
+  ControllerHandle to determine if the driver supports ControllerHandle. This function\r
+  may be called many times during platform initialization. In order to reduce boot times, the tests\r
+  performed by this function must be very small, and take as little time as possible to execute. This\r
+  function must not change the state of any hardware devices, and this function must be aware that the\r
+  device specified by ControllerHandle may already be managed by the same driver or a\r
+  different driver. This function must match its calls to AllocatePages() with FreePages(),\r
+  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().\r
+  Because ControllerHandle may have been previously started by the same driver, if a protocol is\r
+  already in the opened state, then it must not be closed with CloseProtocol(). This is required\r
   to guarantee the state of ControllerHandle is not modified by this function.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to test. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to test. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For bus drivers, if this parameter is not NULL, then \r
-                                   the bus driver must determine if the bus controller specified \r
-                                   by ControllerHandle and the child controller specified \r
-                                   by RemainingDevicePath are both supported by this \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For bus drivers, if this parameter is not NULL, then\r
+                                   the bus driver must determine if the bus controller specified\r
+                                   by ControllerHandle and the child controller specified\r
+                                   by RemainingDevicePath are both supported by this\r
                                    bus driver.\r
 \r
   @retval EFI_SUCCESS              The device specified by ControllerHandle and\r
@@ -804,7 +804,7 @@ HttpBootIp6DxeDriverBindingSupported (
   )\r
 {\r
   EFI_STATUS                    Status;\r
-  \r
+\r
   //\r
   // Try to open the DHCP6, HTTP and Device Path protocol.\r
   //\r
@@ -849,28 +849,28 @@ HttpBootIp6DxeDriverBindingSupported (
   Starts a device controller or a bus controller.\r
 \r
   The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
-  As a result, much of the error checking on the parameters to Start() has been moved into this \r
-  common boot service. It is legal to call Start() from other locations, \r
+  As a result, much of the error checking on the parameters to Start() has been moved into this\r
+  common boot service. It is legal to call Start() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE.\r
   2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
      EFI_DEVICE_PATH_PROTOCOL.\r
   3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
-     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.  \r
+     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to start. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to start. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For a bus driver, if this parameter is NULL, then handles \r
-                                   for all the children of Controller are created by this driver.  \r
-                                   If this parameter is not NULL and the first Device Path Node is \r
-                                   not the End of Device Path Node, then only the handle for the \r
-                                   child device specified by the first Device Path Node of \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For a bus driver, if this parameter is NULL, then handles\r
+                                   for all the children of Controller are created by this driver.\r
+                                   If this parameter is not NULL and the first Device Path Node is\r
+                                   not the End of Device Path Node, then only the handle for the\r
+                                   child device specified by the first Device Path Node of\r
                                    RemainingDevicePath is created by this driver.\r
-                                   If the first Device Path Node of RemainingDevicePath is \r
+                                   If the first Device Path Node of RemainingDevicePath is\r
                                    the End of Device Path Node, no child handle is created by this\r
                                    driver.\r
 \r
@@ -897,7 +897,7 @@ HttpBootIp6DxeDriverBindingStart (
   BOOLEAN                    FirstStart;\r
 \r
   FirstStart = FALSE;\r
-  \r
+\r
   Status = gBS->OpenProtocol (\r
                   ControllerHandle,\r
                   &gEfiCallerIdGuid,\r
@@ -906,12 +906,12 @@ HttpBootIp6DxeDriverBindingStart (
                   ControllerHandle,\r
                   EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
                   );\r
-  \r
+\r
   if (!EFI_ERROR (Status)) {\r
     Private = HTTP_BOOT_PRIVATE_DATA_FROM_ID(Id);\r
   } else {\r
     FirstStart = TRUE;\r
-    \r
+\r
     //\r
     // Initialize the private data structure.\r
     //\r
@@ -973,16 +973,16 @@ HttpBootIp6DxeDriverBindingStart (
     if (EFI_ERROR (Status)) {\r
       goto ON_ERROR;\r
     }\r
-      \r
+\r
   }\r
 \r
   //\r
   // Set IPv6 available flag.\r
-  // \r
+  //\r
   Status = HttpBootCheckIpv6Support (Private, &Ipv6Available);\r
   if (EFI_ERROR (Status)) {\r
     //\r
-    // Fail to get the data whether UNDI supports IPv6. \r
+    // Fail to get the data whether UNDI supports IPv6.\r
     // Set default value to TRUE.\r
     //\r
     Ipv6Available = TRUE;\r
@@ -992,14 +992,14 @@ HttpBootIp6DxeDriverBindingStart (
     Status = EFI_UNSUPPORTED;\r
     goto ON_ERROR;\r
   }\r
-  \r
+\r
   if (Private->Ip6Nic != NULL) {\r
     //\r
     // Already created before\r
     //\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   Private->Ip6Nic = AllocateZeroPool (sizeof (HTTP_BOOT_VIRTUAL_NIC));\r
   if (Private->Ip6Nic == NULL) {\r
     Status = EFI_OUT_OF_RESOURCES;\r
@@ -1008,7 +1008,7 @@ HttpBootIp6DxeDriverBindingStart (
   Private->Ip6Nic->Private     = Private;\r
   Private->Ip6Nic->ImageHandle = This->DriverBindingHandle;\r
   Private->Ip6Nic->Signature   = HTTP_BOOT_VIRTUAL_NIC_SIGNATURE;\r
-  \r
+\r
   //\r
   // Create Dhcp6 child and open Dhcp6 protocol\r
   Status = NetLibCreateServiceChild (\r
@@ -1144,7 +1144,7 @@ HttpBootIp6DxeDriverBindingStart (
   }\r
 \r
   return EFI_SUCCESS;\r
-   \r
+\r
 ON_ERROR:\r
   if (Private != NULL) {\r
     if (FirstStart) {\r
@@ -1168,10 +1168,10 @@ ON_ERROR:
 \r
 /**\r
   Stops a device controller or a bus controller.\r
-  \r
-  The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r
-  As a result, much of the error checking on the parameters to Stop() has been moved \r
-  into this common boot service. It is legal to call Stop() from other locations, \r
+\r
+  The Stop() function is designed to be invoked from the EFI boot service DisconnectController().\r
+  As a result, much of the error checking on the parameters to Stop() has been moved\r
+  into this common boot service. It is legal to call Stop() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
      same driver's Start() function.\r
@@ -1179,13 +1179,13 @@ ON_ERROR:
      EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
      Start() function, and the Start() function must have called OpenProtocol() on\r
      ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
-  \r
+\r
   @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must \r
-                                support a bus specific I/O protocol for the driver \r
+  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must\r
+                                support a bus specific I/O protocol for the driver\r
                                 to use to stop the device.\r
   @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.\r
-  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL \r
+  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL\r
                                 if NumberOfChildren is 0.\r
 \r
   @retval EFI_SUCCESS           The device was stopped.\r
@@ -1317,7 +1317,7 @@ HttpBootDxeDriverEntryPoint (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   Status = EfiLibInstallDriverBindingComponentName2 (\r
              ImageHandle,\r
              SystemTable,\r
index 166bc458f19007937b63e1e29a7b0b24cc94b55b..316e143152fc63747bbf13140f698417006e04f5 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
   UEFI HTTP boot driver's private data structure and interfaces declaration.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.              \r
+http://opensource.org/licenses/bsd-license.php.\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -77,7 +77,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define HTTP_BOOT_DXE_VERSION  0xa\r
 \r
 //\r
-// Standard Media Types defined in \r
+// Standard Media Types defined in\r
 // http://www.iana.org/assignments/media-types\r
 //\r
 #define HTTP_CONTENT_TYPE_APP_EFI           "application/efi"\r
@@ -136,7 +136,7 @@ struct _HTTP_BOOT_VIRTUAL_NIC {
   CallbackInfo, \\r
   HTTP_BOOT_PRIVATE_DATA_SIGNATURE \\r
   )\r
-  \r
+\r
 #define HTTP_BOOT_PRIVATE_DATA_FROM_CALLBACK_PROTOCOL(CallbackProtocol) \\r
     CR ( \\r
     CallbackProtocol, \\r
@@ -172,7 +172,7 @@ struct _HTTP_BOOT_PRIVATE_DATA {
   EFI_DHCP6_PROTOCOL                        *Dhcp6;\r
   EFI_DEVICE_PATH_PROTOCOL                  *ParentDevicePath;\r
 \r
-  \r
+\r
   //\r
   // Produced protocol\r
   //\r
@@ -273,33 +273,33 @@ struct _HTTP_BOOT_PRIVATE_DATA {
 extern EFI_LOAD_FILE_PROTOCOL               gHttpBootDxeLoadFile;\r
 \r
 /**\r
-  Tests to see if this driver supports a given controller. If a child device is provided, \r
+  Tests to see if this driver supports a given controller. If a child device is provided,\r
   it further tests to see if this driver supports creating a handle for the specified child device.\r
 \r
-  This function checks to see if the driver specified by This supports the device specified by \r
-  ControllerHandle. Drivers will typically use the device path attached to \r
-  ControllerHandle and/or the services from the bus I/O abstraction attached to \r
-  ControllerHandle to determine if the driver supports ControllerHandle. This function \r
-  may be called many times during platform initialization. In order to reduce boot times, the tests \r
-  performed by this function must be very small, and take as little time as possible to execute. This \r
-  function must not change the state of any hardware devices, and this function must be aware that the \r
-  device specified by ControllerHandle may already be managed by the same driver or a \r
-  different driver. This function must match its calls to AllocatePages() with FreePages(), \r
-  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().  \r
-  Because ControllerHandle may have been previously started by the same driver, if a protocol is \r
-  already in the opened state, then it must not be closed with CloseProtocol(). This is required \r
+  This function checks to see if the driver specified by This supports the device specified by\r
+  ControllerHandle. Drivers will typically use the device path attached to\r
+  ControllerHandle and/or the services from the bus I/O abstraction attached to\r
+  ControllerHandle to determine if the driver supports ControllerHandle. This function\r
+  may be called many times during platform initialization. In order to reduce boot times, the tests\r
+  performed by this function must be very small, and take as little time as possible to execute. This\r
+  function must not change the state of any hardware devices, and this function must be aware that the\r
+  device specified by ControllerHandle may already be managed by the same driver or a\r
+  different driver. This function must match its calls to AllocatePages() with FreePages(),\r
+  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().\r
+  Because ControllerHandle may have been previously started by the same driver, if a protocol is\r
+  already in the opened state, then it must not be closed with CloseProtocol(). This is required\r
   to guarantee the state of ControllerHandle is not modified by this function.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to test. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to test. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For bus drivers, if this parameter is not NULL, then \r
-                                   the bus driver must determine if the bus controller specified \r
-                                   by ControllerHandle and the child controller specified \r
-                                   by RemainingDevicePath are both supported by this \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For bus drivers, if this parameter is not NULL, then\r
+                                   the bus driver must determine if the bus controller specified\r
+                                   by ControllerHandle and the child controller specified\r
+                                   by RemainingDevicePath are both supported by this\r
                                    bus driver.\r
 \r
   @retval EFI_SUCCESS              The device specified by ControllerHandle and\r
@@ -326,28 +326,28 @@ HttpBootIp4DxeDriverBindingSupported (
   Starts a device controller or a bus controller.\r
 \r
   The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
-  As a result, much of the error checking on the parameters to Start() has been moved into this \r
-  common boot service. It is legal to call Start() from other locations, \r
+  As a result, much of the error checking on the parameters to Start() has been moved into this\r
+  common boot service. It is legal to call Start() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE.\r
   2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
      EFI_DEVICE_PATH_PROTOCOL.\r
   3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
-     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.  \r
+     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to start. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to start. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For a bus driver, if this parameter is NULL, then handles \r
-                                   for all the children of Controller are created by this driver.  \r
-                                   If this parameter is not NULL and the first Device Path Node is \r
-                                   not the End of Device Path Node, then only the handle for the \r
-                                   child device specified by the first Device Path Node of \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For a bus driver, if this parameter is NULL, then handles\r
+                                   for all the children of Controller are created by this driver.\r
+                                   If this parameter is not NULL and the first Device Path Node is\r
+                                   not the End of Device Path Node, then only the handle for the\r
+                                   child device specified by the first Device Path Node of\r
                                    RemainingDevicePath is created by this driver.\r
-                                   If the first Device Path Node of RemainingDevicePath is \r
+                                   If the first Device Path Node of RemainingDevicePath is\r
                                    the End of Device Path Node, no child handle is created by this\r
                                    driver.\r
 \r
@@ -367,10 +367,10 @@ HttpBootIp4DxeDriverBindingStart (
 \r
 /**\r
   Stops a device controller or a bus controller.\r
-  \r
-  The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r
-  As a result, much of the error checking on the parameters to Stop() has been moved \r
-  into this common boot service. It is legal to call Stop() from other locations, \r
+\r
+  The Stop() function is designed to be invoked from the EFI boot service DisconnectController().\r
+  As a result, much of the error checking on the parameters to Stop() has been moved\r
+  into this common boot service. It is legal to call Stop() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
      same driver's Start() function.\r
@@ -378,13 +378,13 @@ HttpBootIp4DxeDriverBindingStart (
      EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
      Start() function, and the Start() function must have called OpenProtocol() on\r
      ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
-  \r
+\r
   @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must \r
-                                support a bus specific I/O protocol for the driver \r
+  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must\r
+                                support a bus specific I/O protocol for the driver\r
                                 to use to stop the device.\r
   @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.\r
-  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL \r
+  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL\r
                                 if NumberOfChildren is 0.\r
 \r
   @retval EFI_SUCCESS           The device was stopped.\r
@@ -401,33 +401,33 @@ HttpBootIp4DxeDriverBindingStop (
   );\r
 \r
 /**\r
-  Tests to see if this driver supports a given controller. If a child device is provided, \r
+  Tests to see if this driver supports a given controller. If a child device is provided,\r
   it further tests to see if this driver supports creating a handle for the specified child device.\r
 \r
-  This function checks to see if the driver specified by This supports the device specified by \r
-  ControllerHandle. Drivers will typically use the device path attached to \r
-  ControllerHandle and/or the services from the bus I/O abstraction attached to \r
-  ControllerHandle to determine if the driver supports ControllerHandle. This function \r
-  may be called many times during platform initialization. In order to reduce boot times, the tests \r
-  performed by this function must be very small, and take as little time as possible to execute. This \r
-  function must not change the state of any hardware devices, and this function must be aware that the \r
-  device specified by ControllerHandle may already be managed by the same driver or a \r
-  different driver. This function must match its calls to AllocatePages() with FreePages(), \r
-  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().  \r
-  Because ControllerHandle may have been previously started by the same driver, if a protocol is \r
-  already in the opened state, then it must not be closed with CloseProtocol(). This is required \r
+  This function checks to see if the driver specified by This supports the device specified by\r
+  ControllerHandle. Drivers will typically use the device path attached to\r
+  ControllerHandle and/or the services from the bus I/O abstraction attached to\r
+  ControllerHandle to determine if the driver supports ControllerHandle. This function\r
+  may be called many times during platform initialization. In order to reduce boot times, the tests\r
+  performed by this function must be very small, and take as little time as possible to execute. This\r
+  function must not change the state of any hardware devices, and this function must be aware that the\r
+  device specified by ControllerHandle may already be managed by the same driver or a\r
+  different driver. This function must match its calls to AllocatePages() with FreePages(),\r
+  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().\r
+  Because ControllerHandle may have been previously started by the same driver, if a protocol is\r
+  already in the opened state, then it must not be closed with CloseProtocol(). This is required\r
   to guarantee the state of ControllerHandle is not modified by this function.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to test. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to test. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For bus drivers, if this parameter is not NULL, then \r
-                                   the bus driver must determine if the bus controller specified \r
-                                   by ControllerHandle and the child controller specified \r
-                                   by RemainingDevicePath are both supported by this \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For bus drivers, if this parameter is not NULL, then\r
+                                   the bus driver must determine if the bus controller specified\r
+                                   by ControllerHandle and the child controller specified\r
+                                   by RemainingDevicePath are both supported by this\r
                                    bus driver.\r
 \r
   @retval EFI_SUCCESS              The device specified by ControllerHandle and\r
@@ -454,28 +454,28 @@ HttpBootIp6DxeDriverBindingSupported (
   Starts a device controller or a bus controller.\r
 \r
   The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
-  As a result, much of the error checking on the parameters to Start() has been moved into this \r
-  common boot service. It is legal to call Start() from other locations, \r
+  As a result, much of the error checking on the parameters to Start() has been moved into this\r
+  common boot service. It is legal to call Start() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE.\r
   2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
      EFI_DEVICE_PATH_PROTOCOL.\r
   3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
-     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.  \r
+     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to start. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to start. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For a bus driver, if this parameter is NULL, then handles \r
-                                   for all the children of Controller are created by this driver.  \r
-                                   If this parameter is not NULL and the first Device Path Node is \r
-                                   not the End of Device Path Node, then only the handle for the \r
-                                   child device specified by the first Device Path Node of \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For a bus driver, if this parameter is NULL, then handles\r
+                                   for all the children of Controller are created by this driver.\r
+                                   If this parameter is not NULL and the first Device Path Node is\r
+                                   not the End of Device Path Node, then only the handle for the\r
+                                   child device specified by the first Device Path Node of\r
                                    RemainingDevicePath is created by this driver.\r
-                                   If the first Device Path Node of RemainingDevicePath is \r
+                                   If the first Device Path Node of RemainingDevicePath is\r
                                    the End of Device Path Node, no child handle is created by this\r
                                    driver.\r
 \r
@@ -495,10 +495,10 @@ HttpBootIp6DxeDriverBindingStart (
 \r
 /**\r
   Stops a device controller or a bus controller.\r
-  \r
-  The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r
-  As a result, much of the error checking on the parameters to Stop() has been moved \r
-  into this common boot service. It is legal to call Stop() from other locations, \r
+\r
+  The Stop() function is designed to be invoked from the EFI boot service DisconnectController().\r
+  As a result, much of the error checking on the parameters to Stop() has been moved\r
+  into this common boot service. It is legal to call Stop() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
      same driver's Start() function.\r
@@ -506,13 +506,13 @@ HttpBootIp6DxeDriverBindingStart (
      EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
      Start() function, and the Start() function must have called OpenProtocol() on\r
      ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
-  \r
+\r
   @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must \r
-                                support a bus specific I/O protocol for the driver \r
+  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must\r
+                                support a bus specific I/O protocol for the driver\r
                                 to use to stop the device.\r
   @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.\r
-  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL \r
+  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL\r
                                 if NumberOfChildren is 0.\r
 \r
   @retval EFI_SUCCESS           The device was stopped.\r
index 6d2a7722066620e8971d5d464a71846eabe95686..f0e3fad68eacdbb811a34b0ccf1e7b3c54bfecda 100644 (file)
@@ -1,15 +1,15 @@
 ## @file\r
 #  This modules produce the Load File Protocol for UEFI HTTP boot.\r
-# \r
-#  Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
+#\r
+#  Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #  which accompanies this distribution.  The full text of the license may be found at\r
 #  http://opensource.org/licenses/bsd-license.php\r
-#  \r
+#\r
 #  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 #  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#  \r
+#\r
 ##\r
 \r
 [Defines]\r
@@ -68,7 +68,7 @@
   ## TO_START\r
   ## BY_START\r
   gEfiDevicePathProtocolGuid\r
-  \r
+\r
   gEfiLoadFileProtocolGuid                        ## BY_START\r
   gEfiHttpServiceBindingProtocolGuid              ## CONSUMES\r
   gEfiHttpProtocolGuid                            ## CONSUMES\r
@@ -99,7 +99,7 @@
   gEfiAdapterInfoUndiIpv6SupportGuid             ## SOMETIMES_CONSUMES ## GUID\r
 \r
 [Pcd]\r
-  gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections       ## CONSUMES  \r
+  gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections       ## CONSUMES\r
 \r
 [UserExtensions.TianoCore."ExtraFiles"]\r
   HttpBootDxeExtra.uni\r
index 370f115347d153d28301e124634e9318b10c9f82..6abd2c5f37558ef407a793ad3307721aaf929493 100644 (file)
@@ -3,15 +3,15 @@
 //\r
 // This driver provides EFI Load File Protocol which is used to download\r
 // the boot image from HTTP server. It could work with an IPv4 or IPv6 stack.\r
-// \r
 //\r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+//\r
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
 // which accompanies this distribution. The full text of the license may be found at\r
 // http://opensource.org/licenses/bsd-license.php.\r
-// \r
+//\r
 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 //\r
index d6a0f0cef6e3af627ef2cd1e0c6e1a35e9f95b12..593538b2acd99fa4717fa18d43d36d2a27f2bc36 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // HttpBootDxe Localized Strings and Content\r
 //\r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -13,8 +13,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "UEFI HTTP BOOT DXE"\r
 \r
 \r
index a0fd934ec4c7bf6794a5a15e2d90e2d5c76d85fd..0f222adefd8b8f0c3b60ecfe7e1f45f5f4ae2a9b 100644 (file)
@@ -3,12 +3,12 @@
 \r
 Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+http://opensource.org/licenses/bsd-license.php.\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -96,7 +96,7 @@ HttpBootUninstallCallback (
 /**\r
   Enable the use of UEFI HTTP boot function.\r
 \r
-  If the driver has already been started but not satisfy the requirement (IP stack and \r
+  If the driver has already been started but not satisfy the requirement (IP stack and\r
   specified boot file path), this function will stop the driver and start it again.\r
 \r
   @param[in]    Private            The pointer to the driver's private data.\r
@@ -110,7 +110,7 @@ HttpBootUninstallCallback (
   @retval EFI_INVALID_PARAMETER    The FilePath doesn't contain a valid URI device path node.\r
   @retval EFI_ALREADY_STARTED      The driver is already in started state.\r
   @retval EFI_OUT_OF_RESOURCES     There are not enough resources.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 HttpBootStart (\r
@@ -124,20 +124,20 @@ HttpBootStart (
   CHAR8                *Uri;\r
 \r
   Uri = NULL;\r
-  \r
+\r
   if (Private == NULL || FilePath == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // Check the URI in the input FilePath, in order to see whether it is\r
-  // required to boot from a new specified boot file. \r
+  // required to boot from a new specified boot file.\r
   //\r
   Status = HttpBootParseFilePath (FilePath, &Uri);\r
   if (EFI_ERROR (Status)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // Check whether we need to stop and restart the HTTP boot driver.\r
   //\r
@@ -148,7 +148,7 @@ HttpBootStart (
     // 2. The specified boot file URI in FilePath is different with the one we have\r
     // recorded before.\r
     //\r
-    if ((UsingIpv6 != Private->UsingIpv6) || \r
+    if ((UsingIpv6 != Private->UsingIpv6) ||\r
         ((Uri != NULL) && (AsciiStrCmp (Private->BootFileUri, Uri) != 0))) {\r
       //\r
       // Restart is required, first stop then continue this start function.\r
@@ -201,7 +201,7 @@ HttpBootStart (
       return Status;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Init the content of cached DHCP offer list.\r
   //\r
@@ -241,7 +241,7 @@ HttpBootStart (
   @retval EFI_NOT_STARTED          The driver is in stopped state.\r
   @retval EFI_DEVICE_ERROR         An unexpected network error occurred.\r
   @retval Others                   Other errors as indicated.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 HttpBootDhcp (\r
@@ -253,7 +253,7 @@ HttpBootDhcp (
   if (Private == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   if (!Private->Started) {\r
     return EFI_NOT_STARTED;\r
   }\r
@@ -292,11 +292,11 @@ HttpBootDhcp (
   @retval EFI_INVALID_PARAMETER       Private is NULL, or ImageType is NULL, or BufferSize is NULL.\r
   @retval EFI_INVALID_PARAMETER       *BufferSize is not zero, and Buffer is NULL.\r
   @retval EFI_NOT_STARTED             The driver is in stopped state.\r
-  @retval EFI_BUFFER_TOO_SMALL        The BufferSize is too small to read the boot file. BufferSize has \r
+  @retval EFI_BUFFER_TOO_SMALL        The BufferSize is too small to read the boot file. BufferSize has\r
                                       been updated with the size needed to complete the request.\r
   @retval EFI_DEVICE_ERROR            An unexpected network error occurred.\r
   @retval Others                      Other errors as indicated.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 HttpBootLoadFile (\r
@@ -315,7 +315,7 @@ HttpBootLoadFile (
   if (*BufferSize != 0 && Buffer == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   if (!Private->Started) {\r
     return EFI_NOT_STARTED;\r
   }\r
@@ -397,10 +397,10 @@ HttpBootLoadFile (
              Buffer,\r
              ImageType\r
              );\r
-  \r
+\r
 ON_EXIT:\r
   HttpBootUninstallCallback (Private);\r
-  \r
+\r
   if (EFI_ERROR (Status)) {\r
     if (Status == EFI_ACCESS_DENIED) {\r
       AsciiPrint ("\n  Error: Could not establish connection with HTTP server.\n");\r
@@ -418,7 +418,7 @@ ON_EXIT:
       AsciiPrint ("\n  Error: Unexpected network error.\n");\r
     }\r
   }\r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -431,7 +431,7 @@ ON_EXIT:
   @retval EFI_NOT_STARTED          The driver is already in stopped state.\r
   @retval EFI_INVALID_PARAMETER    Private is NULL.\r
   @retval Others                   Unexpected error when stop the function.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 HttpBootStop (\r
@@ -443,16 +443,16 @@ HttpBootStop (
   if (Private == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   if (!Private->Started) {\r
     return EFI_NOT_STARTED;\r
   }\r
-  \r
+\r
   if (Private->HttpCreated) {\r
     HttpIoDestroyIo (&Private->HttpIo);\r
     Private->HttpCreated = FALSE;\r
   }\r
-  \r
+\r
   Private->Started = FALSE;\r
   ZeroMem (&Private->StationIp, sizeof (EFI_IP_ADDRESS));\r
   ZeroMem (&Private->SubnetMask, sizeof (EFI_IP_ADDRESS));\r
@@ -462,7 +462,7 @@ HttpBootStop (
   Private->BootFileUriParser = NULL;\r
   Private->BootFileSize = 0;\r
   Private->SelectIndex = 0;\r
-  Private->SelectProxyType = HttpOfferTypeMax; \r
+  Private->SelectProxyType = HttpOfferTypeMax;\r
 \r
   if (!Private->UsingIpv6) {\r
     //\r
@@ -482,7 +482,7 @@ HttpBootStop (
     //\r
     Private->Dhcp6->Stop (Private->Dhcp6);\r
     Private->Dhcp6->Configure (Private->Dhcp6, NULL);\r
-    \r
+\r
     for (Index = 0; Index < HTTP_BOOT_OFFER_MAX_NUM; Index++) {\r
       if (Private->OfferBuffer[Index].Dhcp6.UriParser) {\r
         HttpUrlFreeParser (Private->OfferBuffer[Index].Dhcp6.UriParser);\r
@@ -501,14 +501,14 @@ HttpBootStop (
     Private->FilePathUri = NULL;\r
     Private->FilePathUriParser = NULL;\r
   }\r
-  \r
+\r
   ZeroMem (Private->OfferBuffer, sizeof (Private->OfferBuffer));\r
   Private->OfferNum = 0;\r
   ZeroMem (Private->OfferCount, sizeof (Private->OfferCount));\r
   ZeroMem (Private->OfferIndex, sizeof (Private->OfferIndex));\r
-  \r
+\r
   HttpBootFreeCacheList (Private);\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -573,7 +573,7 @@ HttpBootDxeLoadFile (
 \r
   VirtualNic = HTTP_BOOT_VIRTUAL_NIC_FROM_LOADFILE (This);\r
   Private = VirtualNic->Private;\r
-  \r
+\r
   //\r
   // Check media status before HTTP boot start\r
   //\r
@@ -583,7 +583,7 @@ HttpBootDxeLoadFile (
     AsciiPrint ("\n  Error: Could not detect network connection.\n");\r
     return EFI_NO_MEDIA;\r
   }\r
-  \r
+\r
   //\r
   // Check whether the virtual nic is using IPv6 or not.\r
   //\r
@@ -599,7 +599,7 @@ HttpBootDxeLoadFile (
   if (Status != EFI_SUCCESS && Status != EFI_ALREADY_STARTED) {\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Load the boot file.\r
   //\r
@@ -636,7 +636,7 @@ HttpBootDxeLoadFile (
 ///\r
 /// Load File Protocol instance\r
 ///\r
-GLOBAL_REMOVE_IF_UNREFERENCED \r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
 EFI_LOAD_FILE_PROTOCOL  gHttpBootDxeLoadFile = {\r
   HttpBootDxeLoadFile\r
 };\r
@@ -658,7 +658,7 @@ EFI_LOAD_FILE_PROTOCOL  gHttpBootDxeLoadFile = {
   @param[in]  DataLength          The length in bytes of the buffer pointed to by Data.\r
   @param[in]  Data                A pointer to the buffer of data, the data type is specified by\r
                                   DataType.\r
-                                  \r
+\r
   @retval EFI_SUCCESS             Tells the HTTP Boot driver to continue the HTTP Boot process.\r
   @retval EFI_ABORTED             Tells the HTTP Boot driver to abort the current HTTP Boot process.\r
 **/\r
@@ -698,7 +698,7 @@ HttpBootCallback (
   case HttpBootHttpResponse:\r
     if (Data != NULL) {\r
       HttpMessage = (EFI_HTTP_MESSAGE *) Data;\r
-      \r
+\r
       if (HttpMessage->Data.Response != NULL) {\r
         if (HttpBootIsHttpRedirectStatusCode (HttpMessage->Data.Response->StatusCode)) {\r
           //\r
@@ -714,10 +714,10 @@ HttpBootCallback (
           if (HttpHeader != NULL) {\r
             Print (L"\n  HTTP ERROR: Resource Redirected.\n  New Location: %a\n", HttpHeader->FieldValue);\r
           }\r
-          break; \r
+          break;\r
         }\r
       }\r
-      \r
+\r
       HttpHeader = HttpFindHeader (\r
                      HttpMessage->HeaderCount,\r
                      HttpMessage->Headers,\r
@@ -767,7 +767,7 @@ HttpBootCallback (
 ///\r
 /// HTTP Boot Callback Protocol instance\r
 ///\r
-GLOBAL_REMOVE_IF_UNREFERENCED \r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
 EFI_HTTP_BOOT_CALLBACK_PROTOCOL  gHttpBootDxeHttpBootCallback = {\r
   HttpBootCallback\r
 };\r
index 53160359f3d8b3ac6b13f983b486db2054596a8b..82224ad2f3c225b858d8ee4c56ea2dd8e9e80d12 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   The declaration of UEFI HTTP boot function.\r
 \r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+http://opensource.org/licenses/bsd-license.php.\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -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.\r
   @retval EFI_DEVICE_ERROR         An unexpected network error occurred.\r
   @retval Others                   Other errors as indicated.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 HttpBootDhcp (\r
@@ -42,7 +42,7 @@ HttpBootDhcp (
   @retval EFI_NOT_STARTED          The driver is already in stopped state.\r
   @retval EFI_INVALID_PARAMETER    Private is NULL.\r
   @retval Others                   Unexpected error when stop the function.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 HttpBootStop (\r
index d508e2c1a979f85df8ace5f4a5c2940bdfb2c921..b5974a514823568b9018af1888ab5e979a83d94e 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
   Support functions implementation for UEFI HTTP boot driver.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials are licensed and made available under\r
 the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+http://opensource.org/licenses/bsd-license.php.\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -162,27 +162,27 @@ HttpBootPrintErrorMessage (
   switch (StatusCode) {\r
   case HTTP_STATUS_300_MULTIPLE_CHOICES:\r
     AsciiPrint ("\n  Redirection: 300 Multiple Choices");\r
-    break; \r
-    \r
+    break;\r
+\r
   case HTTP_STATUS_301_MOVED_PERMANENTLY:\r
     AsciiPrint ("\n  Redirection: 301 Moved Permanently");\r
-    break; \r
-    \r
+    break;\r
+\r
   case HTTP_STATUS_302_FOUND:\r
     AsciiPrint ("\n  Redirection: 302 Found");\r
-    break; \r
-    \r
+    break;\r
+\r
   case HTTP_STATUS_303_SEE_OTHER:\r
     AsciiPrint ("\n  Redirection: 303 See Other");\r
-    break; \r
+    break;\r
 \r
   case HTTP_STATUS_304_NOT_MODIFIED:\r
     AsciiPrint ("\n  Redirection: 304 Not Modified");\r
-    break; \r
+    break;\r
 \r
   case HTTP_STATUS_305_USE_PROXY:\r
     AsciiPrint ("\n  Redirection: 305 Use Proxy");\r
-    break; \r
+    break;\r
 \r
   case HTTP_STATUS_307_TEMPORARY_REDIRECT:\r
     AsciiPrint ("\n  Redirection: 307 Temporary Redirect");\r
@@ -190,16 +190,16 @@ HttpBootPrintErrorMessage (
 \r
   case HTTP_STATUS_308_PERMANENT_REDIRECT:\r
     AsciiPrint ("\n  Redirection: 308 Permanent Redirect");\r
-    break; \r
+    break;\r
 \r
   case HTTP_STATUS_400_BAD_REQUEST:\r
     AsciiPrint ("\n  Client Error: 400 Bad Request");\r
     break;\r
-    \r
+\r
   case HTTP_STATUS_401_UNAUTHORIZED:\r
     AsciiPrint ("\n  Client Error: 401 Unauthorized");\r
     break;\r
-    \r
+\r
   case HTTP_STATUS_402_PAYMENT_REQUIRED:\r
     AsciiPrint ("\n  Client Error: 402 Payment Required");\r
     break;\r
@@ -289,7 +289,7 @@ HttpBootPrintErrorMessage (
     break;\r
 \r
   default: ;\r
-  \r
+\r
   }\r
 }\r
 \r
@@ -319,13 +319,13 @@ HttpBootCommonNotify (
 \r
   @retval EFI_SUCCESS             Operation succeeded.\r
   @retval EFI_DEVICE_ERROR        An unexpected network error occurred.\r
-  @retval Others                  Other errors as indicated.  \r
+  @retval Others                  Other errors as indicated.\r
 **/\r
 EFI_STATUS\r
 HttpBootDns (\r
   IN     HTTP_BOOT_PRIVATE_DATA   *Private,\r
   IN     CHAR16                   *HostName,\r
-     OUT EFI_IPv6_ADDRESS         *IpAddress \r
+     OUT EFI_IPv6_ADDRESS         *IpAddress\r
   )\r
 {\r
   EFI_STATUS                      Status;\r
@@ -337,14 +337,14 @@ HttpBootDns (
   EFI_IPv6_ADDRESS                *DnsServerList;\r
   UINTN                           DnsServerListCount;\r
   UINTN                           DataSize;\r
-  BOOLEAN                         IsDone;  \r
-  \r
+  BOOLEAN                         IsDone;\r
+\r
   DnsServerList       = NULL;\r
   DnsServerListCount  = 0;\r
   Dns6                = NULL;\r
   Dns6Handle          = NULL;\r
   ZeroMem (&Token, sizeof (EFI_DNS6_COMPLETION_TOKEN));\r
-  \r
+\r
   //\r
   // Get DNS server list from EFI IPv6 Configuration protocol.\r
   //\r
@@ -359,7 +359,7 @@ HttpBootDns (
       DnsServerList = AllocatePool (DataSize);\r
       if (DnsServerList == NULL) {\r
         return EFI_OUT_OF_RESOURCES;\r
-      }  \r
+      }\r
 \r
       Status = Ip6Config->GetData (Ip6Config, Ip6ConfigDataTypeDnsServer, &DataSize, DnsServerList);\r
       if (EFI_ERROR (Status)) {\r
@@ -381,8 +381,8 @@ HttpBootDns (
              );\r
   if (EFI_ERROR (Status)) {\r
     goto Exit;\r
-  } \r
-  \r
+  }\r
+\r
   Status = gBS->OpenProtocol (\r
                   Dns6Handle,\r
                   &gEfiDns6ProtocolGuid,\r
@@ -411,7 +411,7 @@ HttpBootDns (
   if (EFI_ERROR (Status)) {\r
     goto Exit;\r
   }\r
-  \r
+\r
   Token.Status = EFI_NOT_READY;\r
   IsDone       = FALSE;\r
   //\r
@@ -439,11 +439,11 @@ HttpBootDns (
   while (!IsDone) {\r
     Dns6->Poll (Dns6);\r
   }\r
-  \r
+\r
   //\r
   // Name resolution is done, check result.\r
   //\r
-  Status = Token.Status;  \r
+  Status = Token.Status;\r
   if (!EFI_ERROR (Status)) {\r
     if (Token.RspData.H2AData == NULL) {\r
       Status = EFI_DEVICE_ERROR;\r
@@ -473,7 +473,7 @@ Exit:
 \r
   if (Dns6 != NULL) {\r
     Dns6->Configure (Dns6, NULL);\r
-    \r
+\r
     gBS->CloseProtocol (\r
            Dns6Handle,\r
            &gEfiDns6ProtocolGuid,\r
@@ -494,8 +494,8 @@ Exit:
   if (DnsServerList != NULL) {\r
     FreePool (DnsServerList);\r
   }\r
-  \r
-  return Status;  \r
+\r
+  return Status;\r
 }\r
 /**\r
   Create a HTTP_IO_HEADER to hold the HTTP header items.\r
@@ -503,7 +503,7 @@ Exit:
   @param[in]  MaxHeaderCount         The maximun number of HTTP header in this holder.\r
 \r
   @return    A pointer of the HTTP header holder or NULL if failed.\r
-  \r
+\r
 **/\r
 HTTP_IO_HEADER *\r
 HttpBootCreateHeader (\r
@@ -528,7 +528,7 @@ HttpBootCreateHeader (
 }\r
 \r
 /**\r
-  Destroy the HTTP_IO_HEADER and release the resouces. \r
+  Destroy the HTTP_IO_HEADER and release the resouces.\r
 \r
   @param[in]  HttpIoHeader       Point to the HTTP header holder to be destroyed.\r
 \r
@@ -539,7 +539,7 @@ HttpBootFreeHeader (
   )\r
 {\r
   UINTN      Index;\r
-  \r
+\r
   if (HttpIoHeader != NULL) {\r
     if (HttpIoHeader->HeaderCount != 0) {\r
       for (Index = 0; Index < HttpIoHeader->HeaderCount; Index++) {\r
@@ -562,7 +562,7 @@ HttpBootFreeHeader (
   @retval  EFI_INVALID_PARAMETER Any input parameter is invalid.\r
   @retval  EFI_OUT_OF_RESOURCES  Insufficient resource to complete the operation.\r
   @retval  Other                 Unexpected error happened.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 HttpBootSetHeader (\r
@@ -574,7 +574,7 @@ HttpBootSetHeader (
   EFI_HTTP_HEADER       *Header;\r
   UINTN                 StrSize;\r
   CHAR8                 *NewFieldValue;\r
-  \r
+\r
   if (HttpIoHeader == NULL || FieldName == NULL || FieldValue == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -618,7 +618,7 @@ HttpBootSetHeader (
     }\r
     CopyMem (NewFieldValue, FieldValue, StrSize);\r
     NewFieldValue[StrSize -1] = '\0';\r
-    \r
+\r
     if (Header->FieldValue != NULL) {\r
       FreePool (Header->FieldValue);\r
     }\r
@@ -675,7 +675,7 @@ HttpIoNotify (
                              HTTP_IO_CALLBACK_EVENT happened.\r
   @param[in]  Context        The Context data which will be passed to the Callback function.\r
   @param[out] HttpIo         The HTTP_IO.\r
-  \r
+\r
   @retval EFI_SUCCESS            The HTTP_IO is created and configured.\r
   @retval EFI_INVALID_PARAMETER  One or more parameters are invalid.\r
   @retval EFI_UNSUPPORTED        One or more of the control options are not\r
@@ -701,7 +701,7 @@ HttpIoCreateIo (
   EFI_HTTPv6_ACCESS_POINT   Http6AccessPoint;\r
   EFI_HTTP_PROTOCOL         *Http;\r
   EFI_EVENT                 Event;\r
-  \r
+\r
   if ((Image == NULL) || (Controller == NULL) || (ConfigData == NULL) || (HttpIo == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -711,10 +711,10 @@ HttpIoCreateIo (
   }\r
 \r
   ZeroMem (HttpIo, sizeof (HTTP_IO));\r
-  \r
+\r
   //\r
   // Create the HTTP child instance and get the HTTP protocol.\r
-  //  \r
+  //\r
   Status = NetLibCreateServiceChild (\r
              Controller,\r
              Image,\r
@@ -752,19 +752,19 @@ HttpIoCreateIo (
   HttpConfigData.TimeOutMillisec    = ConfigData->Config4.RequestTimeOut;\r
   if (HttpIo->IpVersion == IP_VERSION_4) {\r
     HttpConfigData.LocalAddressIsIPv6 = FALSE;\r
-    \r
+\r
     Http4AccessPoint.UseDefaultAddress = ConfigData->Config4.UseDefaultAddress;\r
     Http4AccessPoint.LocalPort         = ConfigData->Config4.LocalPort;\r
     IP4_COPY_ADDRESS (&Http4AccessPoint.LocalAddress, &ConfigData->Config4.LocalIp);\r
     IP4_COPY_ADDRESS (&Http4AccessPoint.LocalSubnet, &ConfigData->Config4.SubnetMask);\r
-    HttpConfigData.AccessPoint.IPv4Node = &Http4AccessPoint;   \r
+    HttpConfigData.AccessPoint.IPv4Node = &Http4AccessPoint;\r
   } else {\r
     HttpConfigData.LocalAddressIsIPv6 = TRUE;\r
     Http6AccessPoint.LocalPort        = ConfigData->Config6.LocalPort;\r
     IP6_COPY_ADDRESS (&Http6AccessPoint.LocalAddress, &ConfigData->Config6.LocalIp);\r
     HttpConfigData.AccessPoint.IPv6Node = &Http6AccessPoint;\r
   }\r
-  \r
+\r
   Status = Http->Configure (Http, &HttpConfigData);\r
   if (EFI_ERROR (Status)) {\r
     goto ON_ERROR;\r
@@ -815,7 +815,7 @@ HttpIoCreateIo (
   HttpIo->TimeoutEvent = Event;\r
 \r
   return EFI_SUCCESS;\r
-  \r
+\r
 ON_ERROR:\r
   HttpIoDestroyIo (HttpIo);\r
 \r
@@ -823,7 +823,7 @@ ON_ERROR:
 }\r
 \r
 /**\r
-  Destroy the HTTP_IO and release the resouces. \r
+  Destroy the HTTP_IO and release the resouces.\r
 \r
   @param[in]  HttpIo          The HTTP_IO which wraps the HTTP service to be destroyed.\r
 \r
@@ -854,7 +854,7 @@ HttpIoDestroyIo (
   if (Event != NULL) {\r
     gBS->CloseEvent (Event);\r
   }\r
-  \r
+\r
   Http = HttpIo->Http;\r
   if (Http != NULL) {\r
     Http->Configure (Http, NULL);\r
@@ -876,14 +876,14 @@ HttpIoDestroyIo (
 \r
 /**\r
   Synchronously send a HTTP REQUEST message to the server.\r
-  \r
+\r
   @param[in]   HttpIo           The HttpIo wrapping the HTTP service.\r
   @param[in]   Request          A pointer to storage such data as URL and HTTP method.\r
-  @param[in]   HeaderCount      Number of HTTP header structures in Headers list. \r
+  @param[in]   HeaderCount      Number of HTTP header structures in Headers list.\r
   @param[in]   Headers          Array containing list of HTTP headers.\r
   @param[in]   BodyLength       Length in bytes of the HTTP body.\r
-  @param[in]   Body             Body associated with the HTTP request. \r
-  \r
+  @param[in]   Body             Body associated with the HTTP request.\r
+\r
   @retval EFI_SUCCESS            The HTTP request is trasmitted.\r
   @retval EFI_INVALID_PARAMETER  One or more parameters are invalid.\r
   @retval EFI_OUT_OF_RESOURCES   Failed to allocate memory.\r
@@ -951,12 +951,12 @@ HttpIoSendRequest (
 \r
 /**\r
   Synchronously receive a HTTP RESPONSE message from the server.\r
-  \r
+\r
   @param[in]   HttpIo           The HttpIo wrapping the HTTP service.\r
   @param[in]   RecvMsgHeader    TRUE to receive a new HTTP response (from message header).\r
                                 FALSE to continue receive the previous response message.\r
   @param[out]  ResponseData     Point to a wrapper of the received response data.\r
-  \r
+\r
   @retval EFI_SUCCESS            The HTTP response is received.\r
   @retval EFI_INVALID_PARAMETER  One or more parameters are invalid.\r
   @retval EFI_OUT_OF_RESOURCES   Failed to allocate memory.\r
@@ -1006,7 +1006,7 @@ HttpIoRecvResponse (
                    Http,\r
                    &HttpIo->RspToken\r
                    );\r
-  \r
+\r
   if (EFI_ERROR (Status)) {\r
     gBS->SetTimer (HttpIo->TimeoutEvent, TimerCancel, 0);\r
     return Status;\r
@@ -1026,15 +1026,15 @@ HttpIoRecvResponse (
     // Timeout occurs, cancel the response token.\r
     //\r
     Http->Cancel (Http, &HttpIo->RspToken);\r
-   \r
+\r
     Status = EFI_TIMEOUT;\r
-    \r
+\r
     return Status;\r
   } else {\r
     HttpIo->IsRxDone = FALSE;\r
   }\r
 \r
-  if ((HttpIo->Callback != NULL) && \r
+  if ((HttpIo->Callback != NULL) &&\r
       (HttpIo->RspToken.Status == EFI_SUCCESS || HttpIo->RspToken.Status == EFI_HTTP_ERROR)) {\r
     Status = HttpIo->Callback (\r
                HttpIoResponse,\r
@@ -1061,7 +1061,7 @@ HttpIoRecvResponse (
   This function checks the HTTP(S) URI scheme.\r
 \r
   @param[in]    Uri              The pointer to the URI string.\r
-  \r
+\r
   @retval EFI_SUCCESS            The URI scheme is valid.\r
   @retval EFI_INVALID_PARAMETER  The URI scheme is not HTTP or HTTPS.\r
   @retval EFI_ACCESS_DENIED      HTTP is disabled and the URI is HTTP.\r
@@ -1096,7 +1096,7 @@ HttpBootCheckUriScheme (
     DEBUG ((EFI_D_ERROR, "HttpBootCheckUriScheme: Invalid Uri.\n"));\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // HTTP is disabled, return EFI_ACCESS_DENIED if the URI is HTTP.\r
   //\r
@@ -1112,10 +1112,10 @@ HttpBootCheckUriScheme (
   Get the URI address string from the input device path.\r
 \r
   Caller need to free the buffer in the UriAddress pointer.\r
-  \r
+\r
   @param[in]   FilePath         Pointer to the device path which contains a URI device path node.\r
   @param[out]  UriAddress       The URI address string extract from the device path.\r
-  \r
+\r
   @retval EFI_SUCCESS            The URI string is returned.\r
   @retval EFI_OUT_OF_RESOURCES   Failed to allocate memory.\r
 \r
@@ -1176,11 +1176,11 @@ HttpBootParseFilePath (
   and also the image's URI info.\r
 \r
   @param[in]    Uri              The pointer to the image's URI string.\r
-  @param[in]    UriParser        URI Parse result returned by NetHttpParseUrl(). \r
-  @param[in]    HeaderCount      Number of HTTP header structures in Headers list. \r
+  @param[in]    UriParser        URI Parse result returned by NetHttpParseUrl().\r
+  @param[in]    HeaderCount      Number of HTTP header structures in Headers list.\r
   @param[in]    Headers          Array containing list of HTTP headers.\r
   @param[out]   ImageType        The image type of the downloaded file.\r
-  \r
+\r
   @retval EFI_SUCCESS            The image type is returned in ImageType.\r
   @retval EFI_INVALID_PARAMETER  ImageType, Uri or UriParser is NULL.\r
   @retval EFI_INVALID_PARAMETER  HeaderCount is not zero, and Headers is NULL.\r
@@ -1263,7 +1263,7 @@ HttpBootCheckImageType (
 \r
 /**\r
   This function register the RAM disk info to the system.\r
-  \r
+\r
   @param[in]       Private         The pointer to the driver's private data.\r
   @param[in]       BufferSize      The size of Buffer in bytes.\r
   @param[in]       Buffer          The base address of the RAM disk.\r
@@ -1287,7 +1287,7 @@ HttpBootRegisterRamDisk (
   EFI_STATUS                 Status;\r
   EFI_DEVICE_PATH_PROTOCOL   *DevicePath;\r
   EFI_GUID                   *RamDiskType;\r
-  \r
+\r
   ASSERT (Private != NULL);\r
   ASSERT (Buffer != NULL);\r
   ASSERT (BufferSize != 0);\r
@@ -1305,7 +1305,7 @@ HttpBootRegisterRamDisk (
   } else {\r
     return EFI_UNSUPPORTED;\r
   }\r
-  \r
+\r
   Status = RamDisk->Register (\r
              (UINTN)Buffer,\r
              (UINT64)BufferSize,\r
@@ -1322,7 +1322,7 @@ HttpBootRegisterRamDisk (
 \r
 /**\r
   Indicate if the HTTP status code indicates a redirection.\r
-  \r
+\r
   @param[in]  StatusCode      HTTP status code from server.\r
 \r
   @return                     TRUE if it's redirection.\r
index 9b7acd9e1b92fa74c7720ff6311aba8422e3452f..72a2f1f25a84cccc08fe39d20e57be43f02e9ed8 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Support functions declaration for UEFI HTTP boot driver.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+http://opensource.org/licenses/bsd-license.php.\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -107,7 +107,7 @@ typedef struct {
   @param[in]  MaxHeaderCount         The maximun number of HTTP header in this holder.\r
 \r
   @return    A pointer of the HTTP header holder or NULL if failed.\r
-  \r
+\r
 **/\r
 HTTP_IO_HEADER *\r
 HttpBootCreateHeader (\r
@@ -115,7 +115,7 @@ HttpBootCreateHeader (
   );\r
 \r
 /**\r
-  Destroy the HTTP_IO_HEADER and release the resouces. \r
+  Destroy the HTTP_IO_HEADER and release the resouces.\r
 \r
   @param[in]  HttpIoHeader       Point to the HTTP header holder to be destroyed.\r
 \r
@@ -129,14 +129,14 @@ HttpBootFreeHeader (
   Set or update a HTTP header with the field name and corresponding value.\r
 \r
   @param[in]  HttpIoHeader       Point to the HTTP header holder.\r
-  @param[in]  FieldName          Null terminated string which describes a field name. \r
+  @param[in]  FieldName          Null terminated string which describes a field name.\r
   @param[in]  FieldValue         Null terminated string which describes the corresponding field value.\r
 \r
   @retval  EFI_SUCCESS           The HTTP header has been set or updated.\r
   @retval  EFI_INVALID_PARAMETER Any input parameter is invalid.\r
   @retval  EFI_OUT_OF_RESOURCES  Insufficient resource to complete the operation.\r
   @retval  Other                 Unexpected error happened.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 HttpBootSetHeader (\r
@@ -159,7 +159,7 @@ typedef enum {
   @param[in]    EventType      Indicate the Event type that occurs in the current callback.\r
   @param[in]    Message        HTTP message which will be send to, or just received from HTTP server.\r
   @param[in]    Context        The Callback Context pointer.\r
-  \r
+\r
   @retval EFI_SUCCESS          Tells the HttpIo to continue the HTTP process.\r
   @retval Others               Tells the HttpIo to abort the current HTTP process.\r
 **/\r
@@ -212,7 +212,7 @@ typedef struct {
   EFI_HANDLE                Image;\r
   EFI_HANDLE                Controller;\r
   EFI_HANDLE                Handle;\r
-  \r
+\r
   EFI_HTTP_PROTOCOL         *Http;\r
 \r
   HTTP_IO_CALLBACK          Callback;\r
@@ -250,13 +250,13 @@ typedef struct {
 \r
   @retval EFI_SUCCESS             Operation succeeded.\r
   @retval EFI_DEVICE_ERROR        An unexpected network error occurred.\r
-  @retval Others                  Other errors as indicated.  \r
+  @retval Others                  Other errors as indicated.\r
 **/\r
 EFI_STATUS\r
 HttpBootDns (\r
   IN     HTTP_BOOT_PRIVATE_DATA   *Private,\r
   IN     CHAR16                   *HostName,\r
-     OUT EFI_IPv6_ADDRESS         *IpAddress \r
+     OUT EFI_IPv6_ADDRESS         *IpAddress\r
   );\r
 \r
 /**\r
@@ -285,7 +285,7 @@ HttpBootCommonNotify (
                              HTTP_IO_CALLBACK_EVENT happened.\r
   @param[in]  Context        The Context data which will be passed to the Callback function.\r
   @param[out] HttpIo         The HTTP_IO.\r
-  \r
+\r
   @retval EFI_SUCCESS            The HTTP_IO is created and configured.\r
   @retval EFI_INVALID_PARAMETER  One or more parameters are invalid.\r
   @retval EFI_UNSUPPORTED        One or more of the control options are not\r
@@ -306,7 +306,7 @@ HttpIoCreateIo (
   );\r
 \r
 /**\r
-  Destroy the HTTP_IO and release the resouces. \r
+  Destroy the HTTP_IO and release the resouces.\r
 \r
   @param[in]  HttpIo          The HTTP_IO which wraps the HTTP service to be destroyed.\r
 \r
@@ -318,14 +318,14 @@ HttpIoDestroyIo (
 \r
 /**\r
   Synchronously send a HTTP REQUEST message to the server.\r
-  \r
+\r
   @param[in]   HttpIo           The HttpIo wrapping the HTTP service.\r
   @param[in]   Request          A pointer to storage such data as URL and HTTP method.\r
-  @param[in]   HeaderCount      Number of HTTP header structures in Headers list. \r
+  @param[in]   HeaderCount      Number of HTTP header structures in Headers list.\r
   @param[in]   Headers          Array containing list of HTTP headers.\r
   @param[in]   BodyLength       Length in bytes of the HTTP body.\r
-  @param[in]   Body             Body associated with the HTTP request. \r
-  \r
+  @param[in]   Body             Body associated with the HTTP request.\r
+\r
   @retval EFI_SUCCESS            The HTTP request is trasmitted.\r
   @retval EFI_INVALID_PARAMETER  One or more parameters are invalid.\r
   @retval EFI_OUT_OF_RESOURCES   Failed to allocate memory.\r
@@ -345,12 +345,12 @@ HttpIoSendRequest (
 \r
 /**\r
   Synchronously receive a HTTP RESPONSE message from the server.\r
-  \r
+\r
   @param[in]   HttpIo           The HttpIo wrapping the HTTP service.\r
   @param[in]   RecvMsgHeader    TRUE to receive a new HTTP response (from message header).\r
                                 FALSE to continue receive the previous response message.\r
   @param[out]  ResponseData     Point to a wrapper of the received response data.\r
-  \r
+\r
   @retval EFI_SUCCESS            The HTTP response is received.\r
   @retval EFI_INVALID_PARAMETER  One or more parameters are invalid.\r
   @retval EFI_OUT_OF_RESOURCES   Failed to allocate memory.\r
@@ -369,7 +369,7 @@ HttpIoRecvResponse (
   This function checks the HTTP(S) URI scheme.\r
 \r
   @param[in]    Uri              The pointer to the URI string.\r
-  \r
+\r
   @retval EFI_SUCCESS            The URI scheme is valid.\r
   @retval EFI_INVALID_PARAMETER  The URI scheme is not HTTP or HTTPS.\r
   @retval EFI_ACCESS_DENIED      HTTP is disabled and the URI is HTTP.\r
@@ -384,10 +384,10 @@ HttpBootCheckUriScheme (
   Get the URI address string from the input device path.\r
 \r
   Caller need to free the buffer in the UriAddress pointer.\r
-  \r
+\r
   @param[in]   FilePath         Pointer to the device path which contains a URI device path node.\r
   @param[out]  UriAddress       The URI address string extract from the device path.\r
-  \r
+\r
   @retval EFI_SUCCESS            The URI string is returned.\r
   @retval EFI_OUT_OF_RESOURCES   Failed to allocate memory.\r
 \r
@@ -403,11 +403,11 @@ HttpBootParseFilePath (
   and also the image's URI info.\r
 \r
   @param[in]    Uri              The pointer to the image's URI string.\r
-  @param[in]    UriParser        URI Parse result returned by NetHttpParseUrl(). \r
-  @param[in]    HeaderCount      Number of HTTP header structures in Headers list. \r
+  @param[in]    UriParser        URI Parse result returned by NetHttpParseUrl().\r
+  @param[in]    HeaderCount      Number of HTTP header structures in Headers list.\r
   @param[in]    Headers          Array containing list of HTTP headers.\r
   @param[out]   ImageType        The image type of the downloaded file.\r
-  \r
+\r
   @retval EFI_SUCCESS            The image type is returned in ImageType.\r
   @retval EFI_INVALID_PARAMETER  ImageType, Uri or UriParser is NULL.\r
   @retval EFI_INVALID_PARAMETER  HeaderCount is not zero, and Headers is NULL.\r
@@ -426,7 +426,7 @@ HttpBootCheckImageType (
 \r
 /**\r
   This function register the RAM disk info to the system.\r
-  \r
+\r
   @param[in]       Private         The pointer to the driver's private data.\r
   @param[in]       BufferSize      The size of Buffer in bytes.\r
   @param[in]       Buffer          The base address of the RAM disk.\r
@@ -448,7 +448,7 @@ HttpBootRegisterRamDisk (
 \r
 /**\r
   Indicate if the HTTP status code indicates a redirection.\r
-  \r
+\r
   @param[in]  StatusCode      HTTP status code from server.\r
 \r
   @return                     TRUE if it's redirection.\r
index fdd2e7f344ea4f74360268c9b4d0880cb8588c9d..fb3c5a3a8ba122e55464e2244580ceeead1a5c57 100644 (file)
@@ -2,7 +2,7 @@
   Implementation of EFI_COMPONENT_NAME_PROTOCOL and\r
   EFI_COMPONENT_NAME2_PROTOCOL protocol.\r
 \r
-  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -19,7 +19,7 @@
 ///\r
 /// Component Name Protocol instance\r
 ///\r
-GLOBAL_REMOVE_IF_UNREFERENCED \r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
 EFI_COMPONENT_NAME_PROTOCOL  gHttpDxeComponentName = {\r
   (EFI_COMPONENT_NAME_GET_DRIVER_NAME)     HttpDxeComponentNameGetDriverName,\r
   (EFI_COMPONENT_NAME_GET_CONTROLLER_NAME) HttpDxeComponentNameGetControllerName,\r
@@ -29,7 +29,7 @@ EFI_COMPONENT_NAME_PROTOCOL  gHttpDxeComponentName = {
 ///\r
 /// Component Name 2 Protocol instance\r
 ///\r
-GLOBAL_REMOVE_IF_UNREFERENCED \r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
 EFI_COMPONENT_NAME2_PROTOCOL  gHttpDxeComponentName2 = {\r
   HttpDxeComponentNameGetDriverName,\r
   HttpDxeComponentNameGetControllerName,\r
@@ -39,7 +39,7 @@ EFI_COMPONENT_NAME2_PROTOCOL  gHttpDxeComponentName2 = {
 ///\r
 /// Table of driver names\r
 ///\r
-GLOBAL_REMOVE_IF_UNREFERENCED \r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
 EFI_UNICODE_STRING_TABLE mHttpDxeDriverNameTable[] = {\r
   { "eng;en", (CHAR16 *) L"HttpDxe" },\r
   { NULL, NULL }\r
index 59cd7b325189b4c777812c38426a4c87d38e1a85..d0d57a5b2d0d3989d9b0e826c4292200771b7fd6 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Routines for HttpDxe driver to perform DNS resolution based on UEFI DNS protocols.\r
 \r
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -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.\r
   @retval EFI_DEVICE_ERROR        An unexpected network error occurred.\r
   @retval Others                  Other errors as indicated.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 HttpDns4 (\r
   IN     HTTP_PROTOCOL            *HttpInstance,\r
   IN     CHAR16                   *HostName,\r
-     OUT EFI_IPv4_ADDRESS         *IpAddress                \r
+     OUT EFI_IPv4_ADDRESS         *IpAddress\r
   )\r
 {\r
   EFI_STATUS                      Status;\r
@@ -45,7 +45,7 @@ HttpDns4 (
   UINTN                           DnsServerListCount;\r
   EFI_IPv4_ADDRESS                *DnsServerList;\r
   UINTN                           DataSize;\r
-  \r
+\r
 \r
   Service = HttpInstance->Service;\r
   ASSERT (Service != NULL);\r
@@ -82,7 +82,7 @@ HttpDns4 (
 \r
   Dns4Handle = NULL;\r
   Dns4       = NULL;\r
-  \r
+\r
   //\r
   // Create a DNS child instance and get the protocol.\r
   //\r
@@ -94,7 +94,7 @@ HttpDns4 (
              );\r
   if (EFI_ERROR (Status)) {\r
     goto Exit;\r
-  }  \r
+  }\r
 \r
   Status = gBS->OpenProtocol (\r
                   Dns4Handle,\r
@@ -128,7 +128,7 @@ HttpDns4 (
   if (EFI_ERROR (Status)) {\r
     goto Exit;\r
   }\r
-  \r
+\r
   //\r
   // Create event to set the is done flag when name resolution is finished.\r
   //\r
@@ -161,7 +161,7 @@ HttpDns4 (
   //\r
   // Name resolution is done, check result.\r
   //\r
-  Status = Token.Status;  \r
+  Status = Token.Status;\r
   if (!EFI_ERROR (Status)) {\r
     if (Token.RspData.H2AData == NULL) {\r
       Status = EFI_DEVICE_ERROR;\r
@@ -179,7 +179,7 @@ HttpDns4 (
   }\r
 \r
 Exit:\r
-  \r
+\r
   if (Token.Event != NULL) {\r
     gBS->CloseEvent (Token.Event);\r
   }\r
@@ -192,7 +192,7 @@ Exit:
 \r
   if (Dns4 != NULL) {\r
     Dns4->Configure (Dns4, NULL);\r
-    \r
+\r
     gBS->CloseProtocol (\r
            Dns4Handle,\r
            &gEfiDns4ProtocolGuid,\r
@@ -213,7 +213,7 @@ Exit:
   if (DnsServerList != NULL) {\r
     FreePool (DnsServerList);\r
   }\r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -228,13 +228,13 @@ Exit:
   @retval EFI_OUT_OF_RESOURCES    Failed to allocate needed resources.\r
   @retval EFI_DEVICE_ERROR        An unexpected network error occurred.\r
   @retval Others                  Other errors as indicated.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 HttpDns6 (\r
   IN     HTTP_PROTOCOL            *HttpInstance,\r
   IN     CHAR16                   *HostName,\r
-     OUT EFI_IPv6_ADDRESS         *IpAddress                \r
+     OUT EFI_IPv6_ADDRESS         *IpAddress\r
   )\r
 {\r
   EFI_STATUS                      Status;\r
@@ -248,7 +248,7 @@ HttpDns6 (
   UINTN                           DnsServerListCount;\r
   UINTN                           DataSize;\r
   BOOLEAN                         IsDone;\r
-  \r
+\r
 \r
   Service = HttpInstance->Service;\r
   ASSERT (Service != NULL);\r
@@ -258,7 +258,7 @@ HttpDns6 (
   Dns6                = NULL;\r
   Dns6Handle          = NULL;\r
   ZeroMem (&Token, sizeof (EFI_DNS6_COMPLETION_TOKEN));\r
-  \r
+\r
   //\r
   // Get DNS server list from EFI IPv6 Configuration protocol.\r
   //\r
@@ -273,7 +273,7 @@ HttpDns6 (
       DnsServerList = AllocatePool (DataSize);\r
       if (DnsServerList == NULL) {\r
         return EFI_OUT_OF_RESOURCES;\r
-      }  \r
+      }\r
 \r
       Status = Ip6Config->GetData (Ip6Config, Ip6ConfigDataTypeDnsServer, &DataSize, DnsServerList);\r
       if (EFI_ERROR (Status)) {\r
@@ -296,8 +296,8 @@ HttpDns6 (
              );\r
   if (EFI_ERROR (Status)) {\r
     goto Exit;\r
-  } \r
-  \r
+  }\r
+\r
   Status = gBS->OpenProtocol (\r
                   Dns6Handle,\r
                   &gEfiDns6ProtocolGuid,\r
@@ -358,7 +358,7 @@ HttpDns6 (
   //\r
   // Name resolution is done, check result.\r
   //\r
-  Status = Token.Status;  \r
+  Status = Token.Status;\r
   if (!EFI_ERROR (Status)) {\r
     if (Token.RspData.H2AData == NULL) {\r
       Status = EFI_DEVICE_ERROR;\r
@@ -374,7 +374,7 @@ HttpDns6 (
     IP6_COPY_ADDRESS (IpAddress, Token.RspData.H2AData->IpList);\r
     Status = EFI_SUCCESS;\r
   }\r
-  \r
+\r
 Exit:\r
 \r
   if (Token.Event != NULL) {\r
@@ -389,7 +389,7 @@ Exit:
 \r
   if (Dns6 != NULL) {\r
     Dns6->Configure (Dns6, NULL);\r
-    \r
+\r
     gBS->CloseProtocol (\r
            Dns6Handle,\r
            &gEfiDns6ProtocolGuid,\r
@@ -410,6 +410,6 @@ Exit:
   if (DnsServerList != NULL) {\r
     FreePool (DnsServerList);\r
   }\r
-  \r
-  return Status;  \r
+\r
+  return Status;\r
 }\r
index fa0c8f4a99f3dd962f2fb6d5ec5131c7525578b1..2dc178af00ef951517e235650fae681b0fb6a7e4 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The header file of routines for HttpDxe driver to perform DNS resolution based on UEFI DNS protocols.\r
 \r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -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.\r
   @retval EFI_DEVICE_ERROR        An unexpected network error occurred.\r
   @retval Others                  Other errors as indicated.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 HttpDns4 (\r
   IN     HTTP_PROTOCOL            *HttpInstance,\r
   IN     CHAR16                   *HostName,\r
-     OUT EFI_IPv4_ADDRESS         *IpAddress                \r
+     OUT EFI_IPv4_ADDRESS         *IpAddress\r
   );\r
 \r
 /**\r
@@ -46,13 +46,13 @@ HttpDns4 (
   @retval EFI_OUT_OF_RESOURCES    Failed to allocate needed resources.\r
   @retval EFI_DEVICE_ERROR        An unexpected network error occurred.\r
   @retval Others                  Other errors as indicated.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 HttpDns6 (\r
   IN     HTTP_PROTOCOL            *HttpInstance,\r
   IN     CHAR16                   *HostName,\r
-     OUT EFI_IPv6_ADDRESS         *IpAddress                \r
+     OUT EFI_IPv6_ADDRESS         *IpAddress\r
   );\r
 \r
-#endif
\ No newline at end of file
+#endif\r
index 5727526273c3e54151f073ebcfda3d672c2350a7..8df984db418acc3f2f2e902541536f67027b7d8b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The driver binding and service binding protocol for HttpDxe driver.\r
 \r
-  Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
   (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 \r
   This program and the accompanying materials\r
@@ -73,7 +73,7 @@ HttpCreateService (
   HttpService->ControllerHandle = Controller;\r
   HttpService->ChildrenNumber = 0;\r
   InitializeListHead (&HttpService->ChildrenList);\r
-  \r
+\r
   *ServiceData = HttpService;\r
   return EFI_SUCCESS;\r
 }\r
@@ -91,8 +91,8 @@ HttpCleanService (
   IN HTTP_SERVICE     *HttpService,\r
   IN BOOLEAN          UsingIpv6\r
   )\r
-{ \r
-  \r
+{\r
+\r
   if (HttpService == NULL) {\r
     return ;\r
   }\r
@@ -104,14 +104,14 @@ HttpCleanService (
              HttpService->Ip4DriverBindingHandle,\r
              HttpService->ControllerHandle\r
              );\r
-    \r
+\r
       NetLibDestroyServiceChild (\r
         HttpService->ControllerHandle,\r
         HttpService->Ip4DriverBindingHandle,\r
         &gEfiTcp4ServiceBindingProtocolGuid,\r
         HttpService->Tcp4ChildHandle\r
         );\r
-      \r
+\r
       HttpService->Tcp4ChildHandle = NULL;\r
     }\r
   } else {\r
@@ -122,18 +122,18 @@ HttpCleanService (
              HttpService->Ip6DriverBindingHandle,\r
              HttpService->ControllerHandle\r
              );\r
-    \r
+\r
       NetLibDestroyServiceChild (\r
         HttpService->ControllerHandle,\r
         HttpService->Ip6DriverBindingHandle,\r
         &gEfiTcp6ServiceBindingProtocolGuid,\r
         HttpService->Tcp6ChildHandle\r
         );\r
-      \r
+\r
       HttpService->Tcp6ChildHandle = NULL;\r
     }\r
   }\r
-  \r
+\r
 }\r
 \r
 /**\r
@@ -152,11 +152,11 @@ HttpUtilitiesInstalledCallback (
   )\r
 {\r
   gBS->LocateProtocol (\r
-         &gEfiHttpUtilitiesProtocolGuid, \r
-         NULL, \r
+         &gEfiHttpUtilitiesProtocolGuid,\r
+         NULL,\r
          (VOID **) &mHttpUtilities\r
          );\r
\r
+\r
   //\r
   // Close the event if Http utilities protocol is loacted.\r
   //\r
@@ -183,13 +183,13 @@ HttpDxeDriverEntryPoint (
   IN EFI_HANDLE        ImageHandle,\r
   IN EFI_SYSTEM_TABLE  *SystemTable\r
   )\r
-{ \r
+{\r
   EFI_STATUS     Status;\r
   VOID           *Registration;\r
 \r
   gBS->LocateProtocol (\r
-         &gEfiHttpUtilitiesProtocolGuid, \r
-         NULL, \r
+         &gEfiHttpUtilitiesProtocolGuid,\r
+         NULL,\r
          (VOID **) &mHttpUtilities\r
          );\r
 \r
@@ -246,7 +246,7 @@ HttpDxeDriverEntryPoint (
 \r
 /**\r
   Callback function which provided by user to remove one node in NetDestroyLinkList process.\r
-  \r
+\r
   @param[in]    Entry           The entry to be removed.\r
   @param[in]    Context         Pointer to the callback context corresponds to the Context in NetDestroyLinkList.\r
 \r
@@ -292,7 +292,7 @@ HttpDestroyChildEntryInHandleBuffer (
   @param[in]  RemainingDevicePath Optional parameter used to pick a specific child\r
                                   device to be started.\r
   @param[in]  IpVersion           IP_VERSION_4 or IP_VERSION_6.\r
-  \r
+\r
   @retval EFI_SUCCESS         This driver supports this device.\r
   @retval EFI_UNSUPPORTED     This driver does not support this device.\r
 \r
@@ -383,9 +383,9 @@ HttpDxeStart (
     if (EFI_ERROR (Status)) {\r
       return Status;\r
     }\r
-    \r
+\r
     ASSERT (HttpService != NULL);\r
-      \r
+\r
     //\r
     // Install the HttpServiceBinding Protocol onto Controller\r
     //\r
@@ -395,7 +395,7 @@ HttpDxeStart (
                     &HttpService->ServiceBinding,\r
                     NULL\r
                     );\r
-    \r
+\r
     if (EFI_ERROR (Status)) {\r
       goto ON_ERROR;\r
     }\r
@@ -414,11 +414,11 @@ HttpDxeStart (
                  &gEfiTcp4ServiceBindingProtocolGuid,\r
                  &HttpService->Tcp4ChildHandle\r
                  );\r
-      \r
+\r
       if (EFI_ERROR (Status)) {\r
         goto ON_ERROR;\r
       }\r
-      \r
+\r
       Status = gBS->OpenProtocol (\r
                       HttpService->Tcp4ChildHandle,\r
                       &gEfiTcp4ProtocolGuid,\r
@@ -427,11 +427,11 @@ HttpDxeStart (
                       ControllerHandle,\r
                       EFI_OPEN_PROTOCOL_BY_DRIVER\r
                       );\r
-                      \r
+\r
       if (EFI_ERROR (Status)) {\r
         goto ON_ERROR;\r
       }\r
-      \r
+\r
     } else {\r
       return EFI_ALREADY_STARTED;\r
     }\r
@@ -450,11 +450,11 @@ HttpDxeStart (
                  &gEfiTcp6ServiceBindingProtocolGuid,\r
                  &HttpService->Tcp6ChildHandle\r
                  );\r
-      \r
+\r
       if (EFI_ERROR (Status)) {\r
         goto ON_ERROR;\r
       }\r
-      \r
+\r
       Status = gBS->OpenProtocol (\r
                       HttpService->Tcp6ChildHandle,\r
                       &gEfiTcp6ProtocolGuid,\r
@@ -463,11 +463,11 @@ HttpDxeStart (
                       ControllerHandle,\r
                       EFI_OPEN_PROTOCOL_BY_DRIVER\r
                       );\r
-                      \r
+\r
       if (EFI_ERROR (Status)) {\r
         goto ON_ERROR;\r
       }\r
-      \r
+\r
     } else {\r
       return EFI_ALREADY_STARTED;\r
     }\r
@@ -475,16 +475,16 @@ HttpDxeStart (
   }\r
 \r
   return EFI_SUCCESS;\r
-  \r
+\r
 ON_ERROR:\r
-    \r
+\r
   if (HttpService != NULL) {\r
     HttpCleanService (HttpService, UsingIpv6);\r
     if (HttpService->Tcp4ChildHandle == NULL && HttpService->Tcp6ChildHandle == NULL) {\r
       FreePool (HttpService);\r
     }\r
   }\r
-      \r
+\r
   return Status;\r
 \r
 \r
@@ -551,9 +551,9 @@ HttpDxeStop (
                   );\r
 \r
   if (!EFI_ERROR (Status)) {\r
-    \r
+\r
     HttpService = HTTP_SERVICE_FROM_PROTOCOL (ServiceBinding);\r
-    \r
+\r
     if (NumberOfChildren != 0) {\r
       //\r
       // Destroy the HTTP child instance in ChildHandleBuffer.\r
@@ -569,9 +569,9 @@ HttpDxeStop (
                  NULL\r
                  );\r
     } else {\r
-    \r
+\r
       HttpCleanService (HttpService, UsingIpv6);\r
-      \r
+\r
       if (HttpService->Tcp4ChildHandle == NULL && HttpService->Tcp6ChildHandle == NULL) {\r
         gBS->UninstallProtocolInterface (\r
                NicHandle,\r
@@ -581,41 +581,41 @@ HttpDxeStop (
         FreePool (HttpService);\r
       }\r
       Status = EFI_SUCCESS;\r
-    }  \r
+    }\r
   }\r
-  \r
+\r
   return Status;\r
 \r
 }\r
 \r
 /**\r
-  Tests to see if this driver supports a given controller. If a child device is provided, \r
+  Tests to see if this driver supports a given controller. If a child device is provided,\r
   it further tests to see if this driver supports creating a handle for the specified child device.\r
 \r
-  This function checks to see if the driver specified by This supports the device specified by \r
-  ControllerHandle. Drivers will typically use the device path attached to \r
-  ControllerHandle and/or the services from the bus I/O abstraction attached to \r
-  ControllerHandle to determine if the driver supports ControllerHandle. This function \r
-  may be called many times during platform initialization. In order to reduce boot times, the tests \r
-  performed by this function must be very small, and take as little time as possible to execute. This \r
-  function must not change the state of any hardware devices, and this function must be aware that the \r
-  device specified by ControllerHandle may already be managed by the same driver or a \r
-  different driver. This function must match its calls to AllocatePages() with FreePages(), \r
-  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().  \r
-  Because ControllerHandle may have been previously started by the same driver, if a protocol is \r
-  already in the opened state, then it must not be closed with CloseProtocol(). This is required \r
+  This function checks to see if the driver specified by This supports the device specified by\r
+  ControllerHandle. Drivers will typically use the device path attached to\r
+  ControllerHandle and/or the services from the bus I/O abstraction attached to\r
+  ControllerHandle to determine if the driver supports ControllerHandle. This function\r
+  may be called many times during platform initialization. In order to reduce boot times, the tests\r
+  performed by this function must be very small, and take as little time as possible to execute. This\r
+  function must not change the state of any hardware devices, and this function must be aware that the\r
+  device specified by ControllerHandle may already be managed by the same driver or a\r
+  different driver. This function must match its calls to AllocatePages() with FreePages(),\r
+  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().\r
+  Because ControllerHandle may have been previously started by the same driver, if a protocol is\r
+  already in the opened state, then it must not be closed with CloseProtocol(). This is required\r
   to guarantee the state of ControllerHandle is not modified by this function.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to test. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to test. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For bus drivers, if this parameter is not NULL, then \r
-                                   the bus driver must determine if the bus controller specified \r
-                                   by ControllerHandle and the child controller specified \r
-                                   by RemainingDevicePath are both supported by this \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For bus drivers, if this parameter is not NULL, then\r
+                                   the bus driver must determine if the bus controller specified\r
+                                   by ControllerHandle and the child controller specified\r
+                                   by RemainingDevicePath are both supported by this\r
                                    bus driver.\r
 \r
   @retval EFI_SUCCESS              The device specified by ControllerHandle and\r
@@ -650,28 +650,28 @@ HttpDxeIp4DriverBindingSupported (
   Starts a device controller or a bus controller.\r
 \r
   The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
-  As a result, much of the error checking on the parameters to Start() has been moved into this \r
-  common boot service. It is legal to call Start() from other locations, \r
+  As a result, much of the error checking on the parameters to Start() has been moved into this\r
+  common boot service. It is legal to call Start() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE.\r
   2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
      EFI_DEVICE_PATH_PROTOCOL.\r
   3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
-     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.  \r
+     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to start. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to start. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For a bus driver, if this parameter is NULL, then handles \r
-                                   for all the children of Controller are created by this driver.  \r
-                                   If this parameter is not NULL and the first Device Path Node is \r
-                                   not the End of Device Path Node, then only the handle for the \r
-                                   child device specified by the first Device Path Node of \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For a bus driver, if this parameter is NULL, then handles\r
+                                   for all the children of Controller are created by this driver.\r
+                                   If this parameter is not NULL and the first Device Path Node is\r
+                                   not the End of Device Path Node, then only the handle for the\r
+                                   child device specified by the first Device Path Node of\r
                                    RemainingDevicePath is created by this driver.\r
-                                   If the first Device Path Node of RemainingDevicePath is \r
+                                   If the first Device Path Node of RemainingDevicePath is\r
                                    the End of Device Path Node, no child handle is created by this\r
                                    driver.\r
 \r
@@ -700,10 +700,10 @@ HttpDxeIp4DriverBindingStart (
 \r
 /**\r
   Stops a device controller or a bus controller.\r
-  \r
-  The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r
-  As a result, much of the error checking on the parameters to Stop() has been moved \r
-  into this common boot service. It is legal to call Stop() from other locations, \r
+\r
+  The Stop() function is designed to be invoked from the EFI boot service DisconnectController().\r
+  As a result, much of the error checking on the parameters to Stop() has been moved\r
+  into this common boot service. It is legal to call Stop() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
      same driver's Start() function.\r
@@ -711,13 +711,13 @@ HttpDxeIp4DriverBindingStart (
      EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
      Start() function, and the Start() function must have called OpenProtocol() on\r
      ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
-  \r
+\r
   @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must \r
-                                support a bus specific I/O protocol for the driver \r
+  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must\r
+                                support a bus specific I/O protocol for the driver\r
                                 to use to stop the device.\r
   @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.\r
-  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL \r
+  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL\r
                                 if NumberOfChildren is 0.\r
 \r
   @retval EFI_SUCCESS           The device was stopped.\r
@@ -743,33 +743,33 @@ HttpDxeIp4DriverBindingStop (
 }\r
 \r
 /**\r
-  Tests to see if this driver supports a given controller. If a child device is provided, \r
+  Tests to see if this driver supports a given controller. If a child device is provided,\r
   it further tests to see if this driver supports creating a handle for the specified child device.\r
 \r
-  This function checks to see if the driver specified by This supports the device specified by \r
-  ControllerHandle. Drivers will typically use the device path attached to \r
-  ControllerHandle and/or the services from the bus I/O abstraction attached to \r
-  ControllerHandle to determine if the driver supports ControllerHandle. This function \r
-  may be called many times during platform initialization. In order to reduce boot times, the tests \r
-  performed by this function must be very small, and take as little time as possible to execute. This \r
-  function must not change the state of any hardware devices, and this function must be aware that the \r
-  device specified by ControllerHandle may already be managed by the same driver or a \r
-  different driver. This function must match its calls to AllocatePages() with FreePages(), \r
-  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().  \r
-  Because ControllerHandle may have been previously started by the same driver, if a protocol is \r
-  already in the opened state, then it must not be closed with CloseProtocol(). This is required \r
+  This function checks to see if the driver specified by This supports the device specified by\r
+  ControllerHandle. Drivers will typically use the device path attached to\r
+  ControllerHandle and/or the services from the bus I/O abstraction attached to\r
+  ControllerHandle to determine if the driver supports ControllerHandle. This function\r
+  may be called many times during platform initialization. In order to reduce boot times, the tests\r
+  performed by this function must be very small, and take as little time as possible to execute. This\r
+  function must not change the state of any hardware devices, and this function must be aware that the\r
+  device specified by ControllerHandle may already be managed by the same driver or a\r
+  different driver. This function must match its calls to AllocatePages() with FreePages(),\r
+  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().\r
+  Because ControllerHandle may have been previously started by the same driver, if a protocol is\r
+  already in the opened state, then it must not be closed with CloseProtocol(). This is required\r
   to guarantee the state of ControllerHandle is not modified by this function.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to test. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to test. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For bus drivers, if this parameter is not NULL, then \r
-                                   the bus driver must determine if the bus controller specified \r
-                                   by ControllerHandle and the child controller specified \r
-                                   by RemainingDevicePath are both supported by this \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For bus drivers, if this parameter is not NULL, then\r
+                                   the bus driver must determine if the bus controller specified\r
+                                   by ControllerHandle and the child controller specified\r
+                                   by RemainingDevicePath are both supported by this\r
                                    bus driver.\r
 \r
   @retval EFI_SUCCESS              The device specified by ControllerHandle and\r
@@ -791,7 +791,7 @@ HttpDxeIp6DriverBindingSupported (
   IN EFI_HANDLE                   ControllerHandle,\r
   IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath OPTIONAL\r
   )\r
-{  \r
+{\r
   return HttpDxeSupported (\r
            This,\r
            ControllerHandle,\r
@@ -805,28 +805,28 @@ HttpDxeIp6DriverBindingSupported (
   Starts a device controller or a bus controller.\r
 \r
   The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
-  As a result, much of the error checking on the parameters to Start() has been moved into this \r
-  common boot service. It is legal to call Start() from other locations, \r
+  As a result, much of the error checking on the parameters to Start() has been moved into this\r
+  common boot service. It is legal to call Start() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE.\r
   2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
      EFI_DEVICE_PATH_PROTOCOL.\r
   3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
-     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.  \r
+     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to start. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to start. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For a bus driver, if this parameter is NULL, then handles \r
-                                   for all the children of Controller are created by this driver.  \r
-                                   If this parameter is not NULL and the first Device Path Node is \r
-                                   not the End of Device Path Node, then only the handle for the \r
-                                   child device specified by the first Device Path Node of \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For a bus driver, if this parameter is NULL, then handles\r
+                                   for all the children of Controller are created by this driver.\r
+                                   If this parameter is not NULL and the first Device Path Node is\r
+                                   not the End of Device Path Node, then only the handle for the\r
+                                   child device specified by the first Device Path Node of\r
                                    RemainingDevicePath is created by this driver.\r
-                                   If the first Device Path Node of RemainingDevicePath is \r
+                                   If the first Device Path Node of RemainingDevicePath is\r
                                    the End of Device Path Node, no child handle is created by this\r
                                    driver.\r
 \r
@@ -855,10 +855,10 @@ HttpDxeIp6DriverBindingStart (
 \r
 /**\r
   Stops a device controller or a bus controller.\r
-  \r
-  The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r
-  As a result, much of the error checking on the parameters to Stop() has been moved \r
-  into this common boot service. It is legal to call Stop() from other locations, \r
+\r
+  The Stop() function is designed to be invoked from the EFI boot service DisconnectController().\r
+  As a result, much of the error checking on the parameters to Stop() has been moved\r
+  into this common boot service. It is legal to call Stop() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
      same driver's Start() function.\r
@@ -866,13 +866,13 @@ HttpDxeIp6DriverBindingStart (
      EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
      Start() function, and the Start() function must have called OpenProtocol() on\r
      ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
-  \r
+\r
   @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must \r
-                                support a bus specific I/O protocol for the driver \r
+  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must\r
+                                support a bus specific I/O protocol for the driver\r
                                 to use to stop the device.\r
   @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.\r
-  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL \r
+  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL\r
                                 if NumberOfChildren is 0.\r
 \r
   @retval EFI_SUCCESS           The device was stopped.\r
@@ -936,7 +936,7 @@ HttpServiceBindingCreateChild (
   if (HttpInstance == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   HttpInstance->Signature = HTTP_PROTOCOL_SIGNATURE;\r
   HttpInstance->Service   = HttpService;\r
   HttpInstance->Method = HttpMethodMax;\r
@@ -972,9 +972,9 @@ HttpServiceBindingCreateChild (
   gBS->RestoreTPL (OldTpl);\r
 \r
   return EFI_SUCCESS;\r
-  \r
+\r
 ON_ERROR:\r
\r
+\r
   NetMapClean (&HttpInstance->TxTokens);\r
   NetMapClean (&HttpInstance->RxTokens);\r
   FreePool (HttpInstance);\r
@@ -1010,7 +1010,7 @@ HttpServiceBindingDestroyChild (
   EFI_HTTP_PROTOCOL        *Http;\r
   EFI_STATUS                Status;\r
   EFI_TPL                   OldTpl;\r
-  \r
+\r
   if ((This == NULL) || (ChildHandle == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -1027,7 +1027,7 @@ HttpServiceBindingDestroyChild (
   if (EFI_ERROR (Status)) {\r
     return EFI_UNSUPPORTED;\r
   }\r
-  \r
+\r
   HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (Http);\r
   if (HttpInstance->Service != HttpService) {\r
     return EFI_INVALID_PARAMETER;\r
@@ -1052,16 +1052,16 @@ HttpServiceBindingDestroyChild (
     HttpInstance->InDestroy = FALSE;\r
     return Status;\r
   }\r
-  \r
+\r
   HttpCleanProtocol (HttpInstance);\r
-  \r
+\r
   OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
-  \r
+\r
   RemoveEntryList (&HttpInstance->Link);\r
   HttpService->ChildrenNumber--;\r
 \r
   gBS->RestoreTPL (OldTpl);\r
-  \r
+\r
   FreePool (HttpInstance);\r
   return EFI_SUCCESS;\r
 }\r
index 3b7a7a22a5ce3c4687ce68f81a554a24fa16dcc9..bf9d4db8b6b3aa599a19f17c31d2d1b885f670f4 100644 (file)
@@ -97,33 +97,33 @@ typedef struct {
 } HTTP_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT;\r
 \r
 /**\r
-  Tests to see if this driver supports a given controller. If a child device is provided, \r
+  Tests to see if this driver supports a given controller. If a child device is provided,\r
   it further tests to see if this driver supports creating a handle for the specified child device.\r
 \r
-  This function checks to see if the driver specified by This supports the device specified by \r
-  ControllerHandle. Drivers will typically use the device path attached to \r
-  ControllerHandle and/or the services from the bus I/O abstraction attached to \r
-  ControllerHandle to determine if the driver supports ControllerHandle. This function \r
-  may be called many times during platform initialization. In order to reduce boot times, the tests \r
-  performed by this function must be very small, and take as little time as possible to execute. This \r
-  function must not change the state of any hardware devices, and this function must be aware that the \r
-  device specified by ControllerHandle may already be managed by the same driver or a \r
-  different driver. This function must match its calls to AllocatePages() with FreePages(), \r
-  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().  \r
-  Because ControllerHandle may have been previously started by the same driver, if a protocol is \r
-  already in the opened state, then it must not be closed with CloseProtocol(). This is required \r
+  This function checks to see if the driver specified by This supports the device specified by\r
+  ControllerHandle. Drivers will typically use the device path attached to\r
+  ControllerHandle and/or the services from the bus I/O abstraction attached to\r
+  ControllerHandle to determine if the driver supports ControllerHandle. This function\r
+  may be called many times during platform initialization. In order to reduce boot times, the tests\r
+  performed by this function must be very small, and take as little time as possible to execute. This\r
+  function must not change the state of any hardware devices, and this function must be aware that the\r
+  device specified by ControllerHandle may already be managed by the same driver or a\r
+  different driver. This function must match its calls to AllocatePages() with FreePages(),\r
+  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().\r
+  Because ControllerHandle may have been previously started by the same driver, if a protocol is\r
+  already in the opened state, then it must not be closed with CloseProtocol(). This is required\r
   to guarantee the state of ControllerHandle is not modified by this function.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to test. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to test. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For bus drivers, if this parameter is not NULL, then \r
-                                   the bus driver must determine if the bus controller specified \r
-                                   by ControllerHandle and the child controller specified \r
-                                   by RemainingDevicePath are both supported by this \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For bus drivers, if this parameter is not NULL, then\r
+                                   the bus driver must determine if the bus controller specified\r
+                                   by ControllerHandle and the child controller specified\r
+                                   by RemainingDevicePath are both supported by this\r
                                    bus driver.\r
 \r
   @retval EFI_SUCCESS              The device specified by ControllerHandle and\r
@@ -150,28 +150,28 @@ HttpDxeIp4DriverBindingSupported (
   Starts a device controller or a bus controller.\r
 \r
   The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
-  As a result, much of the error checking on the parameters to Start() has been moved into this \r
-  common boot service. It is legal to call Start() from other locations, \r
+  As a result, much of the error checking on the parameters to Start() has been moved into this\r
+  common boot service. It is legal to call Start() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE.\r
   2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
      EFI_DEVICE_PATH_PROTOCOL.\r
   3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
-     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.  \r
+     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to start. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to start. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For a bus driver, if this parameter is NULL, then handles \r
-                                   for all the children of Controller are created by this driver.  \r
-                                   If this parameter is not NULL and the first Device Path Node is \r
-                                   not the End of Device Path Node, then only the handle for the \r
-                                   child device specified by the first Device Path Node of \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For a bus driver, if this parameter is NULL, then handles\r
+                                   for all the children of Controller are created by this driver.\r
+                                   If this parameter is not NULL and the first Device Path Node is\r
+                                   not the End of Device Path Node, then only the handle for the\r
+                                   child device specified by the first Device Path Node of\r
                                    RemainingDevicePath is created by this driver.\r
-                                   If the first Device Path Node of RemainingDevicePath is \r
+                                   If the first Device Path Node of RemainingDevicePath is\r
                                    the End of Device Path Node, no child handle is created by this\r
                                    driver.\r
 \r
@@ -191,10 +191,10 @@ HttpDxeIp4DriverBindingStart (
 \r
 /**\r
   Stops a device controller or a bus controller.\r
-  \r
-  The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r
-  As a result, much of the error checking on the parameters to Stop() has been moved \r
-  into this common boot service. It is legal to call Stop() from other locations, \r
+\r
+  The Stop() function is designed to be invoked from the EFI boot service DisconnectController().\r
+  As a result, much of the error checking on the parameters to Stop() has been moved\r
+  into this common boot service. It is legal to call Stop() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
      same driver's Start() function.\r
@@ -202,13 +202,13 @@ HttpDxeIp4DriverBindingStart (
      EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
      Start() function, and the Start() function must have called OpenProtocol() on\r
      ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
-  \r
+\r
   @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must \r
-                                support a bus specific I/O protocol for the driver \r
+  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must\r
+                                support a bus specific I/O protocol for the driver\r
                                 to use to stop the device.\r
   @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.\r
-  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL \r
+  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL\r
                                 if NumberOfChildren is 0.\r
 \r
   @retval EFI_SUCCESS           The device was stopped.\r
@@ -225,33 +225,33 @@ HttpDxeIp4DriverBindingStop (
   );\r
 \r
 /**\r
-  Tests to see if this driver supports a given controller. If a child device is provided, \r
+  Tests to see if this driver supports a given controller. If a child device is provided,\r
   it further tests to see if this driver supports creating a handle for the specified child device.\r
 \r
-  This function checks to see if the driver specified by This supports the device specified by \r
-  ControllerHandle. Drivers will typically use the device path attached to \r
-  ControllerHandle and/or the services from the bus I/O abstraction attached to \r
-  ControllerHandle to determine if the driver supports ControllerHandle. This function \r
-  may be called many times during platform initialization. In order to reduce boot times, the tests \r
-  performed by this function must be very small, and take as little time as possible to execute. This \r
-  function must not change the state of any hardware devices, and this function must be aware that the \r
-  device specified by ControllerHandle may already be managed by the same driver or a \r
-  different driver. This function must match its calls to AllocatePages() with FreePages(), \r
-  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().  \r
-  Because ControllerHandle may have been previously started by the same driver, if a protocol is \r
-  already in the opened state, then it must not be closed with CloseProtocol(). This is required \r
+  This function checks to see if the driver specified by This supports the device specified by\r
+  ControllerHandle. Drivers will typically use the device path attached to\r
+  ControllerHandle and/or the services from the bus I/O abstraction attached to\r
+  ControllerHandle to determine if the driver supports ControllerHandle. This function\r
+  may be called many times during platform initialization. In order to reduce boot times, the tests\r
+  performed by this function must be very small, and take as little time as possible to execute. This\r
+  function must not change the state of any hardware devices, and this function must be aware that the\r
+  device specified by ControllerHandle may already be managed by the same driver or a\r
+  different driver. This function must match its calls to AllocatePages() with FreePages(),\r
+  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().\r
+  Because ControllerHandle may have been previously started by the same driver, if a protocol is\r
+  already in the opened state, then it must not be closed with CloseProtocol(). This is required\r
   to guarantee the state of ControllerHandle is not modified by this function.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to test. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to test. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For bus drivers, if this parameter is not NULL, then \r
-                                   the bus driver must determine if the bus controller specified \r
-                                   by ControllerHandle and the child controller specified \r
-                                   by RemainingDevicePath are both supported by this \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For bus drivers, if this parameter is not NULL, then\r
+                                   the bus driver must determine if the bus controller specified\r
+                                   by ControllerHandle and the child controller specified\r
+                                   by RemainingDevicePath are both supported by this\r
                                    bus driver.\r
 \r
   @retval EFI_SUCCESS              The device specified by ControllerHandle and\r
@@ -278,28 +278,28 @@ HttpDxeIp6DriverBindingSupported (
   Starts a device controller or a bus controller.\r
 \r
   The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
-  As a result, much of the error checking on the parameters to Start() has been moved into this \r
-  common boot service. It is legal to call Start() from other locations, \r
+  As a result, much of the error checking on the parameters to Start() has been moved into this\r
+  common boot service. It is legal to call Start() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE.\r
   2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
      EFI_DEVICE_PATH_PROTOCOL.\r
   3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
-     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.  \r
+     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to start. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to start. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For a bus driver, if this parameter is NULL, then handles \r
-                                   for all the children of Controller are created by this driver.  \r
-                                   If this parameter is not NULL and the first Device Path Node is \r
-                                   not the End of Device Path Node, then only the handle for the \r
-                                   child device specified by the first Device Path Node of \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For a bus driver, if this parameter is NULL, then handles\r
+                                   for all the children of Controller are created by this driver.\r
+                                   If this parameter is not NULL and the first Device Path Node is\r
+                                   not the End of Device Path Node, then only the handle for the\r
+                                   child device specified by the first Device Path Node of\r
                                    RemainingDevicePath is created by this driver.\r
-                                   If the first Device Path Node of RemainingDevicePath is \r
+                                   If the first Device Path Node of RemainingDevicePath is\r
                                    the End of Device Path Node, no child handle is created by this\r
                                    driver.\r
 \r
@@ -320,10 +320,10 @@ HttpDxeIp6DriverBindingStart (
 \r
 /**\r
   Stops a device controller or a bus controller.\r
-  \r
-  The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r
-  As a result, much of the error checking on the parameters to Stop() has been moved \r
-  into this common boot service. It is legal to call Stop() from other locations, \r
+\r
+  The Stop() function is designed to be invoked from the EFI boot service DisconnectController().\r
+  As a result, much of the error checking on the parameters to Stop() has been moved\r
+  into this common boot service. It is legal to call Stop() from other locations,\r
   but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
      same driver's Start() function.\r
@@ -331,13 +331,13 @@ HttpDxeIp6DriverBindingStart (
      EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
      Start() function, and the Start() function must have called OpenProtocol() on\r
      ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
-  \r
+\r
   @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must \r
-                                support a bus specific I/O protocol for the driver \r
+  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must\r
+                                support a bus specific I/O protocol for the driver\r
                                 to use to stop the device.\r
   @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.\r
-  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL \r
+  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL\r
                                 if NumberOfChildren is 0.\r
 \r
   @retval EFI_SUCCESS           The device was stopped.\r
index 6c0688d1305bb749ef61b8052205b84fdc4098e1..b90a7ef4f892f40450323569c40f86dd2d372061 100644 (file)
@@ -78,7 +78,7 @@
   gEfiCertX509Guid                                 ## SOMETIMES_CONSUMES  ## GUID  # Check the cert type\r
 \r
 [Pcd]\r
-  gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections       ## CONSUMES  \r
+  gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections       ## CONSUMES\r
 \r
 [UserExtensions.TianoCore."ExtraFiles"]\r
   HttpDxeExtra.uni\r
index 8aee8f72a6edc9df600aa79392f5e5ea157cc198..e8fc3fe8db7c4283265a9c45cb1eefee1c6e178b 100644 (file)
@@ -2,15 +2,15 @@
 // UEFI HTTP DXE Driver.\r
 //\r
 // This driver provides UEFI 2.5 HTTP protocols. It could work with an IPv4 or IPv6 stack.\r
-// \r
 //\r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+//\r
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
 // which accompanies this distribution. The full text of the license may be found at\r
 // http://opensource.org/licenses/bsd-license.php.\r
-// \r
+//\r
 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 //\r
index 2e96fc8aa50f9484081fb4fe0de9d6007d7139bc..bd50de2269dd5ac0b8573aa0699c1c04df08061e 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // HttpDxe Localized Strings and Content\r
 //\r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -13,8 +13,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "UEFI HTTP DXE"\r
 \r
 \r
index a2af59674a3c7dd4426424f9e638f8de32802f86..f70e116f38d7e78f7bfc131c343b26aa4bc622bc 100644 (file)
@@ -33,17 +33,17 @@ EFI_HTTP_PROTOCOL  mEfiHttpTemplate = {
 \r
   @param[in]  This                Pointer to EFI_HTTP_PROTOCOL instance.\r
   @param[out] HttpConfigData      Point to buffer for operational parameters of this\r
-                                  HTTP instance. It is the responsibility of the caller \r
-                                  to allocate the memory for HttpConfigData and \r
-                                  HttpConfigData->AccessPoint.IPv6Node/IPv4Node. In fact, \r
-                                  it is recommended to allocate sufficient memory to record \r
-                                  IPv6Node since it is big enough for all possibilities. \r
+                                  HTTP instance. It is the responsibility of the caller\r
+                                  to allocate the memory for HttpConfigData and\r
+                                  HttpConfigData->AccessPoint.IPv6Node/IPv4Node. In fact,\r
+                                  it is recommended to allocate sufficient memory to record\r
+                                  IPv6Node since it is big enough for all possibilities.\r
 \r
   @retval EFI_SUCCESS             Operation succeeded.\r
   @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:\r
                                   This is NULL.\r
                                   HttpConfigData is NULL.\r
-                                  HttpConfigData->AccessPoint.IPv4Node or \r
+                                  HttpConfigData->AccessPoint.IPv4Node or\r
                                   HttpConfigData->AccessPoint.IPv6Node is NULL.\r
   @retval EFI_NOT_STARTED         This EFI HTTP Protocol instance has not been started.\r
 \r
@@ -132,16 +132,16 @@ EFIAPI
 EfiHttpConfigure (\r
   IN  EFI_HTTP_PROTOCOL         *This,\r
   IN  EFI_HTTP_CONFIG_DATA      *HttpConfigData OPTIONAL\r
-  ) \r
+  )\r
 {\r
   HTTP_PROTOCOL                 *HttpInstance;\r
   EFI_STATUS                    Status;\r
-  \r
+\r
   //\r
   // Check input parameters.\r
   //\r
   if (This == NULL ||\r
-      (HttpConfigData != NULL && \r
+      (HttpConfigData != NULL &&\r
        ((HttpConfigData->LocalAddressIsIPv6 && HttpConfigData->AccessPoint.IPv6Node == NULL) ||\r
         (!HttpConfigData->LocalAddressIsIPv6 && HttpConfigData->AccessPoint.IPv4Node == NULL)))) {\r
     return EFI_INVALID_PARAMETER;\r
@@ -166,8 +166,8 @@ EfiHttpConfigure (
     HttpInstance->HttpVersion        = HttpConfigData->HttpVersion;\r
     HttpInstance->TimeOutMillisec    = HttpConfigData->TimeOutMillisec;\r
     HttpInstance->LocalAddressIsIPv6 = HttpConfigData->LocalAddressIsIPv6;\r
-    \r
-    if (HttpConfigData->LocalAddressIsIPv6) { \r
+\r
+    if (HttpConfigData->LocalAddressIsIPv6) {\r
       CopyMem (\r
         &HttpInstance->Ipv6Node,\r
         HttpConfigData->AccessPoint.IPv6Node,\r
@@ -180,7 +180,7 @@ EfiHttpConfigure (
         sizeof (HttpInstance->IPv4Node)\r
         );\r
     }\r
-    \r
+\r
     //\r
     // Creat Tcp child\r
     //\r
@@ -188,7 +188,7 @@ EfiHttpConfigure (
     if (EFI_ERROR (Status)) {\r
       return Status;\r
     }\r
-    \r
+\r
     HttpInstance->State = HTTP_STATE_HTTP_CONFIGED;\r
     return EFI_SUCCESS;\r
 \r
@@ -201,7 +201,7 @@ EfiHttpConfigure (
     return EFI_SUCCESS;\r
   }\r
 }\r
\r
+\r
 \r
 /**\r
   The Request() function queues an HTTP request to this HTTP instance.\r
@@ -284,8 +284,8 @@ EfiHttpRequest (
   // Only support GET, HEAD, DELETE, PATCH, PUT and POST method in current implementation.\r
   //\r
   if ((Request != NULL) && (Request->Method != HttpMethodGet) &&\r
-      (Request->Method != HttpMethodHead) && (Request->Method != HttpMethodDelete) && \r
-      (Request->Method != HttpMethodPut) && (Request->Method != HttpMethodPost) && \r
+      (Request->Method != HttpMethodHead) && (Request->Method != HttpMethodDelete) &&\r
+      (Request->Method != HttpMethodPut) && (Request->Method != HttpMethodPost) &&\r
       (Request->Method != HttpMethodPatch)) {\r
     return EFI_UNSUPPORTED;\r
   }\r
@@ -307,8 +307,8 @@ EfiHttpRequest (
     //\r
     // Request would be NULL only for PUT/POST/PATCH operation (in the current implementation)\r
     //\r
-    if ((HttpInstance->Method != HttpMethodPut) && \r
-        (HttpInstance->Method != HttpMethodPost) && \r
+    if ((HttpInstance->Method != HttpMethodPut) &&\r
+        (HttpInstance->Method != HttpMethodPost) &&\r
         (HttpInstance->Method != HttpMethodPatch)) {\r
       return EFI_INVALID_PARAMETER;\r
     }\r
@@ -358,7 +358,7 @@ EfiHttpRequest (
     UnicodeStrToAsciiStrS (Request->Url, Url, UrlLen);\r
 \r
     //\r
-    // From the information in Url, the HTTP instance will \r
+    // From the information in Url, the HTTP instance will\r
     // be able to determine whether to use http or https.\r
     //\r
     HttpInstance->UseHttps = IsHttpsUrl (Url);\r
@@ -367,7 +367,7 @@ EfiHttpRequest (
     // HTTP is disabled, return directly if the URI is not HTTPS.\r
     //\r
     if (!PcdGetBool (PcdAllowHttpConnections) && !(HttpInstance->UseHttps)) {\r
-      \r
+\r
       DEBUG ((EFI_D_ERROR, "EfiHttpRequest: HTTP is disabled.\n"));\r
 \r
       return EFI_ACCESS_DENIED;\r
@@ -434,9 +434,9 @@ EfiHttpRequest (
       ReConfigure = FALSE;\r
     } else {\r
       if ((HttpInstance->RemotePort == RemotePort) &&\r
-          (AsciiStrCmp (HttpInstance->RemoteHost, HostName) == 0) && \r
-          (!HttpInstance->UseHttps || (HttpInstance->UseHttps && \r
-                                       !TlsConfigure && \r
+          (AsciiStrCmp (HttpInstance->RemoteHost, HostName) == 0) &&\r
+          (!HttpInstance->UseHttps || (HttpInstance->UseHttps &&\r
+                                       !TlsConfigure &&\r
                                        HttpInstance->TlsSessionState == EfiTlsSessionDataTransferring))) {\r
         //\r
         // Host Name and port number of the request URL are the same with previous call to Request().\r
@@ -495,7 +495,7 @@ EfiHttpRequest (
         }\r
       }\r
     }\r
-  } \r
+  }\r
 \r
   if (Configure) {\r
     //\r
@@ -514,14 +514,14 @@ EfiHttpRequest (
         Status = EFI_OUT_OF_RESOURCES;\r
         goto Error1;\r
       }\r
-      \r
+\r
       AsciiStrToUnicodeStrS (HostName, HostNameStr, HostNameSize);\r
       if (!HttpInstance->LocalAddressIsIPv6) {\r
         Status = HttpDns4 (HttpInstance, HostNameStr, &HttpInstance->RemoteAddr);\r
       } else {\r
         Status = HttpDns6 (HttpInstance, HostNameStr, &HttpInstance->RemoteIpv6Addr);\r
       }\r
-      \r
+\r
       FreePool (HostNameStr);\r
       if (EFI_ERROR (Status)) {\r
         DEBUG ((EFI_D_ERROR, "Error: Could not retrieve the host address from DNS server.\n"));\r
@@ -553,10 +553,10 @@ EfiHttpRequest (
       if (EFI_ERROR (Status)) {\r
         goto Error1;\r
       }\r
-      \r
+\r
       TlsCloseTxRxEvent (HttpInstance);\r
     }\r
-    \r
+\r
     HttpCloseConnection (HttpInstance);\r
     EfiHttpCancel (This, NULL);\r
   }\r
@@ -575,11 +575,11 @@ EfiHttpRequest (
   if (Request != NULL) {\r
     Wrap->TcpWrap.Method = Request->Method;\r
   }\r
-  \r
+\r
   Status = HttpInitSession (\r
-             HttpInstance, \r
-             Wrap, \r
-             Configure || ReConfigure, \r
+             HttpInstance,\r
+             Wrap,\r
+             Configure || ReConfigure,\r
              TlsConfigure\r
              );\r
   if (EFI_ERROR (Status)) {\r
@@ -588,14 +588,14 @@ EfiHttpRequest (
 \r
   if (!Configure && !ReConfigure && !TlsConfigure) {\r
     //\r
-    // For the new HTTP token, create TX TCP token events.    \r
+    // For the new HTTP token, create TX TCP token events.\r
     //\r
     Status = HttpCreateTcpTxEvent (Wrap);\r
     if (EFI_ERROR (Status)) {\r
       goto Error1;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Create request message.\r
   //\r
@@ -647,11 +647,11 @@ EfiHttpRequest (
              RequestMsgSize\r
              );\r
   if (EFI_ERROR (Status)) {\r
-    goto Error5;    \r
+    goto Error5;\r
   }\r
 \r
   DispatchDpc ();\r
-  \r
+\r
   if (HostName != NULL) {\r
     FreePool (HostName);\r
   }\r
@@ -659,7 +659,7 @@ EfiHttpRequest (
   if (UrlParser != NULL) {\r
     HttpUrlFreeParser (UrlParser);\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 \r
 Error5:\r
@@ -674,7 +674,7 @@ Error5:
 Error4:\r
   if (RequestMsg != NULL) {\r
     FreePool (RequestMsg);\r
-  }  \r
+  }\r
 \r
 Error3:\r
   if (HttpInstance->UseHttps) {\r
@@ -684,7 +684,7 @@ Error3:
 \r
 Error2:\r
   HttpCloseConnection (HttpInstance);\r
-  \r
+\r
   HttpCloseTcpConnCloseEvent (HttpInstance);\r
   if (NULL != Wrap->TcpWrap.Tx4Token.CompletionToken.Event) {\r
     gBS->CloseEvent (Wrap->TcpWrap.Tx4Token.CompletionToken.Event);\r
@@ -707,12 +707,12 @@ Error1:
   }\r
 \r
   return Status;\r
-  \r
+\r
 }\r
 \r
 /**\r
-  Cancel a user's Token. \r
\r
+  Cancel a user's Token.\r
+\r
   @param[in]  Map                The HTTP instance's token queue.\r
   @param[in]  Item               Object container for one HTTP token and token's wrap.\r
   @param[in]  Context            The user's token to cancel.\r
@@ -746,7 +746,7 @@ HttpCancelTokens (
   Wrap = (HTTP_TOKEN_WRAP *) Item->Value;\r
   ASSERT (Wrap != NULL);\r
   HttpInstance = Wrap->HttpInstance;\r
-  \r
+\r
   if (!HttpInstance->LocalAddressIsIPv6) {\r
     if (Wrap->TcpWrap.Rx4Token.CompletionToken.Event != NULL) {\r
       //\r
@@ -781,7 +781,7 @@ HttpCancelTokens (
     return EFI_ABORTED;\r
   }\r
 \r
-  return EFI_SUCCESS; \r
+  return EFI_SUCCESS;\r
 }\r
 \r
 /**\r
@@ -794,7 +794,7 @@ HttpCancelTokens (
                                  cancelled.\r
 \r
   @retval EFI_SUCCESS            The token is cancelled.\r
-  @retval EFI_NOT_FOUND          The asynchronous request or response token is not found.                                 \r
+  @retval EFI_NOT_FOUND          The asynchronous request or response token is not found.\r
   @retval Others                 Other error as indicated.\r
 \r
 **/\r
@@ -814,7 +814,7 @@ HttpCancel (
     if (Token != NULL) {\r
       if (Status == EFI_ABORTED) {\r
         return EFI_SUCCESS;\r
-      } \r
+      }\r
     } else {\r
       return Status;\r
     }\r
@@ -843,7 +843,7 @@ HttpCancel (
       HttpInstance->Tcp6->Cancel (HttpInstance->Tcp6, &HttpInstance->Tcp6TlsRxToken.CompletionToken);\r
     }\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -936,7 +936,7 @@ HttpBodyParserCallback (
   } else {\r
     Wrap->HttpInstance->NextMsg = NULL;\r
   }\r
-  \r
+\r
 \r
   //\r
   // Free Tx4Token or Tx6Token since already received corrsponding HTTP response.\r
@@ -953,7 +953,7 @@ HttpBodyParserCallback (
 \r
   @retval EFI_SUCCESS             Allocation succeeded.\r
   @retval EFI_OUT_OF_RESOURCES    Failed to complete the opration due to lack of resources.\r
-  @retval EFI_NOT_READY           Can't find a corresponding Tx4Token/Tx6Token or \r
+  @retval EFI_NOT_READY           Can't find a corresponding Tx4Token/Tx6Token or\r
                                   the EFI_HTTP_UTILITIES_PROTOCOL is not available.\r
 \r
 **/\r
@@ -983,7 +983,7 @@ HttpResponseWorker (
   if (Wrap == NULL || Wrap->HttpInstance == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   HttpInstance = Wrap->HttpInstance;\r
   Token = Wrap->HttpToken;\r
   HttpMsg = Token->Message;\r
@@ -998,7 +998,7 @@ HttpResponseWorker (
   ValueInItem               = NULL;\r
   Fragment.Len              = 0;\r
   Fragment.Bulk             = NULL;\r
\r
+\r
   if (HttpMsg->Data.Response != NULL) {\r
     //\r
     // Check whether we have cached header from previous call.\r
@@ -1025,8 +1025,8 @@ HttpResponseWorker (
       //\r
       // Check whether we cached the whole HTTP headers.\r
       //\r
-      EndofHeader = AsciiStrStr (HttpHeaders, HTTP_END_OF_HDR_STR); \r
-    }   \r
+      EndofHeader = AsciiStrStr (HttpHeaders, HTTP_END_OF_HDR_STR);\r
+    }\r
 \r
     HttpInstance->EndofHeader = &EndofHeader;\r
     HttpInstance->HttpHeaders = &HttpHeaders;\r
@@ -1239,7 +1239,7 @@ HttpResponseWorker (
       //\r
       // We have a cached HTTP message which includes a part of HTTP header of next message.\r
       //\r
-      BodyLen = HttpInstance->NextMsg - (HttpInstance->CacheBody + HttpInstance->CacheOffset);      \r
+      BodyLen = HttpInstance->NextMsg - (HttpInstance->CacheBody + HttpInstance->CacheOffset);\r
     } else {\r
       BodyLen = HttpInstance->CacheLen - HttpInstance->CacheOffset;\r
     }\r
@@ -1274,7 +1274,7 @@ HttpResponseWorker (
       //\r
       Status = EFI_SUCCESS;\r
       goto Exit;\r
-    } \r
+    }\r
 \r
     if (BodyLen == 0 && HttpInstance->MsgParser == NULL) {\r
       //\r
@@ -1282,8 +1282,8 @@ HttpResponseWorker (
       //\r
       HttpMsg->BodyLength = 0;\r
       Status = EFI_SUCCESS;\r
-      goto Exit;      \r
-    }    \r
+      goto Exit;\r
+    }\r
   }\r
 \r
   ASSERT (HttpInstance->MsgParser != NULL);\r
@@ -1297,7 +1297,7 @@ HttpResponseWorker (
     if (EFI_ERROR (Status)) {\r
       goto Error2;\r
     }\r
-    \r
+\r
   } else {\r
     if (HttpInstance->TimeoutEvent == NULL) {\r
       //\r
@@ -1322,11 +1322,11 @@ HttpResponseWorker (
     if (EFI_ERROR (Status)) {\r
       goto Error2;\r
     }\r
-  \r
+\r
     Status = HttpsReceive (HttpInstance, &Fragment, HttpInstance->TimeoutEvent);\r
 \r
     gBS->SetTimer (HttpInstance->TimeoutEvent, TimerCancel, 0);\r
-    \r
+\r
     if (EFI_ERROR (Status)) {\r
       goto Error2;\r
     }\r
@@ -1357,19 +1357,19 @@ HttpResponseWorker (
     if (HttpInstance->NextMsg != NULL) {\r
       HttpMsg->BodyLength = MIN ((UINTN) HttpInstance->NextMsg - (UINTN) Fragment.Bulk, HttpMsg->BodyLength);\r
       CopyMem (HttpMsg->Body, Fragment.Bulk, HttpMsg->BodyLength);\r
-      \r
+\r
       HttpInstance->CacheLen = Fragment.Len - HttpMsg->BodyLength;\r
       if (HttpInstance->CacheLen != 0) {\r
         if (HttpInstance->CacheBody != NULL) {\r
           FreePool (HttpInstance->CacheBody);\r
         }\r
-        \r
+\r
         HttpInstance->CacheBody = AllocateZeroPool (HttpInstance->CacheLen);\r
         if (HttpInstance->CacheBody == NULL) {\r
           Status = EFI_OUT_OF_RESOURCES;\r
           goto Error2;\r
         }\r
-        \r
+\r
         CopyMem (HttpInstance->CacheBody, Fragment.Bulk + HttpMsg->BodyLength, HttpInstance->CacheLen);\r
         HttpInstance->CacheOffset = 0;\r
 \r
@@ -1383,7 +1383,7 @@ HttpResponseWorker (
         if (HttpInstance->CacheBody != NULL) {\r
           FreePool (HttpInstance->CacheBody);\r
         }\r
-        \r
+\r
         HttpInstance->CacheBody = AllocateZeroPool (HttpInstance->CacheLen);\r
         if (HttpInstance->CacheBody == NULL) {\r
           Status = EFI_OUT_OF_RESOURCES;\r
@@ -1438,7 +1438,7 @@ Error:
   } else {\r
     FreePool (Wrap);\r
   }\r
-  \r
+\r
   if (HttpHeaders != NULL) {\r
     FreePool (HttpHeaders);\r
     HttpHeaders = NULL;\r
@@ -1467,7 +1467,7 @@ Error:
 \r
   gBS->SignalEvent (Token->Event);\r
 \r
-  return Status;  \r
+  return Status;\r
 \r
 }\r
 \r
@@ -1539,7 +1539,7 @@ EfiHttpResponse (
   if (HttpMsg == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);\r
 \r
   if (HttpInstance->State != HTTP_STATE_TCP_CONNECTED) {\r
@@ -1550,7 +1550,7 @@ EfiHttpResponse (
   // Check whether the token already existed.\r
   //\r
   if (EFI_ERROR (NetMapIterate (&HttpInstance->RxTokens, HttpTokenExist, Token))) {\r
-    return EFI_ACCESS_DENIED;   \r
+    return EFI_ACCESS_DENIED;\r
   }\r
 \r
   Wrap = AllocateZeroPool (sizeof (HTTP_TOKEN_WRAP));\r
@@ -1562,8 +1562,8 @@ EfiHttpResponse (
   Wrap->HttpToken    = Token;\r
 \r
   //\r
-  // Notes: For Https, receive token wrapped in HTTP_TOKEN_WRAP is not used to \r
-  // receive the https response. A special TlsRxToken is used for receiving TLS \r
+  // Notes: For Https, receive token wrapped in HTTP_TOKEN_WRAP is not used to\r
+  // receive the https response. A special TlsRxToken is used for receiving TLS\r
   // related messages. It should be a blocking response.\r
   //\r
   if (!HttpInstance->UseHttps) {\r
@@ -1597,9 +1597,9 @@ Error:
       gBS->CloseEvent (Wrap->TcpWrap.Rx6Token.CompletionToken.Event);\r
     }\r
     FreePool (Wrap);\r
-  }  \r
+  }\r
 \r
-  return Status;  \r
+  return Status;\r
 }\r
 \r
 /**\r
@@ -1640,7 +1640,7 @@ EfiHttpPoll (
   if (HttpInstance->State != HTTP_STATE_TCP_CONNECTED) {\r
     return EFI_NOT_STARTED;\r
   }\r
-  \r
+\r
   if (HttpInstance->LocalAddressIsIPv6) {\r
     if (HttpInstance->Tcp6 == NULL) {\r
       return EFI_NOT_STARTED;\r
@@ -1652,8 +1652,8 @@ EfiHttpPoll (
     }\r
     Status = HttpInstance->Tcp4->Poll (HttpInstance->Tcp4);\r
   }\r
-  \r
+\r
   DispatchDpc ();\r
\r
+\r
   return Status;\r
 }\r
index 6550ce0375bedfd41a649b75c579f526dc0e9969..de6f597b95ccda3d09e4952067fd9759022000a5 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   The header files of implementation of EFI_HTTP_PROTOCOL protocol interfaces.\r
 \r
-  Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
-  (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>  \r
+  Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
 \r
   @param[in]  This                Pointer to EFI_HTTP_PROTOCOL instance.\r
   @param[out] HttpConfigData      Point to buffer for operational parameters of this\r
-                                  HTTP instance. It is the responsibility of the caller \r
-                                  to allocate the memory for HttpConfigData and \r
-                                  HttpConfigData->AccessPoint.IPv6Node/IPv4Node. In fact, \r
-                                  it is recommended to allocate sufficient memory to record \r
+                                  HTTP instance. It is the responsibility of the caller\r
+                                  to allocate the memory for HttpConfigData and\r
+                                  HttpConfigData->AccessPoint.IPv6Node/IPv4Node. In fact,\r
+                                  it is recommended to allocate sufficient memory to record\r
                                   IPv6Node since it is big enough for all possibilities.\r
 \r
   @retval EFI_SUCCESS             Operation succeeded.\r
   @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:\r
                                   This is NULL.\r
                                   HttpConfigData is NULL.\r
-                                  HttpConfigData->AccessPoint.IPv4Node or \r
+                                  HttpConfigData->AccessPoint.IPv4Node or\r
                                   HttpConfigData->AccessPoint.IPv6Node is NULL.\r
   @retval EFI_NOT_STARTED         This EFI HTTP Protocol instance has not been started.\r
 \r
@@ -65,7 +65,7 @@ EfiHttpGetModeData (
   connections with remote hosts, canceling all asynchronous tokens, and flush request\r
   and response buffers without informing the appropriate hosts.\r
 \r
-  No other EFI HTTP function can be executed by this instance until the Configure() \r
+  No other EFI HTTP function can be executed by this instance until the Configure()\r
   function is executed and returns successfully.\r
 \r
   @param[in]  This                Pointer to EFI_HTTP_PROTOCOL instance.\r
index 35c4a166c445a47ae785e02f23f6fdc904006056..5356cd35c0f3d972bf987aad0cc8d36ed61aa2a5 100644 (file)
@@ -16,7 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include "HttpDriver.h"\r
 \r
 /**\r
-  The common notify function used in HTTP driver. \r
+  The common notify function used in HTTP driver.\r
 \r
   @param[in]  Event   The event signaled.\r
   @param[in]  Context The context.\r
@@ -54,10 +54,10 @@ HttpTcpTransmitNotifyDpc (
   if (Context == NULL) {\r
     return ;\r
   }\r
-  \r
+\r
   Wrap         = (HTTP_TOKEN_WRAP *) Context;\r
   HttpInstance = Wrap->HttpInstance;\r
-  \r
+\r
   if (!HttpInstance->LocalAddressIsIPv6) {\r
       Wrap->HttpToken->Status = Wrap->TcpWrap.Tx4Token.CompletionToken.Status;\r
       gBS->SignalEvent (Wrap->HttpToken->Event);\r
@@ -72,11 +72,11 @@ HttpTcpTransmitNotifyDpc (
       if (Wrap->TcpWrap.Tx4Token.CompletionToken.Event != NULL) {\r
         gBS->CloseEvent (Wrap->TcpWrap.Tx4Token.CompletionToken.Event);\r
       }\r
-      \r
+\r
   } else {\r
     Wrap->HttpToken->Status = Wrap->TcpWrap.Tx6Token.CompletionToken.Status;\r
     gBS->SignalEvent (Wrap->HttpToken->Event);\r
-    \r
+\r
     //\r
     // Free resources.\r
     //\r
@@ -86,7 +86,7 @@ HttpTcpTransmitNotifyDpc (
 \r
     if (Wrap->TcpWrap.Tx6Token.CompletionToken.Event != NULL) {\r
       gBS->CloseEvent (Wrap->TcpWrap.Tx6Token.CompletionToken.Event);\r
-    }   \r
+    }\r
   }\r
 \r
 \r
@@ -145,11 +145,11 @@ HttpTcpReceiveNotifyDpc (
   Wrap = (HTTP_TOKEN_WRAP *) Context;\r
   HttpInstance = Wrap->HttpInstance;\r
   UsingIpv6    = HttpInstance->LocalAddressIsIPv6;\r
-  \r
+\r
   if (UsingIpv6) {\r
     gBS->CloseEvent (Wrap->TcpWrap.Rx6Token.CompletionToken.Event);\r
     Wrap->TcpWrap.Rx6Token.CompletionToken.Event = NULL;\r
-    \r
+\r
     if (EFI_ERROR (Wrap->TcpWrap.Rx6Token.CompletionToken.Status)) {\r
       DEBUG ((EFI_D_ERROR, "HttpTcpReceiveNotifyDpc: %r!\n", Wrap->TcpWrap.Rx6Token.CompletionToken.Status));\r
       Wrap->HttpToken->Status = Wrap->TcpWrap.Rx6Token.CompletionToken.Status;\r
@@ -159,30 +159,30 @@ HttpTcpReceiveNotifyDpc (
       if (Item != NULL) {\r
         NetMapRemoveItem (&HttpInstance->RxTokens, Item, NULL);\r
       }\r
-      \r
+\r
       FreePool (Wrap);\r
       Wrap = NULL;\r
-      \r
+\r
       return ;\r
     }\r
 \r
   } else {\r
     gBS->CloseEvent (Wrap->TcpWrap.Rx4Token.CompletionToken.Event);\r
     Wrap->TcpWrap.Rx4Token.CompletionToken.Event = NULL;\r
-    \r
+\r
     if (EFI_ERROR (Wrap->TcpWrap.Rx4Token.CompletionToken.Status)) {\r
       DEBUG ((EFI_D_ERROR, "HttpTcpReceiveNotifyDpc: %r!\n", Wrap->TcpWrap.Rx4Token.CompletionToken.Status));\r
       Wrap->HttpToken->Status = Wrap->TcpWrap.Rx4Token.CompletionToken.Status;\r
       gBS->SignalEvent (Wrap->HttpToken->Event);\r
-      \r
+\r
       Item = NetMapFindKey (&HttpInstance->RxTokens, Wrap->HttpToken);\r
       if (Item != NULL) {\r
         NetMapRemoveItem (&HttpInstance->RxTokens, Item, NULL);\r
       }\r
-      \r
+\r
       FreePool (Wrap);\r
       Wrap = NULL;\r
-      \r
+\r
       return ;\r
     }\r
   }\r
@@ -220,7 +220,7 @@ HttpTcpReceiveNotifyDpc (
   // We receive part of header of next HTTP msg.\r
   //\r
   if (HttpInstance->NextMsg != NULL) {\r
-    Wrap->HttpToken->Message->BodyLength = HttpInstance->NextMsg - \r
+    Wrap->HttpToken->Message->BodyLength = HttpInstance->NextMsg -\r
                                            (CHAR8 *) Wrap->HttpToken->Message->Body;\r
     HttpInstance->CacheLen = Length - Wrap->HttpToken->Message->BodyLength;\r
     if (HttpInstance->CacheLen != 0) {\r
@@ -246,7 +246,7 @@ HttpTcpReceiveNotifyDpc (
   } else {\r
     Wrap->HttpToken->Status = Wrap->TcpWrap.Rx4Token.CompletionToken.Status;\r
   }\r
-  \r
+\r
 \r
   gBS->SignalEvent (Wrap->HttpToken->Event);\r
 \r
@@ -323,7 +323,7 @@ HttpCreateTcpConnCloseEvent (
     if (EFI_ERROR (Status)) {\r
       goto ERROR;\r
     }\r
-    \r
+\r
   } else {\r
     //\r
     // Create events for variuos asynchronous operations.\r
@@ -353,7 +353,7 @@ HttpCreateTcpConnCloseEvent (
       goto ERROR;\r
     }\r
   }\r
-     \r
+\r
   return EFI_SUCCESS;\r
 \r
 ERROR:\r
@@ -401,7 +401,7 @@ HttpCloseTcpConnCloseEvent (
       HttpInstance->Tcp4CloseToken.CompletionToken.Event = NULL;\r
     }\r
   }\r
-  \r
+\r
 }\r
 \r
 /**\r
@@ -436,7 +436,7 @@ HttpCreateTcpTxEvent (
     if (EFI_ERROR (Status)) {\r
       return Status;\r
     }\r
-  \r
+\r
     TcpWrap->Tx4Data.Push = TRUE;\r
     TcpWrap->Tx4Data.Urgent = FALSE;\r
     TcpWrap->Tx4Data.FragmentCount = 1;\r
@@ -460,9 +460,9 @@ HttpCreateTcpTxEvent (
     TcpWrap->Tx6Data.FragmentCount  = 1;\r
     TcpWrap->Tx6Token.Packet.TxData = &Wrap->TcpWrap.Tx6Data;\r
     TcpWrap->Tx6Token.CompletionToken.Status =EFI_NOT_READY;\r
-    \r
+\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -493,7 +493,7 @@ HttpCreateTcpRxEventForHeader (
     if (EFI_ERROR (Status)) {\r
       return Status;\r
     }\r
-    \r
+\r
     HttpInstance->Rx4Data.FragmentCount = 1;\r
     HttpInstance->Rx4Token.Packet.RxData = &HttpInstance->Rx4Data;\r
     HttpInstance->Rx4Token.CompletionToken.Status = EFI_NOT_READY;\r
@@ -513,7 +513,7 @@ HttpCreateTcpRxEventForHeader (
     HttpInstance->Rx6Data.FragmentCount  =1;\r
     HttpInstance->Rx6Token.Packet.RxData = &HttpInstance->Rx6Data;\r
     HttpInstance->Rx6Token.CompletionToken.Status = EFI_NOT_READY;\r
-    \r
+\r
   }\r
 \r
 \r
@@ -531,7 +531,7 @@ HttpCreateTcpRxEventForHeader (
 **/\r
 EFI_STATUS\r
 HttpCreateTcpRxEvent (\r
-  IN  HTTP_TOKEN_WRAP      *Wrap \r
+  IN  HTTP_TOKEN_WRAP      *Wrap\r
   )\r
 {\r
   EFI_STATUS               Status;\r
@@ -551,7 +551,7 @@ HttpCreateTcpRxEvent (
     if (EFI_ERROR (Status)) {\r
       return Status;\r
     }\r
-    \r
+\r
     TcpWrap->Rx4Data.FragmentCount = 1;\r
     TcpWrap->Rx4Token.Packet.RxData = &Wrap->TcpWrap.Rx4Data;\r
     TcpWrap->Rx4Token.CompletionToken.Status = EFI_NOT_READY;\r
@@ -563,7 +563,7 @@ HttpCreateTcpRxEvent (
                     HttpTcpReceiveNotify,\r
                     Wrap,\r
                     &TcpWrap->Rx6Token.CompletionToken.Event\r
-                    );  \r
+                    );\r
     if (EFI_ERROR (Status)) {\r
       return Status;\r
     }\r
@@ -572,7 +572,7 @@ HttpCreateTcpRxEvent (
     TcpWrap->Rx6Token.Packet.RxData = &Wrap->TcpWrap.Rx6Data;\r
     TcpWrap->Rx6Token.CompletionToken.Status = EFI_NOT_READY;\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -580,7 +580,7 @@ HttpCreateTcpRxEvent (
   Close Events for Tcp Receive Tokens for HTTP body and HTTP header.\r
 \r
   @param[in]  Wrap               Pointer to HTTP token's wrap data.\r
-  \r
+\r
 **/\r
 VOID\r
 HttpCloseTcpRxEvent (\r
@@ -591,7 +591,7 @@ HttpCloseTcpRxEvent (
 \r
   ASSERT (Wrap != NULL);\r
   HttpInstance   = Wrap->HttpInstance;\r
-  \r
+\r
   if (HttpInstance->LocalAddressIsIPv6) {\r
     if (Wrap->TcpWrap.Rx6Token.CompletionToken.Event != NULL) {\r
       gBS->CloseEvent (Wrap->TcpWrap.Rx6Token.CompletionToken.Event);\r
@@ -605,7 +605,7 @@ HttpCloseTcpRxEvent (
     if (Wrap->TcpWrap.Rx4Token.CompletionToken.Event != NULL) {\r
       gBS->CloseEvent (Wrap->TcpWrap.Rx4Token.CompletionToken.Event);\r
     }\r
-    \r
+\r
     if (HttpInstance->Rx4Token.CompletionToken.Event != NULL) {\r
       gBS->CloseEvent (HttpInstance->Rx4Token.CompletionToken.Event);\r
       HttpInstance->Rx4Token.CompletionToken.Event = NULL;\r
@@ -619,7 +619,7 @@ HttpCloseTcpRxEvent (
   @param[in, out]  HttpInstance         Pointer to HTTP_PROTOCOL structure.\r
   @param[in]       IpVersion            Indicate us TCP4 protocol or TCP6 protocol.\r
 \r
-  @retval EFI_SUCCESS       HTTP_PROTOCOL structure is initialized successfully.                                          \r
+  @retval EFI_SUCCESS       HTTP_PROTOCOL structure is initialized successfully.\r
   @retval Others            Other error as indicated.\r
 \r
 **/\r
@@ -632,10 +632,10 @@ HttpInitProtocol (
   EFI_STATUS                     Status;\r
   VOID                           *Interface;\r
   BOOLEAN                        UsingIpv6;\r
-  \r
+\r
   ASSERT (HttpInstance != NULL);\r
   UsingIpv6 = IpVersion;\r
-  \r
+\r
   if (!UsingIpv6) {\r
     //\r
     // Create TCP4 child.\r
@@ -659,7 +659,7 @@ HttpInitProtocol (
                     HttpInstance->Service->ControllerHandle,\r
                     EFI_OPEN_PROTOCOL_BY_DRIVER\r
                     );\r
-                    \r
+\r
     if (EFI_ERROR (Status)) {\r
       goto ON_ERROR;\r
     }\r
@@ -710,7 +710,7 @@ HttpInitProtocol (
                     HttpInstance->Service->ControllerHandle,\r
                     EFI_OPEN_PROTOCOL_BY_DRIVER\r
                     );\r
-    \r
+\r
     if (EFI_ERROR (Status)) {\r
       goto ON_ERROR;\r
     }\r
@@ -723,10 +723,10 @@ HttpInitProtocol (
                     HttpInstance->Handle,\r
                     EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER\r
                     );\r
-    \r
+\r
     if (EFI_ERROR(Status)) {\r
       goto ON_ERROR;\r
-    }      \r
+    }\r
 \r
     Status = gBS->OpenProtocol (\r
                     HttpInstance->Service->Tcp6ChildHandle,\r
@@ -741,7 +741,7 @@ HttpInitProtocol (
       goto ON_ERROR;\r
     }\r
   }\r
-  \r
+\r
   HttpInstance->Url = AllocateZeroPool (HTTP_URL_BUFFER_LEN);\r
   if (HttpInstance->Url == NULL) {\r
     Status = EFI_OUT_OF_RESOURCES;\r
@@ -751,7 +751,7 @@ HttpInitProtocol (
   return EFI_SUCCESS;\r
 \r
 ON_ERROR:\r
-  \r
+\r
   if (HttpInstance->Tcp4ChildHandle != NULL) {\r
     gBS->CloseProtocol (\r
            HttpInstance->Tcp4ChildHandle,\r
@@ -765,8 +765,8 @@ ON_ERROR:
            &gEfiTcp4ProtocolGuid,\r
            HttpInstance->Service->Ip4DriverBindingHandle,\r
            HttpInstance->Handle\r
-           );    \r
-    \r
+           );\r
+\r
     NetLibDestroyServiceChild (\r
       HttpInstance->Service->ControllerHandle,\r
       HttpInstance->Service->Ip4DriverBindingHandle,\r
@@ -774,7 +774,7 @@ ON_ERROR:
       HttpInstance->Tcp4ChildHandle\r
       );\r
   }\r
-  \r
+\r
   if (HttpInstance->Service->Tcp4ChildHandle != NULL) {\r
     gBS->CloseProtocol (\r
            HttpInstance->Service->Tcp4ChildHandle,\r
@@ -783,7 +783,7 @@ ON_ERROR:
            HttpInstance->Handle\r
            );\r
   }\r
-  \r
+\r
   if (HttpInstance->Tcp6ChildHandle != NULL) {\r
     gBS->CloseProtocol (\r
            HttpInstance->Tcp6ChildHandle,\r
@@ -798,7 +798,7 @@ ON_ERROR:
            HttpInstance->Service->Ip6DriverBindingHandle,\r
            HttpInstance->Handle\r
            );\r
-    \r
+\r
     NetLibDestroyServiceChild (\r
       HttpInstance->Service->ControllerHandle,\r
       HttpInstance->Service->Ip6DriverBindingHandle,\r
@@ -806,7 +806,7 @@ ON_ERROR:
       HttpInstance->Tcp6ChildHandle\r
       );\r
   }\r
-  \r
+\r
   if (HttpInstance->Service->Tcp6ChildHandle != NULL) {\r
     gBS->CloseProtocol (\r
            HttpInstance->Service->Tcp6ChildHandle,\r
@@ -817,7 +817,7 @@ ON_ERROR:
   }\r
 \r
   return EFI_UNSUPPORTED;\r
-  \r
+\r
 }\r
 \r
 /**\r
@@ -832,7 +832,7 @@ HttpCleanProtocol (
   )\r
 {\r
   HttpCloseConnection (HttpInstance);\r
-  \r
+\r
   HttpCloseTcpConnCloseEvent (HttpInstance);\r
 \r
   if (HttpInstance->TimeoutEvent != NULL) {\r
@@ -855,18 +855,18 @@ HttpCleanProtocol (
     HttpFreeMsgParser (HttpInstance->MsgParser);\r
     HttpInstance->MsgParser = NULL;\r
   }\r
-  \r
+\r
   if (HttpInstance->Url != NULL) {\r
     FreePool (HttpInstance->Url);\r
     HttpInstance->Url = NULL;\r
   }\r
-  \r
+\r
   NetMapClean (&HttpInstance->TxTokens);\r
   NetMapClean (&HttpInstance->RxTokens);\r
 \r
   if (HttpInstance->TlsSb != NULL && HttpInstance->TlsChildHandle != NULL) {\r
     //\r
-    // Destroy the TLS instance.   \r
+    // Destroy the TLS instance.\r
     //\r
     HttpInstance->TlsSb->DestroyChild (HttpInstance->TlsSb, HttpInstance->TlsChildHandle);\r
   }\r
@@ -885,7 +885,7 @@ HttpCleanProtocol (
            HttpInstance->Service->Ip4DriverBindingHandle,\r
            HttpInstance->Handle\r
            );\r
-    \r
+\r
     NetLibDestroyServiceChild (\r
       HttpInstance->Service->ControllerHandle,\r
       HttpInstance->Service->Ip4DriverBindingHandle,\r
@@ -901,7 +901,7 @@ HttpCleanProtocol (
            HttpInstance->Service->Ip4DriverBindingHandle,\r
            HttpInstance->Handle\r
            );\r
-  }  \r
+  }\r
 \r
   if (HttpInstance->Tcp6ChildHandle != NULL) {\r
     gBS->CloseProtocol (\r
@@ -917,7 +917,7 @@ HttpCleanProtocol (
            HttpInstance->Service->Ip6DriverBindingHandle,\r
            HttpInstance->Handle\r
            );\r
-    \r
+\r
     NetLibDestroyServiceChild (\r
       HttpInstance->Service->ControllerHandle,\r
       HttpInstance->Service->Ip6DriverBindingHandle,\r
@@ -925,7 +925,7 @@ HttpCleanProtocol (
       HttpInstance->Tcp6ChildHandle\r
       );\r
   }\r
-  \r
+\r
   if (HttpInstance->Service->Tcp6ChildHandle != NULL) {\r
     gBS->CloseProtocol (\r
            HttpInstance->Service->Tcp6ChildHandle,\r
@@ -935,7 +935,7 @@ HttpCleanProtocol (
            );\r
   }\r
 \r
-  TlsCloseTxRxEvent (HttpInstance); \r
+  TlsCloseTxRxEvent (HttpInstance);\r
 }\r
 \r
 /**\r
@@ -965,13 +965,13 @@ HttpCreateConnection (
       DEBUG ((EFI_D_ERROR, "HttpCreateConnection: Tcp4->Connect() = %r\n", Status));\r
       return Status;\r
     }\r
-    \r
+\r
     while (!HttpInstance->IsTcp4ConnDone) {\r
       HttpInstance->Tcp4->Poll (HttpInstance->Tcp4);\r
     }\r
-    \r
+\r
     Status = HttpInstance->Tcp4ConnToken.CompletionToken.Status;\r
-    \r
+\r
   } else {\r
     HttpInstance->IsTcp6ConnDone = FALSE;\r
     HttpInstance->Tcp6ConnToken.CompletionToken.Status = EFI_NOT_READY;\r
@@ -985,9 +985,9 @@ HttpCreateConnection (
       HttpInstance->Tcp6->Poll (HttpInstance->Tcp6);\r
     }\r
 \r
-    Status = HttpInstance->Tcp6ConnToken.CompletionToken.Status;   \r
+    Status = HttpInstance->Tcp6ConnToken.CompletionToken.Status;\r
   }\r
-  \r
+\r
   if (!EFI_ERROR (Status)) {\r
     HttpInstance->State = HTTP_STATE_TCP_CONNECTED;\r
   }\r
@@ -1024,7 +1024,7 @@ HttpCloseConnection (
       while (!HttpInstance->IsTcp6CloseDone) {\r
         HttpInstance->Tcp6->Poll (HttpInstance->Tcp6);\r
       }\r
-      \r
+\r
     } else {\r
       HttpInstance->Tcp4CloseToken.AbortOnClose = TRUE;\r
       HttpInstance->IsTcp4CloseDone             = FALSE;\r
@@ -1070,7 +1070,7 @@ HttpConfigureTcp4 (
 \r
   Tcp4CfgData = &HttpInstance->Tcp4CfgData;\r
   ZeroMem (Tcp4CfgData, sizeof (EFI_TCP4_CONFIG_DATA));\r
-  \r
+\r
   Tcp4CfgData->TypeOfService = HTTP_TOS_DEAULT;\r
   Tcp4CfgData->TimeToLive    = HTTP_TTL_DEAULT;\r
   Tcp4CfgData->ControlOption = &HttpInstance->Tcp4Option;\r
@@ -1081,7 +1081,7 @@ HttpConfigureTcp4 (
     IP4_COPY_ADDRESS (&Tcp4AP->StationAddress, &HttpInstance->IPv4Node.LocalAddress);\r
     IP4_COPY_ADDRESS (&Tcp4AP->SubnetMask, &HttpInstance->IPv4Node.LocalSubnet);\r
   }\r
-  \r
+\r
   Tcp4AP->StationPort = HttpInstance->IPv4Node.LocalPort;\r
   Tcp4AP->RemotePort  = HttpInstance->RemotePort;\r
   Tcp4AP->ActiveFlag  = TRUE;\r
@@ -1141,16 +1141,16 @@ HttpConfigureTcp6 (
   EFI_TCP6_CONFIG_DATA     *Tcp6CfgData;\r
   EFI_TCP6_ACCESS_POINT    *Tcp6Ap;\r
   EFI_TCP6_OPTION          *Tcp6Option;\r
-  \r
+\r
   ASSERT (HttpInstance != NULL);\r
-  \r
+\r
   Tcp6CfgData = &HttpInstance->Tcp6CfgData;\r
   ZeroMem (Tcp6CfgData, sizeof (EFI_TCP6_CONFIG_DATA));\r
 \r
   Tcp6CfgData->TrafficClass  = 0;\r
   Tcp6CfgData->HopLimit      = 255;\r
   Tcp6CfgData->ControlOption = &HttpInstance->Tcp6Option;\r
-  \r
+\r
   Tcp6Ap  = &Tcp6CfgData->AccessPoint;\r
   Tcp6Ap->ActiveFlag  = TRUE;\r
   Tcp6Ap->StationPort = HttpInstance->Ipv6Node.LocalPort;\r
@@ -1175,7 +1175,7 @@ HttpConfigureTcp6 (
     DEBUG ((EFI_D_ERROR, "HttpConfigureTcp6 - %r\n", Status));\r
     return Status;\r
   }\r
-  \r
+\r
   Status = HttpCreateTcpConnCloseEvent (HttpInstance);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
@@ -1189,11 +1189,11 @@ HttpConfigureTcp6 (
   HttpInstance->State = HTTP_STATE_TCP_CONFIGED;\r
 \r
   return EFI_SUCCESS;\r
\r
+\r
 }\r
 \r
 /**\r
-  Check existing TCP connection, if in error state, recover TCP4 connection. Then, \r
+  Check existing TCP connection, if in error state, recover TCP4 connection. Then,\r
   connect one TLS session if required.\r
 \r
   @param[in]  HttpInstance       The HTTP instance private data.\r
@@ -1217,8 +1217,8 @@ HttpConnectTcp4 (
   }\r
 \r
   Status = HttpInstance->Tcp4->GetModeData(\r
-                                 HttpInstance->Tcp4, \r
-                                 &Tcp4State, \r
+                                 HttpInstance->Tcp4,\r
+                                 &Tcp4State,\r
                                  NULL,\r
                                  NULL,\r
                                  NULL,\r
@@ -1240,7 +1240,7 @@ HttpConnectTcp4 (
     DEBUG ((EFI_D_ERROR, "Tcp4 Connection fail - %x\n", Status));\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Tls session connection.\r
   //\r
@@ -1270,11 +1270,11 @@ HttpConnectTcp4 (
       TlsCloseTxRxEvent (HttpInstance);\r
       return Status;\r
     }\r
-    \r
+\r
     Status = TlsConnectSession (HttpInstance, HttpInstance->TimeoutEvent);\r
 \r
     gBS->SetTimer (HttpInstance->TimeoutEvent, TimerCancel, 0);\r
-    \r
+\r
     if (EFI_ERROR (Status)) {\r
       TlsCloseTxRxEvent (HttpInstance);\r
       return Status;\r
@@ -1285,7 +1285,7 @@ HttpConnectTcp4 (
 }\r
 \r
 /**\r
-  Check existing TCP connection, if in error state, recover TCP6 connection. Then, \r
+  Check existing TCP connection, if in error state, recover TCP6 connection. Then,\r
   connect one TLS session if required.\r
 \r
   @param[in]  HttpInstance       The HTTP instance private data.\r
@@ -1315,7 +1315,7 @@ HttpConnectTcp6 (
                                  NULL,\r
                                  NULL\r
                                  );\r
-  \r
+\r
   if (EFI_ERROR(Status)){\r
      DEBUG ((EFI_D_ERROR, "Tcp6 GetModeData fail - %x\n", Status));\r
      return Status;\r
@@ -1332,7 +1332,7 @@ HttpConnectTcp6 (
     DEBUG ((EFI_D_ERROR, "Tcp6 Connection fail - %x\n", Status));\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Tls session connection.\r
   //\r
@@ -1362,11 +1362,11 @@ HttpConnectTcp6 (
       TlsCloseTxRxEvent (HttpInstance);\r
       return Status;\r
     }\r
-    \r
+\r
     Status = TlsConnectSession (HttpInstance, HttpInstance->TimeoutEvent);\r
 \r
     gBS->SetTimer (HttpInstance->TimeoutEvent, TimerCancel, 0);\r
-    \r
+\r
     if (EFI_ERROR (Status)) {\r
       TlsCloseTxRxEvent (HttpInstance);\r
       return Status;\r
@@ -1384,7 +1384,7 @@ HttpConnectTcp6 (
   @param[in]  Configure          The Flag indicates whether need to initialize session.\r
   @param[in]  TlsConfigure       The Flag indicates whether it's the new Tls session.\r
 \r
-  @retval EFI_SUCCESS            The initialization of session is done. \r
+  @retval EFI_SUCCESS            The initialization of session is done.\r
   @retval Others                 Other error as indicated.\r
 \r
 **/\r
@@ -1446,9 +1446,9 @@ HttpInitSession (
       return Status;\r
     }\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
-  \r
+\r
 }\r
 \r
 /**\r
@@ -1476,7 +1476,7 @@ HttpTransmitTcp (
   EFI_TCP4_PROTOCOL             *Tcp4;\r
   EFI_TCP6_IO_TOKEN             *Tx6Token;\r
   EFI_TCP6_PROTOCOL             *Tcp6;\r
-  UINT8                         *TlsRecord;  \r
+  UINT8                         *TlsRecord;\r
   UINT16                        PayloadSize;\r
   NET_FRAGMENT                  TempFragment;\r
   NET_FRAGMENT                  Fragment;\r
@@ -1522,19 +1522,19 @@ HttpTransmitTcp (
     RemainingLen = TxStringLen;\r
     while (RemainingLen != 0) {\r
       PayloadSize = (UINT16) MIN (TLS_PLAINTEXT_RECORD_MAX_PAYLOAD_LENGTH, RemainingLen);\r
-      \r
+\r
       ((TLS_RECORD_HEADER *) TlsRecord)->ContentType = TlsContentTypeApplicationData;\r
       ((TLS_RECORD_HEADER *) TlsRecord)->Version.Major = HttpInstance->TlsConfigData.Version.Major;\r
       ((TLS_RECORD_HEADER *) TlsRecord)->Version.Minor = HttpInstance->TlsConfigData.Version.Minor;\r
       ((TLS_RECORD_HEADER *) TlsRecord)->Length = PayloadSize;\r
 \r
       CopyMem (TlsRecord + TLS_RECORD_HEADER_LENGTH, TxString + (TxStringLen - RemainingLen), PayloadSize);\r
-      \r
+\r
       Status = TlsProcessMessage (\r
-                 HttpInstance, \r
-                 TlsRecord, \r
-                 TLS_RECORD_HEADER_LENGTH + PayloadSize, \r
-                 EfiTlsEncrypt, \r
+                 HttpInstance,\r
+                 TlsRecord,\r
+                 TLS_RECORD_HEADER_LENGTH + PayloadSize,\r
+                 EfiTlsEncrypt,\r
                  &TempFragment\r
                  );\r
       if (EFI_ERROR (Status)) {\r
@@ -1542,7 +1542,7 @@ HttpTransmitTcp (
       }\r
 \r
       //\r
-      // Record the processed/encrypted Packet. \r
+      // Record the processed/encrypted Packet.\r
       //\r
       CopyMem (Fragment.Bulk + Fragment.Len, TempFragment.Bulk, TempFragment.Len);\r
       Fragment.Len += TempFragment.Len;\r
@@ -1550,7 +1550,7 @@ HttpTransmitTcp (
       FreePool (TempFragment.Bulk);\r
       TempFragment.Len  = 0;\r
       TempFragment.Bulk = NULL;\r
-      \r
+\r
       RemainingLen -= (UINTN) PayloadSize;\r
       ZeroMem (TlsRecord, TLS_RECORD_HEADER_LENGTH + TLS_PLAINTEXT_RECORD_MAX_PAYLOAD_LENGTH);\r
     }\r
@@ -1558,7 +1558,7 @@ HttpTransmitTcp (
     FreePool (TlsRecord);\r
     TlsRecord = NULL;\r
   }\r
-  \r
+\r
   if (!HttpInstance->LocalAddressIsIPv6) {\r
     Tcp4 = HttpInstance->Tcp4;\r
     Tx4Token = &Wrap->TcpWrap.Tx4Token;\r
@@ -1572,9 +1572,9 @@ HttpTransmitTcp (
       Tx4Token->Packet.TxData->FragmentTable[0].FragmentLength = (UINT32) TxStringLen;\r
       Tx4Token->Packet.TxData->FragmentTable[0].FragmentBuffer = (VOID *) TxString;\r
     }\r
-    \r
-    Tx4Token->CompletionToken.Status = EFI_NOT_READY;  \r
-    \r
+\r
+    Tx4Token->CompletionToken.Status = EFI_NOT_READY;\r
+\r
     Wrap->TcpWrap.IsTxDone = FALSE;\r
     Status  = Tcp4->Transmit (Tcp4, Tx4Token);\r
     if (EFI_ERROR (Status)) {\r
@@ -1585,7 +1585,7 @@ HttpTransmitTcp (
   } else {\r
     Tcp6 = HttpInstance->Tcp6;\r
     Tx6Token = &Wrap->TcpWrap.Tx6Token;\r
-    \r
+\r
     if (HttpInstance->UseHttps) {\r
       Tx6Token->Packet.TxData->DataLength = Fragment.Len;\r
       Tx6Token->Packet.TxData->FragmentTable[0].FragmentLength = Fragment.Len;\r
@@ -1595,7 +1595,7 @@ HttpTransmitTcp (
       Tx6Token->Packet.TxData->FragmentTable[0].FragmentLength = (UINT32) TxStringLen;\r
       Tx6Token->Packet.TxData->FragmentTable[0].FragmentBuffer = (VOID *) TxString;\r
     }\r
-    \r
+\r
     Tx6Token->CompletionToken.Status = EFI_NOT_READY;\r
 \r
     Wrap->TcpWrap.IsTxDone = FALSE;\r
@@ -1605,17 +1605,17 @@ HttpTransmitTcp (
       goto ON_ERROR;\r
     }\r
   }\r
-  \r
+\r
   return Status;\r
 \r
 ON_ERROR:\r
-  \r
+\r
   if (HttpInstance->UseHttps) {\r
     if (TlsRecord != NULL) {\r
       FreePool (TlsRecord);\r
       TlsRecord = NULL;\r
     }\r
-    \r
+\r
     if (Fragment.Bulk != NULL) {\r
       FreePool (Fragment.Bulk);\r
       Fragment.Bulk = NULL;\r
@@ -1686,7 +1686,7 @@ HttpTcpNotReady (
   if (!ValueInItem->TcpWrap.IsTxDone) {\r
     return EFI_NOT_READY;\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -1798,8 +1798,8 @@ HttpTcpReceive (
   @param[in, out]  SizeofHeaders    The HTTP header length.\r
   @param[in, out]  BufferSize       The size of buffer to cacahe the header message.\r
   @param[in]       Timeout          The time to wait for receiving the header packet.\r
-  \r
-  @retval EFI_SUCCESS               The HTTP header is received.                          \r
+\r
+  @retval EFI_SUCCESS               The HTTP header is received.\r
   @retval Others                    Other errors as indicated.\r
 \r
 **/\r
@@ -1832,7 +1832,7 @@ HttpTcpReceiveHeader (
   Rx6Token    = NULL;\r
   Fragment.Len  = 0;\r
   Fragment.Bulk = NULL;\r
-  \r
+\r
   if (HttpInstance->LocalAddressIsIPv6) {\r
     ASSERT (Tcp6 != NULL);\r
   } else {\r
@@ -1855,7 +1855,7 @@ HttpTcpReceiveHeader (
         return Status;\r
       }\r
     }\r
-  \r
+\r
     //\r
     // Receive the HTTP headers only when EFI_HTTP_RESPONSE_DATA is not NULL.\r
     //\r
@@ -1887,7 +1887,7 @@ HttpTcpReceiveHeader (
         if (EFI_ERROR (Status)) {\r
           return Status;\r
         }\r
-        \r
+\r
         Fragment.Len  = Rx4Token->Packet.RxData->FragmentTable[0].FragmentLength;\r
         Fragment.Bulk = (UINT8 *) Rx4Token->Packet.RxData->FragmentTable[0].FragmentBuffer;\r
       } else {\r
@@ -1895,7 +1895,7 @@ HttpTcpReceiveHeader (
           FreePool (Fragment.Bulk);\r
           Fragment.Bulk = NULL;\r
         }\r
-        \r
+\r
         Status = HttpsReceive (HttpInstance, &Fragment, Timeout);\r
         if (EFI_ERROR (Status)) {\r
           DEBUG ((EFI_D_ERROR, "Tcp4 receive failed: %r\n", Status));\r
@@ -1931,7 +1931,7 @@ HttpTcpReceiveHeader (
       //\r
       *EndofHeader = AsciiStrStr (*HttpHeaders, HTTP_END_OF_HDR_STR);\r
     };\r
-    \r
+\r
     //\r
     // Free the buffer.\r
     //\r
@@ -1944,7 +1944,7 @@ HttpTcpReceiveHeader (
     if (Fragment.Bulk != NULL) {\r
       FreePool (Fragment.Bulk);\r
       Fragment.Bulk = NULL;\r
-    } \r
+    }\r
   } else {\r
     if (!HttpInstance->UseHttps) {\r
       Rx6Token = &HttpInstance->Rx6Token;\r
@@ -1954,7 +1954,7 @@ HttpTcpReceiveHeader (
         return Status;\r
       }\r
     }\r
-  \r
+\r
     //\r
     // Receive the HTTP headers only when EFI_HTTP_RESPONSE_DATA is not NULL.\r
     //\r
@@ -1986,7 +1986,7 @@ HttpTcpReceiveHeader (
         if (EFI_ERROR (Status)) {\r
           return Status;\r
         }\r
-        \r
+\r
         Fragment.Len  = Rx6Token->Packet.RxData->FragmentTable[0].FragmentLength;\r
         Fragment.Bulk = (UINT8 *) Rx6Token->Packet.RxData->FragmentTable[0].FragmentBuffer;\r
       } else {\r
@@ -1994,7 +1994,7 @@ HttpTcpReceiveHeader (
           FreePool (Fragment.Bulk);\r
           Fragment.Bulk = NULL;\r
         }\r
-        \r
+\r
         Status = HttpsReceive (HttpInstance, &Fragment, Timeout);\r
         if (EFI_ERROR (Status)) {\r
           DEBUG ((EFI_D_ERROR, "Tcp6 receive failed: %r\n", Status));\r
@@ -2028,7 +2028,7 @@ HttpTcpReceiveHeader (
       //\r
       // Check whether we received end of HTTP headers.\r
       //\r
-      *EndofHeader = AsciiStrStr (*HttpHeaders, HTTP_END_OF_HDR_STR); \r
+      *EndofHeader = AsciiStrStr (*HttpHeaders, HTTP_END_OF_HDR_STR);\r
     };\r
 \r
     //\r
@@ -2044,7 +2044,7 @@ HttpTcpReceiveHeader (
       FreePool (Fragment.Bulk);\r
       Fragment.Bulk = NULL;\r
     }\r
-  }     \r
+  }\r
 \r
   //\r
   // Skip the CRLF after the HTTP headers.\r
@@ -2062,7 +2062,7 @@ HttpTcpReceiveHeader (
   @param[in]  Wrap               The HTTP token's wrap data.\r
   @param[in]  HttpMsg            The HTTP message data.\r
 \r
-  @retval EFI_SUCCESS            The HTTP body is received.                          \r
+  @retval EFI_SUCCESS            The HTTP body is received.\r
   @retval Others                 Other error as indicated.\r
 \r
 **/\r
@@ -2078,19 +2078,19 @@ HttpTcpReceiveBody (
   EFI_TCP6_IO_TOKEN         *Rx6Token;\r
   EFI_TCP4_PROTOCOL         *Tcp4;\r
   EFI_TCP4_IO_TOKEN         *Rx4Token;\r
-  \r
+\r
   HttpInstance   = Wrap->HttpInstance;\r
   Tcp4 = HttpInstance->Tcp4;\r
   Tcp6 = HttpInstance->Tcp6;\r
   Rx4Token       = NULL;\r
   Rx6Token       = NULL;\r
-  \r
+\r
   if (HttpInstance->LocalAddressIsIPv6) {\r
     ASSERT (Tcp6 != NULL);\r
   } else {\r
     ASSERT (Tcp4 != NULL);\r
   }\r
-  \r
+\r
   if (HttpInstance->LocalAddressIsIPv6) {\r
     Rx6Token = &Wrap->TcpWrap.Rx6Token;\r
     Rx6Token ->Packet.RxData->DataLength = (UINT32) MIN (MAX_UINT32, HttpMsg->BodyLength);\r
@@ -2108,7 +2108,7 @@ HttpTcpReceiveBody (
     Rx4Token->Packet.RxData->DataLength = (UINT32) MIN (MAX_UINT32, HttpMsg->BodyLength);\r
     Rx4Token->Packet.RxData->FragmentTable[0].FragmentLength = (UINT32) MIN (MAX_UINT32, HttpMsg->BodyLength);\r
     Rx4Token->Packet.RxData->FragmentTable[0].FragmentBuffer = (VOID *) HttpMsg->Body;\r
-    \r
+\r
     Rx4Token->CompletionToken.Status = EFI_NOT_READY;\r
     Status = Tcp4->Receive (Tcp4, Rx4Token);\r
     if (EFI_ERROR (Status)) {\r
@@ -2125,13 +2125,13 @@ HttpTcpReceiveBody (
   Clean up Tcp Tokens while the Tcp transmission error occurs.\r
 \r
   @param[in]  Wrap               Pointer to HTTP token's wrap data.\r
-  \r
+\r
 **/\r
 VOID\r
 HttpTcpTokenCleanup (\r
   IN  HTTP_TOKEN_WRAP      *Wrap\r
   )\r
-{ \r
+{\r
   HTTP_PROTOCOL            *HttpInstance;\r
   EFI_TCP4_IO_TOKEN        *Rx4Token;\r
   EFI_TCP6_IO_TOKEN        *Rx6Token;\r
@@ -2140,10 +2140,10 @@ HttpTcpTokenCleanup (
   HttpInstance   = Wrap->HttpInstance;\r
   Rx4Token       = NULL;\r
   Rx6Token       = NULL;\r
-  \r
+\r
   if (HttpInstance->LocalAddressIsIPv6) {\r
     Rx6Token = &Wrap->TcpWrap.Rx6Token;\r
-    \r
+\r
     if (Rx6Token->CompletionToken.Event != NULL) {\r
       gBS->CloseEvent (Rx6Token->CompletionToken.Event);\r
       Rx6Token->CompletionToken.Event = NULL;\r
@@ -2152,25 +2152,25 @@ HttpTcpTokenCleanup (
     FreePool (Wrap);\r
 \r
     Rx6Token = &HttpInstance->Rx6Token;\r
-    \r
+\r
     if (Rx6Token->CompletionToken.Event != NULL) {\r
       gBS->CloseEvent (Rx6Token->CompletionToken.Event);\r
       Rx6Token->CompletionToken.Event = NULL;\r
     }\r
-    \r
+\r
     if (Rx6Token->Packet.RxData->FragmentTable[0].FragmentBuffer != NULL) {\r
       FreePool (Rx6Token->Packet.RxData->FragmentTable[0].FragmentBuffer);\r
       Rx6Token->Packet.RxData->FragmentTable[0].FragmentBuffer = NULL;\r
     }\r
-    \r
+\r
   } else {\r
     Rx4Token = &Wrap->TcpWrap.Rx4Token;\r
-  \r
+\r
     if (Rx4Token->CompletionToken.Event != NULL) {\r
       gBS->CloseEvent (Rx4Token->CompletionToken.Event);\r
       Rx4Token->CompletionToken.Event = NULL;\r
     }\r
-    \r
+\r
     FreePool (Wrap);\r
 \r
     Rx4Token = &HttpInstance->Rx4Token;\r
@@ -2179,8 +2179,8 @@ HttpTcpTokenCleanup (
       gBS->CloseEvent (Rx4Token->CompletionToken.Event);\r
       Rx4Token->CompletionToken.Event = NULL;\r
     }\r
-    \r
-    \r
+\r
+\r
     if (Rx4Token->Packet.RxData->FragmentTable[0].FragmentBuffer != NULL) {\r
       FreePool (Rx4Token->Packet.RxData->FragmentTable[0].FragmentBuffer);\r
       Rx4Token->Packet.RxData->FragmentTable[0].FragmentBuffer = NULL;\r
index 04d36aaca0a0b9c65b5d138198edcbd67d28cf1d..cc6c1eb566debcb3359466b7c1987e2565c22337 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The header files of miscellaneous routines for HttpDxe driver.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -117,18 +117,18 @@ typedef struct _HTTP_PROTOCOL {
   CHAR8                         *RemoteHost;\r
   UINT16                        RemotePort;\r
   EFI_IPv4_ADDRESS              RemoteAddr;\r
-  \r
+\r
   EFI_HANDLE                    Tcp6ChildHandle;\r
   EFI_TCP6_PROTOCOL             *Tcp6;\r
   EFI_TCP6_CONFIG_DATA          Tcp6CfgData;\r
   EFI_TCP6_OPTION               Tcp6Option;\r
-  \r
+\r
   EFI_TCP6_CONNECTION_TOKEN     Tcp6ConnToken;\r
   BOOLEAN                       IsTcp6ConnDone;\r
   EFI_TCP6_CLOSE_TOKEN          Tcp6CloseToken;\r
   BOOLEAN                       IsTcp6CloseDone;\r
   EFI_IPv6_ADDRESS              RemoteIpv6Addr;\r
\r
+\r
   //\r
   // Rx4Token or Rx6Token used for receiving HTTP header.\r
   //\r
@@ -149,7 +149,7 @@ typedef struct _HTTP_PROTOCOL {
   // HTTP message-body parser.\r
   //\r
   VOID                          *MsgParser;\r
-  \r
+\r
   EFI_HTTP_VERSION              HttpVersion;\r
   UINT32                        TimeOutMillisec;\r
   BOOLEAN                       LocalAddressIsIPv6;\r
@@ -211,7 +211,7 @@ typedef struct {
   )\r
 \r
 /**\r
-  The common notify function used in HTTP driver. \r
+  The common notify function used in HTTP driver.\r
 \r
   @param[in]  Event   The event signaled.\r
   @param[in]  Context The context.\r
@@ -288,14 +288,14 @@ HttpCreateTcpRxEventForHeader (
 **/\r
 EFI_STATUS\r
 HttpCreateTcpRxEvent (\r
-  IN  HTTP_TOKEN_WRAP      *Wrap \r
+  IN  HTTP_TOKEN_WRAP      *Wrap\r
   );\r
 \r
 /**\r
   Close Events for Tcp Receive Tokens for HTTP body and HTTP header.\r
 \r
   @param[in]  Wrap               Pointer to HTTP token's wrap data.\r
-  \r
+\r
 **/\r
 VOID\r
 HttpCloseTcpRxEvent (\r
@@ -308,7 +308,7 @@ HttpCloseTcpRxEvent (
   @param[in, out]  HttpInstance         Pointer to HTTP_PROTOCOL structure.\r
   @param[in]       IpVersion            Indicate us TCP4 protocol or TCP6 protocol.\r
 \r
-  @retval EFI_SUCCESS       HTTP_PROTOCOL structure is initialized successfully.                                          \r
+  @retval EFI_SUCCESS       HTTP_PROTOCOL structure is initialized successfully.\r
   @retval Others            Other error as indicated.\r
 \r
 **/\r
@@ -390,7 +390,7 @@ HttpConfigureTcp6 (
   );\r
 \r
 /**\r
-  Check existing TCP connection, if in error state, recover TCP4 connection. Then, \r
+  Check existing TCP connection, if in error state, recover TCP4 connection. Then,\r
   connect one TLS session if required.\r
 \r
   @param[in]  HttpInstance       The HTTP instance private data.\r
@@ -406,7 +406,7 @@ HttpConnectTcp4 (
   );\r
 \r
 /**\r
-  Check existing TCP connection, if in error state, recover TCP6 connection. Then, \r
+  Check existing TCP connection, if in error state, recover TCP6 connection. Then,\r
   connect one TLS session if required.\r
 \r
   @param[in]  HttpInstance       The HTTP instance private data.\r
@@ -490,7 +490,7 @@ HttpTcpNotReady (
   @param[in]  Configure          The Flag indicates whether need to initialize session.\r
   @param[in]  TlsConfigure       The Flag indicates whether it's the new Tls session.\r
 \r
-  @retval EFI_SUCCESS            The initialization of session is done. \r
+  @retval EFI_SUCCESS            The initialization of session is done.\r
   @retval Others                 Other error as indicated.\r
 \r
 **/\r
@@ -550,7 +550,7 @@ HttpTcpReceive (
   @param[in, out]  BufferSize      The size of buffer to cacahe the header message.\r
   @param[in]       Timeout         The time to wait for receiving the header packet.\r
 \r
-  @retval EFI_SUCCESS              The HTTP header is received.                          \r
+  @retval EFI_SUCCESS              The HTTP header is received.\r
   @retval Others                   Other errors as indicated.\r
 \r
 **/\r
@@ -568,7 +568,7 @@ HttpTcpReceiveHeader (
   @param[in]  Wrap               The HTTP token's wrap data.\r
   @param[in]  HttpMsg            The HTTP message data.\r
 \r
-  @retval EFI_SUCCESS            The HTTP body is received.                          \r
+  @retval EFI_SUCCESS            The HTTP body is received.\r
   @retval Others                 Other error as indicated.\r
 \r
 **/\r
@@ -582,7 +582,7 @@ HttpTcpReceiveBody (
   Clean up Tcp Tokens while the Tcp transmission error occurs.\r
 \r
   @param[in]  Wrap               Pointer to HTTP token's wrap data.\r
-  \r
+\r
 **/\r
 VOID\r
 HttpTcpTokenCleanup (\r
index d658512f6d9fd5e881642b291a751148cc0cbdde..ed883a1f71cee6be747319b9d1d17f515ca1eebd 100644 (file)
@@ -603,9 +603,9 @@ TlsConfigCipherList (
                                 CipherListSize\r
                                 );\r
 \r
-ON_EXIT:  \r
+ON_EXIT:\r
   FreePool (CipherList);\r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -1453,18 +1453,18 @@ TlsCloseSession (
   Process one message according to the CryptMode.\r
 \r
   @param[in]           HttpInstance    Pointer to HTTP_PROTOCOL structure.\r
-  @param[in]           Message         Pointer to the message buffer needed to processed. \r
+  @param[in]           Message         Pointer to the message buffer needed to processed.\r
                                        If ProcessMode is EfiTlsEncrypt, the message contain the TLS\r
                                        header and plain text TLS APP payload.\r
-                                       If ProcessMode is EfiTlsDecrypt, the message contain the TLS \r
+                                       If ProcessMode is EfiTlsDecrypt, the message contain the TLS\r
                                        header and cipher text TLS APP payload.\r
   @param[in]           MessageSize     Pointer to the message buffer size.\r
   @param[in]           ProcessMode     Process mode.\r
   @param[in, out]      Fragment        Only one Fragment returned after the Message is\r
                                        processed successfully.\r
-                                       If ProcessMode is EfiTlsEncrypt, the fragment contain the TLS \r
+                                       If ProcessMode is EfiTlsEncrypt, the fragment contain the TLS\r
                                        header and cipher text TLS APP payload.\r
-                                       If ProcessMode is EfiTlsDecrypt, the fragment contain the TLS \r
+                                       If ProcessMode is EfiTlsDecrypt, the fragment contain the TLS\r
                                        header and plain text TLS APP payload.\r
 \r
   @retval EFI_SUCCESS          Message is processed successfully.\r
index 5d4ca011088542b1a962135d61517bd2098df99f..3329e65168034cb2331a108744b764d8a95bb997 100644 (file)
@@ -217,18 +217,18 @@ TlsCloseSession (
   Process one message according to the CryptMode.\r
 \r
   @param[in]           HttpInstance    Pointer to HTTP_PROTOCOL structure.\r
-  @param[in]           Message         Pointer to the message buffer needed to processed. \r
+  @param[in]           Message         Pointer to the message buffer needed to processed.\r
                                        If ProcessMode is EfiTlsEncrypt, the message contain the TLS\r
                                        header and plain text TLS APP payload.\r
-                                       If ProcessMode is EfiTlsDecrypt, the message contain the TLS \r
+                                       If ProcessMode is EfiTlsDecrypt, the message contain the TLS\r
                                        header and cipher text TLS APP payload.\r
   @param[in]           MessageSize     Pointer to the message buffer size.\r
   @param[in]           ProcessMode     Process mode.\r
   @param[in, out]      Fragment        Only one Fragment returned after the Message is\r
                                        processed successfully.\r
-                                       If ProcessMode is EfiTlsEncrypt, the fragment contain the TLS \r
+                                       If ProcessMode is EfiTlsEncrypt, the fragment contain the TLS\r
                                        header and cipher text TLS APP payload.\r
-                                       If ProcessMode is EfiTlsDecrypt, the fragment contain the TLS \r
+                                       If ProcessMode is EfiTlsDecrypt, the fragment contain the TLS\r
                                        header and plain text TLS APP payload.\r
 \r
   @retval EFI_SUCCESS          Message is processed successfully.\r
index 8c54874b9fa62d80f0579dc68a86225607e4a160..290107880bd9cad52ee3b91392d94bbafc7e4f0b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The DriverEntryPoint and Unload for HttpUtilities driver.\r
 \r
-  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -25,7 +25,7 @@
   @retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.\r
 \r
 **/\r
-EFI_STATUS \r
+EFI_STATUS\r
 EFIAPI\r
 HttpUtilitiesDxeUnload (\r
   IN EFI_HANDLE  ImageHandle\r
@@ -59,11 +59,11 @@ HttpUtilitiesDxeUnload (
     // Firstly, find HttpUtilitiesProtocol interface\r
     //\r
     Status = gBS->OpenProtocol (\r
-                    HandleBuffer[Index], \r
-                    &gEfiHttpUtilitiesProtocolGuid, \r
-                    (VOID **) &HttpUtilitiesProtocol, \r
-                    ImageHandle, \r
-                    NULL, \r
+                    HandleBuffer[Index],\r
+                    &gEfiHttpUtilitiesProtocolGuid,\r
+                    (VOID **) &HttpUtilitiesProtocol,\r
+                    ImageHandle,\r
+                    NULL,\r
                     EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL\r
                     );\r
     if (EFI_ERROR (Status)) {\r
@@ -72,7 +72,7 @@ HttpUtilitiesDxeUnload (
 \r
     //\r
     // Then, uninstall HttpUtilities interface\r
-    // \r
+    //\r
     Status = gBS->UninstallMultipleProtocolInterfaces (\r
                     HandleBuffer[Index],\r
                     &gEfiHttpUtilitiesProtocolGuid, HttpUtilitiesProtocol,\r
@@ -120,7 +120,7 @@ HttpUtilitiesDxeDriverEntryPoint (
                   &mHttpUtilitiesProtocol,\r
                   NULL\r
                   );\r
-  \r
+\r
   return Status;\r
 }\r
 \r
index 0efdcd54298976a59a7a83dc7f7b7186758d17af..11d4a3351e7eeec903c92f65d4da5e109b7dbd59 100644 (file)
@@ -2,15 +2,15 @@
 // This module produces Http Utilities Protocol.\r
 //\r
 // This module produces Http Utilities Protocol.\r
-// \r
 //\r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+//\r
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
 // which accompanies this distribution. The full text of the license may be found at\r
 // http://opensource.org/licenses/bsd-license.php.\r
-// \r
+//\r
 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 //\r
index a9194be736bf462c4be83e57f24fd1d2224e141b..74f1915a5e36fb78f1e8f454a8275d6445bad445 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // HttpUtilitiesDxe Localized Strings and Content\r
 //\r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -13,8 +13,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "UEFI HTTP UTILITIES DXE"\r
 \r
 \r
index 645fca4084d45aa741c1b82c16bebd3539902fa8..a9a1c7c586cc60fba3c6206f8f09c546ec28fa8b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation of EFI_HTTP_PROTOCOL protocol interfaces.\r
 \r
-  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
   (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -91,17 +91,17 @@ HttpUtilitiesBuild (
   NewMessagePtr    = NULL;\r
   *NewMessageSize  = 0;\r
   Status           = EFI_SUCCESS;\r
-  \r
+\r
   if (This == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
   if (SeedMessage != NULL) {\r
     Status = This->Parse (\r
-                     This, \r
-                     SeedMessage, \r
-                     SeedMessageSize, \r
-                     &SeedHeaderFields, \r
+                     This,\r
+                     SeedMessage,\r
+                     SeedMessageSize,\r
+                     &SeedHeaderFields,\r
                      &SeedFieldCount\r
                      );\r
     if (EFI_ERROR (Status)) {\r
@@ -118,15 +118,15 @@ HttpUtilitiesBuild (
       Status = EFI_OUT_OF_RESOURCES;\r
       goto ON_EXIT;\r
     }\r
-    \r
+\r
     for (Index = 0, TempFieldCount = 0; Index < SeedFieldCount; Index++) {\r
       //\r
       // Check whether each SeedHeaderFields member is in DeleteList\r
       //\r
       if (HttpIsValidHttpHeader( DeleteList, DeleteCount, SeedHeaderFields[Index].FieldName)) {\r
         Status = HttpSetFieldNameAndValue (\r
-                   &TempHeaderFields[TempFieldCount], \r
-                   SeedHeaderFields[Index].FieldName, \r
+                   &TempHeaderFields[TempFieldCount],\r
+                   SeedHeaderFields[Index].FieldName,\r
                    SeedHeaderFields[Index].FieldValue\r
                    );\r
         if (EFI_ERROR (Status)) {\r
@@ -151,23 +151,23 @@ HttpUtilitiesBuild (
 \r
   for (Index = 0; Index < TempFieldCount; Index++) {\r
     Status = HttpSetFieldNameAndValue (\r
-               &NewHeaderFields[Index], \r
-               TempHeaderFields[Index].FieldName, \r
+               &NewHeaderFields[Index],\r
+               TempHeaderFields[Index].FieldName,\r
                TempHeaderFields[Index].FieldValue\r
                );\r
     if (EFI_ERROR (Status)) {\r
       goto ON_EXIT;\r
     }\r
   }\r
-  \r
+\r
   NewFieldCount = TempFieldCount;\r
 \r
   for (Index = 0; Index < AppendCount; Index++) {\r
     HttpHeader = HttpFindHeader (NewFieldCount, NewHeaderFields, AppendList[Index]->FieldName);\r
     if (HttpHeader != NULL) {\r
       Status = HttpSetFieldNameAndValue (\r
-                 HttpHeader, \r
-                 AppendList[Index]->FieldName, \r
+                 HttpHeader,\r
+                 AppendList[Index]->FieldName,\r
                  AppendList[Index]->FieldValue\r
                  );\r
       if (EFI_ERROR (Status)) {\r
@@ -175,8 +175,8 @@ HttpUtilitiesBuild (
       }\r
     } else {\r
       Status = HttpSetFieldNameAndValue (\r
-                 &NewHeaderFields[NewFieldCount], \r
-                 AppendList[Index]->FieldName, \r
+                 &NewHeaderFields[NewFieldCount],\r
+                 AppendList[Index]->FieldName,\r
                  AppendList[Index]->FieldValue\r
                  );\r
       if (EFI_ERROR (Status)) {\r
@@ -241,13 +241,13 @@ HttpUtilitiesBuild (
   ASSERT (*NewMessageSize == (UINTN)NewMessagePtr - (UINTN)(*NewMessage));\r
 \r
   //\r
-  // Free allocated buffer \r
+  // Free allocated buffer\r
   //\r
 ON_EXIT:\r
   if (SeedHeaderFields != NULL) {\r
     HttpFreeHeaderFields(SeedHeaderFields, SeedFieldCount);\r
   }\r
-  \r
+\r
   if (TempHeaderFields != NULL) {\r
     HttpFreeHeaderFields(TempHeaderFields, TempFieldCount);\r
   }\r
@@ -255,7 +255,7 @@ ON_EXIT:
   if (NewHeaderFields != NULL) {\r
     HttpFreeHeaderFields(NewHeaderFields, NewFieldCount);\r
   }\r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -298,7 +298,7 @@ HttpUtilitiesParse (
   CHAR8                     *FieldName;\r
   CHAR8                     *FieldValue;\r
   UINTN                     Index;\r
-  \r
+\r
   Status          = EFI_SUCCESS;\r
   TempHttpMessage = NULL;\r
   Token           = NULL;\r
@@ -306,18 +306,18 @@ HttpUtilitiesParse (
   FieldName       = NULL;\r
   FieldValue      = NULL;\r
   Index           = 0;\r
-  \r
+\r
   if (This == NULL || HttpMessage == NULL || HeaderFields == NULL || FieldCount == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   TempHttpMessage = AllocateZeroPool (HttpMessageSize);\r
   if (TempHttpMessage == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r
   CopyMem (TempHttpMessage, HttpMessage, HttpMessageSize);\r
-  \r
+\r
   //\r
   // Get header number\r
   //\r
@@ -339,7 +339,7 @@ HttpUtilitiesParse (
     Status =  EFI_INVALID_PARAMETER;\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   //\r
   // Allocate buffer for header\r
   //\r
@@ -349,9 +349,9 @@ HttpUtilitiesParse (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   CopyMem (TempHttpMessage, HttpMessage, HttpMessageSize);\r
-  \r
+\r
   //\r
   // Set Field and Value to each header\r
   //\r
@@ -371,17 +371,17 @@ HttpUtilitiesParse (
       HttpFreeHeaderFields (*HeaderFields, Index);\r
       goto ON_EXIT;\r
     }\r
-    \r
+\r
     Index++;\r
   }\r
 \r
   //\r
-  // Free allocated buffer \r
+  // Free allocated buffer\r
   //\r
 ON_EXIT:\r
   if (TempHttpMessage != NULL) {\r
     FreePool (TempHttpMessage);\r
   }\r
-  \r
+\r
   return Status;\r
-}
\ No newline at end of file
+}\r
index 46d89d855ca38bb5b53017a2e682bf3fa78d10d2..cb91af3fc310fa718be0880b302a1084236b6c48 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   UEFI Component Name(2) protocol implementation for iSCSI.\r
 \r
-Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -106,11 +106,11 @@ IScsiComponentNameGetDriverName (
 \r
   @param[in]  IScsiExtScsiPassThru  A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.\r
   @param[in]  Ipv6Flag              TRUE if IP6 network stack is used.\r
-  \r
+\r
   @retval EFI_SUCCESS               Update the ControllerNameTable of this instance successfully.\r
   @retval EFI_INVALID_PARAMETER     The input parameter is invalid.\r
   @retval EFI_UNSUPPORTED           Can't get the corresponding NIC info from the Controller handle.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 UpdateName (\r
@@ -126,10 +126,10 @@ UpdateName (
   if (IScsiExtScsiPassThru == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   Private  = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (IScsiExtScsiPassThru);\r
   NicIndex = Private->Session->ConfigData->NicIndex;\r
-    \r
+\r
   UnicodeSPrint (\r
     HandleName,\r
     sizeof (HandleName),\r
@@ -242,14 +242,14 @@ IScsiComponentNameGetControllerName (
   )\r
 {\r
   EFI_STATUS                      Status;\r
-  \r
+\r
   EFI_HANDLE                      IScsiController;\r
   BOOLEAN                         Ipv6Flag;\r
   EFI_GUID                        *IScsiPrivateGuid;\r
   ISCSI_PRIVATE_PROTOCOL          *IScsiIdentifier;\r
-  \r
+\r
   EFI_EXT_SCSI_PASS_THRU_PROTOCOL *IScsiExtScsiPassThru;\r
-  \r
+\r
   if (ControllerHandle == NULL) {\r
     return EFI_UNSUPPORTED;\r
   }\r
@@ -309,7 +309,7 @@ IScsiComponentNameGetControllerName (
         return Status;\r
       }\r
     }\r
-    \r
+\r
     //\r
     // Retrieve an instance of a produced protocol from ChildHandle\r
     //\r
@@ -324,7 +324,7 @@ IScsiComponentNameGetControllerName (
     if (EFI_ERROR (Status)) {\r
       return Status;\r
     }\r
-    \r
+\r
     //\r
     // Update the component name for this child handle.\r
     //\r
index 18c49b952f56d24bd03b72730fa5642be62daa77..da6da3f17ed9fc0e142cf51fe5279200c0d7cacf 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This file is for Challenge-Handshake Authentication Protocol (CHAP) Configuration.\r
 \r
-Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -16,14 +16,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 /**\r
   Initator calculates its own expected hash value.\r
-  \r
+\r
   @param[in]   ChapIdentifier     iSCSI CHAP identifier sent by authenticator.\r
   @param[in]   ChapSecret         iSCSI CHAP secret of the authenticator.\r
   @param[in]   SecretLength       The length of iSCSI CHAP secret.\r
   @param[in]   ChapChallenge      The challenge message sent by authenticator.\r
   @param[in]   ChallengeLength    The length of iSCSI CHAP challenge message.\r
   @param[out]  ChapResponse       The calculation of the expected hash value.\r
-  \r
+\r
   @retval EFI_SUCCESS             The expected hash value was calculatedly successfully.\r
   @retval EFI_PROTOCOL_ERROR      The length of the secret should be at least the\r
                                   length of the hash value for the hashing algorithm chosen.\r
@@ -95,10 +95,10 @@ Exit:
 \r
 /**\r
   The initator checks the CHAP response replied by target against its own\r
-  calculation of the expected hash value. \r
-  \r
-  @param[in]   AuthData             iSCSI CHAP authentication data. \r
-  @param[in]   TargetResponse       The response from target.    \r
+  calculation of the expected hash value.\r
+\r
+  @param[in]   AuthData             iSCSI CHAP authentication data.\r
+  @param[in]   TargetResponse       The response from target.\r
 \r
   @retval EFI_SUCCESS               The response from target passed authentication.\r
   @retval EFI_SECURITY_VIOLATION    The response from target was not expected value.\r
@@ -267,12 +267,12 @@ IScsiCHAPOnRspReceived (
     //\r
     // Process the CHAP identifier and CHAP Challenge from Target.\r
     // Calculate Response value.\r
-    //    \r
+    //\r
     Result = IScsiNetNtoi (Identifier);\r
     if (Result > 0xFF) {\r
       goto ON_EXIT;\r
-    }    \r
-    \r
+    }\r
+\r
     AuthData->InIdentifier      = (UINT32) Result;\r
     AuthData->InChallengeLength = ISCSI_CHAP_AUTH_MAX_LEN;\r
     IScsiHexToBin ((UINT8 *) AuthData->InChallenge, &AuthData->InChallengeLength, Challenge);\r
@@ -331,7 +331,7 @@ ON_EXIT:
 \r
   if (KeyValueList != NULL) {\r
     IScsiFreeKeyValueList (KeyValueList);\r
-  }  \r
+  }\r
 \r
   FreePool (Data);\r
 \r
index 132461b84d25a264f9ebddf481f375439f4490ad..768fc0d9b46cfa58825d984daa24367a2d95b600 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The header file of CHAP configuration.\r
 \r
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -29,7 +29,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 ///\r
 /// MD5_HASHSIZE\r
 ///\r
-#define ISCSI_CHAP_RSP_LEN        16  \r
+#define ISCSI_CHAP_RSP_LEN        16\r
 \r
 #define ISCSI_CHAP_STEP_ONE       1\r
 #define ISCSI_CHAP_STEP_TWO       2\r
index 62df367da78afb23e62d729ccb5a7a1f1638ba2d..893eca61d5b181f668f4e49c812c6f5c2d3c525d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Helper functions for configuring or getting the parameters relating to iSCSI.\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -34,7 +34,7 @@ HII_VENDOR_DEVICE_PATH  mIScsiHiiVendorDevicePath = {
   {\r
     END_DEVICE_PATH_TYPE,\r
     END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
-    { \r
+    {\r
       (UINT8) (END_DEVICE_PATH_LENGTH),\r
       (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)\r
     }\r
@@ -939,7 +939,7 @@ IScsiConvertIfrNvDataToAttemptConfigData (
           L"CHAP Name or CHAP Secret is invalid!",\r
           NULL\r
           );\r
-        \r
+\r
         return EFI_INVALID_PARAMETER;\r
       }\r
 \r
@@ -951,7 +951,7 @@ IScsiConvertIfrNvDataToAttemptConfigData (
           &Key,\r
           L"Reverse CHAP Name or Reverse CHAP Secret is invalid!",\r
           NULL\r
-          );        \r
+          );\r
         return EFI_INVALID_PARAMETER;\r
       }\r
     }\r
@@ -970,7 +970,7 @@ IScsiConvertIfrNvDataToAttemptConfigData (
       if (AttemptName2 == NULL) {\r
         FreePool (AttemptName1);\r
         return EFI_OUT_OF_RESOURCES;\r
-      }      \r
+      }\r
 \r
       AsciiStrToUnicodeStrS (Attempt->AttemptName, AttemptName1, ATTEMPT_NAME_SIZE);\r
       AsciiStrToUnicodeStrS (SameNicAttempt->AttemptName, AttemptName2, ATTEMPT_NAME_SIZE);\r
@@ -988,7 +988,7 @@ IScsiConvertIfrNvDataToAttemptConfigData (
         &Key,\r
         mPrivate->PortString,\r
         NULL\r
-        );       \r
+        );\r
 \r
       FreePool (AttemptName1);\r
       FreePool (AttemptName2);\r
@@ -2026,7 +2026,7 @@ IScsiConfigAddAttempt (
     PortTitleHelpToken = HiiSetString (mCallbackInfo->RegisteredHandle, 0, mPrivate->PortString, NULL);\r
     if (PortTitleHelpToken == 0) {\r
       Status = EFI_INVALID_PARAMETER;\r
-      goto Exit;      \r
+      goto Exit;\r
     }\r
 \r
     HiiCreateGotoOpCode (\r
@@ -2050,14 +2050,14 @@ IScsiConfigAddAttempt (
 Exit:\r
   HiiFreeOpCodeHandle (StartOpCodeHandle);\r
   HiiFreeOpCodeHandle (EndOpCodeHandle);\r
-  \r
+\r
   return Status;\r
 }\r
 \r
 /**\r
   Add the attempts by keyword 'iSCSIAddAttempts', you can use this keyword with\r
   value 'attempt:1 attempt:2' etc to add one or more attempts once. This is different\r
-  with IScsiConfigAddAttempt function which is used to add attempt by UI configuration. \r
+  with IScsiConfigAddAttempt function which is used to add attempt by UI configuration.\r
 \r
   @param[in]  AttemptList        The new attempt List will be added.\r
 \r
@@ -2505,7 +2505,7 @@ IScsiConfigDisplayDeleteAttempts (
              FORMID_DELETE_FORM,              // Form ID\r
              StartOpCodeHandle,               // Label for where to insert opcodes\r
              EndOpCodeHandle                  // Replace data\r
-             );    \r
+             );\r
 \r
   HiiFreeOpCodeHandle (StartOpCodeHandle);\r
   HiiFreeOpCodeHandle (EndOpCodeHandle);\r
@@ -2536,8 +2536,8 @@ IScsiConfigDisplayOrderAttempts (
   EFI_IFR_GUID_LABEL          *StartLabel;\r
   VOID                        *EndOpCodeHandle;\r
   EFI_IFR_GUID_LABEL          *EndLabel;\r
-  VOID                        *OptionsOpCodeHandle;  \r
-  \r
+  VOID                        *OptionsOpCodeHandle;\r
+\r
   Status = IScsiCreateOpCode (\r
              ORDER_ENTRY_LABEL,\r
              &StartOpCodeHandle,\r
@@ -2589,14 +2589,14 @@ IScsiConfigDisplayOrderAttempts (
     DYNAMIC_ORDERED_LIST_QUESTION_ID,           // Question ID\r
     CONFIGURATION_VARSTORE_ID,                  // VarStore ID\r
     DYNAMIC_ORDERED_LIST_VAR_OFFSET,            // Offset in Buffer Storage\r
-    STRING_TOKEN (STR_ORDER_ATTEMPT_ENTRY),     // Question prompt text        \r
-    STRING_TOKEN (STR_ORDER_ATTEMPT_ENTRY),     // Question help text       \r
+    STRING_TOKEN (STR_ORDER_ATTEMPT_ENTRY),     // Question prompt text\r
+    STRING_TOKEN (STR_ORDER_ATTEMPT_ENTRY),     // Question help text\r
     0,                                          // Question flag\r
     EFI_IFR_UNIQUE_SET,                         // Ordered list flag, e.g. EFI_IFR_UNIQUE_SET\r
     EFI_IFR_NUMERIC_SIZE_1,                     // Data type of Question value\r
     ISCSI_MAX_ATTEMPTS_NUM,                     // Maximum container\r
-    OptionsOpCodeHandle,                        // Option Opcode list                        \r
-    NULL                                        // Default Opcode is NULL                               \r
+    OptionsOpCodeHandle,                        // Option Opcode list\r
+    NULL                                        // Default Opcode is NULL\r
     );\r
 \r
 Exit:\r
@@ -2606,11 +2606,11 @@ Exit:
              FORMID_ORDER_FORM,               // Form ID\r
              StartOpCodeHandle,               // Label for where to insert opcodes\r
              EndOpCodeHandle                  // Replace data\r
-             );             \r
+             );\r
 \r
 Error:\r
   HiiFreeOpCodeHandle (StartOpCodeHandle);\r
-  HiiFreeOpCodeHandle (EndOpCodeHandle);  \r
+  HiiFreeOpCodeHandle (EndOpCodeHandle);\r
   if (OptionsOpCodeHandle != NULL) {\r
     HiiFreeOpCodeHandle (OptionsOpCodeHandle);\r
   }\r
@@ -2821,10 +2821,10 @@ IScsiConfigProcessDefault (
       if (AttemptConfigData == NULL || AttemptConfigData->Actived == ISCSI_ACTIVE_ENABLED) {\r
         continue;\r
       }\r
-    \r
+\r
       break;\r
     }\r
-    \r
+\r
     if (Index > PcdGet8 (PcdMaxIScsiAttemptNumber)) {\r
       CreatePopUp (\r
         EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,\r
@@ -2858,7 +2858,7 @@ IScsiConfigProcessDefault (
     // Generate OUI-format ISID based on MAC address.\r
     //\r
     CopyMem (AttemptConfigData->SessionConfigData.IsId, &NicInfo->PermanentAddress, 6);\r
-    AttemptConfigData->SessionConfigData.IsId[0] = \r
+    AttemptConfigData->SessionConfigData.IsId[0] =\r
       (UINT8) (AttemptConfigData->SessionConfigData.IsId[0] & 0x3F);\r
 \r
     //\r
@@ -2908,7 +2908,7 @@ IScsiConfigProcessDefault (
     ZeroMem (IfrNvData->ReverseCHAPName, sizeof (IfrNvData->ReverseCHAPName));\r
     ZeroMem (IfrNvData->ReverseCHAPSecret, sizeof (IfrNvData->ReverseCHAPSecret));\r
   }\r
-  \r
+\r
   IScsiConvertAttemptConfigDataToIfrNvData (AttemptConfigData, IfrNvData);\r
 \r
   //\r
@@ -2921,7 +2921,7 @@ IScsiConfigProcessDefault (
 \r
 \r
 /**\r
-   \r
+\r
   This function allows the caller to request the current\r
   configuration for one or more named elements. The resulting\r
   string is in <ConfigAltResp> format. Also, any and all alternative\r
@@ -2950,7 +2950,7 @@ IScsiConfigProcessDefault (
                          to the most recent "&" before the first\r
                          failing name / value pair (or the beginning\r
                          of the string if the failure is in the first\r
-                         name / value pair) if the request was not successful.                        \r
+                         name / value pair) if the request was not successful.\r
 \r
   @param[out] Results    A null-terminated Unicode string in\r
                          <ConfigAltResp> format which has all values\r
@@ -2971,7 +2971,7 @@ IScsiConfigProcessDefault (
                                   would result in this type of\r
                                   error. In this case, the\r
                                   Progress parameter would be\r
-                                  set to NULL. \r
+                                  set to NULL.\r
 \r
   @retval EFI_NOT_FOUND           Routing data doesn't match any\r
                                   known driver. Progress set to the\r
@@ -3046,7 +3046,7 @@ IScsiFormExtractConfig (
     FreePool (IfrNvData);\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-    \r
+\r
   Status = gIScsiInitiatorName.Get (&gIScsiInitiatorName, &BufferSize, InitiatorName);\r
   if (EFI_ERROR (Status)) {\r
     IfrNvData->InitiatorName[0] = L'\0';\r
@@ -3114,7 +3114,7 @@ IScsiFormExtractConfig (
 \r
 \r
 /**\r
-   \r
+\r
   This function applies changes in a driver's configuration.\r
   Input is a Configuration, which has the routing data for this\r
   driver followed by name / value configuration pairs. The driver\r
@@ -3127,8 +3127,8 @@ IScsiFormExtractConfig (
   @param[in]  This           Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
 \r
   @param[in]  Configuration  A null-terminated Unicode string in\r
-                             <ConfigString> format. \r
-  \r
+                             <ConfigString> format.\r
+\r
   @param[out] Progress       A pointer to a string filled in with the\r
                              offset of the most recent '&' before the\r
                              first failing name / value pair (or the\r
@@ -3139,16 +3139,16 @@ IScsiFormExtractConfig (
 \r
   @retval EFI_SUCCESS             The results have been distributed or are\r
                                   awaiting distribution.\r
-  \r
+\r
   @retval EFI_OUT_OF_RESOURCES    Not enough memory to store the\r
                                   parts of the results that must be\r
                                   stored awaiting possible future\r
                                   protocols.\r
-  \r
+\r
   @retval EFI_INVALID_PARAMETERS  Passing in a NULL for the\r
                                   Results parameter would result\r
                                   in this type of error.\r
-  \r
+\r
   @retval EFI_NOT_FOUND           Target for the specified routing data\r
                                   was not found.\r
 \r
@@ -3374,7 +3374,7 @@ Exit:
 }\r
 \r
 /**\r
-   \r
+\r
   This function is called to provide results data to the driver.\r
   This data consists of a unique key that is used to identify\r
   which data is either being passed back or being asked for.\r
@@ -3383,7 +3383,7 @@ Exit:
   @param[in]       Action        Specifies the type of action taken by the browser.\r
   @param[in]       QuestionId    A unique value which is sent to the original\r
                                  exporting driver so that it can identify the type\r
-                                 of data to expect. The format of the data tends to \r
+                                 of data to expect. The format of the data tends to\r
                                  vary based on the opcode that generated the callback.\r
   @param[in]       Type          The type of value for the question.\r
   @param[in, out]  Value         A pointer to the data being sent to the original\r
@@ -3445,29 +3445,29 @@ IScsiFormCallback (
   }\r
 \r
   Private = ISCSI_FORM_CALLBACK_INFO_FROM_FORM_CALLBACK (This);\r
-  \r
+\r
   //\r
   // Retrieve uncommitted data from Browser\r
   //\r
-  \r
+\r
   BufferSize = sizeof (ISCSI_CONFIG_IFR_NVDATA);\r
   IfrNvData = AllocateZeroPool (BufferSize);\r
   if (IfrNvData == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   IScsiName = (CHAR8 *) AllocateZeroPool (ISCSI_NAME_MAX_SIZE);\r
   if (IScsiName == NULL) {\r
     FreePool (IfrNvData);\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   Status = EFI_SUCCESS;\r
-  \r
+\r
   ZeroMem (&OldIfrNvData, BufferSize);\r
-  \r
+\r
   HiiGetBrowserData (NULL, NULL, BufferSize, (UINT8 *) IfrNvData);\r
-  \r
+\r
   CopyMem (&OldIfrNvData, IfrNvData, BufferSize);\r
 \r
   if (Action == EFI_BROWSER_ACTION_CHANGING) {\r
@@ -3488,10 +3488,10 @@ IScsiFormCallback (
           &Key,\r
           L"Error: please configure iSCSI initiator name first!",\r
           NULL\r
-          );        \r
+          );\r
         break;\r
       }\r
-      \r
+\r
       Status = IScsiConfigAddAttempt ();\r
       break;\r
 \r
@@ -3515,12 +3515,12 @@ IScsiFormCallback (
         );\r
       IScsiConfigDisplayOrderAttempts ();\r
       break;\r
-    \r
+\r
     default:\r
       Status = IScsiConfigProcessDefault (QuestionId, IfrNvData);\r
       break;\r
     }\r
-  } else if (Action == EFI_BROWSER_ACTION_CHANGED) {  \r
+  } else if (Action == EFI_BROWSER_ACTION_CHANGED) {\r
     switch (QuestionId) {\r
     case KEY_INITIATOR_NAME:\r
       UnicodeStrToAsciiStrS (IfrNvData->InitiatorName, IScsiName, ISCSI_NAME_MAX_SIZE);\r
@@ -3533,12 +3533,12 @@ IScsiFormCallback (
           &Key,\r
           L"Invalid iSCSI Name!",\r
           NULL\r
-          );      \r
+          );\r
       }\r
 \r
       *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;\r
       break;\r
-      \r
+\r
     case KEY_SAVE_ATTEMPT_CONFIG:\r
       Status = IScsiConvertIfrNvDataToAttemptConfigData (IfrNvData, Private->Current);\r
       if (EFI_ERROR (Status)) {\r
@@ -3595,17 +3595,17 @@ IScsiFormCallback (
     case KEY_IP_MODE:\r
       switch (Value->u8) {\r
       case IP_MODE_IP6:\r
-        NicInfo = IScsiGetNicInfoByIndex (Private->Current->NicIndex); \r
+        NicInfo = IScsiGetNicInfoByIndex (Private->Current->NicIndex);\r
         if(NicInfo == NULL) {\r
           break;\r
         }\r
 \r
-        if(!NicInfo->Ipv6Available) {                  \r
-             //\r
-          // Current NIC doesn't Support IPv6, hence use IPv4.    \r
-          //    \r
+        if(!NicInfo->Ipv6Available) {\r
+          //\r
+          // Current NIC doesn't Support IPv6, hence use IPv4.\r
+          //\r
           IfrNvData->IpMode = IP_MODE_IP4;\r
-               \r
+\r
           CreatePopUp (\r
             EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,\r
             &Key,\r
@@ -3613,7 +3613,7 @@ IScsiFormCallback (
             NULL\r
             );\r
         }\r
-         \r
+\r
       case IP_MODE_IP4:\r
         ZeroMem (IfrNvData->LocalIp, sizeof (IfrNvData->LocalIp));\r
         ZeroMem (IfrNvData->SubnetMask, sizeof (IfrNvData->SubnetMask));\r
@@ -3624,7 +3624,7 @@ IScsiFormCallback (
         ZeroMem (&Private->Current->SessionConfigData.SubnetMask, sizeof (EFI_IPv4_ADDRESS));\r
         ZeroMem (&Private->Current->SessionConfigData.Gateway, sizeof (EFI_IP_ADDRESS));\r
         ZeroMem (&Private->Current->SessionConfigData.TargetIp, sizeof (EFI_IP_ADDRESS));\r
-        \r
+\r
         break;\r
       }\r
 \r
@@ -3632,16 +3632,16 @@ IScsiFormCallback (
 \r
     case KEY_LOCAL_IP:\r
       Status = NetLibStrToIp4 (IfrNvData->LocalIp, &HostIp.v4);\r
-      if (EFI_ERROR (Status) || \r
-          ((Private->Current->SessionConfigData.SubnetMask.Addr[0] != 0) && \r
+      if (EFI_ERROR (Status) ||\r
+          ((Private->Current->SessionConfigData.SubnetMask.Addr[0] != 0) &&\r
            !NetIp4IsUnicast (NTOHL (HostIp.Addr[0]), NTOHL(*(UINT32*)Private->Current->SessionConfigData.SubnetMask.Addr)))) {\r
         CreatePopUp (\r
           EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,\r
           &Key,\r
           L"Invalid IP address!",\r
           NULL\r
-          ); \r
-        \r
+          );\r
+\r
         Status = EFI_INVALID_PARAMETER;\r
       } else {\r
         CopyMem (&Private->Current->SessionConfigData.LocalIp, &HostIp.v4, sizeof (HostIp.v4));\r
@@ -3657,8 +3657,8 @@ IScsiFormCallback (
           &Key,\r
           L"Invalid Subnet Mask!",\r
           NULL\r
-          ); \r
-        \r
+          );\r
+\r
         Status = EFI_INVALID_PARAMETER;\r
       } else {\r
         CopyMem (&Private->Current->SessionConfigData.SubnetMask, &SubnetMask.v4, sizeof (SubnetMask.v4));\r
@@ -3668,16 +3668,16 @@ IScsiFormCallback (
 \r
     case KEY_GATE_WAY:\r
       Status = NetLibStrToIp4 (IfrNvData->Gateway, &Gateway.v4);\r
-      if (EFI_ERROR (Status) || \r
-          ((Gateway.Addr[0] != 0) && \r
-           (Private->Current->SessionConfigData.SubnetMask.Addr[0] != 0) && \r
+      if (EFI_ERROR (Status) ||\r
+          ((Gateway.Addr[0] != 0) &&\r
+           (Private->Current->SessionConfigData.SubnetMask.Addr[0] != 0) &&\r
            !NetIp4IsUnicast (NTOHL (Gateway.Addr[0]), NTOHL(*(UINT32*)Private->Current->SessionConfigData.SubnetMask.Addr)))) {\r
         CreatePopUp (\r
           EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,\r
           &Key,\r
           L"Invalid Gateway!",\r
           NULL\r
-          );       \r
+          );\r
         Status = EFI_INVALID_PARAMETER;\r
       } else {\r
         CopyMem (&Private->Current->SessionConfigData.Gateway, &Gateway.v4, sizeof (Gateway.v4));\r
@@ -3734,7 +3734,7 @@ IScsiFormCallback (
           &Key,\r
           L"Invalid LUN string!",\r
           NULL\r
-          );       \r
+          );\r
       } else {\r
         CopyMem (Private->Current->SessionConfigData.BootLun, &Lun, sizeof (Lun));\r
       }\r
@@ -3851,7 +3851,7 @@ IScsiConfigFormInit (
                   NULL\r
                   );\r
   ASSERT_EFI_ERROR (Status);\r
-  \r
+\r
   //\r
   // Publish our HII data.\r
   //\r
index 10583f8f3b5a1201f73280d8093ce6f48b8d3f54..21a2a200fca0d1318e378c677885e810e3b12a87 100644 (file)
@@ -1,6 +1,6 @@
 // *++\r
 //\r
-// Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
 // which accompanies this distribution.  The full text of the license may be found at\r
@@ -26,8 +26,8 @@
 #langdef en-US "English"\r
 #langdef x-UEFI-ns "UefiNameSpace"\r
 \r
-#string STR_ISCSI_CONFIG_FORM_TITLE     #language en-US "iSCSI Configuration"  \r
-#string STR_ISCSI_CONFIG_FORM_HELP      #language en-US "Configure the iSCSI parameters."   \r
+#string STR_ISCSI_CONFIG_FORM_TITLE     #language en-US "iSCSI Configuration"\r
+#string STR_ISCSI_CONFIG_FORM_HELP      #language en-US "Configure the iSCSI parameters."\r
 #string STR_ISCSI_MAIN_FORM_TITLE       #language en-US "iSCSI Configuration"\r
 #string STR_ISCSI_MAC_FORM_TITLE        #language en-US "MAC Selection"\r
 #string STR_ISCSI_CONFIG_INIT_NAME      #language en-US "iSCSI Initiator Name"\r
index 35e8f9a2751ba25ac19bc002df826db61dd2c9d1..7d2c53e9089dd0a7bd3a6d65c16c559eb7eee2c8 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   VFR file used by the iSCSI configuration component.\r
-  \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -113,7 +113,7 @@ formset
       text   = STRING_TOKEN (STR_NO_SAVE_AND_EXIT),\r
       flags  = INTERACTIVE,\r
       key    = KEY_IGNORE_DELETE_ATTEMPT;\r
-  endform;    \r
+  endform;\r
 \r
   form formid = FORMID_ATTEMPT_FORM,\r
     title  = STRING_TOKEN(STR_ISCSI_ATTEMPT_FORM_TITLE);\r
@@ -157,8 +157,8 @@ formset
             minimum = CONNECT_MIN_RETRY,\r
             maximum = CONNECT_MAX_RETRY,\r
             step    = 0,\r
-    endnumeric;  \r
-    \r
+    endnumeric;\r
+\r
     numeric varid   = ISCSI_CONFIG_IFR_NVDATA.ConnectTimeout,\r
             prompt  = STRING_TOKEN(STR_ISCSI_CONFIG_TIMEOUT),\r
             help    = STRING_TOKEN(STR_ISCSI_CONFIG_TIMEOUT_HELP),\r
@@ -171,7 +171,7 @@ formset
 \r
     subtitle text = STRING_TOKEN(STR_NULL);\r
 \r
-    string  varid   = ISCSI_CONFIG_IFR_NVDATA.IsId, \r
+    string  varid   = ISCSI_CONFIG_IFR_NVDATA.IsId,\r
             prompt  = STRING_TOKEN(STR_ISCSI_CONFIG_ISID),\r
             help    = STRING_TOKEN(STR_ISCSI_CONFIG_ISID_HELP),\r
             flags   = INTERACTIVE,\r
@@ -191,9 +191,9 @@ formset
     endcheckbox;\r
     endif;\r
 \r
-    suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_IP6 OR \r
+    suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_IP6 OR\r
                ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG;\r
-               \r
+\r
     grayoutif ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x01;\r
     string  varid   = ISCSI_CONFIG_IFR_NVDATA.LocalIp,\r
             prompt  = STRING_TOKEN(STR_ISCSI_LOCAL_IP_ADDRESS),\r
@@ -222,12 +222,12 @@ formset
             maxsize = IP4_MAX_SIZE,\r
     endstring;\r
     endif;\r
-    \r
+\r
     endif;\r
 \r
     suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG;\r
     subtitle text = STRING_TOKEN(STR_NULL);\r
-    endif;     \r
+    endif;\r
 \r
     suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG OR\r
                ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x00;\r
@@ -276,22 +276,22 @@ formset
             minsize = LUN_MIN_SIZE,\r
             maxsize = LUN_MAX_SIZE,\r
     endstring;\r
-    \r
+\r
     endif;\r
 \r
     suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.IpMode == IP_MODE_AUTOCONFIG;\r
     subtitle text = STRING_TOKEN(STR_NULL);\r
-    endif; \r
+    endif;\r
 \r
     oneof varid  = ISCSI_CONFIG_IFR_NVDATA.AuthenticationType,\r
-          questionid = KEY_AUTH_TYPE,      \r
+          questionid = KEY_AUTH_TYPE,\r
           prompt = STRING_TOKEN(STR_AUTHEN_TYPE_PROMPT),\r
           help   = STRING_TOKEN(STR_AUTHEN_TYPE_HELP),\r
           option text = STRING_TOKEN(STR_AUTHEN_TYPE_CHAP),     value = ISCSI_AUTH_TYPE_CHAP, flags = 0;\r
           option text = STRING_TOKEN(STR_AUTHEN_TYPE_NONE),     value = ISCSI_AUTH_TYPE_NONE, flags = DEFAULT;\r
     endoneof;\r
 \r
-    suppressif NOT ideqval ISCSI_CONFIG_IFR_NVDATA.AuthenticationType == ISCSI_AUTH_TYPE_CHAP;    \r
+    suppressif NOT ideqval ISCSI_CONFIG_IFR_NVDATA.AuthenticationType == ISCSI_AUTH_TYPE_CHAP;\r
     oneof varid  = ISCSI_CONFIG_IFR_NVDATA.CHAPType,\r
           prompt = STRING_TOKEN(STR_CHAP_TYPE_PROMPT),\r
           help   = STRING_TOKEN(STR_CHAP_TYPE_HELP),\r
@@ -393,7 +393,7 @@ formset
       text   = STRING_TOKEN (STR_SAVE_CHANGES),\r
       flags  = INTERACTIVE,\r
       key    = KEY_SAVE_ATTEMPT_CONFIG;\r
-      \r
+\r
     goto FORMID_MAIN_FORM,\r
     prompt = STRING_TOKEN (STR_RETURN_MAIN_FORM),\r
     help   = STRING_TOKEN (STR_RETURN_MAIN_FORM),\r
index e34352370c6ed0b5a73e1c7b2bd2bd112ad789ba..2a0da0ccf3987860a8dfaa9259777d650900ab60 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   iSCSI DHCP4 related configuration routines.\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -201,14 +201,14 @@ ON_EXIT:
 /**\r
   The callback function registerd to the DHCP4 instance that is used to select\r
   the qualified DHCP OFFER.\r
-  \r
+\r
   @param[in]  This         The DHCP4 protocol.\r
   @param[in]  Context      The context set when configuring the DHCP4 protocol.\r
   @param[in]  CurrentState The current state of the DHCP4 protocol.\r
   @param[in]  Dhcp4Event   The event occurs in the current state.\r
-  @param[in]  Packet       The DHCP packet that is to be sent or was already received. \r
+  @param[in]  Packet       The DHCP packet that is to be sent or was already received.\r
   @param[out] NewPacket    The packet used to replace the above Packet.\r
-  \r
+\r
   @retval EFI_SUCCESS      Either the DHCP OFFER is qualified or we're not intereseted\r
                            in the Dhcp4Event.\r
   @retval EFI_NOT_READY    The DHCP OFFER packet doesn't match our requirements.\r
@@ -411,7 +411,7 @@ IScsiSetIp4Policy (
                           );\r
     if (EFI_ERROR (Status)) {\r
       return Status;\r
-    } \r
+    }\r
   }\r
 \r
   return EFI_SUCCESS;\r
@@ -462,10 +462,10 @@ IScsiDoDhcp (
   }\r
 \r
   //\r
-  // DHCP4 service allows only one of its children to be configured in  \r
-  // the active state, If the DHCP4 D.O.R.A started by IP4 auto  \r
-  // configuration and has not been completed, the Dhcp4 state machine \r
-  // will not be in the right state for the iSCSI to start a new round D.O.R.A. \r
+  // DHCP4 service allows only one of its children to be configured in\r
+  // the active state, If the DHCP4 D.O.R.A started by IP4 auto\r
+  // configuration and has not been completed, the Dhcp4 state machine\r
+  // will not be in the right state for the iSCSI to start a new round D.O.R.A.\r
   // So, we need to switch it's policy to static.\r
   //\r
   Status = gBS->HandleProtocol (Controller, &gEfiIp4Config2ProtocolGuid, (VOID **) &Ip4Config2);\r
index 90acb94e0ed11b335bc1fdb18d6dc4109c8c475f..b24ba66c64167a97f70a1eced3c097506e6828c3 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   iSCSI DHCP6 related configuration routines.\r
 \r
-Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -47,7 +47,7 @@ IScsiDhcp6ExtractRootPath (
   UINT8                       Index;\r
   ISCSI_SESSION_CONFIG_NVDATA *ConfigNvData;\r
   EFI_IP_ADDRESS              Ip;\r
-  UINT8                       IpMode;  \r
+  UINT8                       IpMode;\r
 \r
   ConfigNvData = &ConfigData->SessionConfigData;\r
   ConfigNvData->DnsMode = FALSE;\r
@@ -156,7 +156,7 @@ IScsiDhcp6ExtractRootPath (
   //\r
   // Get the IP address of the target.\r
   //\r
-  Field   = &Fields[RP_FIELD_IDX_SERVERNAME];  \r
+  Field   = &Fields[RP_FIELD_IDX_SERVERNAME];\r
   if (ConfigNvData->IpMode < IP_MODE_AUTOCONFIG) {\r
     IpMode = ConfigNvData->IpMode;\r
   } else {\r
@@ -238,11 +238,11 @@ ON_EXIT:
 }\r
 \r
 /**\r
-  EFI_DHCP6_INFO_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol \r
+  EFI_DHCP6_INFO_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol\r
   instance to intercept events that occurs in the DHCPv6 Information Request\r
   exchange process.\r
 \r
-  @param[in]  This              Pointer to the EFI_DHCP6_PROTOCOL instance that \r
+  @param[in]  This              Pointer to the EFI_DHCP6_PROTOCOL instance that\r
                                 is used to configure this  callback function.\r
   @param[in]  Context           Pointer to the context that is initialized in\r
                                 the EFI_DHCP6_PROTOCOL.InfoRequest().\r
@@ -276,10 +276,10 @@ IScsiDhcp6ParseReply (
   EFI_DHCP6_PACKET_OPTION     **OptionList;\r
   ISCSI_ATTEMPT_CONFIG_NVDATA *ConfigData;\r
   UINT16                      ParaLen;\r
\r
+\r
   OptionCount = 0;\r
   BootFileOpt = NULL;\r
-  \r
+\r
   Status      = This->Parse (This, Packet, &OptionCount, NULL);\r
   if (Status != EFI_BUFFER_TOO_SMALL) {\r
     return EFI_NOT_READY;\r
@@ -353,7 +353,7 @@ IScsiDhcp6ParseReply (
     Status = EFI_UNSUPPORTED;\r
     goto Exit;\r
   }\r
-  \r
+\r
   //\r
   // Get iSCSI root path from Boot File Uniform Resource Locator (URL) Option\r
   //\r
@@ -524,7 +524,7 @@ ON_EXIT:
 \r
   if (Oro != NULL) {\r
     FreePool (Oro);\r
-  }  \r
+  }\r
 \r
   if (Timer != NULL) {\r
     gBS->CloseEvent (Timer);\r
index 0b7ff8680b29f59a7f023d3008d024bd9627e89d..c8457174e3de7fe1b0a5938798173e326d11df50 100644 (file)
@@ -2,7 +2,7 @@
  The header file of routines for IScsi driver to perform DNS\r
  resolution based on UEFI DNS protocols.\r
 \r
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -56,4 +56,4 @@ IScsiDns6 (
   IN OUT ISCSI_SESSION_CONFIG_NVDATA     *NvData\r
   );\r
 \r
-#endif
\ No newline at end of file
+#endif\r
index a0ece3ae1fa876ca40108e61526ad2b832354c4c..91176e6715a6f7c2b67cca633df875fdf30c71af 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The entry point of IScsi driver.\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2017 Hewlett Packard Enterprise Development LP<BR>\r
 \r
 This program and the accompanying materials\r
@@ -39,14 +39,14 @@ EFI_GUID                    gIScsiV6PrivateGuid = ISCSI_V6_PRIVATE_GUID;
 ISCSI_PRIVATE_DATA          *mPrivate           = NULL;\r
 \r
 /**\r
-  Tests to see if this driver supports the RemainingDevicePath. \r
-\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For bus drivers, if this parameter is not NULL, then \r
-                                   the bus driver must determine if the bus controller specified \r
-                                   by ControllerHandle and the child controller specified \r
-                                   by RemainingDevicePath are both supported by this \r
+  Tests to see if this driver supports the RemainingDevicePath.\r
+\r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For bus drivers, if this parameter is not NULL, then\r
+                                   the bus driver must determine if the bus controller specified\r
+                                   by ControllerHandle and the child controller specified\r
+                                   by RemainingDevicePath are both supported by this\r
                                    bus driver.\r
 \r
   @retval EFI_SUCCESS              The RemainingDevicePath is supported or NULL.\r
@@ -222,15 +222,15 @@ Exit:
   IScsiIp4(6)DriverBindingSupported.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to test. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to test. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For bus drivers, if this parameter is not NULL, then \r
-                                   the bus driver must determine if the bus controller specified \r
-                                   by ControllerHandle and the child controller specified \r
-                                   by RemainingDevicePath are both supported by this \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For bus drivers, if this parameter is not NULL, then\r
+                                   the bus driver must determine if the bus controller specified\r
+                                   by ControllerHandle and the child controller specified\r
+                                   by RemainingDevicePath are both supported by this\r
                                    bus driver.\r
   @param[in]  IpVersion            IP_VERSION_4 or IP_VERSION_6.\r
 \r
@@ -437,7 +437,7 @@ IScsiStart (
       return EFI_ABORTED;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Record the incoming NIC info.\r
   //\r
@@ -479,13 +479,13 @@ IScsiStart (
                   ControllerHandle,\r
                   EFI_OPEN_PROTOCOL_BY_DRIVER\r
                   );\r
-                  \r
+\r
   if (EFI_ERROR (Status)) {\r
     goto ON_ERROR;\r
   }\r
 \r
   //\r
-  // Always install private protocol no matter what happens later. We need to \r
+  // Always install private protocol no matter what happens later. We need to\r
   // keep the relationship between ControllerHandle and ChildHandle.\r
   //\r
   Status = gBS->InstallProtocolInterface (\r
@@ -497,7 +497,7 @@ IScsiStart (
   if (EFI_ERROR (Status)) {\r
     goto ON_ERROR;\r
   }\r
-  \r
+\r
   if (IpVersion == IP_VERSION_4) {\r
     mPrivate->Ipv6Flag = FALSE;\r
   } else {\r
@@ -900,8 +900,8 @@ IScsiStart (
                ExistPrivate->Controller,\r
                IScsiPrivateGuid,\r
                &ExistPrivate->IScsiIdentifier\r
-               ); \r
-        \r
+               );\r
+\r
         IScsiRemoveNic (ExistPrivate->Controller);\r
         if (ExistPrivate->Session != NULL) {\r
           IScsiSessionAbort (ExistPrivate->Session);\r
@@ -973,7 +973,7 @@ IScsiStart (
                   Image,\r
                   Private->ExtScsiPassThruHandle,\r
                   EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER\r
-                  );              \r
+                  );\r
   if (EFI_ERROR (Status)) {\r
     gBS->UninstallMultipleProtocolInterfaces (\r
            Private->ExtScsiPassThruHandle,\r
@@ -983,7 +983,7 @@ IScsiStart (
            Private->DevicePath,\r
            NULL\r
            );\r
-    \r
+\r
     goto ON_ERROR;\r
   }\r
 \r
@@ -1010,16 +1010,16 @@ ON_ERROR:
 /**\r
   Stops a device controller or a bus controller. This is the worker function for\r
   IScsiIp4(6)DriverBindingStop.\r
-  \r
+\r
   @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must \r
-                                support a bus specific I/O protocol for the driver \r
+  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must\r
+                                support a bus specific I/O protocol for the driver\r
                                 to use to stop the device.\r
   @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.\r
-  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL \r
+  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL\r
                                 if NumberOfChildren is 0.\r
   @param[in]  IpVersion         IP_VERSION_4 or IP_VERSION_6.\r
-  \r
+\r
   @retval EFI_SUCCESS           The device was stopped.\r
   @retval EFI_DEVICE_ERROR      The device could not be stopped due to a device error.\r
   @retval EFI_INVALID_PARAMETER Child handle is NULL.\r
@@ -1084,7 +1084,7 @@ IScsiStop (
            Private->Image,\r
            Private->ExtScsiPassThruHandle\r
            );\r
-    \r
+\r
     gBS->CloseProtocol (\r
            Conn->TcpIo.Handle,\r
            ProtocolGuid,\r
@@ -1094,7 +1094,7 @@ IScsiStop (
 \r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   //\r
   // Get the handle of the controller we are controling.\r
   //\r
@@ -1134,7 +1134,7 @@ IScsiStop (
                     This->DriverBindingHandle,\r
                     IScsiController\r
                     );\r
-                    \r
+\r
     ASSERT (!EFI_ERROR (Status));\r
 \r
     Status = NetLibDestroyServiceChild (\r
@@ -1151,7 +1151,7 @@ IScsiStop (
          IScsiController,\r
          ProtocolGuid,\r
          &Private->IScsiIdentifier\r
-         ); \r
+         );\r
 \r
   //\r
   // Remove this NIC.\r
@@ -1177,33 +1177,33 @@ IScsiStop (
 }\r
 \r
 /**\r
-  Tests to see if this driver supports a given controller. If a child device is provided, \r
+  Tests to see if this driver supports a given controller. If a child device is provided,\r
   it tests to see if this driver supports creating a handle for the specified child device.\r
 \r
-  This function checks to see if the driver specified by This supports the device specified by \r
-  ControllerHandle. Drivers typically use the device path attached to \r
-  ControllerHandle and/or the services from the bus I/O abstraction attached to \r
-  ControllerHandle to determine if the driver supports ControllerHandle. This function \r
-  may be called many times during platform initialization. In order to reduce boot times, the tests \r
-  performed by this function must be very small and take as little time as possible to execute. This \r
-  function must not change the state of any hardware devices, and this function must be aware that the \r
-  device specified by ControllerHandle may already be managed by the same driver or a \r
-  different driver. This function must match its calls to AllocatePages() with FreePages(), \r
-  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().  \r
-  Since ControllerHandle may have been previously started by the same driver, if a protocol is \r
-  already in the opened state, then it must not be closed with CloseProtocol(). This is required \r
+  This function checks to see if the driver specified by This supports the device specified by\r
+  ControllerHandle. Drivers typically use the device path attached to\r
+  ControllerHandle and/or the services from the bus I/O abstraction attached to\r
+  ControllerHandle to determine if the driver supports ControllerHandle. This function\r
+  may be called many times during platform initialization. In order to reduce boot times, the tests\r
+  performed by this function must be very small and take as little time as possible to execute. This\r
+  function must not change the state of any hardware devices, and this function must be aware that the\r
+  device specified by ControllerHandle may already be managed by the same driver or a\r
+  different driver. This function must match its calls to AllocatePages() with FreePages(),\r
+  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().\r
+  Since ControllerHandle may have been previously started by the same driver, if a protocol is\r
+  already in the opened state, then it must not be closed with CloseProtocol(). This is required\r
   to guarantee the state of ControllerHandle is not modified by this function.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to test. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to test. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For bus drivers, if this parameter is not NULL, then \r
-                                   the bus driver must determine if the bus controller specified \r
-                                   by ControllerHandle and the child controller specified \r
-                                   by RemainingDevicePath are both supported by this \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For bus drivers, if this parameter is not NULL, then\r
+                                   the bus driver must determine if the bus controller specified\r
+                                   by ControllerHandle and the child controller specified\r
+                                   by RemainingDevicePath are both supported by this\r
                                    bus driver.\r
 \r
   @retval EFI_SUCCESS              The device specified by ControllerHandle and\r
@@ -1238,28 +1238,28 @@ IScsiIp4DriverBindingSupported (
   Starts a device controller or a bus controller.\r
 \r
   The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
-  As a result, much of the error checking on the parameters to Start() has been moved into this \r
-  common boot service. It is legal to call Start() from other locations, \r
+  As a result, much of the error checking on the parameters to Start() has been moved into this\r
+  common boot service. It is legal to call Start() from other locations,\r
   but the following calling restrictions must be followed or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE.\r
   2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
      EFI_DEVICE_PATH_PROTOCOL.\r
   3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
-     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.  \r
+     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to start. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to start. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For a bus driver, if this parameter is NULL, then handles \r
-                                   for all the children of Controller are created by this driver.  \r
-                                   If this parameter is not NULL and the first Device Path Node is \r
-                                   not the End of Device Path Node, then only the handle for the \r
-                                   child device specified by the first Device Path Node of \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For a bus driver, if this parameter is NULL, then handles\r
+                                   for all the children of Controller are created by this driver.\r
+                                   If this parameter is not NULL and the first Device Path Node is\r
+                                   not the End of Device Path Node, then only the handle for the\r
+                                   child device specified by the first Device Path Node of\r
                                    RemainingDevicePath is created by this driver.\r
-                                   If the first Device Path Node of RemainingDevicePath is \r
+                                   If the first Device Path Node of RemainingDevicePath is\r
                                    the End of Device Path Node, no child handle is created by this\r
                                    driver.\r
 \r
@@ -1289,10 +1289,10 @@ IScsiIp4DriverBindingStart (
 \r
 /**\r
   Stops a device controller or a bus controller.\r
-  \r
-  The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r
-  As a result, much of the error checking on the parameters to Stop() has been moved \r
-  into this common boot service. It is legal to call Stop() from other locations, \r
+\r
+  The Stop() function is designed to be invoked from the EFI boot service DisconnectController().\r
+  As a result, much of the error checking on the parameters to Stop() has been moved\r
+  into this common boot service. It is legal to call Stop() from other locations,\r
   but the following calling restrictions must be followed or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
      same driver's Start() function.\r
@@ -1300,13 +1300,13 @@ IScsiIp4DriverBindingStart (
      EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
      Start() function, and the Start() function must have called OpenProtocol() on\r
      ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
-  \r
+\r
   @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must \r
-                                support a bus specific I/O protocol for the driver \r
+  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must\r
+                                support a bus specific I/O protocol for the driver\r
                                 to use to stop the device.\r
   @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.\r
-  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL \r
+  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL\r
                                 if NumberOfChildren is 0.\r
 \r
   @retval EFI_SUCCESS           The device was stopped.\r
@@ -1332,33 +1332,33 @@ IScsiIp4DriverBindingStop (
 }\r
 \r
 /**\r
-  Tests to see if this driver supports a given controller. If a child device is provided, \r
+  Tests to see if this driver supports a given controller. If a child device is provided,\r
   it tests to see if this driver supports creating a handle for the specified child device.\r
 \r
-  This function checks to see if the driver specified by This supports the device specified by \r
-  ControllerHandle. Drivers typically use the device path attached to \r
-  ControllerHandle and/or the services from the bus I/O abstraction attached to \r
-  ControllerHandle to determine if the driver supports ControllerHandle. This function \r
-  may be called many times during platform initialization. In order to reduce boot times, the tests \r
-  performed by this function must be very small and take as little time as possible to execute. This \r
-  function must not change the state of any hardware devices, and this function must be aware that the \r
-  device specified by ControllerHandle may already be managed by the same driver or a \r
-  different driver. This function must match its calls to AllocatePages() with FreePages(), \r
-  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().  \r
-  Since ControllerHandle may have been previously started by the same driver, if a protocol is \r
-  already in the opened state, then it must not be closed with CloseProtocol(). This is required \r
+  This function checks to see if the driver specified by This supports the device specified by\r
+  ControllerHandle. Drivers typically use the device path attached to\r
+  ControllerHandle and/or the services from the bus I/O abstraction attached to\r
+  ControllerHandle to determine if the driver supports ControllerHandle. This function\r
+  may be called many times during platform initialization. In order to reduce boot times, the tests\r
+  performed by this function must be very small and take as little time as possible to execute. This\r
+  function must not change the state of any hardware devices, and this function must be aware that the\r
+  device specified by ControllerHandle may already be managed by the same driver or a\r
+  different driver. This function must match its calls to AllocatePages() with FreePages(),\r
+  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().\r
+  Since ControllerHandle may have been previously started by the same driver, if a protocol is\r
+  already in the opened state, then it must not be closed with CloseProtocol(). This is required\r
   to guarantee the state of ControllerHandle is not modified by this function.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to test. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to test. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For bus drivers, if this parameter is not NULL, then \r
-                                   the bus driver must determine if the bus controller specified \r
-                                   by ControllerHandle and the child controller specified \r
-                                   by RemainingDevicePath are both supported by this \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For bus drivers, if this parameter is not NULL, then\r
+                                   the bus driver must determine if the bus controller specified\r
+                                   by ControllerHandle and the child controller specified\r
+                                   by RemainingDevicePath are both supported by this\r
                                    bus driver.\r
 \r
   @retval EFI_SUCCESS              The device specified by ControllerHandle and\r
@@ -1393,28 +1393,28 @@ IScsiIp6DriverBindingSupported (
   Starts a device controller or a bus controller.\r
 \r
   The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
-  As a result, much of the error checking on the parameters to Start() has been moved into this \r
-  common boot service. It is legal to call Start() from other locations, \r
+  As a result, much of the error checking on the parameters to Start() has been moved into this\r
+  common boot service. It is legal to call Start() from other locations,\r
   but the following calling restrictions must be followed or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE.\r
   2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
      EFI_DEVICE_PATH_PROTOCOL.\r
   3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
-     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.  \r
+     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to start. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to start. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For a bus driver, if this parameter is NULL, then handles \r
-                                   for all the children of Controller are created by this driver.  \r
-                                   If this parameter is not NULL and the first Device Path Node is \r
-                                   not the End of Device Path Node, then only the handle for the \r
-                                   child device specified by the first Device Path Node of \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For a bus driver, if this parameter is NULL, then handles\r
+                                   for all the children of Controller are created by this driver.\r
+                                   If this parameter is not NULL and the first Device Path Node is\r
+                                   not the End of Device Path Node, then only the handle for the\r
+                                   child device specified by the first Device Path Node of\r
                                    RemainingDevicePath is created by this driver.\r
-                                   If the first Device Path Node of RemainingDevicePath is \r
+                                   If the first Device Path Node of RemainingDevicePath is\r
                                    the End of Device Path Node, no child handle is created by this\r
                                    driver.\r
 \r
@@ -1444,10 +1444,10 @@ IScsiIp6DriverBindingStart (
 \r
 /**\r
   Stops a device controller or a bus controller.\r
-  \r
-  The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r
-  As a result, much of the error checking on the parameters to Stop() has been moved \r
-  into this common boot service. It is legal to call Stop() from other locations, \r
+\r
+  The Stop() function is designed to be invoked from the EFI boot service DisconnectController().\r
+  As a result, much of the error checking on the parameters to Stop() has been moved\r
+  into this common boot service. It is legal to call Stop() from other locations,\r
   but the following calling restrictions must be followed or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
      same driver's Start() function.\r
@@ -1455,13 +1455,13 @@ IScsiIp6DriverBindingStart (
      EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
      Start() function, and the Start() function must have called OpenProtocol() on\r
      ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
-  \r
+\r
   @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must \r
-                                support a bus specific I/O protocol for the driver \r
+  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must\r
+                                support a bus specific I/O protocol for the driver\r
                                 to use to stop the device.\r
   @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.\r
-  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL \r
+  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL\r
                                 if NumberOfChildren is 0.\r
 \r
   @retval EFI_SUCCESS           The device was stopped.\r
@@ -1573,7 +1573,7 @@ IScsiUnload (
   if (EFI_ERROR (Status)) {\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   //\r
   // Uninstall the protocols installed by iSCSI driver.\r
   //\r
@@ -1586,7 +1586,7 @@ IScsiUnload (
   if (EFI_ERROR (Status)) {\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   if (gIScsiControllerNameTable!= NULL) {\r
     Status = FreeUnicodeStringTable (gIScsiControllerNameTable);\r
     if (EFI_ERROR (Status)) {\r
@@ -1615,7 +1615,7 @@ IScsiUnload (
       goto ON_EXIT;\r
     }\r
   }\r
-  \r
+\r
   Status = gBS->HandleProtocol (\r
                   gIScsiIp4DriverBinding.DriverBindingHandle,\r
                   &gEfiComponentName2ProtocolGuid,\r
@@ -1653,7 +1653,7 @@ IScsiUnload (
       goto ON_EXIT;\r
     }\r
   }\r
-  \r
+\r
   Status = gBS->HandleProtocol (\r
                   gIScsiIp6DriverBinding.DriverBindingHandle,\r
                   &gEfiComponentName2ProtocolGuid,\r
@@ -1698,7 +1698,7 @@ ON_EXIT:
   if (DeviceHandleBuffer != NULL) {\r
     FreePool (DeviceHandleBuffer);\r
   }\r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -1706,11 +1706,11 @@ ON_EXIT:
   This is the declaration of an EFI image entry point. This entry point is\r
   the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including\r
   both device drivers and bus drivers.\r
-  \r
+\r
   The entry point for iSCSI driver which initializes the global variables and\r
   installs the driver binding, component name protocol, iSCSI initiator name\r
   protocol and Authentication Info protocol on its image.\r
-  \r
+\r
   @param[in]  ImageHandle       The firmware allocated handle for the UEFI image.\r
   @param[in]  SystemTable       A pointer to the EFI System Table.\r
 \r
@@ -1767,7 +1767,7 @@ IScsiDriverEntryPoint (
   if (EFI_ERROR (Status)) {\r
     goto Error1;\r
   }\r
-  \r
+\r
   //\r
   // Install the iSCSI Initiator Name Protocol.\r
   //\r
@@ -1779,7 +1779,7 @@ IScsiDriverEntryPoint (
                   );\r
   if (EFI_ERROR (Status)) {\r
     goto Error2;\r
-  } \r
+  }\r
 \r
   //\r
   // Create the private data structures.\r
@@ -1835,7 +1835,7 @@ IScsiDriverEntryPoint (
                     );\r
     if (EFI_ERROR (Status)) {\r
       goto Error6;\r
-    }    \r
+    }\r
   }\r
 \r
   return EFI_SUCCESS;\r
index 2db93c5d01be7e781e8be840dac48518d01f0b36..ea76cf722112d540ffc8044410e9dfe0722c6038 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The header file of IScsiDriver.c.\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2017 Hewlett Packard Enterprise Development LP<BR>\r
 \r
 This program and the accompanying materials\r
@@ -93,33 +93,33 @@ typedef struct _ISCSI_PRIVATE_PROTOCOL {
 //\r
 \r
 /**\r
-  Tests to see if this driver supports a given controller. If a child device is provided, \r
+  Tests to see if this driver supports a given controller. If a child device is provided,\r
   it tests to see if this driver supports creating a handle for the specified child device.\r
 \r
-  This function checks to see if the driver specified by This supports the device specified by \r
-  ControllerHandle. Drivers typically use the device path attached to \r
-  ControllerHandle and/or the services from the bus I/O abstraction attached to \r
-  ControllerHandle to determine if the driver supports ControllerHandle. This function \r
-  may be called many times during platform initialization. In order to reduce boot times, the tests \r
-  performed by this function must be very small and take as little time as possible to execute. This \r
-  function must not change the state of any hardware devices, and this function must be aware that the \r
-  device specified by ControllerHandle may already be managed by the same driver or a \r
-  different driver. This function must match its calls to AllocatePages() with FreePages(), \r
-  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().  \r
-  Since ControllerHandle may have been previously started by the same driver, if a protocol is \r
-  already in the opened state, then it must not be closed with CloseProtocol(). This is required \r
+  This function checks to see if the driver specified by This supports the device specified by\r
+  ControllerHandle. Drivers typically use the device path attached to\r
+  ControllerHandle and/or the services from the bus I/O abstraction attached to\r
+  ControllerHandle to determine if the driver supports ControllerHandle. This function\r
+  may be called many times during platform initialization. In order to reduce boot times, the tests\r
+  performed by this function must be very small and take as little time as possible to execute. This\r
+  function must not change the state of any hardware devices, and this function must be aware that the\r
+  device specified by ControllerHandle may already be managed by the same driver or a\r
+  different driver. This function must match its calls to AllocatePages() with FreePages(),\r
+  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().\r
+  Since ControllerHandle may have been previously started by the same driver, if a protocol is\r
+  already in the opened state, then it must not be closed with CloseProtocol(). This is required\r
   to guarantee the state of ControllerHandle is not modified by this function.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to test. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to test. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For bus drivers, if this parameter is not NULL, then \r
-                                   the bus driver must determine if the bus controller specified \r
-                                   by ControllerHandle and the child controller specified \r
-                                   by RemainingDevicePath are both supported by this \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For bus drivers, if this parameter is not NULL, then\r
+                                   the bus driver must determine if the bus controller specified\r
+                                   by ControllerHandle and the child controller specified\r
+                                   by RemainingDevicePath are both supported by this\r
                                    bus driver.\r
 \r
   @retval EFI_SUCCESS              The device specified by ControllerHandle and\r
@@ -146,28 +146,28 @@ IScsiIp4DriverBindingSupported (
   Starts a device controller or a bus controller.\r
 \r
   The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
-  As a result, much of the error checking on the parameters to Start() has been moved into this \r
-  common boot service. It is legal to call Start() from other locations, \r
+  As a result, much of the error checking on the parameters to Start() has been moved into this\r
+  common boot service. It is legal to call Start() from other locations,\r
   but the following calling restrictions must be followed or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE.\r
   2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
      EFI_DEVICE_PATH_PROTOCOL.\r
   3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
-     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.  \r
+     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to start. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to start. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For a bus driver, if this parameter is NULL, then handles \r
-                                   for all the children of Controller are created by this driver.  \r
-                                   If this parameter is not NULL and the first Device Path Node is \r
-                                   not the End of Device Path Node, then only the handle for the \r
-                                   child device specified by the first Device Path Node of \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For a bus driver, if this parameter is NULL, then handles\r
+                                   for all the children of Controller are created by this driver.\r
+                                   If this parameter is not NULL and the first Device Path Node is\r
+                                   not the End of Device Path Node, then only the handle for the\r
+                                   child device specified by the first Device Path Node of\r
                                    RemainingDevicePath is created by this driver.\r
-                                   If the first Device Path Node of RemainingDevicePath is \r
+                                   If the first Device Path Node of RemainingDevicePath is\r
                                    the End of Device Path Node, no child handle is created by this\r
                                    driver.\r
 \r
@@ -187,10 +187,10 @@ IScsiIp4DriverBindingStart (
 \r
 /**\r
   Stops a device controller or a bus controller.\r
-  \r
-  The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r
-  As a result, much of the error checking on the parameters to Stop() has been moved \r
-  into this common boot service. It is legal to call Stop() from other locations, \r
+\r
+  The Stop() function is designed to be invoked from the EFI boot service DisconnectController().\r
+  As a result, much of the error checking on the parameters to Stop() has been moved\r
+  into this common boot service. It is legal to call Stop() from other locations,\r
   but the following calling restrictions must be followed or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
      same driver's Start() function.\r
@@ -198,13 +198,13 @@ IScsiIp4DriverBindingStart (
      EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
      Start() function, and the Start() function must have called OpenProtocol() on\r
      ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
-  \r
+\r
   @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must \r
-                                support a bus specific I/O protocol for the driver \r
+  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must\r
+                                support a bus specific I/O protocol for the driver\r
                                 to use to stop the device.\r
   @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.\r
-  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL \r
+  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL\r
                                 if NumberOfChildren is 0.\r
 \r
   @retval EFI_SUCCESS           The device was stopped.\r
@@ -221,33 +221,33 @@ IScsiIp4DriverBindingStop (
   );\r
 \r
 /**\r
-  Tests to see if this driver supports a given controller. If a child device is provided, \r
+  Tests to see if this driver supports a given controller. If a child device is provided,\r
   it tests to see if this driver supports creating a handle for the specified child device.\r
 \r
-  This function checks to see if the driver specified by This supports the device specified by \r
-  ControllerHandle. Drivers typically use the device path attached to \r
-  ControllerHandle and/or the services from the bus I/O abstraction attached to \r
-  ControllerHandle to determine if the driver supports ControllerHandle. This function \r
-  may be called many times during platform initialization. In order to reduce boot times, the tests \r
-  performed by this function must be very small and take as little time as possible to execute. This \r
-  function must not change the state of any hardware devices, and this function must be aware that the \r
-  device specified by ControllerHandle may already be managed by the same driver or a \r
-  different driver. This function must match its calls to AllocatePages() with FreePages(), \r
-  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().  \r
-  Since ControllerHandle may have been previously started by the same driver, if a protocol is \r
-  already in the opened state, then it must not be closed with CloseProtocol(). This is required \r
+  This function checks to see if the driver specified by This supports the device specified by\r
+  ControllerHandle. Drivers typically use the device path attached to\r
+  ControllerHandle and/or the services from the bus I/O abstraction attached to\r
+  ControllerHandle to determine if the driver supports ControllerHandle. This function\r
+  may be called many times during platform initialization. In order to reduce boot times, the tests\r
+  performed by this function must be very small and take as little time as possible to execute. This\r
+  function must not change the state of any hardware devices, and this function must be aware that the\r
+  device specified by ControllerHandle may already be managed by the same driver or a\r
+  different driver. This function must match its calls to AllocatePages() with FreePages(),\r
+  AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().\r
+  Since ControllerHandle may have been previously started by the same driver, if a protocol is\r
+  already in the opened state, then it must not be closed with CloseProtocol(). This is required\r
   to guarantee the state of ControllerHandle is not modified by this function.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to test. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to test. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For bus drivers, if this parameter is not NULL, then \r
-                                   the bus driver must determine if the bus controller specified \r
-                                   by ControllerHandle and the child controller specified \r
-                                   by RemainingDevicePath are both supported by this \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For bus drivers, if this parameter is not NULL, then\r
+                                   the bus driver must determine if the bus controller specified\r
+                                   by ControllerHandle and the child controller specified\r
+                                   by RemainingDevicePath are both supported by this\r
                                    bus driver.\r
 \r
   @retval EFI_SUCCESS              The device specified by ControllerHandle and\r
@@ -274,28 +274,28 @@ IScsiIp6DriverBindingSupported (
   Starts a device controller or a bus controller.\r
 \r
   The Start() function is designed to be invoked from the EFI boot service ConnectController().\r
-  As a result, much of the error checking on the parameters to Start() has been moved into this \r
-  common boot service. It is legal to call Start() from other locations, \r
+  As a result, much of the error checking on the parameters to Start() has been moved into this\r
+  common boot service. It is legal to call Start() from other locations,\r
   but the following calling restrictions must be followed or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE.\r
   2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r
      EFI_DEVICE_PATH_PROTOCOL.\r
   3. Prior to calling Start(), the Supported() function for the driver specified by This must\r
-     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.  \r
+     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.\r
 \r
   @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle     The handle of the controller to start. This handle \r
-                                   must support a protocol interface that supplies \r
+  @param[in]  ControllerHandle     The handle of the controller to start. This handle\r
+                                   must support a protocol interface that supplies\r
                                    an I/O abstraction to the driver.\r
-  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This \r
-                                   parameter is ignored by device drivers, and is optional for bus \r
-                                   drivers. For a bus driver, if this parameter is NULL, then handles \r
-                                   for all the children of Controller are created by this driver.  \r
-                                   If this parameter is not NULL and the first Device Path Node is \r
-                                   not the End of Device Path Node, then only the handle for the \r
-                                   child device specified by the first Device Path Node of \r
+  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This\r
+                                   parameter is ignored by device drivers, and is optional for bus\r
+                                   drivers. For a bus driver, if this parameter is NULL, then handles\r
+                                   for all the children of Controller are created by this driver.\r
+                                   If this parameter is not NULL and the first Device Path Node is\r
+                                   not the End of Device Path Node, then only the handle for the\r
+                                   child device specified by the first Device Path Node of\r
                                    RemainingDevicePath is created by this driver.\r
-                                   If the first Device Path Node of RemainingDevicePath is \r
+                                   If the first Device Path Node of RemainingDevicePath is\r
                                    the End of Device Path Node, no child handle is created by this\r
                                    driver.\r
 \r
@@ -315,10 +315,10 @@ IScsiIp6DriverBindingStart (
 \r
 /**\r
   Stops a device controller or a bus controller.\r
-  \r
-  The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). \r
-  As a result, much of the error checking on the parameters to Stop() has been moved \r
-  into this common boot service. It is legal to call Stop() from other locations, \r
+\r
+  The Stop() function is designed to be invoked from the EFI boot service DisconnectController().\r
+  As a result, much of the error checking on the parameters to Stop() has been moved\r
+  into this common boot service. It is legal to call Stop() from other locations,\r
   but the following calling restrictions must be followed or the system behavior will not be deterministic.\r
   1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r
      same driver's Start() function.\r
@@ -326,13 +326,13 @@ IScsiIp6DriverBindingStart (
      EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r
      Start() function, and the Start() function must have called OpenProtocol() on\r
      ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
-  \r
+\r
   @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must \r
-                                support a bus specific I/O protocol for the driver \r
+  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must\r
+                                support a bus specific I/O protocol for the driver\r
                                 to use to stop the device.\r
   @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.\r
-  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL \r
+  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL\r
                                 if NumberOfChildren is 0.\r
 \r
   @retval EFI_SUCCESS           The device was stopped.\r
@@ -434,11 +434,11 @@ IScsiComponentNameGetDriverName (
                                 language of the driver name that the caller is\r
                                 requesting, and it must match one of the\r
                                 languages specified in SupportedLanguages. The\r
-                                number of languages supported by a driver is \r
-                                determined by the driver writer. Language is \r
-                                specified inRFC 4646 or ISO 639-2 language code \r
+                                number of languages supported by a driver is\r
+                                determined by the driver writer. Language is\r
+                                specified inRFC 4646 or ISO 639-2 language code\r
                                 format.\r
-                                \r
+\r
   @param[out]  ControllerName   A pointer to the Unicode string to return.\r
                                 This Unicode string is the name of the\r
                                 controller specified by ControllerHandle and\r
@@ -597,19 +597,19 @@ IScsiSetAuthenticationInfo (
 /**\r
   Sends a SCSI Request Packet to a SCSI device that is attached to the SCSI channel.\r
   This function supports both blocking I/O and nonblocking I/O. The blocking I/O\r
-  functionality is required, and the nonblocking I/O functionality is optional.  \r
+  functionality is required, and the nonblocking I/O functionality is optional.\r
 \r
   @param[in]       This    A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.\r
   @param[in]       Target  The Target is an array of size TARGET_MAX_BYTES and it\r
                            represents the id of the SCSI device to send the SCSI\r
                            Request Packet. Each transport driver may choose to\r
                            utilize a subset of this size to suit the needs\r
-                           of transport target representation. For example, a \r
+                           of transport target representation. For example, a\r
                            Fibre Channel driver may use only 8 bytes (WWN)\r
                            to represent an FC target.\r
   @param[in]       Lun     The LUN of the SCSI device to send the SCSI Request Packet.\r
   @param[in, out]  Packet  A pointer to the SCSI Request Packet to send to the\r
-                           SCSI device specified by Target and Lun.                  \r
+                           SCSI device specified by Target and Lun.\r
   @param[in]       Event   If nonblocking I/O is not supported then Event is ignored,\r
                            and blocking I/O is performed. If Event is NULL, then\r
                            blocking I/O is performed. If Event is not NULL and non\r
@@ -618,7 +618,7 @@ IScsiSetAuthenticationInfo (
                            completes.\r
 \r
   @retval EFI_SUCCESS           The SCSI Request Packet was sent by the host. For\r
-                                bi-directional commands, InTransferLength bytes \r
+                                bi-directional commands, InTransferLength bytes\r
                                 were transferred from InDataBuffer.\r
                                 For write and bi-directional commands, OutTransferLength\r
                                 bytes were transferred by OutDataBuffer.\r
@@ -631,7 +631,7 @@ IScsiSetAuthenticationInfo (
                                 there are too many SCSI Request Packets already\r
                                 queued. The caller may retry later.\r
   @retval EFI_DEVICE_ERROR      A device error occurred while attempting to send\r
-                                the SCSI Request Packet.                                \r
+                                the SCSI Request Packet.\r
   @retval EFI_INVALID_PARAMETER Target, Lun, or the contents of ScsiRequestPacket\r
                                 are invalid.\r
   @retval EFI_UNSUPPORTED       The command described by the SCSI Request Packet\r
@@ -658,9 +658,9 @@ IScsiExtScsiPassThruFunction (
   Used to retrieve the list of legal Target IDs and LUNs for SCSI devices on\r
   a SCSI channel. These can either be the list SCSI devices that are actually\r
   present on the SCSI channel, or the list of legal Target Ids and LUNs for the\r
-  SCSI channel. Regardless, the caller of this function must probe the Target ID      \r
-  and LUN returned to see if a SCSI device is actually present at that location    \r
-  on the SCSI channel. \r
+  SCSI channel. Regardless, the caller of this function must probe the Target ID\r
+  and LUN returned to see if a SCSI device is actually present at that location\r
+  on the SCSI channel.\r
 \r
   @param[in]       This          The EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.\r
   @param[in, out]  Target        On input, a pointer to the Target ID of a SCSI\r
@@ -790,7 +790,7 @@ IScsiExtScsiPassThruResetTargetLun (
   );\r
 \r
 /**\r
-  Retrieve the list of legal Target IDs for SCSI devices on a SCSI channel.                         \r
+  Retrieve the list of legal Target IDs for SCSI devices on a SCSI channel.\r
 \r
   @param[in]       This         A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL\r
                                 instance.\r
@@ -800,7 +800,7 @@ IScsiExtScsiPassThruResetTargetLun (
                                 next SCSI device present on a SCSI channel.\r
                                 An input value of 0xF(all bytes in the array are 0xF)\r
                                 in the Target array retrieves the Target ID of the\r
-                                first SCSI device present on a SCSI channel.                 \r
+                                first SCSI device present on a SCSI channel.\r
 \r
   @retval EFI_SUCCESS           The Target ID of the next SCSI device on the SCSI\r
                                 channel was returned in Target.\r
index 319c7fe79a52519efd1ed2cba0ed99c600b6386e..2d96611b447ef0d874530d6b5566159f9af4d728 100644 (file)
@@ -3,8 +3,8 @@
 #\r
 #  The iSCSI driver provides iSCSI service in the preboot environment and supports\r
 #  booting over iSCSI.\r
-#                                                    \r
-# Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+#\r
+# Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -57,7 +57,7 @@
   IScsiExtScsiPassThru.c\r
   IScsiIbft.c\r
   IScsiIbft.h\r
-  IScsiInitiatorName.c \r
+  IScsiInitiatorName.c\r
   IScsiImpl.h\r
   IScsiMisc.c\r
   IScsiMisc.h\r
@@ -82,7 +82,7 @@
   PrintLib\r
   UefiBootServicesTableLib\r
   UefiDriverEntryPoint\r
-  UefiLib  \r
+  UefiLib\r
   UefiRuntimeServicesTableLib\r
   UefiHiiServicesLib\r
   BaseCryptLib\r
   ## PRODUCES\r
   ## UNDEFINED # Variable\r
   gEfiIScsiInitiatorNameProtocolGuid\r
-  ## PRODUCES       \r
+  ## PRODUCES\r
   gEfiAuthenticationInfoProtocolGuid\r
   ## SOMETIMES_CONSUMES\r
   gEfiAdapterInformationProtocolGuid\r
   gEfiAcpi20TableGuid                           ## SOMETIMES_CONSUMES ## SystemTable\r
   gEfiAdapterInfoNetworkBootGuid                ## SOMETIMES_CONSUMES ## UNDEFINED\r
   gEfiAdapterInfoUndiIpv6SupportGuid            ## SOMETIMES_CONSUMES ## GUID\r
-  \r
+\r
   ## SOMETIMES_PRODUCES ## Variable:L"AttemptOrder"\r
   ## SOMETIMES_CONSUMES ## Variable:L"AttemptOrder"\r
   ## SOMETIMES_PRODUCES ## Variable:L"InitialAttemptOrder"\r
index 8522a4991c8f85ea8fd85b9e47a7b0e446080237..ae3082d7942e9a7dbed6e5fa59be9a8fa880b09e 100644 (file)
@@ -4,13 +4,13 @@
 // The iSCSI driver provides iSCSI service in the preboot environment and supports\r
 // booting over iSCSI.\r
 //\r
-// Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
 // which accompanies this distribution.  The full text of the license may be found at\r
 // http://opensource.org/licenses/bsd-license.php\r
-// \r
+//\r
 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 //\r
index 4a0579875e7dd0ab96ec166cec92fb92d54193c3..98b92319201068b6211a11826d0afcea1f54c98d 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // IScsiDxe Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -14,7 +14,7 @@
 // **/\r
 \r
 #string STR_PROPERTIES_MODULE_NAME\r
-#language en-US \r
+#language en-US\r
 "iSCSI DXE"\r
 \r
 \r
index 90e26d4611a50e73c00df7c1869deeef66ab4510..dcc33a2e2266113298f9383cae84b94aac11e003 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The implementation of EFI_EXT_SCSI_PASS_THRU_PROTOCOL.\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -29,19 +29,19 @@ EFI_EXT_SCSI_PASS_THRU_PROTOCOL gIScsiExtScsiPassThruProtocolTemplate = {
 /**\r
   Sends a SCSI Request Packet to a SCSI device that is attached to the SCSI channel.\r
   This function supports both blocking I/O and nonblocking I/O. The blocking I/O\r
-  functionality is required, and the nonblocking I/O functionality is optional.  \r
+  functionality is required, and the nonblocking I/O functionality is optional.\r
 \r
   @param[in]       This    A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.\r
   @param[in]       Target  The Target is an array of size TARGET_MAX_BYTES and it\r
                            represents the id of the SCSI device to send the SCSI\r
                            Request Packet. Each transport driver may choose to\r
                            utilize a subset of this size to suit the needs\r
-                           of transport target representation. For example, a \r
+                           of transport target representation. For example, a\r
                            Fibre Channel driver may use only 8 bytes (WWN)\r
                            to represent an FC target.\r
   @param[in]       Lun     The LUN of the SCSI device to send the SCSI Request Packet.\r
   @param[in, out]  Packet  A pointer to the SCSI Request Packet to send to the\r
-                           SCSI device specified by Target and Lun.                  \r
+                           SCSI device specified by Target and Lun.\r
   @param[in]       Event   If nonblocking I/O is not supported then Event is ignored,\r
                            and blocking I/O is performed. If Event is NULL, then\r
                            blocking I/O is performed. If Event is not NULL and non\r
@@ -50,7 +50,7 @@ EFI_EXT_SCSI_PASS_THRU_PROTOCOL gIScsiExtScsiPassThruProtocolTemplate = {
                            completes.\r
 \r
   @retval EFI_SUCCESS           The SCSI Request Packet was sent by the host. For\r
-                                bi-directional commands, InTransferLength bytes \r
+                                bi-directional commands, InTransferLength bytes\r
                                 were transferred from InDataBuffer.\r
                                 For write and bi-directional commands, OutTransferLength\r
                                 bytes were transferred by OutDataBuffer.\r
@@ -63,7 +63,7 @@ EFI_EXT_SCSI_PASS_THRU_PROTOCOL gIScsiExtScsiPassThruProtocolTemplate = {
                                 there are too many SCSI Request Packets already\r
                                 queued. The caller may retry later.\r
   @retval EFI_DEVICE_ERROR      A device error occurred while attempting to send\r
-                                the SCSI Request Packet.                                \r
+                                the SCSI Request Packet.\r
   @retval EFI_INVALID_PARAMETER Target, Lun, or the contents of ScsiRequestPacket,\r
                                 are invalid.\r
   @retval EFI_UNSUPPORTED       The command described by the SCSI Request Packet\r
@@ -88,7 +88,7 @@ IScsiExtScsiPassThruFunction (
 {\r
   EFI_STATUS         Status;\r
   ISCSI_DRIVER_DATA  *Private;\r
-  \r
+\r
   if (Target[0] != 0) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -118,9 +118,9 @@ IScsiExtScsiPassThruFunction (
   Used to retrieve the list of legal Target IDs and LUNs for SCSI devices on\r
   a SCSI channel. These can either be the list SCSI devices that are actually\r
   present on the SCSI channel, or the list of legal Target Ids and LUNs for the\r
-  SCSI channel. Regardless, the caller of this function must probe the Target ID      \r
-  and LUN returned to see if a SCSI device is actually present at that location    \r
-  on the SCSI channel. \r
+  SCSI channel. Regardless, the caller of this function must probe the Target ID\r
+  and LUN returned to see if a SCSI device is actually present at that location\r
+  on the SCSI channel.\r
 \r
   @param[in]       This          The EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.\r
   @param[in, out]  Target        On input, a pointer to the Target ID of a SCSI\r
@@ -298,7 +298,7 @@ IScsiExtScsiPassThruBuildDevicePath (
   @retval EFI_INVALID_PARAMETER  DevicePath/Target/Lun is NULL.\r
   @retval EFI_UNSUPPORTED        This driver does not support the device path  node\r
                                  type in DevicePath.\r
-  @retval EFI_NOT_FOUND          A valid translation does not exist from DevicePath \r
+  @retval EFI_NOT_FOUND          A valid translation does not exist from DevicePath\r
                                  to a TargetID and LUN.\r
 \r
 **/\r
@@ -382,7 +382,7 @@ IScsiExtScsiPassThruResetTargetLun (
 }\r
 \r
 /**\r
-  Retrieve the list of legal Target IDs for SCSI devices on a SCSI channel.                         \r
+  Retrieve the list of legal Target IDs for SCSI devices on a SCSI channel.\r
 \r
   @param[in]       This         A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL\r
                                 instance.\r
@@ -392,7 +392,7 @@ IScsiExtScsiPassThruResetTargetLun (
                                 next SCSI device present on a SCSI channel.\r
                                 An input value of 0xF(all bytes in the array are 0xF)\r
                                 in the Target array retrieves the Target ID of the\r
-                                first SCSI device present on a SCSI channel.                 \r
+                                first SCSI device present on a SCSI channel.\r
 \r
   @retval EFI_SUCCESS           The Target ID of the next SCSI device on the SCSI\r
                                 channel was returned in Target.\r
index 27d098d578524c360c747efa187d51175ca9b0b2..a3b7c4e26faf7091de2da49ea5c55dd417d0c975 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation for iSCSI Boot Firmware Table publication.\r
 \r
-Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -19,7 +19,7 @@ UINTN   mTableKey;
 \r
 /**\r
   Initialize the header of the iSCSI Boot Firmware Table.\r
-  \r
+\r
   @param[out]  Header     The header of the iSCSI Boot Firmware Table.\r
   @param[in]   OemId      The OEM ID.\r
   @param[in]   OemTableId The OEM table ID for the iBFT.\r
index 35d5216419696876a0a3d340dd0b917920db4d6a..aa85794d77cbc9f7d1a3e68337191be72cb4d94d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Some extra definitions for iBFT.\r
 \r
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -16,7 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define _ISCSI_IBFT_H_\r
 \r
 #include <IndustryStandard/Acpi.h>\r
-#include <IndustryStandard/IScsiBootFirmwareTable.h> \r
+#include <IndustryStandard/IScsiBootFirmwareTable.h>\r
 #include <Protocol/AcpiTable.h>\r
 #include <Protocol/PciIo.h>\r
 \r
index 9e36da0203091ca7c0d7f058c0e9633cc6c75ec2..5ab685aa84059ff8bcb1ec4ff9b8fa4f1ded0664 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The shared head file for iSCSI driver.\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -201,7 +201,7 @@ struct _ISCSI_DRIVER_DATA {
   EFI_EXT_SCSI_PASS_THRU_MODE     ExtScsiPassThruMode;\r
   EFI_HANDLE                      ExtScsiPassThruHandle;\r
   EFI_DEVICE_PATH_PROTOCOL        *DevicePath;\r
-  EFI_HANDLE                      ChildHandle;  \r
+  EFI_HANDLE                      ChildHandle;\r
   ISCSI_SESSION                   *Session;\r
 };\r
 \r
index 745b7ac07b972194ba1f2622ac0f83103e0d37e5..dd0d32dcda168259e7573275ffe422d95ae66074 100644 (file)
@@ -20,7 +20,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8  IScsiHexString[] = "0123456789ABCDEFa
   Removes (trims) specified leading and trailing characters from a string.\r
 \r
   @param[in, out] Str   Pointer to the null-terminated string to be trimmed.\r
-                        On return, Str will hold the trimmed string. \r
+                        On return, Str will hold the trimmed string.\r
 \r
   @param[in]      CharC Character will be trimmed from str.\r
 \r
@@ -33,18 +33,18 @@ IScsiStrTrim (
 {\r
   CHAR16  *Pointer1;\r
   CHAR16  *Pointer2;\r
-  \r
+\r
   if (*Str == 0) {\r
     return ;\r
   }\r
-  \r
+\r
   //\r
   // Trim off the leading and trailing characters c\r
   //\r
   for (Pointer1 = Str; (*Pointer1 != 0) && (*Pointer1 == CharC); Pointer1++) {\r
     ;\r
   }\r
-  \r
+\r
   Pointer2 = Str;\r
   if (Pointer2 == Pointer1) {\r
     while (*Pointer1 != 0) {\r
@@ -52,19 +52,19 @@ IScsiStrTrim (
       Pointer1++;\r
     }\r
   } else {\r
-    while (*Pointer1 != 0) {    \r
-    *Pointer2 = *Pointer1;    \r
+    while (*Pointer1 != 0) {\r
+    *Pointer2 = *Pointer1;\r
     Pointer1++;\r
     Pointer2++;\r
     }\r
     *Pointer2 = 0;\r
   }\r
-  \r
-  \r
+\r
+\r
   for (Pointer1 = Str + StrLen(Str) - 1; Pointer1 >= Str && *Pointer1 == CharC; Pointer1--) {\r
     ;\r
   }\r
-  if  (Pointer1 !=  Str + StrLen(Str) - 1) { \r
+  if  (Pointer1 !=  Str + StrLen(Str) - 1) {\r
     *(Pointer1 + 1) = 0;\r
   }\r
 }\r
@@ -131,11 +131,11 @@ IScsiAsciiStrToLun (
   CHAR8   TemStr[2];\r
   UINT8   TemValue;\r
   UINT16  Value[4];\r
-  \r
+\r
   ZeroMem (Lun, 8);\r
   ZeroMem (TemStr, 2);\r
   ZeroMem ((UINT8 *) Value, sizeof (Value));\r
-  SizeStr    = AsciiStrLen (Str);  \r
+  SizeStr    = AsciiStrLen (Str);\r
   IndexValue = 0;\r
   IndexNum   = 0;\r
 \r
@@ -150,7 +150,7 @@ IScsiAsciiStrToLun (
         return EFI_INVALID_PARAMETER;\r
       }\r
     }\r
-    \r
+\r
     if ((TemValue == 0) && (TemStr[0] == '-')) {\r
       //\r
       // Next Lun value.\r
@@ -167,24 +167,24 @@ IScsiAsciiStrToLun (
       IndexNum = 0;\r
       continue;\r
     }\r
-    \r
+\r
     if (++IndexNum > 4) {\r
-      //     \r
+      //\r
       // Each Lun Str can't exceed size 4, because it will be as UINT16 value.\r
       //\r
       return EFI_INVALID_PARAMETER;\r
     }\r
-    \r
+\r
     //\r
     // Combine UINT16 value.\r
     //\r
     Value[IndexValue] = (UINT16) ((Value[IndexValue] << 4) + TemValue);\r
   }\r
\r
+\r
   for (Index = 0; Index <= IndexValue; Index ++) {\r
     *((UINT16 *) &Lun[Index * 2]) =  HTONS (Value[Index]);\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -319,7 +319,7 @@ IScsiMacAddrToStr (
   @param[in, out]  HexStr      Pointer to the string.\r
   @param[in, out]  HexLength   The length of the string.\r
 \r
-  @retval EFI_SUCCESS          The binary data is converted to the hexadecimal string \r
+  @retval EFI_SUCCESS          The binary data is converted to the hexadecimal string\r
                                and the length of the string is updated.\r
   @retval EFI_BUFFER_TOO_SMALL The string is too small.\r
   @retval EFI_INVALID_PARAMETER The IP string is malformatted.\r
@@ -385,7 +385,7 @@ IScsiHexToBin (
   UINTN   Length;\r
   UINT8   Digit;\r
   CHAR8   TemStr[2];\r
-  \r
+\r
   ZeroMem (TemStr, sizeof (TemStr));\r
 \r
   //\r
@@ -394,7 +394,7 @@ IScsiHexToBin (
   if ((HexStr[0] == '0') && ((HexStr[1] == 'x') || (HexStr[1] == 'X'))) {\r
     HexStr += 2;\r
   }\r
-  \r
+\r
   Length = AsciiStrLen (HexStr);\r
 \r
   for (Index = 0; Index < Length; Index ++) {\r
@@ -412,7 +412,7 @@ IScsiHexToBin (
       BinBuffer [Index/2] = (UINT8) ((BinBuffer [Index/2] << 4) + Digit);\r
     }\r
   }\r
-  \r
+\r
   *BinLength = (UINT32) ((Index + 1)/2);\r
 \r
   return EFI_SUCCESS;\r
@@ -492,7 +492,7 @@ IScsiCheckIpv6Support (
   BOOLEAN                          Supported;\r
   VOID                             *InfoBlock;\r
   UINTN                            InfoBlockSize;\r
-  \r
+\r
   EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL *Nii;\r
 \r
   ASSERT (Ipv6Support != NULL);\r
@@ -515,7 +515,7 @@ IScsiCheckIpv6Support (
 \r
   //\r
   // Get the NIC handle by SNP protocol.\r
-  //  \r
+  //\r
   Handle = NetLibGetSnpHandle (ControllerHandle, NULL);\r
   if (Handle == NULL) {\r
     return EFI_NOT_FOUND;\r
@@ -561,11 +561,11 @@ IScsiCheckIpv6Support (
   if (EFI_ERROR (Status) || InfoBlock == NULL) {\r
     FreePool (InfoBlock);\r
     return EFI_NOT_FOUND;\r
-  }  \r
+  }\r
 \r
   *Ipv6Support = ((EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT *) InfoBlock)->Ipv6Support;\r
   FreePool (InfoBlock);\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -615,19 +615,19 @@ IScsiAddNic (
         CompareMem (&NicInfo->PermanentAddress, MacAddr.Addr, HwAddressSize) == 0 &&\r
         NicInfo->VlanId == VlanId) {\r
       mPrivate->CurrentNic = NicInfo->NicIndex;\r
-         \r
-           //\r
+\r
+      //\r
       // Set IPv6 available flag.\r
-      // \r
+      //\r
       Status = IScsiCheckIpv6Support (Controller, Image, &NicInfo->Ipv6Available);\r
       if (EFI_ERROR (Status)) {\r
         //\r
-        // Fail to get the data whether UNDI supports IPv6. \r
+        // Fail to get the data whether UNDI supports IPv6.\r
         // Set default value to TRUE.\r
         //\r
         NicInfo->Ipv6Available = TRUE;\r
       }\r
-         \r
+\r
       return EFI_SUCCESS;\r
     }\r
 \r
@@ -649,19 +649,19 @@ IScsiAddNic (
   NicInfo->VlanId         = VlanId;\r
   NicInfo->NicIndex       = (UINT8) (mPrivate->MaxNic + 1);\r
   mPrivate->MaxNic        = NicInfo->NicIndex;\r
-  \r
+\r
   //\r
   // Set IPv6 available flag.\r
-  // \r
+  //\r
   Status = IScsiCheckIpv6Support (Controller, Image, &NicInfo->Ipv6Available);\r
   if (EFI_ERROR (Status)) {\r
     //\r
-    // Fail to get the data whether UNDI supports IPv6. \r
+    // Fail to get the data whether UNDI supports IPv6.\r
     // Set default value to TRUE.\r
     //\r
     NicInfo->Ipv6Available = TRUE;\r
   }\r
-  \r
+\r
   //\r
   // Get the PCI location.\r
   //\r
@@ -1799,7 +1799,7 @@ IScsiCleanDriverData (
 \r
 EXIT:\r
   if (Private->ExitBootServiceEvent != NULL) {\r
-    gBS->CloseEvent (Private->ExitBootServiceEvent); \r
+    gBS->CloseEvent (Private->ExitBootServiceEvent);\r
   }\r
 \r
   mCallbackInfo->Current = NULL;\r
@@ -1813,10 +1813,10 @@ EXIT:
 \r
   @param[in]  Controller           The handle of the controller.\r
   @param[in]  IpVersion            IP_VERSION_4 or IP_VERSION_6.\r
-  \r
+\r
   @retval TRUE                     The handle of the controller need the Dhcp protocol.\r
   @retval FALSE                    The handle of the controller does not need the Dhcp protocol.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 IScsiDhcpIsConfigured (\r
@@ -1835,7 +1835,7 @@ IScsiDhcpIsConfigured (
   CHAR16                      MacString[ISCSI_MAX_MAC_STRING_LEN];\r
   CHAR16                      AttemptMacString[ISCSI_MAX_MAC_STRING_LEN];\r
   CHAR16                      AttemptName[ISCSI_NAME_IFR_MAX_SIZE];\r
-  \r
+\r
   AttemptConfigOrder = IScsiGetVariableAndSize (\r
                          L"AttemptOrder",\r
                          &gIScsiConfigGuid,\r
@@ -1844,7 +1844,7 @@ IScsiDhcpIsConfigured (
   if (AttemptConfigOrder == NULL || AttemptConfigOrderSize == 0) {\r
     return FALSE;\r
   }\r
-  \r
+\r
   //\r
   // Get MAC address of this network device.\r
   //\r
@@ -1857,7 +1857,7 @@ IScsiDhcpIsConfigured (
   //\r
   VlanId = NetLibGetVlanId (Controller);\r
   IScsiMacAddrToStr (&MacAddr, (UINT32) HwAddressSize, VlanId, MacString);\r
-  \r
+\r
   for (Index = 0; Index < AttemptConfigOrderSize / sizeof (UINT8); Index++) {\r
     UnicodeSPrint (\r
       AttemptName,\r
@@ -1874,7 +1874,7 @@ IScsiDhcpIsConfigured (
     if(AttemptTmp == NULL || EFI_ERROR (Status)) {\r
       continue;\r
     }\r
-    \r
+\r
     ASSERT (AttemptConfigOrder[Index] == AttemptTmp->AttemptConfigIndex);\r
 \r
     if (AttemptTmp->SessionConfigData.Enabled == ISCSI_DISABLED) {\r
@@ -1882,7 +1882,7 @@ IScsiDhcpIsConfigured (
       continue;\r
     }\r
 \r
-    if (AttemptTmp->SessionConfigData.IpMode != IP_MODE_AUTOCONFIG && \r
+    if (AttemptTmp->SessionConfigData.IpMode != IP_MODE_AUTOCONFIG &&\r
         AttemptTmp->SessionConfigData.IpMode != ((IpVersion == IP_VERSION_4) ? IP_MODE_IP4 : IP_MODE_IP6)) {\r
       FreePool (AttemptTmp);\r
       continue;\r
@@ -1896,7 +1896,7 @@ IScsiDhcpIsConfigured (
 \r
     if(AttemptTmp->SessionConfigData.IpMode == IP_MODE_AUTOCONFIG ||\r
        AttemptTmp->SessionConfigData.InitiatorInfoFromDhcp == TRUE ||\r
-       AttemptTmp->SessionConfigData.TargetInfoFromDhcp == TRUE) { \r
+       AttemptTmp->SessionConfigData.TargetInfoFromDhcp == TRUE) {\r
       FreePool (AttemptTmp);\r
       FreePool (AttemptConfigOrder);\r
       return TRUE;\r
@@ -1904,7 +1904,7 @@ IScsiDhcpIsConfigured (
 \r
     FreePool (AttemptTmp);\r
   }\r
-  \r
+\r
   FreePool (AttemptConfigOrder);\r
   return FALSE;\r
 }\r
@@ -1913,10 +1913,10 @@ IScsiDhcpIsConfigured (
   Check whether the Controller handle is configured to use DNS protocol.\r
 \r
   @param[in]  Controller           The handle of the controller.\r
-  \r
+\r
   @retval TRUE                     The handle of the controller need the Dns protocol.\r
   @retval FALSE                    The handle of the controller does not need the Dns protocol.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 IScsiDnsIsConfigured (\r
@@ -1934,7 +1934,7 @@ IScsiDnsIsConfigured (
   CHAR16                      AttemptMacString[ISCSI_MAX_MAC_STRING_LEN];\r
   CHAR16                      MacString[ISCSI_MAX_MAC_STRING_LEN];\r
   CHAR16                      AttemptName[ISCSI_NAME_IFR_MAX_SIZE];\r
-  \r
+\r
   AttemptConfigOrder = IScsiGetVariableAndSize (\r
                          L"AttemptOrder",\r
                          &gIScsiConfigGuid,\r
@@ -1943,7 +1943,7 @@ IScsiDnsIsConfigured (
   if (AttemptConfigOrder == NULL || AttemptConfigOrderSize == 0) {\r
     return FALSE;\r
   }\r
-  \r
+\r
   //\r
   // Get MAC address of this network device.\r
   //\r
@@ -1956,7 +1956,7 @@ IScsiDnsIsConfigured (
   //\r
   VlanId = NetLibGetVlanId (Controller);\r
   IScsiMacAddrToStr (&MacAddr, (UINT32) HwAddressSize, VlanId, MacString);\r
-  \r
+\r
   for (Index = 0; Index < AttemptConfigOrderSize / sizeof (UINT8); Index++) {\r
     UnicodeSPrint (\r
       AttemptName,\r
@@ -1974,7 +1974,7 @@ IScsiDnsIsConfigured (
     if(AttemptTmp == NULL || EFI_ERROR (Status)) {\r
       continue;\r
     }\r
-    \r
+\r
     ASSERT (AttemptConfigOrder[Index] == AttemptTmp->AttemptConfigIndex);\r
 \r
     AsciiStrToUnicodeStrS (AttemptTmp->MacString, AttemptMacString, sizeof (AttemptMacString) / sizeof (AttemptMacString[0]));\r
@@ -1983,7 +1983,7 @@ IScsiDnsIsConfigured (
       FreePool (AttemptTmp);\r
       continue;\r
     }\r
-    \r
+\r
     if (AttemptTmp->SessionConfigData.DnsMode || AttemptTmp->SessionConfigData.TargetInfoFromDhcp) {\r
       FreePool (AttemptTmp);\r
       FreePool (AttemptConfigOrder);\r
@@ -2060,7 +2060,7 @@ IScsiGetConfigData (
     //\r
     // Check whether the attempt exists in AttemptConfig.\r
     //\r
-    AttemptTmp = IScsiConfigGetAttemptByConfigIndex (AttemptConfigOrder[Index]);    \r
+    AttemptTmp = IScsiConfigGetAttemptByConfigIndex (AttemptConfigOrder[Index]);\r
     if (AttemptTmp != NULL && AttemptTmp->SessionConfigData.Enabled == ISCSI_DISABLED) {\r
       continue;\r
     } else if (AttemptTmp != NULL && AttemptTmp->SessionConfigData.Enabled != ISCSI_DISABLED) {\r
@@ -2126,11 +2126,11 @@ IScsiGetConfigData (
 \r
           continue;\r
         }\r
-      } else if (AttemptTmp->SessionConfigData.InitiatorInfoFromDhcp && \r
-                 !AttemptTmp->ValidPath && \r
+      } else if (AttemptTmp->SessionConfigData.InitiatorInfoFromDhcp &&\r
+                 !AttemptTmp->ValidPath &&\r
                  AttemptTmp->NicIndex == mPrivate->CurrentNic) {\r
         //\r
-        // If the attempt associates with the current NIC, we can \r
+        // If the attempt associates with the current NIC, we can\r
         // get DHCP information for already added, but failed, attempt.\r
         //\r
         AttemptTmp->DhcpSuccess = FALSE;\r
@@ -2213,7 +2213,7 @@ IScsiGetConfigData (
         (UINT8) (mPrivate->Ipv6Flag ? IP_MODE_AUTOCONFIG_IP6 : IP_MODE_AUTOCONFIG_IP4);\r
       AttemptConfigData->AutoConfigureSuccess = FALSE;\r
     }\r
-    \r
+\r
     //\r
     // Get some information from dhcp server.\r
     //\r
@@ -2384,7 +2384,7 @@ IScsiGetTcpConnDevicePath (
                   Conn->TcpIo.Handle,\r
                   &gEfiDevicePathProtocolGuid,\r
                   (VOID **) &DevicePath\r
-                  );  \r
+                  );\r
   if (EFI_ERROR (Status)) {\r
     return NULL;\r
   }\r
@@ -2403,7 +2403,7 @@ IScsiGetTcpConnDevicePath (
       if (!Conn->Ipv6Flag && DevicePathSubType (&DPathNode->DevPath) == MSG_IPv4_DP) {\r
         DPathNode->Ipv4.LocalPort       = 0;\r
 \r
-        DPathNode->Ipv4.StaticIpAddress = \r
+        DPathNode->Ipv4.StaticIpAddress =\r
           (BOOLEAN) (!Session->ConfigData->SessionConfigData.InitiatorInfoFromDhcp);\r
 \r
         //\r
@@ -2414,9 +2414,9 @@ IScsiGetTcpConnDevicePath (
         //\r
 \r
         PathLen = DevicePathNodeLength (&DPathNode->Ipv4);\r
-        \r
-        if (PathLen == IP4_NODE_LEN_NEW_VERSIONS) {  \r
-            \r
+\r
+        if (PathLen == IP4_NODE_LEN_NEW_VERSIONS) {\r
+\r
           IP4_COPY_ADDRESS (\r
             &DPathNode->Ipv4.GatewayIpAddress,\r
             &Session->ConfigData->SessionConfigData.Gateway\r
@@ -2427,7 +2427,7 @@ IScsiGetTcpConnDevicePath (
             &Session->ConfigData->SessionConfigData.SubnetMask\r
             );\r
         }\r
-        \r
+\r
         break;\r
       } else if (Conn->Ipv6Flag && DevicePathSubType (&DPathNode->DevPath) == MSG_IPv6_DP) {\r
         DPathNode->Ipv6.LocalPort       = 0;\r
@@ -2436,28 +2436,28 @@ IScsiGetTcpConnDevicePath (
         //  Add a judgement here to support previous versions of IPv6_DEVICE_PATH.\r
         //  In previous versions of IPv6_DEVICE_PATH, IpAddressOrigin, PrefixLength\r
         //  and GatewayIpAddress do not exist.\r
-        //  In new version of IPv6_DEVICE_PATH, structure length is 60, while in \r
+        //  In new version of IPv6_DEVICE_PATH, structure length is 60, while in\r
         //  old versions, the length is 43.\r
         //\r
 \r
         PathLen = DevicePathNodeLength (&DPathNode->Ipv6);\r
-        \r
-        if (PathLen == IP6_NODE_LEN_NEW_VERSIONS ) { \r
+\r
+        if (PathLen == IP6_NODE_LEN_NEW_VERSIONS ) {\r
 \r
           DPathNode->Ipv6.IpAddressOrigin = 0;\r
           DPathNode->Ipv6.PrefixLength    = IP6_PREFIX_LENGTH;\r
           ZeroMem (&DPathNode->Ipv6.GatewayIpAddress, sizeof (EFI_IPv6_ADDRESS));\r
         }\r
-        else if (PathLen == IP6_NODE_LEN_OLD_VERSIONS) { \r
+        else if (PathLen == IP6_NODE_LEN_OLD_VERSIONS) {\r
 \r
           //\r
-          //  StaticIPAddress is a field in old versions of IPv6_DEVICE_PATH, while ignored in new \r
+          //  StaticIPAddress is a field in old versions of IPv6_DEVICE_PATH, while ignored in new\r
           //  version. Set StaticIPAddress through its' offset in old IPv6_DEVICE_PATH.\r
           //\r
-          *((UINT8 *)(&DPathNode->Ipv6) + IP6_OLD_IPADDRESS_OFFSET) = \r
+          *((UINT8 *)(&DPathNode->Ipv6) + IP6_OLD_IPADDRESS_OFFSET) =\r
             (BOOLEAN) (!Session->ConfigData->SessionConfigData.InitiatorInfoFromDhcp);\r
         }\r
-        \r
+\r
         break;\r
       }\r
     }\r
@@ -2486,10 +2486,10 @@ IScsiOnExitBootService (
   ISCSI_DRIVER_DATA *Private;\r
 \r
   Private = (ISCSI_DRIVER_DATA *) Context;\r
-  \r
+\r
   gBS->CloseEvent (Private->ExitBootServiceEvent);\r
   Private->ExitBootServiceEvent = NULL;\r
-  \r
+\r
   if (Private->Session != NULL) {\r
     IScsiSessionAbort (Private->Session);\r
   }\r
@@ -2502,7 +2502,7 @@ IScsiOnExitBootService (
   currently managing the controller specified by ControllerHandle.  This test\r
   is performed by evaluating if the the protocol specified by ProtocolGuid is\r
   present on ControllerHandle and is was opened by DriverBindingHandle and Nic\r
-  Device handle with an attribute of EFI_OPEN_PROTOCOL_BY_DRIVER. \r
+  Device handle with an attribute of EFI_OPEN_PROTOCOL_BY_DRIVER.\r
   If ProtocolGuid is NULL, then ASSERT().\r
 \r
   @param  ControllerHandle     A handle for a controller to test.\r
index 659c0268b582d52e9ce49458917da0810a332be3..afd4b84910a8e31b885930a5c1c4c7d99d8fcc37 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Miscellaneous definitions for iSCSI driver.\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -62,7 +62,7 @@ typedef struct _ISCSI_SESSION_CONFIG_NVDATA {
 \r
   BOOLEAN           DnsMode;  // Flag indicate whether the Target address is expressed as URL format.\r
   CHAR8             TargetUrl[ISCSI_TARGET_URI_MAX_SIZE];\r
-  \r
+\r
 } ISCSI_SESSION_CONFIG_NVDATA;\r
 #pragma pack()\r
 \r
@@ -81,7 +81,7 @@ IScsiGetSubnetMaskPrefixLength (
   );\r
 \r
 /**\r
-  Convert the hexadecimal encoded LUN string into the 64-bit LUN. \r
+  Convert the hexadecimal encoded LUN string into the 64-bit LUN.\r
 \r
   @param[in]   Str             The hexadecimal encoded LUN string.\r
   @param[out]  Lun             Storage to return the 64-bit LUN.\r
@@ -153,7 +153,7 @@ IScsiAsciiStrToIp (
   @param[in, out]  HexStr      Pointer to the string.\r
   @param[in, out]  HexLength   The length of the string.\r
 \r
-  @retval EFI_SUCCESS          The binary data is converted to the hexadecimal string \r
+  @retval EFI_SUCCESS          The binary data is converted to the hexadecimal string\r
                                and the length of the string is updated.\r
   @retval EFI_BUFFER_TOO_SMALL The string is too small.\r
   @retval EFI_INVALID_PARAMETER The IP string is malformatted.\r
@@ -372,10 +372,10 @@ IScsiCleanDriverData (
 \r
   @param[in]  Controller           The handle of the controller.\r
   @param[in]  IpVersion            IP_VERSION_4 or IP_VERSION_6.\r
-  \r
+\r
   @retval TRUE                     The handle of the controller need the Dhcp protocol.\r
   @retval FALSE                    The handle of the controller does not need the Dhcp protocol.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 IScsiDhcpIsConfigured (\r
@@ -387,10 +387,10 @@ IScsiDhcpIsConfigured (
   Check wheather the Controller handle is configured to use DNS protocol.\r
 \r
   @param[in]  Controller           The handle of the controller.\r
-  \r
+\r
   @retval TRUE                     The handle of the controller need the DNS protocol.\r
   @retval FALSE                    The handle of the controller does not need the DNS protocol.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 IScsiDnsIsConfigured (\r
@@ -447,7 +447,7 @@ IScsiOnExitBootService (
   currently managing the controller specified by ControllerHandle.  This test\r
   is performed by evaluating if the the protocol specified by ProtocolGuid is\r
   present on ControllerHandle and is was opened by DriverBindingHandle and Nic\r
-  Device handle with an attribute of EFI_OPEN_PROTOCOL_BY_DRIVER. \r
+  Device handle with an attribute of EFI_OPEN_PROTOCOL_BY_DRIVER.\r
   If ProtocolGuid is NULL, then ASSERT().\r
 \r
   @param  ControllerHandle     A handle for a controller to test.\r
index 38e4af26bcf8f227fc78fea42b959b23548dbad3..7619360568d8efd6de55f41764b1bf7a79bc8d02 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The implementation of iSCSI protocol based on RFC3720.\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -17,7 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 UINT32 mDataSegPad = 0;\r
 \r
 /**\r
-  Attach the iSCSI connection to the iSCSI session. \r
+  Attach the iSCSI connection to the iSCSI session.\r
 \r
   @param[in, out]  Session The iSCSI session.\r
   @param[in, out]  Conn    The iSCSI connection.\r
@@ -35,7 +35,7 @@ IScsiAttatchConnection (
 }\r
 \r
 /**\r
-  Detach the iSCSI connection from the session it belongs to. \r
+  Detach the iSCSI connection from the session it belongs to.\r
 \r
   @param[in, out]  Conn The iSCSI connection.\r
 \r
@@ -52,7 +52,7 @@ IScsiDetatchConnection (
 \r
 \r
 /**\r
-  Check the sequence number according to RFC3720. \r
+  Check the sequence number according to RFC3720.\r
 \r
   @param[in, out]  ExpSN   The currently expected sequence number.\r
   @param[in]       NewSN   The sequence number to check.\r
@@ -124,7 +124,7 @@ IScsiUpdateCmdSN (
 \r
   @retval EFI_SUCCESS        The iSCSI connection is logged into the iSCSI target.\r
   @retval EFI_TIMEOUT        Timeout occurred during the login procedure.\r
-  @retval Others             Other errors as indicated.  \r
+  @retval Others             Other errors as indicated.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -274,7 +274,7 @@ IScsiCreateConnection (
 \r
   if (!Conn->Ipv6Flag) {\r
     Tcp4IoConfig = &TcpIoConfig.Tcp4IoConfigData;\r
-    \r
+\r
     CopyMem (&Tcp4IoConfig->LocalIp, &NvData->LocalIp, sizeof (EFI_IPv4_ADDRESS));\r
     CopyMem (&Tcp4IoConfig->SubnetMask, &NvData->SubnetMask, sizeof (EFI_IPv4_ADDRESS));\r
     CopyMem (&Tcp4IoConfig->Gateway, &NvData->Gateway, sizeof (EFI_IPv4_ADDRESS));\r
@@ -285,7 +285,7 @@ IScsiCreateConnection (
     Tcp4IoConfig->StationPort = 0;\r
   } else {\r
     Tcp6IoConfig = &TcpIoConfig.Tcp6IoConfigData;\r
-  \r
+\r
     CopyMem (&Tcp6IoConfig->RemoteIp, &NvData->TargetIp, sizeof (EFI_IPv6_ADDRESS));\r
     Tcp6IoConfig->RemotePort  = NvData->TargetPort;\r
     Tcp6IoConfig->ActiveFlag  = TRUE;\r
@@ -338,7 +338,7 @@ IScsiDestroyConnection (
 \r
   @retval     EFI_SUCCESS      Get the NIC information successfully.\r
   @retval     Others           Other errors as indicated.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 IScsiGetIp6NicInfo (\r
@@ -494,7 +494,7 @@ IScsiSessionLogin (
     Session->State = SESSION_STATE_LOGGED_IN;\r
 \r
     if (!Conn->Ipv6Flag) {\r
-      ProtocolGuid = &gEfiTcp4ProtocolGuid;      \r
+      ProtocolGuid = &gEfiTcp4ProtocolGuid;\r
     } else {\r
       ProtocolGuid = &gEfiTcp6ProtocolGuid;\r
     }\r
@@ -505,7 +505,7 @@ IScsiSessionLogin (
                     (VOID **) &Tcp,\r
                     Session->Private->Image,\r
                     Session->Private->ExtScsiPassThruHandle,\r
-                    EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER                    \r
+                    EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER\r
                     );\r
 \r
     ASSERT_EFI_ERROR (Status);\r
@@ -612,7 +612,7 @@ IScsiSendLoginReq (
   Receive and process the iSCSI login response.\r
 \r
   @param[in]  Conn             The connection in the iSCSI login phase.\r
-  \r
+\r
   @retval EFI_SUCCESS          The iSCSI login response PDU is received and processed.\r
   @retval Others               Other errors as indicated.\r
 \r
@@ -793,7 +793,7 @@ IScsiPrepareLoginReq (
   case ISCSI_SECURITY_NEGOTIATION:\r
     //\r
     // Both none authentication and CHAP authentication share the CHAP path.\r
-    // \r
+    //\r
     //\r
     if (Session->AuthType != ISCSI_AUTH_TYPE_KRB) {\r
       Status = IScsiCHAPToSendReq (Conn, Nbuf);\r
@@ -808,7 +808,7 @@ IScsiPrepareLoginReq (
     if (!Conn->ParamNegotiated) {\r
       IScsiFillOpParams (Conn, Nbuf);\r
     }\r
-    \r
+\r
     ISCSI_SET_FLAG (LoginReq, ISCSI_LOGIN_REQ_PDU_FLAG_TRANSIT);\r
     break;\r
 \r
@@ -964,7 +964,7 @@ IScsiProcessLoginRsp (
     // the value presented in CmdSN as the target value for ExpCmdSN.\r
     //\r
     if ((Session->State == SESSION_STATE_FREE) && (Session->CmdSN != LoginRsp->ExpCmdSN)) {\r
-      return EFI_PROTOCOL_ERROR;     \r
+      return EFI_PROTOCOL_ERROR;\r
     }\r
 \r
     //\r
@@ -1072,7 +1072,7 @@ IScsiProcessLoginRsp (
   @param[in]      Data         The data segment that should contain the\r
                                TargetAddress key-value list.\r
   @param[in]      Len          Length of the data.\r
-  \r
+\r
   @retval EFI_SUCCESS          The target address is updated.\r
   @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.\r
   @retval EFI_NOT_FOUND        The TargetAddress key is not found.\r
@@ -1101,7 +1101,7 @@ IScsiUpdateTargetAddress (
 \r
   Status = EFI_NOT_FOUND;\r
   NvData = &Session->ConfigData->SessionConfigData;\r
\r
+\r
   while (TRUE) {\r
     TargetAddress = IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_TARGET_ADDRESS);\r
     if (TargetAddress == NULL) {\r
@@ -1188,7 +1188,7 @@ IScsiUpdateTargetAddress (
 \r
     //\r
     // Save the origial user setting which specifies the proxy/virtual iSCSI target.\r
-    //    \r
+    //\r
     CopyMem (&NvData->OriginalTargetIp, &NvData->TargetIp, sizeof (EFI_IP_ADDRESS));\r
 \r
     //\r
@@ -1365,7 +1365,7 @@ IScsiReceivePdu (
   switch (ISCSI_GET_OPCODE (Header)) {\r
   case ISCSI_OPCODE_SCSI_DATA_IN:\r
     //\r
-    // To reduce memory copy overhead, try to use the buffer described by Context \r
+    // To reduce memory copy overhead, try to use the buffer described by Context\r
     // if the PDU is an iSCSI SCSI data.\r
     //\r
     InDataOffset = ISCSI_GET_BUFFER_OFFSET (Header);\r
@@ -1713,7 +1713,7 @@ IScsiCheckOpParams (
   IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_TARGET_ALIAS);\r
   IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_TARGET_PORTAL_GROUP_TAG);\r
 \r
-  \r
+\r
   //\r
   // Remove the key-value that may not needed for result function is OR.\r
   //\r
@@ -2228,7 +2228,7 @@ IScsiNewScsiCmdPdu (
   if (ScsiCmd == NULL) {\r
     NetbufFree (PduHeader);\r
     return NULL;\r
-  }    \r
+  }\r
   Header  = (ISCSI_ADDITIONAL_HEADER *) (ScsiCmd + 1);\r
 \r
   ZeroMem (ScsiCmd, Length);\r
@@ -2902,8 +2902,8 @@ IScsiOnNopInRcvd (
   @param[in]       Lun       The LUN.\r
   @param[in, out]  Packet    The request packet containing IO request, SCSI command\r
                              buffer and buffers to read/write.\r
-                             \r
-  @retval EFI_SUCCES           The SCSI command is executed and the result is updated to \r
+\r
+  @retval EFI_SUCCES           The SCSI command is executed and the result is updated to\r
                                the Packet.\r
   @retval EFI_DEVICE_ERROR     Session state was not as required.\r
   @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.\r
@@ -3197,7 +3197,7 @@ IScsiSessionAbort (
     if (!Conn->Ipv6Flag) {\r
       ProtocolGuid = &gEfiTcp4ProtocolGuid;\r
     } else {\r
-      ProtocolGuid = &gEfiTcp6ProtocolGuid;    \r
+      ProtocolGuid = &gEfiTcp6ProtocolGuid;\r
     }\r
 \r
     gBS->CloseProtocol (\r
index d57bda590917350914655f2a7572f795362721be..465838666feb4fb923d39b41143d68f2e1a16620 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The header file of iSCSI Protocol that defines many specific data structures.\r
 \r
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -627,7 +627,7 @@ typedef struct _ISCSI_KEY_VALUE_PAIR {
 } ISCSI_KEY_VALUE_PAIR;\r
 \r
 /**\r
-  Attach the iSCSI connection to the iSCSI session. \r
+  Attach the iSCSI connection to the iSCSI session.\r
 \r
   @param[in, out]  Session The iSCSI session.\r
   @param[in, out]  Conn    The iSCSI connection.\r
@@ -640,7 +640,7 @@ IScsiAttatchConnection (
   );\r
 \r
 /**\r
-  Detach the iSCSI connection from the session it belongs to. \r
+  Detach the iSCSI connection from the session it belongs to.\r
 \r
   @param[in, out]  Conn The iSCSI connection.\r
 \r
@@ -658,7 +658,7 @@ IScsiDetatchConnection (
 \r
   @retval EFI_SUCCESS        The iSCSI connection is logged into the iSCSI target.\r
   @retval EFI_TIMEOUT        Timeout occurred during the login procedure.\r
-  @retval Others             Other errors as indicated.  \r
+  @retval Others             Other errors as indicated.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -743,7 +743,7 @@ IScsiSendLoginReq (
   Receive and process the iSCSI login response.\r
 \r
   @param[in]  Conn             The connection in the iSCSI login phase.\r
-  \r
+\r
   @retval EFI_SUCCESS          The iSCSI login response PDU is received and processed.\r
   @retval Others               Other errors as indicated.\r
 \r
@@ -815,7 +815,7 @@ IScsiProcessLoginRsp (
   @param[in]      Data         The data segment which should contain the\r
                                TargetAddress key-value list.\r
   @param[in]      Len          Length of the data.\r
-  \r
+\r
   @retval EFI_SUCCESS          The target address is updated.\r
   @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.\r
   @retval EFI_NOT_FOUND        The TargetAddress key is not found.\r
@@ -983,8 +983,8 @@ IScsiNormalizeName (
   @param[in]       Lun       The LUN.\r
   @param[in, out]  Packet    The request packet containing IO request, SCSI command\r
                              buffer and buffers to read/write.\r
-                             \r
-  @retval EFI_SUCCES           The SCSI command is executed and the result is updated to \r
+\r
+  @retval EFI_SUCCES           The SCSI command is executed and the result is updated to\r
                                the Packet.\r
   @retval EFI_DEVICE_ERROR     Session state was not as required.\r
   @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.\r
@@ -1026,7 +1026,7 @@ IScsiSessionInit (
   IN OUT ISCSI_SESSION  *Session,\r
   IN BOOLEAN            Recovery\r
   );\r
-  \r
+\r
 /**\r
   Abort the iSCSI session, that is, reset all the connection and free the\r
   resources.\r
index 7e44436633d0462c75f2113065726e7645a7f565..cb124452442b980a08dbff28ef9fd4060f47d6a4 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   GUIDs used as HII FormSet and HII Package list GUID in HTTP boot driver.\r
-  \r
-Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+\r
+Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                            \r
+http://opensource.org/licenses/bsd-license.php.\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index bd3023125dcfc1c1635801bd60699cc2797829cc..c648f67576687321229a5c6ec3ba76577a31aefe 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This file defines the HttpTlsCipherList variable for HTTPS to configure Tls Cipher List.\r
 \r
-Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2018 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under\r
 the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
@@ -17,10 +17,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 //\r
 // Private Variable for HTTPS to configure Tls Cipher List.\r
-// The valid contents of variable must follow the TLS CipherList format defined in RFC 5246. \r
+// The valid contents of variable must follow the TLS CipherList format defined in RFC 5246.\r
 // The valid length of variable must be an integral multiple of 2.\r
 // For example, if below cipher suites are preferred:\r
-//      CipherSuite TLS_RSA_WITH_AES_128_CBC_SHA256 = {0x00,0x3C}\r
+//    CipherSuite TLS_RSA_WITH_AES_128_CBC_SHA256 = {0x00,0x3C}\r
 //   CipherSuite TLS_RSA_WITH_AES_256_CBC_SHA256 = {0x00,0x3D}\r
 // Then, the contents of variable should be:\r
 //   {0x00,0x3C,0x00,0x3D}\r
@@ -29,7 +29,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   { \\r
     0x46ddb415, 0x5244, 0x49c7, { 0x93, 0x74, 0xf0, 0xe2, 0x98, 0xe7, 0xd3, 0x86 } \\r
   }\r
-  \r
+\r
 #define EDKII_HTTP_TLS_CIPHER_LIST_VARIABLE       L"HttpTlsCipherList"\r
 \r
 extern EFI_GUID gEdkiiHttpTlsCipherListGuid;\r
index 507702255884a0cbdcf2825303b6e462777b0718..e5a7d131b820f06eb9b5c187525938a48eabeeec 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
-  GUIDs used as HII FormSet and HII Package list GUID in IScsiConfig driver \r
-  that supports IP4 and IP6 both. \r
-  \r
-Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+  GUIDs used as HII FormSet and HII Package list GUID in IScsiConfig driver\r
+  that supports IP4 and IP6 both.\r
+\r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                            \r
+http://opensource.org/licenses/bsd-license.php.\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index f7a38895964df5d0978e991884a8369949e5c49e..eefcd016f0b6d373b0df7a617a37fbfc7291947e 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
-  GUIDs used as HII FormSet and HII Package list GUID in Ip6Config driver. \r
-  \r
-Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+  GUIDs used as HII FormSet and HII Package list GUID in Ip6Config driver.\r
+\r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                            \r
+http://opensource.org/licenses/bsd-license.php.\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index 6a1f082edd7f6a86d1c6cd30f53dcccb17a59ee9..e314f152070352c73e1dc208850042504ef1a2b8 100644 (file)
@@ -2,7 +2,7 @@
   Implementation of EFI_COMPONENT_NAME_PROTOCOL and\r
   EFI_COMPONENT_NAME2_PROTOCOL protocol.\r
 \r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -238,10 +238,10 @@ Ip6ComponentNameGetDriverName (
 \r
   @param  Ip6[in]                   A pointer to the EFI_IP6_PROTOCOL.\r
 \r
-  \r
+\r
   @retval EFI_SUCCESS               Update the ControllerNameTable of this instance successfully.\r
   @retval EFI_INVALID_PARAMETER     The input parameter is invalid.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 UpdateName (\r
@@ -320,7 +320,7 @@ UpdateName (
       FreeUnicodeStringTable (gIp6ControllerNameTable);\r
       gIp6ControllerNameTable = NULL;\r
   }\r
-  \r
+\r
   Status = AddUnicodeString2 (\r
              "eng",\r
              gIp6ComponentName.SupportedLanguages,\r
@@ -331,7 +331,7 @@ UpdateName (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   return AddUnicodeString2 (\r
            "en",\r
            gIp6ComponentName2.SupportedLanguages,\r
@@ -421,7 +421,7 @@ Ip6ComponentNameGetControllerName (
 {\r
   EFI_STATUS                    Status;\r
   EFI_IP6_PROTOCOL              *Ip6;\r
-  \r
+\r
   //\r
   // Only provide names for child handles.\r
   //\r
@@ -430,7 +430,7 @@ Ip6ComponentNameGetControllerName (
   }\r
 \r
   //\r
-  // Make sure this driver produced ChildHandle \r
+  // Make sure this driver produced ChildHandle\r
   //\r
   Status = EfiTestChildHandle (\r
              ControllerHandle,\r
index 7007301f817bbc0c0383cd6b977e9700029c275a..c18918e7348205bb82a3b58172daa1f16eb4ae50 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The implementation of common functions shared by IP6 driver.\r
 \r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -330,7 +330,7 @@ Ip6AddAddr (
 \r
 /**\r
   Callback function which provided by user to remove one node in NetDestroyLinkList process.\r
-  \r
+\r
   @param[in]    Entry           The entry to be removed.\r
   @param[in]    Context         Pointer to the callback context corresponds to the Context in NetDestroyLinkList.\r
 \r
@@ -348,7 +348,7 @@ Ip6DestroyChildEntryByAddr (
   IP6_PROTOCOL                  *Instance;\r
   EFI_SERVICE_BINDING_PROTOCOL  *ServiceBinding;\r
   EFI_IPv6_ADDRESS              *Address;\r
-  \r
+\r
   Instance = NET_LIST_USER_STRUCT_S (Entry, IP6_PROTOCOL, Link, IP6_PROTOCOL_SIGNATURE);\r
   ServiceBinding = ((IP6_DESTROY_CHILD_BY_ADDR_CALLBACK_CONTEXT*) Context)->ServiceBinding;\r
   Address = ((IP6_DESTROY_CHILD_BY_ADDR_CALLBACK_CONTEXT*) Context)->Address;\r
@@ -356,7 +356,7 @@ Ip6DestroyChildEntryByAddr (
   if ((Instance->State == IP6_STATE_CONFIGED) && EFI_IP6_EQUAL (&Instance->ConfigData.StationAddress, Address)) {\r
     return ServiceBinding->DestroyChild (ServiceBinding, Instance->Handle);\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
index f4b9374da2d0c85e3688fce47f28fe2e2c3e67db..6ec87716a2de404f42c74f313bca3b0653cc061a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The implementation of EFI IPv6 Configuration Protocol.\r
 \r
-  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -58,7 +58,7 @@ Ip6ConfigOnPolicyChanged (
   BOOLEAN             Recovery;\r
 \r
   Recovery = FALSE;\r
-  \r
+\r
   //\r
   // Currently there are only two policies: Manual and Automatic. Regardless of\r
   // what transition is going on, i.e., Manual -> Automatic and Automatic ->\r
@@ -86,14 +86,14 @@ Ip6ConfigOnPolicyChanged (
   }\r
 \r
   if (!IsListEmpty (&IpSb->DefaultInterface->AddressList) && IpSb->DefaultInterface->AddressCount > 0) {\r
-    //  \r
-    // If any IPv6 children (Instance) in configured state and use global unicast address, it will be \r
-    // destroyed in Ip6RemoveAddr() function later. Then, the upper layer driver's Stop() function will be \r
-    // called, which may break the upper layer network stacks. So, the driver should take the responsibility \r
-    // for the recovery by using ConnectController() after Ip6RemoveAddr(). \r
+    //\r
+    // If any IPv6 children (Instance) in configured state and use global unicast address, it will be\r
+    // destroyed in Ip6RemoveAddr() function later. Then, the upper layer driver's Stop() function will be\r
+    // called, which may break the upper layer network stacks. So, the driver should take the responsibility\r
+    // for the recovery by using ConnectController() after Ip6RemoveAddr().\r
     // Here, just check whether need to recover the upper layer network stacks later.\r
     //\r
-    NET_LIST_FOR_EACH (Entry, &IpSb->DefaultInterface->AddressList) { \r
+    NET_LIST_FOR_EACH (Entry, &IpSb->DefaultInterface->AddressList) {\r
       AddrInfo = NET_LIST_USER_STRUCT_S (Entry, IP6_ADDRESS_INFO, Link, IP6_ADDR_INFO_SIGNATURE);\r
       if (!IsListEmpty (&IpSb->Children)) {\r
         NET_LIST_FOR_EACH (Entry2, &IpSb->Children) {\r
@@ -105,7 +105,7 @@ Ip6ConfigOnPolicyChanged (
         }\r
       }\r
     }\r
-    \r
+\r
     //\r
     // All IPv6 children that use global unicast address as it's source address\r
     // should be destroyed now. The survivers are those use the link-local address\r
@@ -118,7 +118,7 @@ Ip6ConfigOnPolicyChanged (
       NULL,\r
       0\r
       );\r
-    \r
+\r
     if (IpSb->Controller != NULL && Recovery) {\r
       //\r
       // ConnectController() to recover the upper layer network stacks.\r
@@ -726,7 +726,7 @@ Ip6ConfigSetPolicy (
     DataItem->DataSize = 0;\r
     DataItem->Status   = EFI_NOT_FOUND;\r
     NetMapIterate (&DataItem->EventMap, Ip6ConfigSignalEvent, NULL);\r
-    \r
+\r
     if (NewPolicy == Ip6ConfigPolicyManual) {\r
       //\r
       // The policy is changed from automatic to manual. Stop the DHCPv6 process\r
@@ -1546,7 +1546,7 @@ Ip6ConfigSetDnsServer (
     }\r
   } else  {\r
     //\r
-    // DataSize is 0 and Data is NULL, clean up the DnsServer address. \r
+    // DataSize is 0 and Data is NULL, clean up the DnsServer address.\r
     //\r
     if (Item->Data.Ptr != NULL) {\r
       FreePool (Item->Data.Ptr);\r
@@ -1965,7 +1965,7 @@ Ip6ConfigOnDhcp6SbInstalled (
                                 network stack was set successfully.\r
   @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:\r
                                 - This is NULL.\r
-                                - One or more fields in Data and DataSizedo not match the \r
+                                - One or more fields in Data and DataSizedo not match the\r
                                   requirement of the data type indicated by DataType.\r
   @retval EFI_WRITE_PROTECTED   The specified configuration data is read-only or the specified\r
                                 configuration data cannot be set under the current policy.\r
index 3a6e8ad4d17c28e7b70180c5a0e42dba44077275..6f818d5335aff82f86c01a31b833c47b7413c551 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Definitions for EFI IPv6 Configuartion Protocol implementation.\r
 \r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -70,7 +70,7 @@ typedef struct _IP6_CONFIG_INSTANCE IP6_CONFIG_INSTANCE;
                                8 bytes.\r
   @retval EFI_SUCCESS          The specified configuration data for the EFI IPv6\r
                                network stack was set successfully.\r
-  \r
+\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -87,14 +87,14 @@ EFI_STATUS
   @param[in, out] DataSize On input, in bytes, the size of Data. On output, in\r
                            bytes, the size of buffer required to store the specified\r
                            configuration data.\r
-  @param[in]      Data     The data buffer in which the configuration data is returned.  \r
+  @param[in]      Data     The data buffer in which the configuration data is returned.\r
                            Ignored if DataSize is ZERO.\r
 \r
   @retval EFI_BUFFER_TOO_SMALL The size of Data is too small for the specified\r
-                               configuration data, and the required size is \r
+                               configuration data, and the required size is\r
                                returned in DataSize.\r
-  @retval EFI_SUCCESS          The specified configuration data was obtained successfully.                               \r
-  \r
+  @retval EFI_SUCCESS          The specified configuration data was obtained successfully.\r
+\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -162,9 +162,9 @@ typedef struct {
 } IP6_ADDRESS_INFO_ENTRY;\r
 \r
 typedef struct {\r
-  EFI_IP6_CONFIG_POLICY                    Policy;              ///< manual or automatic  \r
+  EFI_IP6_CONFIG_POLICY                    Policy;              ///< manual or automatic\r
   EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS DadTransmitCount;    ///< dad transmits count\r
-  EFI_IP6_CONFIG_INTERFACE_ID              InterfaceId;         ///< alternative interface id \r
+  EFI_IP6_CONFIG_INTERFACE_ID              InterfaceId;         ///< alternative interface id\r
   LIST_ENTRY                               ManualAddress;       ///< IP addresses\r
   UINT32                                   ManualAddressCount;  ///< IP addresses count\r
   LIST_ENTRY                               GatewayAddress;      ///< Gateway address\r
@@ -236,13 +236,13 @@ Ip6ConfigReadConfigData (
 /**\r
   The event process routine when the DHCPv6 server is answered with a reply packet\r
   for an information request.\r
-  \r
+\r
   @param[in]     This          Points to the EFI_DHCP6_PROTOCOL.\r
   @param[in]     Context       The pointer to the IP6 configuration instance data.\r
   @param[in]     Packet        The DHCPv6 reply packet.\r
 \r
   @retval EFI_SUCCESS      The DNS server address was retrieved from the reply packet.\r
-  @retval EFI_NOT_READY    The reply packet does not contain the DNS server option, or \r
+  @retval EFI_NOT_READY    The reply packet does not contain the DNS server option, or\r
                            the DNS server address is not valid.\r
 \r
 **/\r
@@ -256,7 +256,7 @@ Ip6ConfigOnDhcp6Reply (
 \r
 /**\r
   The work function to trigger the DHCPv6 process to perform a stateful autoconfiguration.\r
-  \r
+\r
   @param[in]     Instance      Pointer to the IP6 config instance data.\r
   @param[in]     OtherInfoOnly If FALSE, get stateful address and other information\r
                                via DHCPv6. Otherwise, only get the other information.\r
@@ -275,10 +275,10 @@ Ip6ConfigStartStatefulAutoConfig (
   Initialize an IP6_CONFIG_INSTANCE.\r
 \r
   @param[out]    Instance       The buffer of IP6_CONFIG_INSTANCE to be initialized.\r
-  \r
+\r
   @retval EFI_OUT_OF_RESOURCES  Failed to allocate resources to complete the operation.\r
   @retval EFI_SUCCESS           The IP6_CONFIG_INSTANCE initialized successfully.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 Ip6ConfigInitInstance (\r
@@ -289,7 +289,7 @@ Ip6ConfigInitInstance (
   Release an IP6_CONFIG_INSTANCE.\r
 \r
   @param[in, out] Instance    The buffer of IP6_CONFIG_INSTANCE to be freed.\r
-  \r
+\r
 **/\r
 VOID\r
 Ip6ConfigCleanInstance (\r
@@ -303,7 +303,7 @@ Ip6ConfigCleanInstance (
 \r
   @retval EFI_SUCCESS         The child was successfully destroyed.\r
   @retval Others              Failed to destroy the child.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 Ip6ConfigDestroyDhcp6 (\r
index 1b878a56a3aae87b8d8f0909a5b1bf791f8408af..50adc371c7bbe59a7712b492714f3e9688188fc8 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Helper functions for configuring or obtaining the parameters relating to IP6.\r
 \r
-  Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -994,7 +994,7 @@ Exit:
 \r
 /**\r
   Convert IFR data into IP6 configuration data. The policy, alternative interface\r
-  ID, and DAD transmit counts, and will be saved. \r
+  ID, and DAD transmit counts, and will be saved.\r
 \r
   @param[in]       IfrNvData       The IFR NV data.\r
   @param[in, out]  Instance        The IP6 config instance data.\r
@@ -1541,7 +1541,7 @@ Ip6GetCurrentSetting (
   EFI_STATUS                    Status;\r
   CHAR16                        PortString[ADDRESS_STR_MAX_SIZE];\r
   EFI_IP6_CONFIG_INTERFACE_INFO *IfInfo;\r
-  \r
+\r
 \r
   Ip6Config = &Instance->Ip6Config;\r
   HiiHandle = Instance->CallbackInfo.RegisteredHandle;\r
@@ -1794,7 +1794,7 @@ Ip6FormCallback (
       }\r
       *ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT;\r
       break;\r
-    \r
+\r
     case KEY_INTERFACE_ID:\r
       Status = Ip6ParseInterfaceIdFromString (IfrNvData->InterfaceId, &Ip6NvData->InterfaceId);\r
       if (EFI_ERROR (Status)) {\r
@@ -1805,9 +1805,9 @@ Ip6FormCallback (
           NULL\r
           );\r
       }\r
-    \r
+\r
       break;\r
-    \r
+\r
     case KEY_MANUAL_ADDRESS:\r
       Status = Ip6ParseAddressListFromString (\r
                  IfrNvData->ManualAddress,\r
@@ -1822,9 +1822,9 @@ Ip6FormCallback (
           NULL\r
           );\r
       }\r
-    \r
+\r
       break;\r
-    \r
+\r
     case KEY_GATEWAY_ADDRESS:\r
       Status = Ip6ParseAddressListFromString (\r
                  IfrNvData->GatewayAddress,\r
@@ -1839,9 +1839,9 @@ Ip6FormCallback (
           NULL\r
           );\r
       }\r
-    \r
+\r
       break;\r
-    \r
+\r
     case KEY_DNS_ADDRESS:\r
       Status = Ip6ParseAddressListFromString (\r
                  IfrNvData->DnsAddress,\r
@@ -1856,7 +1856,7 @@ Ip6FormCallback (
           NULL\r
           );\r
       }\r
-    \r
+\r
       break;\r
 \r
     default:\r
index 0797a742f23ad03c7b6080c7c5b1b004491b5cf0..0bda1687f0c447dd81a6f9d168d61e1032085341 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The driver binding and service binding protocol for IP6 driver.\r
 \r
-  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
   (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
 \r
   This program and the accompanying materials\r
@@ -182,7 +182,7 @@ Ip6CleanService (
     Status = Ip6LeaveGroup (IpSb, &AllNodes);\r
     if (EFI_ERROR (Status)) {\r
       return Status;\r
-    }  \r
+    }\r
   }\r
 \r
   if (IpSb->DefaultInterface != NULL) {\r
@@ -568,14 +568,14 @@ Ip6DriverBindingStart (
   }\r
 \r
   //\r
-  // Read the config data from NV variable again. \r
+  // Read the config data from NV variable again.\r
   // The default data can be changed by other drivers.\r
   //\r
   Status = Ip6ConfigReadConfigData (IpSb->MacString, &IpSb->Ip6ConfigInstance);\r
   if (EFI_ERROR (Status)) {\r
     goto ON_ERROR;\r
   }\r
-  \r
+\r
   //\r
   // If there is any default manual address, set it.\r
   //\r
@@ -638,7 +638,7 @@ Ip6DriverBindingStart (
                   );\r
   if (EFI_ERROR (Status)) {\r
     goto ON_ERROR;\r
-  }    \r
+  }\r
 \r
   //\r
   // Initialize the IP6 ID\r
@@ -655,7 +655,7 @@ ON_ERROR:
 \r
 /**\r
   Callback function which provided by user to remove one node in NetDestroyLinkList process.\r
-  \r
+\r
   @param[in]    Entry           The entry to be removed.\r
   @param[in]    Context         Pointer to the callback context corresponds to the Context in NetDestroyLinkList.\r
 \r
@@ -786,7 +786,7 @@ Ip6DriverBindingStop (
     FreePool (IpSb);\r
     Status = EFI_SUCCESS;\r
   }\r
-  \r
+\r
 Exit:\r
   return Status;\r
 }\r
index 2d0fecc77e5edd9c8490ae50e986999b4b60dac0..71aef4dc89565f4e6f2f8f1ce0bef6bd856e8186 100644 (file)
@@ -1,13 +1,13 @@
 ## @file\r
 #  Basic IPv6 packet I/O Service.\r
-#   \r
-#  This module provides basic network IPv6 packet I/O services which includes support for \r
-#  Neighbor Discovery Protocol (ND), Multicast Listener Discovery Protocol (MLD), \r
-#  and a subset of the Internet Control Message Protocol (ICMPv6). This driver \r
+#\r
+#  This module provides basic network IPv6 packet I/O services which includes support for\r
+#  Neighbor Discovery Protocol (ND), Multicast Listener Discovery Protocol (MLD),\r
+#  and a subset of the Internet Control Message Protocol (ICMPv6). This driver\r
 #  also provides the mechanism to set and get various types of configurations for\r
 #  the EFI IPv6 network stack.\r
 #\r
-#  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
index 11e97344f427d243867d31047f711e094baf8a30..028841958b8105a7848b9b5327bc20be1ebaa23a 100644 (file)
@@ -7,13 +7,13 @@
 // also provides the mechanism to set and get various types of configurations for\r
 // the EFI IPv6 network stack.\r
 //\r
-// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
 // which accompanies this distribution. The full text of the license may be found at\r
 // http://opensource.org/licenses/bsd-license.php.\r
-// \r
+//\r
 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 //\r
index c3c34e4ab73379ccdb6a921209a66457c0e6bbc9..0ae1d678b7d9efd276d4093b29a6378fb6049ea9 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // Ip6Dxe Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -13,8 +13,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "Ip6 DXE"\r
 \r
 \r
index 1828d51a7d80122bf818c6a12b46d45e70ab99dd..5a64512b60ac46db2b6fea4f33e6094fa55d6d70 100644 (file)
@@ -1,9 +1,9 @@
 /** @file\r
   The ICMPv6 handle routines to process the ICMPv6 control messages.\r
 \r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
   (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
-  \r
+\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
index 280cd764f14cb996f855a5fa20a3ddc78ee5d18b..2597915311b732aaff102adc1f76c5594513c1a3 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implement IP6 pesudo interface.\r
 \r
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -565,7 +565,7 @@ Ip6ReceiveFrame (
 {\r
   EFI_STATUS                Status;\r
   IP6_LINK_RX_TOKEN         *Token;\r
-  \r
+\r
   NET_CHECK_SIGNATURE (IpSb, IP6_SERVICE_SIGNATURE);\r
 \r
   Token           = &IpSb->RecvRequest;\r
index 6aa55555b81beff046f58cd117282e5a2a701ff8..4596c01d2f6573c65065ce74b265d100257c9867 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   IP6 internal functions to process the incoming packets.\r
 \r
-  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
   (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
 \r
   This program and the accompanying materials\r
@@ -531,7 +531,7 @@ Ip6IpSecProcessPacket (
     goto ON_EXIT;\r
   }\r
   ASSERT (mIpSec != NULL);\r
-  \r
+\r
   Packet        = *Netbuf;\r
   RecycleEvent  = NULL;\r
   IpSecWrap     = NULL;\r
@@ -647,7 +647,7 @@ Ip6IpSecProcessPacket (
       IP6_GET_CLIP_INFO (Packet),\r
       sizeof (IP6_CLIP_INFO)\r
       );\r
-    \r
+\r
     NetIpSecNetbufFree(Packet);\r
     *Netbuf = TxWrap->Packet;\r
 \r
@@ -724,13 +724,13 @@ ON_EXIT:
   @param[in, out] Packet        The received IP6 packet to be processed.\r
   @param[in]      Flag          The link layer flag for the packet received, such\r
                                 as multicast.\r
-  @param[out]     Payload       The pointer to the payload of the recieved packet. \r
-                                it starts from the first byte of the extension header.                                 \r
+  @param[out]     Payload       The pointer to the payload of the recieved packet.\r
+                                it starts from the first byte of the extension header.\r
   @param[out]     LastHead      The pointer of NextHeader of the last extension\r
                                 header processed by IP6.\r
   @param[out]     ExtHdrsLen    The length of the whole option.\r
   @param[out]     UnFragmentLen The length of unfragmented length of extension headers.\r
-  @param[out]     Fragmented    Indicate whether the packet is fragmented. \r
+  @param[out]     Fragmented    Indicate whether the packet is fragmented.\r
   @param[out]     Head          The pointer to the EFI_IP6_Header.\r
 \r
   @retval     EFI_SUCCESS              The received packet is well format.\r
@@ -746,7 +746,7 @@ Ip6PreProcessPacket (
      OUT UINT8           **LastHead,\r
      OUT UINT32          *ExtHdrsLen,\r
      OUT UINT32          *UnFragmentLen,\r
-     OUT BOOLEAN         *Fragmented, \r
+     OUT BOOLEAN         *Fragmented,\r
      OUT EFI_IP6_HEADER  **Head\r
   )\r
 {\r
@@ -964,7 +964,7 @@ Ip6PreProcessPacket (
   // and Packet->TotalLen == Info->Length.\r
   //\r
   NetbufTrim (*Packet, sizeof (EFI_IP6_HEADER) + *ExtHdrsLen, TRUE);\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -1009,18 +1009,18 @@ Ip6AcceptFrame (
   if (EFI_ERROR (IoStatus) || (IpSb->State == IP6_SERVICE_DESTROY)) {\r
     goto Drop;\r
   }\r
-  \r
+\r
   //\r
   // Pre-Process the Ipv6 Packet and then reassemble if it is necessary.\r
   //\r
   Status = Ip6PreProcessPacket (\r
-             IpSb, \r
-             &Packet, \r
-             Flag, \r
-             &Payload, \r
-             &LastHead, \r
-             &ExtHdrsLen, \r
-             &UnFragmentLen, \r
+             IpSb,\r
+             &Packet,\r
+             Flag,\r
+             &Payload,\r
+             &LastHead,\r
+             &ExtHdrsLen,\r
+             &UnFragmentLen,\r
              &Fragmented,\r
              &Head\r
              );\r
@@ -1052,14 +1052,14 @@ Ip6AcceptFrame (
   ZeroMem (&ZeroHead, sizeof (EFI_IP6_HEADER));\r
   if (0 == CompareMem (Head, &ZeroHead, sizeof (EFI_IP6_HEADER))) {\r
     Status = Ip6PreProcessPacket (\r
-               IpSb, \r
-               &Packet, \r
-               Flag, \r
-               &Payload, \r
-               &LastHead, \r
-               &ExtHdrsLen, \r
-               &UnFragmentLen, \r
-               &Fragmented, \r
+               IpSb,\r
+               &Packet,\r
+               Flag,\r
+               &Payload,\r
+               &LastHead,\r
+               &ExtHdrsLen,\r
+               &UnFragmentLen,\r
+               &Fragmented,\r
                &Head\r
                );\r
     if (EFI_ERROR (Status)) {\r
@@ -1073,7 +1073,7 @@ Ip6AcceptFrame (
   if (Packet == NULL) {\r
     goto Restart;\r
   }\r
-  \r
+\r
   //\r
   // Packet may have been changed. The ownership of the packet\r
   // is transfered to the packet process logic.\r
index a3f49bb2daadccf3d65a1ceb314299ccd68bbb2b..e4132ff4c8cf4aa813e4b59ff597cfa18ac66d06 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation of Neighbor Discovery support routines.\r
 \r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -822,7 +822,7 @@ Ip6OnDADFinished (
   EFI_DHCP6_PACKET_OPTION   *Oro;\r
   EFI_DHCP6_RETRANSMISSION  InfoReqReXmit;\r
   EFI_IPv6_ADDRESS          AllNodes;\r
-  \r
+\r
   IpSb     = IpIf->Service;\r
   AddrInfo = DadEntry->AddressInfo;\r
 \r
@@ -988,7 +988,7 @@ Ip6InitDADProcess (
   if (Ip6FindDADEntry (IpIf->Service, &AddressInfo->Address, NULL) != NULL) {\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   Status   = EFI_SUCCESS;\r
   IpSb     = IpIf->Service;\r
   DadXmits = &IpSb->Ip6ConfigInstance.DadXmits;\r
index d68b175cc18b5f5006e4097f934edc222459fa56..92a1eb3ce8ca54063a280228fdad5046f2a37889 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   UEFI Component Name(2) protocol implementation for IPsec driver.\r
 \r
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -325,7 +325,7 @@ IpSecComponentNameGetControllerName (
   if (ChildHandle != NULL) {\r
     return EFI_UNSUPPORTED;\r
   }\r
-  \r
+\r
   //\r
   // Make sure this driver is currently managing ControllerHandle\r
   //\r
index 7bd5c81da89f108e18c594d95f5337e5ac12f143..1ccc93717243944a62346714f234a548ae1c2b8d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Cryptographic Parameter Constant Definitions from IETF;\r
-  \r
-  Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+\r
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
index 50c680a528c083213acc45dbf9a9cdfc781e1a9c..63ab29bd72cdb35f8f5d9a4f72692d1d5b3b765f 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The common definition of IPsec Key Exchange (IKE).\r
 \r
-  Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -55,7 +55,7 @@
 #define IPSEC_ESP_BLOWFISH            7\r
 #define IPSEC_ESP_3IDEA               8\r
 #define IPSEC_ESP_DES_IV32            9\r
-#define IPSEC_ESP_RC4                 10  // It's reserved in IKEv2 \r
+#define IPSEC_ESP_RC4                 10  // It's reserved in IKEv2\r
 #define IPSEC_ESP_NULL                11\r
 #define IPSEC_ESP_AES                 12\r
 \r
@@ -150,7 +150,7 @@ typedef struct {
 typedef union {\r
   UINT16  AttrLength;\r
   UINT16  AttrValue;\r
-} IKE_SA_ATTR_UNION; \r
+} IKE_SA_ATTR_UNION;\r
 \r
 //\r
 // SA Attribute present in Transform Payload\r
@@ -163,7 +163,7 @@ typedef struct {
 #pragma pack()\r
 \r
 //\r
-// Contains the IKE packet information. \r
+// Contains the IKE packet information.\r
 //\r
 typedef struct {\r
   UINTN               RefCount;\r
@@ -219,7 +219,7 @@ typedef struct {
 //\r
 // Each algorithm has its own Id, Guid, BlockSize and KeyLength.\r
 // This struct contains these information for each algorithm. It is generic structure\r
-// for both encryption and authentication algorithm. \r
+// for both encryption and authentication algorithm.\r
 // For authentication algorithm, the AlgSize means IcvSize. For encryption algorithm,\r
 // it means IvSize.\r
 //\r
index c5fbfab6a955a74322d8415638c5738790658035..67fc2f4084a5856bc23f30863a6a204b0dea9e1c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Common operation of the IKE\r
-  \r
-  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
+\r
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -26,7 +26,7 @@
 \r
   @retval  TRUE    This SpiValue has existed in the Child SA Session\r
   @retval  FALSE   This SpiValue doesn't exist in the Child SA Session.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 IkeSpiValueExisted (\r
@@ -40,8 +40,8 @@ IkeSpiValueExisted (
 \r
   Entry     = NULL;\r
   Next      = NULL;\r
-  SaSession = NULL; \r
-    \r
+  SaSession = NULL;\r
+\r
   //\r
   // Check whether the SPI value has existed in ChildSaEstablishSessionList.\r
   //\r
@@ -67,7 +67,7 @@ IkeSpiValueExisted (
 \r
 /**\r
   Call Crypto Lib to generate a random value with eight-octet length.\r
-  \r
+\r
   @return the 64 byte vaule.\r
 \r
 **/\r
@@ -91,8 +91,8 @@ IkeGenerateCookie (
   Generate the random data for Nonce payload.\r
 \r
   @param[in]  NonceSize      Size of the data in bytes.\r
-  \r
-  @return Buffer which contains the random data of the spcified size. \r
+\r
+  @return Buffer which contains the random data of the spcified size.\r
 \r
 **/\r
 UINT8 *\r
@@ -168,7 +168,7 @@ IkePayloadAlloc (
   if (IkePayload == NULL) {\r
     return NULL;\r
   }\r
-  \r
+\r
   IkePayload->Signature = IKE_PAYLOAD_SIGNATURE;\r
 \r
   return IkePayload;\r
@@ -200,11 +200,11 @@ IkePayloadFree (
 \r
 /**\r
   Generate an new SPI.\r
-  \r
-  @param[in]       IkeSaSession   Pointer to IKEV2_SA_SESSION related to this Child SA \r
+\r
+  @param[in]       IkeSaSession   Pointer to IKEV2_SA_SESSION related to this Child SA\r
                                   Session.\r
-  @param[in, out]  SpiValue       Pointer to the new generated SPI value. \r
-                              \r
+  @param[in, out]  SpiValue       Pointer to the new generated SPI value.\r
+\r
   @retval EFI_SUCCESS         The operation performs successfully.\r
   @retval Otherwise           The operation is failed.\r
 \r
@@ -218,7 +218,7 @@ IkeGenerateSpi (
   EFI_STATUS   Status;\r
 \r
   Status = EFI_SUCCESS;\r
\r
+\r
   while (TRUE) {\r
     //\r
     // Generate SPI randomly\r
@@ -229,13 +229,13 @@ IkeGenerateSpi (
     }\r
 \r
     //\r
-    // The set of SPI values in the range 1 through 255 are reserved by the \r
-    // Internet Assigned Numbers Authority (IANA) for future use; a reserved \r
-    // SPI value will not normally be assigned by IANA unless the use of the \r
+    // The set of SPI values in the range 1 through 255 are reserved by the\r
+    // Internet Assigned Numbers Authority (IANA) for future use; a reserved\r
+    // SPI value will not normally be assigned by IANA unless the use of the\r
     // assigned SPI value is specified in an RFC.\r
     //\r
     if (*SpiValue < IKE_SPI_BASE) {\r
-      *SpiValue += IKE_SPI_BASE; \r
+      *SpiValue += IKE_SPI_BASE;\r
     }\r
 \r
     //\r
@@ -245,7 +245,7 @@ IkeGenerateSpi (
       break;\r
     }\r
   }\r
-  \r
+\r
   return Status;\r
 }\r
 \r
index eb7e913ee8e458c24cac86c6123e3d56cf176ccd..ba9f1bb2fb3c8dd6a2a37845f567447daf2a88fe 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Common operation of the IKE.\r
 \r
-  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -19,7 +19,7 @@
 #include <Protocol/Udp4.h>\r
 #include <Protocol/Udp6.h>\r
 #include <Protocol/Ip4Config2.h>\r
\r
+\r
 #include <Library/BaseLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
@@ -62,7 +62,7 @@
 \r
 /**\r
   Call Crypto Lib to generate a random value with eight-octet length.\r
-  \r
+\r
   @return the 64 byte vaule.\r
 \r
 **/\r
@@ -75,8 +75,8 @@ IkeGenerateCookie (
   Generate the random data for Nonce payload.\r
 \r
   @param[in]  NonceSize      Size of the data in bytes.\r
-  \r
-  @return Buffer which contains the random data of the spcified size. \r
+\r
+  @return Buffer which contains the random data of the spcified size.\r
 \r
 **/\r
 UINT8 *\r
@@ -131,11 +131,11 @@ IkePayloadFree (
 \r
 /**\r
   Generate an new SPI.\r
-  \r
-  @param[in]       IkeSaSession   Pointer to IKEV2_SA_SESSION related to this Child SA \r
+\r
+  @param[in]       IkeSaSession   Pointer to IKEV2_SA_SESSION related to this Child SA\r
                                   Session.\r
-  @param[in, out]  SpiValue       Pointer to the new generated SPI value. \r
-                              \r
+  @param[in, out]  SpiValue       Pointer to the new generated SPI value.\r
+\r
   @retval EFI_SUCCESS         The operation performs successfully.\r
   @retval Otherwise           The operation is failed.\r
 \r
index 14dbb9d5d67ec56f08b19168b865a2e6e9705b23..acfe079855520085a817bb2c783df663e0465c77 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   IKE Packet related operation.\r
 \r
-  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -36,7 +36,7 @@ IkePacketAlloc (
 \r
   IkePacket->RefCount = 1;\r
   InitializeListHead (&IkePacket->PayloadList);\r
-  \r
+\r
   IkePacket->Header = (IKE_HEADER *) AllocateZeroPool (sizeof (IKE_HEADER));\r
   if (IkePacket->Header == NULL) {\r
     FreePool (IkePacket);\r
@@ -94,8 +94,8 @@ IkePacketFree (
 \r
 /**\r
   Callback funtion of NetbufFromExt()\r
-  \r
-  @param[in]  Arg  The data passed from the NetBufFromExe(). \r
+\r
+  @param[in]  Arg  The data passed from the NetBufFromExe().\r
 \r
 **/\r
 VOID\r
@@ -111,11 +111,11 @@ IkePacketNetbufFree (
 \r
 /**\r
   Copy the NetBuf into a IKE_PACKET sturcture.\r
-  \r
-  Create a IKE_PACKET and fill the received IKE header into the header of IKE_PACKET \r
+\r
+  Create a IKE_PACKET and fill the received IKE header into the header of IKE_PACKET\r
   and copy the recieved packet without IKE HEADER to the PayloadBuf of IKE_PACKET.\r
 \r
-  @param[in]  Netbuf      The pointer of the Netbuf which contains the whole received \r
+  @param[in]  Netbuf      The pointer of the Netbuf which contains the whole received\r
                           IKE packet.\r
 \r
   @return The pointer of the IKE_PACKET which contains the received packet.\r
@@ -174,12 +174,12 @@ Error:
 \r
   @param[in]  SessionCommon  Pointer of related IKE_COMMON_SESSION\r
   @param[in]  IkePacket      Pointer of IKE_PACKET to be copy to NetBuf\r
-  @param[in]  IkeType        The IKE type to pointer the packet is for which IKE \r
-                             phase. Now it supports IKE_SA_TYPE, IKE_CHILDSA_TYPE, \r
+  @param[in]  IkeType        The IKE type to pointer the packet is for which IKE\r
+                             phase. Now it supports IKE_SA_TYPE, IKE_CHILDSA_TYPE,\r
                              IKE_INFO_TYPE.\r
 \r
   @return a pointer of Netbuff which contains the IKE_PACKE in network order.\r
-  \r
+\r
 **/\r
 NET_BUF *\r
 IkeNetbufFromPacket (\r
@@ -210,7 +210,7 @@ IkeNetbufFromPacket (
       if (EFI_ERROR (RetStatus)) {\r
         return NULL;\r
       }\r
-      \r
+\r
     } else {\r
       //\r
       // If IKEv1 support, check it here.\r
@@ -224,7 +224,7 @@ IkeNetbufFromPacket (
   // Get the number of the payloads\r
   //\r
   NET_LIST_FOR_EACH (PacketEntry, &(IkePacket)->PayloadList) {\r
-  \r
+\r
     NumPayloads++;\r
   }\r
   //\r
@@ -258,7 +258,7 @@ IkeNetbufFromPacket (
              IkePacketNetbufFree,\r
              NULL\r
              );\r
-  \r
+\r
   FreePool (Fragments);\r
   return Netbuf;\r
 }\r
index 053d659d9c73a905dd8fdd8388721e5339b10153..674d52a6990f46d5e9c918b87da68159a36b2dea 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   IKE Packet related definitions and function declarations.\r
 \r
-  Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -10,7 +10,7 @@
 \r
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-  \r
+\r
 **/\r
 \r
 #ifndef _IKE_V1_PACKET_H_\r
@@ -46,11 +46,11 @@ IkePacketFree (
 \r
 /**\r
   Copy the NetBuf into a IKE_PACKET sturcture.\r
-  \r
-  Create a IKE_PACKET and fill the received IKE header into the header of IKE_PACKET \r
+\r
+  Create a IKE_PACKET and fill the received IKE header into the header of IKE_PACKET\r
   and copy the recieved packet without IKE HEADER to the PayloadBuf of IKE_PACKET.\r
 \r
-  @param[in]  Netbuf      The pointer of the Netbuf which contains the whole received \r
+  @param[in]  Netbuf      The pointer of the Netbuf which contains the whole received\r
                           IKE packet.\r
 \r
   @return The pointer of the IKE_PACKET which contains the received packet.\r
@@ -66,8 +66,8 @@ IkePacketFromNetbuf (
 \r
   @param[in]  SessionCommon  Pointer of related IKE_COMMON_SESSION\r
   @param[in]  IkePacket      Pointer of IKE_PACKET to be copy to NetBuf\r
-  @param[in]  IkeType        The IKE type to pointer the packet is for which IKE \r
-                             phase. Now it supports IKE_SA_TYPE, IKE_CHILDSA_TYPE, \r
+  @param[in]  IkeType        The IKE type to pointer the packet is for which IKE\r
+                             phase. Now it supports IKE_SA_TYPE, IKE_CHILDSA_TYPE,\r
                              IKE_INFO_TYPE.\r
 \r
   @return A pointer of Netbuff which contains the contents of the IKE_PACKE in network order.\r
index 4c0f6f5eb108de2eeff210fa77eed45beeea0c0e..3dc7f31570588517bee4125eaedb94fabefb084c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Provide IPsec Key Exchange (IKE) service general interfaces.\r
 \r
-  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -273,7 +273,7 @@ IkeOpenOutputUdp (
                        &BufSize,\r
                        IfInfo\r
                        );\r
-    \r
+\r
     if (EFI_ERROR (Status)) {\r
       goto ON_EXIT;\r
     }\r
index eaccad20862fe36de6ab56f12bfb43d2bde38a2a..a8791cca15d81df96826a8308eeb1671a670ae72 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The operations for Child SA.\r
 \r
-  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
 #include "Utility.h"\r
 \r
 /**\r
-  Generate IKE Packet for CREATE_CHILD_SA exchange.  \r
+  Generate IKE Packet for CREATE_CHILD_SA exchange.\r
 \r
   This IKE Packet would be the packet for creating new CHILD SA, or the packet for\r
   rekeying existing IKE SA, or the packet for existing CHILD SA.\r
-  \r
-  @param[in] SaSession   Pointer to related SA session. \r
+\r
+  @param[in] SaSession   Pointer to related SA session.\r
   @param[in] Context     The data passed by the caller.\r
 \r
   return a pointer of IKE packet.\r
@@ -42,12 +42,12 @@ Ikev2CreateChildGenerator (
 \r
   NotifyPayload   = NULL;\r
   MessageId       = NULL;\r
-  \r
+\r
   ChildSaSession  = (IKEV2_CHILD_SA_SESSION *) SaSession;\r
   if (ChildSaSession == NULL) {\r
     return NULL;\r
   }\r
-    \r
+\r
   IkePacket       = IkePacketAlloc();\r
   if (IkePacket == NULL) {\r
     return NULL;\r
@@ -57,28 +57,28 @@ Ikev2CreateChildGenerator (
   if (Context != NULL) {\r
     MessageId = (UINT32 *) Context;\r
   }\r
-  \r
+\r
   IkePacket->Header->Version      = (UINT8) (2 << 4);\r
   IkePacket->Header->NextPayload  = IKEV2_PAYLOAD_TYPE_NOTIFY;\r
   IkePacket->Header->ExchangeType = IKE_XCG_TYPE_CREATE_CHILD_SA;\r
-  \r
+\r
   if (ChildSaSession->SessionCommon.IkeSessionType == IkeSessionTypeChildSa) {\r
     //\r
     // 1.a Fill the IkePacket->Hdr\r
-    //    \r
+    //\r
     IkePacket->Header->InitiatorCookie = ChildSaSession->IkeSaSession->InitiatorCookie;\r
     IkePacket->Header->ResponderCookie = ChildSaSession->IkeSaSession->ResponderCookie;\r
-    \r
+\r
     if (MessageId != NULL) {\r
       IkePacket->Header->MessageId     = *MessageId;\r
     } else {\r
       IkePacket->Header->MessageId     = ChildSaSession->MessageId;\r
-    }    \r
-    \r
+    }\r
+\r
     if (ChildSaSession->SessionCommon.IsInitiator) {\r
       IkePacket->Header->Flags = IKE_HEADER_FLAGS_INIT;\r
     }\r
-      \r
+\r
   } else {\r
     IkeSaSession  = (IKEV2_SA_SESSION *) SaSession;\r
     //\r
@@ -91,8 +91,8 @@ Ikev2CreateChildGenerator (
       IkePacket->Header->MessageId     = *MessageId;\r
     } else {\r
       IkePacket->Header->MessageId     = IkeSaSession->MessageId;\r
-    }    \r
-    \r
+    }\r
+\r
     if (IkeSaSession->SessionCommon.IsInitiator) {\r
       IkePacket->Header->Flags = IKE_HEADER_FLAGS_INIT;\r
     }\r
@@ -101,7 +101,7 @@ Ikev2CreateChildGenerator (
   if (MessageId != NULL) {\r
     IkePacket->Header->Flags |= IKE_HEADER_FLAGS_RESPOND;\r
   }\r
-   \r
+\r
   //\r
   // According to RFC4306, Chapter 4.\r
   // A minimal implementation may support the CREATE_CHILD_SA exchange only to\r
@@ -110,33 +110,33 @@ Ikev2CreateChildGenerator (
   NotifyPayload = Ikev2GenerateNotifyPayload (\r
                     0,\r
                     IKEV2_PAYLOAD_TYPE_NONE,\r
-                    0,                  \r
+                    0,\r
                     IKEV2_NOTIFICATION_NO_ADDITIONAL_SAS,\r
                     NULL,\r
                     NULL,\r
                     0\r
                     );\r
-  if (NotifyPayload == NULL) { \r
+  if (NotifyPayload == NULL) {\r
     IkePacketFree (IkePacket);\r
     return NULL;\r
   }\r
-                        \r
+\r
   IKE_PACKET_APPEND_PAYLOAD (IkePacket, NotifyPayload);\r
   //\r
-  // TODO: Support the CREATE_CHILD_SA exchange. \r
-  // \r
+  // TODO: Support the CREATE_CHILD_SA exchange.\r
+  //\r
   return IkePacket;\r
 }\r
 \r
 /**\r
   Parse the IKE packet of CREATE_CHILD_SA exchange.\r
-  \r
+\r
   This function parse the IKE packet and save the related information to further\r
-  calculation. \r
-  \r
+  calculation.\r
+\r
   @param[in] SaSession   Pointer to IKEv2_CHILD_SA_SESSION related to this Exchange.\r
   @param[in] IkePacket   Received packet to be parsed.\r
\r
+\r
 \r
   @retval EFI_SUCCESS       The IKE Packet is acceptable.\r
   @retval EFI_UNSUPPORTED   Not support the CREATE_CHILD_SA request.\r
index 5609964fa4ab33d7b01711cabb4bc002a546f459..0f2f94f118186842ec23160698a1743b2c0bb416 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The general interfaces of the IKEv2.\r
 \r
-  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -498,7 +498,7 @@ Ikev2HandleSa (
     if (ChildSaSession == NULL) {\r
       goto ON_ERROR;\r
     }\r
-    \r
+\r
     ChildSaCommon  = &ChildSaSession->SessionCommon;\r
   }\r
 \r
@@ -526,7 +526,7 @@ Ikev2HandleSa (
     if (ChildSaSession == NULL) {\r
       goto ON_ERROR;\r
     }\r
-    \r
+\r
     ChildSaCommon  = &ChildSaSession->SessionCommon;\r
 \r
     //\r
index a2b733a4d2b4657e8fb59ef3aec84973691c71c4..268464b5ccc37fb51d86b2c80ae43a8076f4c04c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   IKEv2 related definitions.\r
 \r
-  Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -231,7 +231,7 @@ typedef struct {
   UINT8 *Data;\r
 } PRF_DATA_FRAGMENT;\r
 \r
-typedef \r
+typedef\r
 IKE_PACKET *\r
 (*IKEV2_PACKET_GENERATOR) (\r
   IN UINT8                             *SaSession,\r
index 0d2b29081758d6341444d53066cf615137244acf..22ce9e676fbfa3a56621552bf13ccf289f337e24 100644 (file)
@@ -2,7 +2,7 @@
   The Implementations for Information Exchange.\r
 \r
   (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -11,7 +11,7 @@
 \r
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-  \r
+\r
 **/\r
 \r
 #include "Utility.h"\r
 /**\r
   Generate Information Packet.\r
 \r
-  The information Packet may contain one Delete Payload, or Notify Payload, which \r
+  The information Packet may contain one Delete Payload, or Notify Payload, which\r
   dependes on the Context's parameters.\r
 \r
-  @param[in]  SaSession   Pointer to IKE SA Session or Child SA Session which is \r
+  @param[in]  SaSession   Pointer to IKE SA Session or Child SA Session which is\r
                           related to the information Exchange.\r
   @param[in]  Context     The Data passed from the caller. If the Context is not NULL\r
                           it should contain the information for Notification Data.\r
-                          \r
+\r
   @retval     Pointer of IKE_PACKET generated.\r
 \r
 **/\r
@@ -55,7 +55,7 @@ Ikev2InfoGenerator (
   // Fill IkePacket Header.\r
   //\r
   IkePacket->Header->ExchangeType    = IKEV2_EXCHANGE_TYPE_INFO;\r
-  IkePacket->Header->Version         = (UINT8) (2 << 4); \r
+  IkePacket->Header->Version         = (UINT8) (2 << 4);\r
 \r
   if (Context != NULL) {\r
     InfoContext = (IKEV2_INFO_EXCHANGE_CONTEXT *) Context;\r
@@ -64,8 +64,8 @@ Ikev2InfoGenerator (
   //\r
   // For Liveness Check\r
   //\r
-  if (InfoContext != NULL && \r
-      (InfoContext->InfoType == Ikev2InfoLiveCheck || InfoContext->InfoType == Ikev2InfoNotify) \r
+  if (InfoContext != NULL &&\r
+      (InfoContext->InfoType == Ikev2InfoLiveCheck || InfoContext->InfoType == Ikev2InfoNotify)\r
     ) {\r
     IkePacket->Header->MessageId       = InfoContext->MessageId;\r
     IkePacket->Header->InitiatorCookie = IkeSaSession->InitiatorCookie;\r
@@ -77,10 +77,10 @@ Ikev2InfoGenerator (
     //\r
     return IkePacket;\r
   }\r
-  \r
+\r
   //\r
   // For delete SAs\r
-  //  \r
+  //\r
   if (IkeSaSession->SessionCommon.IkeSessionType == IkeSessionTypeIkeSa) {\r
 \r
     IkePacket->Header->InitiatorCookie = IkeSaSession->InitiatorCookie;\r
@@ -101,12 +101,12 @@ Ikev2InfoGenerator (
     //\r
     if (IkeSaSession->SessionCommon.State == IkeStateSaDeleting ) {\r
       IkePayload = Ikev2GenerateDeletePayload (\r
-                     IkeSaSession, \r
-                     IKEV2_PAYLOAD_TYPE_NONE, \r
-                     0, \r
-                     0, \r
+                     IkeSaSession,\r
+                     IKEV2_PAYLOAD_TYPE_NONE,\r
+                     0,\r
+                     0,\r
                      NULL\r
-                     );  \r
+                     );\r
       if (IkePayload == NULL) {\r
         goto ERROR_EXIT;\r
       }\r
@@ -118,7 +118,7 @@ Ikev2InfoGenerator (
       IkePacket->Private           = IkeSaSession->SessionCommon.Private;\r
       IkePacket->Spi               = 0;\r
       IkePacket->IsDeleteInfo      = TRUE;\r
-            \r
+\r
     } else if (Context != NULL) {\r
       //\r
       // TODO: If contest is not NULL Generate a Notify Payload.\r
@@ -132,7 +132,7 @@ Ikev2InfoGenerator (
 \r
     if (IkeSaSession->SessionCommon.IsInitiator) {\r
       IkePacket->Header->Flags = IKE_HEADER_FLAGS_INIT ;\r
-    }  \r
+    }\r
   } else {\r
     //\r
     // Delete the Child SA Information Exchagne\r
@@ -152,7 +152,7 @@ Ikev2InfoGenerator (
       IkePacket->Header->MessageId     = ChildSaSession->IkeSaSession->MessageId;\r
       Ikev2SaSessionIncreaseMessageId (IkeSaSession);\r
     }\r
-    \r
+\r
     IkePayload     = Ikev2GenerateDeletePayload (\r
                        ChildSaSession->IkeSaSession,\r
                        IKEV2_PAYLOAD_TYPE_DELETE,\r
@@ -193,7 +193,7 @@ Ikev2InfoGenerator (
   if (InfoContext != NULL) {\r
     IkePacket->Header->Flags |= IKE_HEADER_FLAGS_RESPOND;\r
   }\r
-  \r
+\r
   return IkePacket;\r
 \r
 ERROR_EXIT:\r
@@ -233,16 +233,16 @@ Ikev2InfoParser (
   UINT8                  Value;\r
   EFI_STATUS             Status;\r
   IKE_PACKET             *RespondPacket;\r
-  \r
+\r
   IKEV2_INFO_EXCHANGE_CONTEXT Context;\r
-  \r
+\r
   IkeSaSession   = (IKEV2_SA_SESSION *) SaSession;\r
 \r
   DeletePayload  = NULL;\r
   Private        = NULL;\r
   RespondPacket  = NULL;\r
   Status         = EFI_SUCCESS;\r
-  \r
+\r
   //\r
   // For Liveness Check\r
   //\r
@@ -279,13 +279,13 @@ Ikev2InfoParser (
   //\r
   // For SA Delete\r
   //\r
-  NET_LIST_FOR_EACH (Entry, &(IkePacket)->PayloadList) {   \r
+  NET_LIST_FOR_EACH (Entry, &(IkePacket)->PayloadList) {\r
 \r
   //\r
   // Iterate payloads to find the Delete/Notify Payload.\r
   //\r
     IkePayload  = IKE_PAYLOAD_BY_PACKET (Entry);\r
-    \r
+\r
     if (IkePayload->PayloadType == IKEV2_PAYLOAD_TYPE_DELETE) {\r
       DeletePayload = IkePayload;\r
       Delete = (IKEV2_DELETE *)DeletePayload->PayloadBuf;\r
@@ -310,7 +310,7 @@ Ikev2InfoParser (
             // After all IKE SAs were deleted, set the IPSEC_STATUS_DISABLED value in\r
             // IPsec status variable.\r
             //\r
-            if (IsListEmpty (&Private->Ikev1EstablishedList) && \r
+            if (IsListEmpty (&Private->Ikev1EstablishedList) &&\r
                 (IsListEmpty (&Private->Ikev2EstablishedList))\r
                ) {\r
               Value  = IPSEC_STATUS_DISABLED;\r
@@ -341,9 +341,9 @@ Ikev2InfoParser (
             return Status;\r
           }\r
           Status = Ikev2SendIkePacket (\r
-                     IkeSaSession->SessionCommon.UdpService, \r
-                     (UINT8 *)(&IkeSaSession->SessionCommon), \r
-                     RespondPacket, \r
+                     IkeSaSession->SessionCommon.UdpService,\r
+                     (UINT8 *)(&IkeSaSession->SessionCommon),\r
+                     RespondPacket,\r
                      0\r
                      );\r
         }\r
@@ -373,7 +373,7 @@ Ikev2InfoParser (
 \r
                 Context.InfoType = Ikev2InfoDelete;\r
                 Context.MessageId = IkePacket->Header->MessageId;\r
-          \r
+\r
                 RespondPacket = Ikev2InfoGenerator ((UINT8 *)ChildSaSession, &Context);\r
                 if (RespondPacket == NULL) {\r
                   Status = EFI_INVALID_PARAMETER;\r
@@ -382,7 +382,7 @@ Ikev2InfoParser (
                 Status = Ikev2SendIkePacket (\r
                            ChildSaSession->SessionCommon.UdpService,\r
                            (UINT8 *)(&ChildSaSession->SessionCommon),\r
-                           RespondPacket, \r
+                           RespondPacket,\r
                            0\r
                            );\r
               } else {\r
@@ -399,7 +399,7 @@ Ikev2InfoParser (
       }\r
     }\r
   }\r
-  \r
+\r
   return Status;\r
 }\r
 \r
index 237743b1b1f7cb9caecefbfb9a08c7d91effbe5b..218c26f9342952930eeef8ce341785ca87f24bd4 100644 (file)
@@ -2,7 +2,7 @@
   The implementation of Payloads Creation.\r
 \r
   (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -55,7 +55,7 @@ Ikev2GenerateSaPayload (
   if (SaPayload == NULL) {\r
     return NULL;\r
   }\r
-  \r
+\r
   //\r
   // TODO: Get the Proposal Number and Transform Number from IPsec Config,\r
   // after the Ipsecconfig Application is support it.\r
@@ -127,7 +127,7 @@ Ikev2GenerateNoncePayload (
   if (Nonce == NULL) {\r
     return NULL;\r
   }\r
-  \r
+\r
   CopyMem (Nonce + 1, NonceBlock, Size - sizeof (IKEV2_NONCE));\r
 \r
   Nonce->Header.NextPayload   = NextPayload;\r
@@ -137,7 +137,7 @@ Ikev2GenerateNoncePayload (
     FreePool (Nonce);\r
     return NULL;\r
   }\r
-  \r
+\r
   NoncePayload->PayloadType = IKEV2_PAYLOAD_TYPE_NONCE;\r
   NoncePayload->PayloadBuf  = (UINT8 *) Nonce;\r
   NoncePayload->PayloadSize = Size;\r
@@ -428,11 +428,11 @@ Ikev2PskGenerateAuthPayload (
   if (Digest == NULL) {\r
     return NULL;\r
   }\r
-  \r
+\r
   if (IdPayload == NULL) {\r
     return NULL;\r
   }\r
-  \r
+\r
   //\r
   // Calcualte Prf(Seceret, "Key Pad for IKEv2");\r
   //\r
@@ -460,7 +460,7 @@ Ikev2PskGenerateAuthPayload (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto EXIT;\r
   }\r
-  \r
+\r
   CopyMem (KeyBuf, Digest, DigestSize);\r
   KeySize = DigestSize;\r
 \r
@@ -522,7 +522,7 @@ Ikev2PskGenerateAuthPayload (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto EXIT;\r
   }\r
-  \r
+\r
   Fragments[2].DataSize = DigestSize;\r
   CopyMem (Fragments[2].Data, Digest, DigestSize);\r
 \r
@@ -557,7 +557,7 @@ Ikev2PskGenerateAuthPayload (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto EXIT;\r
   }\r
-  \r
+\r
   //\r
   // Fill in Auth payload.\r
   //\r
@@ -761,7 +761,7 @@ Ikev2CertGenerateAuthPayload (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto EXIT;\r
   }\r
-  \r
+\r
   Fragments[2].DataSize = DigestSize;\r
   CopyMem (Fragments[2].Data, Digest, DigestSize);\r
 \r
@@ -820,7 +820,7 @@ Ikev2CertGenerateAuthPayload (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto EXIT;\r
   }\r
-  \r
+\r
   //\r
   // Fill in Auth payload.\r
   //\r
@@ -1229,7 +1229,7 @@ Ikev2GenerateNotifyPayload (
     FreePool (Notify);\r
     return NULL;\r
   }\r
-  \r
+\r
   NotifyPayload->PayloadType  = IKEV2_PAYLOAD_TYPE_NOTIFY;\r
   NotifyPayload->PayloadBuf   = (UINT8 *) Notify;\r
   NotifyPayload->PayloadSize  = NotifyPayloadLen;\r
@@ -1320,7 +1320,7 @@ Ikev2GenerateDeletePayload (
     FreePool (Del);\r
     return NULL;\r
   }\r
-  \r
+\r
   DelPayload->PayloadType = IKEV2_PAYLOAD_TYPE_DELETE;\r
   DelPayload->PayloadBuf  = (UINT8 *) Del;\r
   DelPayload->PayloadSize = DelPayloadLen;\r
@@ -1687,7 +1687,7 @@ Ikev2EncodeSa (
   if (Sa == NULL) {\r
     return NULL;\r
   }\r
-  \r
+\r
   CopyMem (Sa, SaData, sizeof (IKEV2_SA));\r
   Sa->Header.PayloadLength  = (UINT16) sizeof (IKEV2_SA);\r
   ProposalsSize             = 0;\r
@@ -1884,7 +1884,7 @@ Ikev2DecodeSa (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto Exit;\r
   }\r
-  \r
+\r
   CopyMem (SaData, Sa, sizeof (IKEV2_SA));\r
   SaData->NumProposals        = TotalProposals;\r
   ProposalData                = (IKEV2_PROPOSAL_DATA *) (SaData + 1);\r
@@ -1921,7 +1921,7 @@ Ikev2DecodeSa (
         Status = EFI_OUT_OF_RESOURCES;\r
         goto Exit;\r
       }\r
-      \r
+\r
       CopyMem (Spi, (UINT32 *) (Proposal + 1), Proposal->SpiSize);\r
       *((UINT32*) Spi) = NTOHL (*((UINT32*) Spi));\r
       ProposalData->Spi = Spi;\r
@@ -2357,7 +2357,7 @@ Ikev2DecodePacket (
       Status = EFI_OUT_OF_RESOURCES;\r
       goto Exit;\r
     }\r
-    \r
+\r
     CopyMem (IkeHeader, IkePacket->Header, sizeof (IKE_HEADER));\r
 \r
     //\r
@@ -2565,7 +2565,7 @@ Ikev2EncodePacket (
       if (IkeSaSession->InitPacket == NULL) {\r
         return EFI_OUT_OF_RESOURCES;\r
       }\r
-      \r
+\r
       CopyMem (IkeSaSession->InitPacket, IkePacket->Header, sizeof (IKE_HEADER));\r
       PayloadTotalSize = 0;\r
       for (Entry = IkePacket->PayloadList.ForwardLink; Entry != &(IkePacket->PayloadList);) {\r
@@ -2584,7 +2584,7 @@ Ikev2EncodePacket (
       if (IkeSaSession->RespPacket == NULL) {\r
         return EFI_OUT_OF_RESOURCES;\r
       }\r
-      \r
+\r
       CopyMem (IkeSaSession->RespPacket, IkePacket->Header, sizeof (IKE_HEADER));\r
       PayloadTotalSize = 0;\r
       for (Entry = IkePacket->PayloadList.ForwardLink; Entry != &(IkePacket->PayloadList);) {\r
@@ -2695,7 +2695,7 @@ Ikev2DecryptPacket (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   CopyMem (IntegrityBuffer, IkePacket->Header, sizeof(IKE_HEADER));\r
   CopyMem (IntegrityBuffer + sizeof (IKE_HEADER), IkePacket->PayloadsBuf, IkePacket->PayloadTotalSize);\r
 \r
@@ -2910,7 +2910,7 @@ Ikev2EncryptPacket (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   //\r
   // Copy all payload into EncryptedIkePayload\r
   //\r
index 7a85792ed7fe567a52ecfdbe07111b395f999e65..544c9b9948ae00b191cfc2f0216fda28680918f4 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The Definitions related to IKEv2 payload.\r
 \r
-  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
 #define IKEV2_PAYLOAD_TYPE_EAP      48\r
 \r
 //\r
-// IKE header Flag (1 octet) for IKEv2, defined in RFC 4306 section 3.1 \r
+// IKE header Flag (1 octet) for IKEv2, defined in RFC 4306 section 3.1\r
 //\r
-// I(nitiator) (bit 3 of Flags, 0x08) - This bit MUST be set in messages sent by the \r
+// I(nitiator) (bit 3 of Flags, 0x08) - This bit MUST be set in messages sent by the\r
 //                                      original initiator of the IKE_SA\r
 //\r
-// R(esponse) (bit 5 of Flags, 0x20)  - This bit indicates that this message is a response to \r
+// R(esponse) (bit 5 of Flags, 0x20)  - This bit indicates that this message is a response to\r
 //                                      a message containing the same message ID.\r
 //\r
 #define IKE_HEADER_FLAGS_INIT       0x08\r
@@ -67,7 +67,7 @@ typedef struct {
 #pragma pack(1)\r
 typedef struct {\r
   IKEV2_COMMON_PAYLOAD_HEADER Header;\r
-  // \r
+  //\r
   // Proposals\r
   //\r
 } IKEV2_SA;\r
@@ -94,7 +94,7 @@ typedef struct {
 \r
 //\r
 // IKEv2 Transform ID for Encrypt Algorithm (ENCR)\r
-// \r
+//\r
 #define IKEV2_TRANSFORM_ID_ENCR_DES_IV64 1\r
 #define IKEV2_TRANSFORM_ID_ENCR_DES      2\r
 #define IKEV2_TRANSFORM_ID_ENCR_3DES     3\r
index f9421ed4e804291c753eda1d2365dda7e80b80fc..554bcabd4917c7803d02bd335f7015d65ff797f5 100644 (file)
@@ -2,7 +2,7 @@
   The operations for IKEv2 SA.\r
 \r
   (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -23,7 +23,7 @@
   Generates the DH Key.\r
 \r
   This generates the DH local public key and store it in the IKEv2 SA Session's GxBuffer.\r
-  \r
+\r
   @param[in]  IkeSaSession   Pointer to related IKE SA Session.\r
 \r
   @retval EFI_SUCCESS        The operation succeeded.\r
@@ -155,7 +155,7 @@ Ikev2InitPskGenerator (
   //    IkeSaSession is responder. If resending IKE_SA_INIT with Cookie Notify\r
   //    No need to recompute the Public key.\r
   //\r
-  if ((IkeSaSession->SessionCommon.IsInitiator) && (IkeSaSession->NCookie == NULL)) {    \r
+  if ((IkeSaSession->SessionCommon.IsInitiator) && (IkeSaSession->NCookie == NULL)) {\r
     Status = Ikev2GenerateSaDhPublicKey (IkeSaSession);\r
     if (EFI_ERROR (Status)) {\r
       goto CheckError;\r
@@ -166,7 +166,7 @@ Ikev2InitPskGenerator (
   // 4. Generate KE Payload according to SaParams->DhGroup\r
   //\r
   KePayload = Ikev2GenerateKePayload (\r
-                IkeSaSession, \r
+                IkeSaSession,\r
                 IKEV2_PAYLOAD_TYPE_NONCE\r
                 );\r
 \r
@@ -223,7 +223,7 @@ CheckError:
   if (SaPayload != NULL) {\r
     IkePayloadFree (SaPayload);\r
   }\r
-  return NULL;    \r
+  return NULL;\r
 }\r
 \r
 /**\r
@@ -241,7 +241,7 @@ EFI_STATUS
 Ikev2InitPskParser (\r
   IN UINT8            *SaSession,\r
   IN IKE_PACKET       *IkePacket\r
-  ) \r
+  )\r
 {\r
   IKEV2_SA_SESSION     *IkeSaSession;\r
   IKE_PAYLOAD          *SaPayload;\r
@@ -305,7 +305,7 @@ Ikev2InitPskParser (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto CheckError;\r
   }\r
-  \r
+\r
   CopyMem (\r
     NonceBuffer,\r
     NoncePayload->PayloadBuf + sizeof (IKEV2_COMMON_PAYLOAD_HEADER),\r
@@ -410,7 +410,7 @@ CheckError:
   if (NonceBuffer != NULL) {\r
     FreePool (NonceBuffer);\r
   }\r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -439,7 +439,7 @@ Ikev2AuthPskGenerator (
   IKE_PAYLOAD            *NotifyPayload;\r
   IKE_PAYLOAD            *CpPayload;\r
   IKEV2_CHILD_SA_SESSION *ChildSaSession;\r
-  \r
+\r
 \r
   IkeSaSession   = (IKEV2_SA_SESSION *) SaSession;\r
   ChildSaSession = IKEV2_CHILD_SA_SESSION_BY_IKE_SA (GetFirstNode (&IkeSaSession->ChildSaSessionList));\r
@@ -453,7 +453,7 @@ Ikev2AuthPskGenerator (
   NotifyPayload  = NULL;\r
   CpPayload      = NULL;\r
   NotifyPayload  = NULL;\r
-  \r
+\r
   //\r
   // 1. Allocate IKE Packet\r
   //\r
@@ -476,7 +476,7 @@ Ikev2AuthPskGenerator (
   }\r
 \r
   //\r
-  // According to RFC4306_2.2, For the IKE_SA_INIT message the MessageID should \r
+  // According to RFC4306_2.2, For the IKE_SA_INIT message the MessageID should\r
   // be always number 0 and 1;\r
   //\r
   IkePacket->Header->MessageId = 1;\r
@@ -623,7 +623,7 @@ CheckError:
   if (IkePacket != NULL) {\r
     IkePacketFree (IkePacket);\r
   }\r
-  \r
+\r
   if (IdPayload != NULL) {\r
     IkePayloadFree (IdPayload);\r
   }\r
@@ -631,7 +631,7 @@ CheckError:
   if (AuthPayload != NULL) {\r
     IkePayloadFree (AuthPayload);\r
   }\r
-  \r
+\r
   if (CpPayload != NULL) {\r
     IkePayloadFree (CpPayload);\r
   }\r
@@ -639,20 +639,20 @@ CheckError:
   if (SaPayload != NULL) {\r
     IkePayloadFree (SaPayload);\r
   }\r
-  \r
+\r
   if (TsiPayload != NULL) {\r
     IkePayloadFree (TsiPayload);\r
   }\r
-  \r
+\r
   if (TsrPayload != NULL) {\r
     IkePayloadFree (TsrPayload);\r
   }\r
-  \r
+\r
   if (NotifyPayload != NULL) {\r
     IkePayloadFree (NotifyPayload);\r
   }\r
-  \r
-  return NULL; \r
+\r
+  return NULL;\r
 }\r
 \r
 /**\r
@@ -661,13 +661,13 @@ CheckError:
   @param[in]  SaSession   Pointer to the IKE_SA_SESSION related to this packet.\r
   @param[in]  IkePacket   Pointer to the IKE_AUTH packet to be parsered.\r
 \r
-  @retval     EFI_INVALID_PARAMETER   The IKE packet is malformed or the SA \r
+  @retval     EFI_INVALID_PARAMETER   The IKE packet is malformed or the SA\r
                                       proposal is unacceptable.\r
   @retval     EFI_SUCCESS             The IKE packet is acceptable and the\r
                                       relative data is saved for furthure communication.\r
 \r
 **/\r
-EFI_STATUS \r
+EFI_STATUS\r
 Ikev2AuthPskParser (\r
   IN UINT8             *SaSession,\r
   IN IKE_PACKET        *IkePacket\r
@@ -733,7 +733,7 @@ Ikev2AuthPskParser (
   // Check IkePacket Header is match the state\r
   //\r
   if (IkeSaSession->SessionCommon.IsInitiator) {\r
-    \r
+\r
     //\r
     // 1. Check the IkePacket->Hdr == IKE_HEADER_FLAGS_RESPOND\r
     //\r
@@ -830,7 +830,7 @@ Ikev2AuthPskParser (
         (((TRAFFIC_SELECTOR *)(TsrPayload->PayloadBuf + sizeof (IKEV2_TS)))->StartPort != ChildSaSession->RemotePort)\r
         ) {\r
       return EFI_INVALID_PARAMETER;\r
-    } \r
+    }\r
     if ((((TRAFFIC_SELECTOR *)(TsiPayload->PayloadBuf + sizeof (IKEV2_TS)))->StartPort != 0) &&\r
         (((TRAFFIC_SELECTOR *)(TsiPayload->PayloadBuf + sizeof (IKEV2_TS)))->StartPort != ChildSaSession->LocalPort)\r
         ) {\r
@@ -847,7 +847,7 @@ Ikev2AuthPskParser (
         return EFI_INVALID_PARAMETER;\r
       }\r
       //\r
-      // Get the Virtual IP address from the Tsi traffic selector. \r
+      // Get the Virtual IP address from the Tsi traffic selector.\r
       // TODO: check the CFG reply payload\r
       //\r
       CopyMem (\r
@@ -856,7 +856,7 @@ Ikev2AuthPskParser (
         (ChildSaSession->SessionCommon.UdpService->IpVersion == IP_VERSION_4) ?\r
         sizeof (EFI_IPv4_ADDRESS) : sizeof (EFI_IPv6_ADDRESS)\r
         );\r
-      }    \r
+      }\r
   }\r
 \r
   //\r
@@ -866,7 +866,7 @@ Ikev2AuthPskParser (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   if (IkeSaSession->SessionCommon.IsInitiator) {\r
     //\r
     // 6. Change the state of IkeSaSession\r
@@ -874,7 +874,7 @@ Ikev2AuthPskParser (
     IKEV2_DUMP_STATE (IkeSaSession->SessionCommon.State, IkeStateIkeSaEstablished);\r
     IkeSaSession->SessionCommon.State = IkeStateIkeSaEstablished;\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -892,7 +892,7 @@ IKE_PACKET*
 Ikev2InitCertGenerator (\r
   IN UINT8           *SaSession,\r
   IN VOID            *Context\r
-  ) \r
+  )\r
 {\r
   IKE_PACKET         *IkePacket;\r
   IKE_PAYLOAD        *CertReqPayload;\r
@@ -944,7 +944,7 @@ Ikev2InitCertGenerator (
 \r
   @retval EFI_SUCCESS            The IKEv2 packet is acceptable and the relative data is\r
                                  saved for furthure communication.\r
-  @retval EFI_INVALID_PARAMETER  The IKE packet is malformed or the SA proposal is unacceptable.                        \r
+  @retval EFI_INVALID_PARAMETER  The IKE packet is malformed or the SA proposal is unacceptable.\r
   @retval EFI_UNSUPPORTED        The certificate authentication is not supported.\r
 \r
 **/\r
@@ -956,11 +956,11 @@ Ikev2InitCertParser (
 {\r
   if (!FeaturePcdGet (PcdIpsecCertificateEnabled)) {\r
     return EFI_UNSUPPORTED;\r
-  } \r
-  \r
+  }\r
+\r
   //\r
   // The first two messages exchange is same between PSK and Cert.\r
-  // Todo: Parse Certificate Request from responder Initial Exchange. \r
+  // Todo: Parse Certificate Request from responder Initial Exchange.\r
   //\r
   return Ikev2InitPskParser (SaSession, IkePacket);\r
 }\r
@@ -1071,7 +1071,7 @@ Ikev2AuthCertGenerator (
   if (CertPayload == NULL) {\r
     goto CheckError;\r
   }\r
-  \r
+\r
   if (IkeSaSession->SessionCommon.IsInitiator) {\r
     CertReqPayload = Ikev2GenerateCertificatePayload (\r
                        IkeSaSession,\r
@@ -1083,7 +1083,7 @@ Ikev2AuthCertGenerator (
                        );\r
     if (CertReqPayload == NULL) {\r
       goto CheckError;\r
-    } \r
+    }\r
   }\r
 \r
   //\r
@@ -1126,15 +1126,15 @@ Ikev2AuthCertGenerator (
                     IKEV2_CFG_ATTR_INTERNAL_IP6_ADDRESS\r
                     );\r
     }\r
-    \r
+\r
     if (CpPayload == NULL) {\r
       goto CheckError;\r
-    } \r
+    }\r
   }\r
 \r
   if (AuthPayload == NULL) {\r
     goto CheckError;\r
-  }  \r
+  }\r
 \r
   //\r
   // 5. Generate SA Payload according to the Sa Data in ChildSaSession\r
@@ -1165,7 +1165,7 @@ Ikev2AuthCertGenerator (
                    );\r
 \r
     //\r
-    // Generate Notify Payload. If transport mode, there should have Notify \r
+    // Generate Notify Payload. If transport mode, there should have Notify\r
     // payload with TRANSPORT_MODE notification.\r
     //\r
     NotifyPayload = Ikev2GenerateNotifyPayload (\r
@@ -1222,7 +1222,7 @@ CheckError:
   if (IkePacket != NULL) {\r
     IkePacketFree (IkePacket);\r
   }\r
-  \r
+\r
   if (IdPayload != NULL) {\r
     IkePayloadFree (IdPayload);\r
   }\r
@@ -1230,7 +1230,7 @@ CheckError:
   if (CertPayload != NULL) {\r
     IkePayloadFree (CertPayload);\r
   }\r
-  \r
+\r
   if (CertReqPayload != NULL) {\r
     IkePayloadFree (CertReqPayload);\r
   }\r
@@ -1242,24 +1242,24 @@ CheckError:
   if (CpPayload != NULL) {\r
     IkePayloadFree (CpPayload);\r
   }\r
-  \r
+\r
   if (SaPayload != NULL) {\r
     IkePayloadFree (SaPayload);\r
   }\r
-  \r
+\r
   if (TsiPayload != NULL) {\r
     IkePayloadFree (TsiPayload);\r
   }\r
-  \r
+\r
   if (TsrPayload != NULL) {\r
     IkePayloadFree (TsrPayload);\r
   }\r
-  \r
+\r
   if (NotifyPayload != NULL) {\r
     IkePayloadFree (NotifyPayload);\r
   }\r
-  \r
-  return NULL; \r
+\r
+  return NULL;\r
 }\r
 \r
 /**\r
@@ -1342,7 +1342,7 @@ Ikev2AuthCertParser (
     }\r
   }\r
 \r
-  if ((SaPayload == NULL) || (AuthPayload == NULL) || (TsiPayload == NULL) || \r
+  if ((SaPayload == NULL) || (AuthPayload == NULL) || (TsiPayload == NULL) ||\r
       (TsrPayload == NULL) || (CertPayload == NULL)) {\r
     goto Exit;\r
   }\r
@@ -1354,7 +1354,7 @@ Ikev2AuthCertParser (
   // Check IkePacket Header is match the state\r
   //\r
   if (IkeSaSession->SessionCommon.IsInitiator) {\r
-    \r
+\r
     //\r
     // 1. Check the IkePacket->Hdr == IKE_HEADER_FLAGS_RESPOND\r
     //\r
@@ -1451,7 +1451,7 @@ Ikev2AuthCertParser (
         (((TRAFFIC_SELECTOR *)(TsrPayload->PayloadBuf + sizeof (IKEV2_TS)))->StartPort != ChildSaSession->RemotePort)\r
         ) {\r
       goto Exit;\r
-    } \r
+    }\r
     if ((((TRAFFIC_SELECTOR *)(TsiPayload->PayloadBuf + sizeof (IKEV2_TS)))->StartPort != 0) &&\r
         (((TRAFFIC_SELECTOR *)(TsiPayload->PayloadBuf + sizeof (IKEV2_TS)))->StartPort != ChildSaSession->LocalPort)\r
         ) {\r
@@ -1468,7 +1468,7 @@ Ikev2AuthCertParser (
         goto Exit;\r
       }\r
       //\r
-      // Get the Virtual IP address from the Tsi traffic selector. \r
+      // Get the Virtual IP address from the Tsi traffic selector.\r
       // TODO: check the CFG reply payload\r
       //\r
       CopyMem (\r
@@ -1479,7 +1479,7 @@ Ikev2AuthCertParser (
         );\r
     }\r
   }\r
-  \r
+\r
   //\r
   // 5. Generat keymats for IPsec protocol.\r
   //\r
@@ -1487,7 +1487,7 @@ Ikev2AuthCertParser (
   if (EFI_ERROR (Status)) {\r
     goto Exit;\r
   }\r
-  \r
+\r
   if (IkeSaSession->SessionCommon.IsInitiator) {\r
     //\r
     // 6. Change the state of IkeSaSession\r
@@ -1528,7 +1528,7 @@ Ikev2GenerateSaDhPublicKey (
   if (IkeSaSession->IkeKeys == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   IkeKeys = IkeSaSession->IkeKeys;\r
   IkeKeys->DhBuffer = AllocateZeroPool (sizeof (IKEV2_DH_BUFFER));\r
   if (IkeKeys->DhBuffer == NULL) {\r
@@ -1560,13 +1560,13 @@ Ikev2GenerateSaDhPublicKey (
              );\r
   if (EFI_ERROR (Status)) {\r
     DEBUG ((DEBUG_ERROR, "Error CPLKeyManGetKeyParam X public key error Status = %r\n", Status));\r
-    \r
+\r
     FreePool (IkeKeys->DhBuffer->GxBuffer);\r
-    \r
+\r
     FreePool (IkeKeys->DhBuffer);\r
-    \r
+\r
     FreePool (IkeSaSession->IkeKeys);\r
-    \r
+\r
     return Status;\r
   }\r
 \r
@@ -1583,7 +1583,7 @@ Ikev2GenerateSaDhPublicKey (
 \r
   @param[in]  DhBuffer       Pointer to buffer of peer's puliic key.\r
   @param[in]  KePayload      Pointer to received key payload.\r
-  \r
+\r
   @retval EFI_SUCCESS        The operation succeeded.\r
   @retval Otherwise          The operation failed.\r
 \r
@@ -1622,7 +1622,7 @@ Ikev2GenerateSaDhComputeKey (
     DEBUG ((DEBUG_ERROR, "Error CPLKeyManGetKeyParam Y session key error Status = %r\n", Status));\r
 \r
     FreePool (DhBuffer->GxyBuffer);\r
-    \r
+\r
     return Status;\r
   }\r
 \r
@@ -1633,10 +1633,10 @@ Ikev2GenerateSaDhComputeKey (
   DhBuffer->GyBuffer = AllocateZeroPool (DhBuffer->GySize);\r
   if (DhBuffer->GyBuffer == NULL) {\r
     FreePool (DhBuffer->GxyBuffer);\r
-    \r
+\r
     return Status;\r
   }\r
-  \r
+\r
   CopyMem (DhBuffer->GyBuffer, PubKey, DhBuffer->GySize);\r
 \r
   IPSEC_DUMP_BUF ("DH Public Key (g^y) Dump", DhBuffer->GyBuffer, DhBuffer->GySize);\r
@@ -1705,7 +1705,7 @@ Ikev2GenerateSaKeys (
   //\r
   // If one or more algorithm is not support, return EFI_UNSUPPORTED.\r
   //\r
-  if (AuthAlgKeyLen == 0 || \r
+  if (AuthAlgKeyLen == 0 ||\r
       EncryptAlgKeyLen == 0 ||\r
       IntegrityAlgKeyLen == 0 ||\r
       PrfAlgKeyLen == 0\r
@@ -1767,8 +1767,8 @@ Ikev2GenerateSaKeys (
   IPSEC_DUMP_BUF (">>> NrBlock", IkeSaSession->NrBlock, IkeSaSession->NrBlkSize);\r
   IPSEC_DUMP_BUF (">>> InitiatorCookie", (UINT8 *)&IkeSaSession->InitiatorCookie, sizeof(UINT64));\r
   IPSEC_DUMP_BUF (">>> ResponderCookie", (UINT8 *)&IkeSaSession->ResponderCookie, sizeof(UINT64));\r
-  \r
-  OutputKeyLength = PrfAlgKeyLen + \r
+\r
+  OutputKeyLength = PrfAlgKeyLen +\r
                     2 * EncryptAlgKeyLen +\r
                     2 * AuthAlgKeyLen +\r
                     2 * IntegrityAlgKeyLen;\r
@@ -1818,7 +1818,7 @@ Ikev2GenerateSaKeys (
   }\r
   IkeSaSession->IkeKeys->SkAiKeySize = IntegrityAlgKeyLen;\r
   CopyMem (IkeSaSession->IkeKeys->SkAiKey, OutputKey + PrfAlgKeyLen, IntegrityAlgKeyLen);\r
-  \r
+\r
   IPSEC_DUMP_BUF (">>> SK_Ai Key", IkeSaSession->IkeKeys->SkAiKey, IkeSaSession->IkeKeys->SkAiKeySize);\r
 \r
   //\r
@@ -1835,7 +1835,7 @@ Ikev2GenerateSaKeys (
     OutputKey + PrfAlgKeyLen + IntegrityAlgKeyLen,\r
     IntegrityAlgKeyLen\r
     );\r
-  \r
+\r
   IPSEC_DUMP_BUF (">>> SK_Ar Key", IkeSaSession->IkeKeys->SkArKey, IkeSaSession->IkeKeys->SkArKeySize);\r
 \r
   //\r
@@ -1847,14 +1847,14 @@ Ikev2GenerateSaKeys (
     goto Exit;\r
   }\r
   IkeSaSession->IkeKeys->SkEiKeySize = EncryptAlgKeyLen;\r
-  \r
+\r
   CopyMem (\r
     IkeSaSession->IkeKeys->SkEiKey,\r
     OutputKey + AuthAlgKeyLen + 2 * IntegrityAlgKeyLen,\r
     EncryptAlgKeyLen\r
     );\r
   IPSEC_DUMP_BUF (\r
-    ">>> SK_Ei Key", \r
+    ">>> SK_Ei Key",\r
     OutputKey + AuthAlgKeyLen + 2 * IntegrityAlgKeyLen,\r
     EncryptAlgKeyLen\r
     );\r
@@ -1915,7 +1915,7 @@ Ikev2GenerateSaKeys (
     IkeSaSession->IkeKeys->SkPrKey,\r
     OutputKey + AuthAlgKeyLen + 2 * IntegrityAlgKeyLen + 2 * EncryptAlgKeyLen + AuthAlgKeyLen,\r
     AuthAlgKeyLen\r
-    ); \r
+    );\r
   IPSEC_DUMP_BUF (\r
     ">>> SK_Pr Key",\r
     OutputKey + AuthAlgKeyLen + 2 * IntegrityAlgKeyLen + 2 * EncryptAlgKeyLen + AuthAlgKeyLen,\r
@@ -1958,7 +1958,7 @@ Exit:
     }\r
   }\r
 \r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -1988,16 +1988,16 @@ Ikev2GenerateChildSaKeys (
 \r
   Status = EFI_SUCCESS;\r
   OutputKey = NULL;\r
-  \r
+\r
   if (KePayload != NULL) {\r
     //\r
-    // Generate Gxy \r
+    // Generate Gxy\r
     //\r
     Status = Ikev2GenerateSaDhComputeKey (ChildSaSession->DhBuffer, KePayload);\r
     if (EFI_ERROR (Status)) {\r
       goto Exit;\r
     }\r
-    \r
+\r
     Fragments[0].Data     = ChildSaSession->DhBuffer->GxyBuffer;\r
     Fragments[0].DataSize = ChildSaSession->DhBuffer->GxySize;\r
   }\r
@@ -2021,7 +2021,7 @@ Ikev2GenerateChildSaKeys (
   }\r
 \r
   //\r
-  // \r
+  //\r
   // If KePayload is not NULL, calculate KEYMAT = prf+(SK_d, g^ir (new) | Ni | Nr ),\r
   // otherwise, KEYMAT = prf+(SK_d, Ni | Nr )\r
   //\r
@@ -2045,16 +2045,16 @@ Ikev2GenerateChildSaKeys (
              );\r
 \r
   if (EFI_ERROR (Status)) {\r
-    goto Exit;  \r
+    goto Exit;\r
   }\r
-  \r
+\r
   //\r
   // Copy KEYMATE (SK_ENCRYPT_i | SK_ENCRYPT_r | SK_INTEG_i | SK_INTEG_r) to\r
   // ChildKeyMates.\r
-  //  \r
+  //\r
   if (!ChildSaSession->SessionCommon.IsInitiator) {\r
 \r
-    // \r
+    //\r
     // Initiator Encryption Key\r
     //\r
     ChildSaSession->ChildKeymats.LocalPeerInfo.EspAlgoInfo.EncAlgoId    = (UINT8)SaParams->EncAlgId;\r
@@ -2080,8 +2080,8 @@ Ikev2GenerateChildSaKeys (
     if (ChildSaSession->ChildKeymats.LocalPeerInfo.EspAlgoInfo.AuthKey == NULL) {\r
       Status = EFI_OUT_OF_RESOURCES;\r
       goto Exit;\r
-    }    \r
-    \r
+    }\r
+\r
     CopyMem (\r
       ChildSaSession->ChildKeymats.LocalPeerInfo.EspAlgoInfo.AuthKey,\r
       OutputKey + EncryptAlgKeyLen,\r
@@ -2097,8 +2097,8 @@ Ikev2GenerateChildSaKeys (
     if (ChildSaSession->ChildKeymats.RemotePeerInfo.EspAlgoInfo.EncKey == NULL) {\r
       Status = EFI_OUT_OF_RESOURCES;\r
       goto Exit;\r
-    }   \r
-    \r
+    }\r
+\r
     CopyMem (\r
       ChildSaSession->ChildKeymats.RemotePeerInfo.EspAlgoInfo.EncKey,\r
       OutputKey + EncryptAlgKeyLen + IntegrityAlgKeyLen,\r
@@ -2114,8 +2114,8 @@ Ikev2GenerateChildSaKeys (
     if (ChildSaSession->ChildKeymats.RemotePeerInfo.EspAlgoInfo.AuthKey == NULL) {\r
       Status = EFI_OUT_OF_RESOURCES;\r
       goto Exit;\r
-    }   \r
-    \r
+    }\r
+\r
     CopyMem (\r
       ChildSaSession->ChildKeymats.RemotePeerInfo.EspAlgoInfo.AuthKey,\r
       OutputKey + 2 * EncryptAlgKeyLen + IntegrityAlgKeyLen,\r
@@ -2131,8 +2131,8 @@ Ikev2GenerateChildSaKeys (
     if (ChildSaSession->ChildKeymats.RemotePeerInfo.EspAlgoInfo.EncKey == NULL) {\r
       Status = EFI_OUT_OF_RESOURCES;\r
       goto Exit;\r
-    }   \r
-    \r
+    }\r
+\r
     CopyMem (\r
       ChildSaSession->ChildKeymats.RemotePeerInfo.EspAlgoInfo.EncKey,\r
       OutputKey,\r
@@ -2148,8 +2148,8 @@ Ikev2GenerateChildSaKeys (
     if (ChildSaSession->ChildKeymats.RemotePeerInfo.EspAlgoInfo.AuthKey == NULL) {\r
       Status = EFI_OUT_OF_RESOURCES;\r
       goto Exit;\r
-    }   \r
-    \r
+    }\r
+\r
     CopyMem (\r
       ChildSaSession->ChildKeymats.RemotePeerInfo.EspAlgoInfo.AuthKey,\r
       OutputKey + EncryptAlgKeyLen,\r
@@ -2165,8 +2165,8 @@ Ikev2GenerateChildSaKeys (
     if (ChildSaSession->ChildKeymats.LocalPeerInfo.EspAlgoInfo.EncKey == NULL) {\r
       Status = EFI_OUT_OF_RESOURCES;\r
       goto Exit;\r
-    }  \r
-    \r
+    }\r
+\r
     CopyMem (\r
       ChildSaSession->ChildKeymats.LocalPeerInfo.EspAlgoInfo.EncKey,\r
       OutputKey + EncryptAlgKeyLen + IntegrityAlgKeyLen,\r
@@ -2182,8 +2182,8 @@ Ikev2GenerateChildSaKeys (
     if (ChildSaSession->ChildKeymats.LocalPeerInfo.EspAlgoInfo.AuthKey == NULL) {\r
       Status = EFI_OUT_OF_RESOURCES;\r
       goto Exit;\r
-    }   \r
-    \r
+    }\r
+\r
     CopyMem (\r
       ChildSaSession->ChildKeymats.LocalPeerInfo.EspAlgoInfo.AuthKey,\r
       OutputKey + 2 * EncryptAlgKeyLen + IntegrityAlgKeyLen,\r
@@ -2233,7 +2233,7 @@ Exit:
   if (OutputKey != NULL) {\r
     FreePool (OutputKey);\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
index 8589af0b2a931c3fe3cd452f0bd4b14798b8229d..698aba1327d2a45c37f1d26615220e52804d003a 100644 (file)
@@ -2,7 +2,7 @@
   The Common operations used by IKE Exchange Process.\r
 \r
   (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -21,7 +21,7 @@
 \r
 UINT16 mIkev2EncryptAlgorithmList[IKEV2_SUPPORT_ENCRYPT_ALGORITHM_NUM] = {\r
   IKEV2_TRANSFORM_ID_ENCR_3DES,\r
-  IKEV2_TRANSFORM_ID_ENCR_AES_CBC, \r
+  IKEV2_TRANSFORM_ID_ENCR_AES_CBC,\r
 };\r
 \r
 UINT16 mIkev2PrfAlgorithmList[IKEV2_SUPPORT_PRF_ALGORITHM_NUM] = {\r
@@ -69,7 +69,7 @@ Ikev2SaSessionAlloc (
   IkeSaSession->InitiatorCookie      = IkeGenerateCookie ();\r
   IkeSaSession->ResponderCookie      = 0;\r
   //\r
-  // BUGBUG: Message ID starts from 2 is to match the OpenSwan requirement, but it \r
+  // BUGBUG: Message ID starts from 2 is to match the OpenSwan requirement, but it\r
   // might not match the IPv6 Logo. In its test specification, it mentions that\r
   // the Message ID should start from zero after the IKE_SA_INIT exchange.\r
   //\r
@@ -143,7 +143,7 @@ Ikev2SaSessionReg (
 \r
   //\r
   // Cleanup the fields of SessionCommon for processing.\r
-  // \r
+  //\r
   Ikev2SessionCommonRefresh (SessionCommon);\r
 \r
   //\r
@@ -163,8 +163,8 @@ Ikev2SaSessionReg (
                   );\r
   if (EFI_ERROR(Status)){\r
     //\r
-    // If TimerEvent creation failed, the SA will be alive untill user disable it or \r
-    // receiving a Delete Payload from peer. \r
+    // If TimerEvent creation failed, the SA will be alive untill user disable it or\r
+    // receiving a Delete Payload from peer.\r
     //\r
     return;\r
   }\r
@@ -177,7 +177,7 @@ Ikev2SaSessionReg (
   } else {\r
     Lifetime = IkeSaSession->Spd->Data->ProcessingPolicy->SaLifetime.HardLifetime;\r
   }\r
-  \r
+\r
   Status = gBS->SetTimer (\r
                   SessionCommon->TimeoutEvent,\r
                   TimerRelative,\r
@@ -185,8 +185,8 @@ Ikev2SaSessionReg (
                   );\r
   if (EFI_ERROR(Status)){\r
     //\r
-    // If SetTimer failed, the SA will be alive untill user disable it or \r
-    // receiving a Delete Payload from peer. \r
+    // If SetTimer failed, the SA will be alive untill user disable it or\r
+    // receiving a Delete Payload from peer.\r
     //\r
     return ;\r
   }\r
@@ -239,8 +239,8 @@ Ikev2SaSessionLookup (
   Private->Ikev2SaSession list or Private->Ikev2EstablishedList list.\r
 \r
   @param[in]  SaSessionList   Pointer to list to be inserted into.\r
-  @param[in]  IkeSaSession    Pointer to IKEV2_SA_SESSION to be inserted. \r
-  @param[in]  RemotePeerIp    Pointer to EFI_IP_ADDRESSS to indicate the \r
+  @param[in]  IkeSaSession    Pointer to IKEV2_SA_SESSION to be inserted.\r
+  @param[in]  RemotePeerIp    Pointer to EFI_IP_ADDRESSS to indicate the\r
                               unique IKEV2_SA_SESSION.\r
 \r
 **/\r
@@ -261,7 +261,7 @@ Ikev2SaSessionInsert (
   @param[in]  SaSessionList   Pointer to list to be searched.\r
   @param[in]  RemotePeerIp    Pointer to EFI_IP_ADDRESS to use for SA Session search.\r
 \r
-  @retval Pointer to IKEV2_SA_SESSION with the specified remote IP address or NULL. \r
+  @retval Pointer to IKEV2_SA_SESSION with the specified remote IP address or NULL.\r
 \r
 **/\r
 IKEV2_SA_SESSION *\r
@@ -307,7 +307,7 @@ Ikev2SaSessionOnDeleting (
 }\r
 \r
 /**\r
-  Free specified Seession Common. The session common would belong to a IKE SA or \r
+  Free specified Seession Common. The session common would belong to a IKE SA or\r
   a Child SA.\r
 \r
   @param[in]   SessionCommon   Pointer to a Session Common.\r
@@ -358,7 +358,7 @@ Ikev2SessionCommonRefresh (
   return ;\r
 }\r
 /**\r
-  Free specified IKEV2 SA Session. \r
+  Free specified IKEV2 SA Session.\r
 \r
   @param[in]    IkeSaSession   Pointer to IKEV2_SA_SESSION to be freed.\r
 \r
@@ -374,7 +374,7 @@ Ikev2SaSessionFree (
   IKEV2_DH_BUFFER         *DhBuffer;\r
 \r
   ASSERT (IkeSaSession != NULL);\r
-  \r
+\r
   //\r
   // Delete Common Session\r
   //\r
@@ -419,7 +419,7 @@ Ikev2SaSessionFree (
 \r
     //\r
     // Delete Keys\r
-    //    \r
+    //\r
     if (IkeKeys->SkAiKey != NULL) {\r
       FreePool (IkeKeys->SkAiKey);\r
     }\r
@@ -495,9 +495,9 @@ Ikev2SaSessionIncreaseMessageId (
 \r
 /**\r
   Allocate memory for IKEV2 Child SA Session.\r
-  \r
+\r
   @param[in]   UdpService     Pointer to IKE_UDP_SERVICE.\r
-  @param[in]   IkeSaSession   Pointer to IKEV2_SA_SESSION related to this Child SA \r
+  @param[in]   IkeSaSession   Pointer to IKEV2_SA_SESSION related to this Child SA\r
                               Session.\r
 \r
   @retval  Pointer of a new created IKEV2 Child SA Session or NULL.\r
@@ -534,7 +534,7 @@ Ikev2ChildSaSessionAlloc (
     FreePool (ChildSaSession);\r
     return NULL;\r
   }\r
-  \r
+\r
   ChildSaCommon                      = &ChildSaSession->SessionCommon;\r
   ChildSaCommon->UdpService          = UdpService;\r
   ChildSaCommon->Private             = IkeSaSession->SessionCommon.Private;\r
@@ -566,8 +566,8 @@ Ikev2ChildSaSessionAlloc (
 }\r
 \r
 /**\r
-  Register a established IKEv2 Child SA into IkeSaSession->ChildSaEstablishSessionList. \r
-  If the there is IKEV2_CHILD_SA_SESSION with same remote peer IP, remove the old one \r
+  Register a established IKEv2 Child SA into IkeSaSession->ChildSaEstablishSessionList.\r
+  If the there is IKEV2_CHILD_SA_SESSION with same remote peer IP, remove the old one\r
   then register the new one.\r
 \r
   @param[in]  ChildSaSession  Pointer to IKEV2_CHILD_SA_SESSION to be registered.\r
@@ -610,9 +610,9 @@ Ikev2ChildSaSessionReg (
 \r
   //\r
   // Cleanup the fields of SessionCommon for processing.\r
-  // \r
+  //\r
   Ikev2SessionCommonRefresh (SessionCommon);\r
\r
+\r
   //\r
   // Insert the ready child SA session into established list.\r
   //\r
@@ -692,7 +692,7 @@ Ikev2ChildSaSessionLookupByMid (
 \r
   This functin find a ChildSA session by searching the ChildSaSessionlist of\r
   the input IKEV2_SA_SESSION by specified MessageID.\r
-  \r
+\r
   @param[in]  SaSessionList      Pointer to List to be searched.\r
   @param[in]  Spi                Specified SPI.\r
 \r
@@ -737,19 +737,19 @@ Ikev2ChildSaSessionInsert (
 \r
 /**\r
   Remove the IKEV2_CHILD_SA_SESSION from IkeSaSessionList.\r
-  \r
+\r
   @param[in]  SaSessionList      The SA Session List to be iterated.\r
   @param[in]  Spi                Spi used to identified the IKEV2_CHILD_SA_SESSION.\r
-  @param[in]  ListType           The type of the List to indicate whether it is a \r
-                                 Established. \r
+  @param[in]  ListType           The type of the List to indicate whether it is a\r
+                                 Established.\r
 \r
   @return The point to IKEV2_CHILD_SA_SESSION or NULL.\r
-  \r
+\r
 **/\r
 IKEV2_CHILD_SA_SESSION *\r
 Ikev2ChildSaSessionRemove (\r
   IN LIST_ENTRY           *SaSessionList,\r
-  IN UINT32               Spi, \r
+  IN UINT32               Spi,\r
   IN UINT8                ListType\r
   )\r
 {\r
@@ -758,7 +758,7 @@ Ikev2ChildSaSessionRemove (
   IKEV2_CHILD_SA_SESSION  *ChildSaSession;\r
 \r
   NET_LIST_FOR_EACH_SAFE (Entry, NextEntry, SaSessionList) {\r
-    \r
+\r
     if (ListType == IKEV2_ESTABLISHED_CHILDSA_LIST || ListType == IKEV2_ESTABLISHING_CHILDSA_LIST) {\r
       ChildSaSession = IKEV2_CHILD_SA_SESSION_BY_IKE_SA (Entry);\r
     } else if (ListType == IKEV2_DELET_CHILDSA_LIST) {\r
@@ -793,7 +793,7 @@ Ikev2ChildSaSessionOnDeleting (
 }\r
 \r
 /**\r
-  Free the memory located for the specified IKEV2_CHILD_SA_SESSION. \r
+  Free the memory located for the specified IKEV2_CHILD_SA_SESSION.\r
 \r
   @param[in]  ChildSaSession  Pointer to IKEV2_CHILD_SA_SESSION.\r
 \r
@@ -907,7 +907,7 @@ Ikev2ChildSaSilentDelete (
   //\r
   ChildSession = Ikev2ChildSaSessionRemove(\r
                    &(IkeSaSession->ChildSaEstablishSessionList),\r
-                   Spi, \r
+                   Spi,\r
                    IKEV2_ESTABLISHED_CHILDSA_LIST\r
                    );\r
   if (ChildSession == NULL) {\r
@@ -916,7 +916,7 @@ Ikev2ChildSaSilentDelete (
 \r
   LocalSpi  = ChildSession->LocalPeerSpi;\r
   RemoteSpi = ChildSession->RemotePeerSpi;\r
-  \r
+\r
   SelectorSize  = sizeof (EFI_IPSEC_CONFIG_SELECTOR);\r
   Selector      = AllocateZeroPool (SelectorSize);\r
   if (Selector == NULL) {\r
@@ -938,7 +938,7 @@ Ikev2ChildSaSilentDelete (
         Status = EFI_OUT_OF_RESOURCES;\r
         break;\r
       }\r
-      \r
+\r
       Status   = EfiIpSecConfigGetNextSelector (\r
                    &Private->IpSecConfig,\r
                    IPsecConfigDataTypeSad,\r
@@ -962,7 +962,7 @@ Ikev2ChildSaSilentDelete (
         Status = EFI_OUT_OF_RESOURCES;\r
         break;\r
       }\r
-      \r
+\r
       CopyMem (RemoteSelector, Selector, SelectorSize);\r
     }\r
 \r
@@ -977,7 +977,7 @@ Ikev2ChildSaSilentDelete (
         Status = EFI_OUT_OF_RESOURCES;\r
         break;\r
       }\r
-      \r
+\r
       CopyMem (LocalSelector, Selector, SelectorSize);\r
     }\r
   }\r
@@ -1032,12 +1032,12 @@ Ikev2ChildSaSilentDelete (
   Free the specified DhBuffer.\r
 \r
   @param[in] DhBuffer   Pointer to IKEV2_DH_BUFFER to be freed.\r
-  \r
+\r
 **/\r
 VOID\r
 Ikev2DhBufferFree (\r
   IKEV2_DH_BUFFER *DhBuffer\r
-) \r
+)\r
 {\r
   if (DhBuffer != NULL) {\r
     if (DhBuffer->GxBuffer != NULL) {\r
@@ -1058,7 +1058,7 @@ Ikev2DhBufferFree (
 \r
 /**\r
   This function is to parse a request IKE packet and return its request type.\r
-  The request type is one of IKE CHILD SA creation, IKE SA rekeying and \r
+  The request type is one of IKE CHILD SA creation, IKE SA rekeying and\r
   IKE CHILD SA rekeying.\r
 \r
   @param[in] IkePacket  IKE packet to be prased.\r
@@ -1085,10 +1085,10 @@ Ikev2ChildExchangeRequestType(
       //\r
       Flag = TRUE;\r
     }\r
-    if (IkePayload->PayloadType == IKEV2_PAYLOAD_TYPE_NOTIFY) { \r
+    if (IkePayload->PayloadType == IKEV2_PAYLOAD_TYPE_NOTIFY) {\r
       if (((IKEV2_NOTIFY*)IkePayload)->MessageType == IKEV2_NOTIFICATION_REKEY_SA) {\r
         //\r
-        // If notify payload with REKEY_SA message type, the IkePacket is for \r
+        // If notify payload with REKEY_SA message type, the IkePacket is for\r
         // rekeying Child SA.\r
         //\r
         return IkeRequestTypeRekeyChildSa;\r
@@ -1103,7 +1103,7 @@ Ikev2ChildExchangeRequestType(
     return IkeRequestTypeRekeyIkeSa;\r
   } else {\r
     //\r
-    // If the Notify payloaad with transport mode message type, the IkePacket is \r
+    // If the Notify payloaad with transport mode message type, the IkePacket is\r
     // for create Child SA.\r
     //\r
     return IkeRequestTypeCreateChildSa;\r
@@ -1113,10 +1113,10 @@ Ikev2ChildExchangeRequestType(
 /**\r
   Associate a SPD selector to the Child SA Session.\r
 \r
-  This function is called when the Child SA is not the first child SA of its \r
+  This function is called when the Child SA is not the first child SA of its\r
   IKE SA. It associate a SPD to this Child SA.\r
 \r
-  @param[in, out]  ChildSaSession     Pointer to the Child SA Session to be associated to \r
+  @param[in, out]  ChildSaSession     Pointer to the Child SA Session to be associated to\r
                                       a SPD selector.\r
 \r
   @retval EFI_SUCCESS        Associate one SPD selector to this Child SA Session successfully.\r
@@ -1139,7 +1139,7 @@ Ikev2ChildSaAssociateSpdEntry (
 \r
 /**\r
   This function finds the SPI from Create Child SA Exchange Packet.\r
\r
+\r
   @param[in] IkePacket       Pointer to IKE_PACKET to be searched.\r
 \r
   @retval SPI number or 0 if it is not supported.\r
@@ -1152,7 +1152,7 @@ Ikev2ChildExchangeRekeySpi (
 {\r
   //\r
   // Not support yet.\r
-  // \r
+  //\r
   return 0;\r
 }\r
 \r
@@ -1202,7 +1202,7 @@ Ikev2ValidateHeader (
   //\r
   // Information Exchagne and Create Child Exchange can be started from each part.\r
   //\r
-  if (IkeHdr->ExchangeType != IKEV2_EXCHANGE_TYPE_INFO && \r
+  if (IkeHdr->ExchangeType != IKEV2_EXCHANGE_TYPE_INFO &&\r
       IkeHdr->ExchangeType != IKEV2_EXCHANGE_TYPE_CREATE_CHILD\r
       ) {\r
     if (IkeSaSession->SessionCommon.IsInitiator) {\r
@@ -1277,7 +1277,7 @@ Ikev2InitializeSaData (
   ProposalData->ProposalIndex   = 1;\r
 \r
   //\r
-  // If SA data for IKE_SA_INIT exchage, contains 4 transforms. If SA data for \r
+  // If SA data for IKE_SA_INIT exchage, contains 4 transforms. If SA data for\r
   // IKE_AUTH exchange contains 3 transforms.\r
   //\r
   if (SessionCommon->IkeSessionType == IkeSessionTypeIkeSa) {\r
@@ -1297,7 +1297,7 @@ Ikev2InitializeSaData (
       FreePool (SaData);\r
       return NULL;\r
     }\r
-    \r
+\r
     CopyMem (\r
       ProposalData->Spi,\r
       &ChildSaSession->LocalPeerSpi,\r
@@ -1370,7 +1370,7 @@ Ikev2InitializeSaData (
       FreePool (SaData);\r
       return NULL;\r
     }\r
-    \r
+\r
     CopyMem (\r
       ProposalData->Spi,\r
       &ChildSaSession->LocalPeerSpi,\r
@@ -1456,9 +1456,9 @@ Ikev2StoreSaData (
 \r
   //\r
   // Create a SpdSelector. In this implementation, one SPD represents\r
-  // 2 direction traffic, so in here, there needs to reverse the local address \r
+  // 2 direction traffic, so in here, there needs to reverse the local address\r
   // and remote address for Remote Peer's SA, then reverse again for the locate\r
-  // SA. \r
+  // SA.\r
   //\r
   TempAddressCount = ChildSaSession->SpdSelector->LocalAddressCount;\r
   TempAddressInfo  = ChildSaSession->SpdSelector->LocalAddress;\r
@@ -1483,7 +1483,7 @@ Ikev2StoreSaData (
   //\r
   if (SaData.Mode == EfiIPsecTunnel) {\r
     CopyMem (\r
-      &SaData.TunnelSourceAddress, \r
+      &SaData.TunnelSourceAddress,\r
       &ChildSaSession->Spd->Data->ProcessingPolicy->TunnelOption->RemoteTunnelAddress,\r
       sizeof (EFI_IP_ADDRESS)\r
       );\r
@@ -1512,13 +1512,13 @@ Ikev2StoreSaData (
 \r
   //\r
   // Store the local SA into SAD.\r
-  //  \r
+  //\r
   ChildSaSession->SpdSelector->RemoteAddressCount = ChildSaSession->SpdSelector->LocalAddressCount;\r
   ChildSaSession->SpdSelector->RemoteAddress      = ChildSaSession->SpdSelector->LocalAddress;\r
 \r
   ChildSaSession->SpdSelector->LocalAddress       = TempAddressInfo;\r
   ChildSaSession->SpdSelector->LocalAddressCount  = TempAddressCount;\r
-  \r
+\r
   SaId.Spi = ChildSaSession->RemotePeerSpi;\r
 \r
   CopyMem (&SaId.DestAddress, &ChildSaSession->SessionCommon.RemotePeerIp, sizeof (EFI_IP_ADDRESS));\r
@@ -1555,12 +1555,12 @@ Ikev2StoreSaData (
 /**\r
   Call back function of the IKE life time is over.\r
 \r
-  This function will mark the related IKE SA Session as deleting and trigger a \r
+  This function will mark the related IKE SA Session as deleting and trigger a\r
   Information negotiation.\r
 \r
   @param[in]    Event     The signaled Event.\r
   @param[in]    Context   Pointer to data passed by caller.\r
-  \r
+\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -1602,7 +1602,7 @@ Ikev2LifetimeNotify (
 \r
     //\r
     // Change the Child SA Session's State to IKE_STATE_SA_DELETING.\r
-    //    \r
+    //\r
     DEBUG ((\r
       DEBUG_INFO,\r
       "\n------ChildSa Lifetime is out(SPI):(0x%x)------\n",\r
@@ -1638,7 +1638,7 @@ Ikev2ResendNotify (
   UINT8                        Value;\r
   EFI_STATUS                   Status;\r
 \r
-  ASSERT (Context != NULL); \r
+  ASSERT (Context != NULL);\r
   IkeSaSession   = NULL;\r
   ChildSaSession = NULL;\r
   SessionCommon  = (IKEV2_SESSION_COMMON *) Context;\r
@@ -1714,9 +1714,9 @@ Ikev2ResendNotify (
       if (ChildSaSession->SessionCommon.State == IkeStateSaDeleting) {\r
 \r
         //\r
-        // Established Child SA should be remove from the SAD entry and \r
-        // DeleteList. The function of Ikev2DeleteChildSaSilent() will remove \r
-        // the childSA from the IkeSaSession->ChildSaEstablishedList. So there \r
+        // Established Child SA should be remove from the SAD entry and\r
+        // DeleteList. The function of Ikev2DeleteChildSaSilent() will remove\r
+        // the childSA from the IkeSaSession->ChildSaEstablishedList. So there\r
         // is no need to remove it here.\r
         //\r
         Ikev2ChildSaSilentDelete (IkeSaSession, ChildSaSession->LocalPeerSpi);\r
@@ -1759,19 +1759,19 @@ Ikev2ResendNotify (
   Copy ChildSaSession->Spd->Selector to ChildSaSession->SpdSelector.\r
 \r
   ChildSaSession->SpdSelector stores the real Spdselector for its SA. Sometime,\r
-  the SpdSelector in ChildSaSession is more accurated or the scope is smaller \r
+  the SpdSelector in ChildSaSession is more accurated or the scope is smaller\r
   than the one in ChildSaSession->Spd, especially for the tunnel mode.\r
-    \r
+\r
   @param[in, out]  ChildSaSession  Pointer to IKEV2_CHILD_SA_SESSION related to.\r
 \r
   @retval EFI_SUCCESS            The operation complete successfully.\r
   @retval EFI_OUT_OF_RESOURCES   If the required resource can't be allocated.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 Ikev2ChildSaSessionSpdSelectorCreate (\r
   IN OUT IKEV2_CHILD_SA_SESSION *ChildSaSession\r
-  ) \r
+  )\r
 {\r
   EFI_STATUS          Status;\r
 \r
@@ -1786,26 +1786,26 @@ Ikev2ChildSaSessionSpdSelectorCreate (
       }\r
     }\r
     CopyMem (\r
-      ChildSaSession->SpdSelector, \r
-      ChildSaSession->Spd->Selector, \r
+      ChildSaSession->SpdSelector,\r
+      ChildSaSession->Spd->Selector,\r
       sizeof (EFI_IPSEC_SPD_SELECTOR)\r
       );\r
     ChildSaSession->SpdSelector->RemoteAddress = AllocateCopyPool (\r
-                                                   ChildSaSession->Spd->Selector->RemoteAddressCount * \r
-                                                   sizeof (EFI_IP_ADDRESS_INFO), \r
+                                                   ChildSaSession->Spd->Selector->RemoteAddressCount *\r
+                                                   sizeof (EFI_IP_ADDRESS_INFO),\r
                                                    ChildSaSession->Spd->Selector->RemoteAddress\r
                                                    );\r
     if (ChildSaSession->SpdSelector->RemoteAddress == NULL) {\r
       Status = EFI_OUT_OF_RESOURCES;\r
 \r
       FreePool (ChildSaSession->SpdSelector);\r
-      \r
+\r
       return Status;\r
     }\r
-    \r
+\r
     ChildSaSession->SpdSelector->LocalAddress = AllocateCopyPool (\r
-                                                  ChildSaSession->Spd->Selector->LocalAddressCount * \r
-                                                  sizeof (EFI_IP_ADDRESS_INFO), \r
+                                                  ChildSaSession->Spd->Selector->LocalAddressCount *\r
+                                                  sizeof (EFI_IP_ADDRESS_INFO),\r
                                                   ChildSaSession->Spd->Selector->LocalAddress\r
                                                   );\r
     if (ChildSaSession->SpdSelector->LocalAddress == NULL) {\r
@@ -1814,12 +1814,12 @@ Ikev2ChildSaSessionSpdSelectorCreate (
       FreePool (ChildSaSession->SpdSelector->RemoteAddress);\r
 \r
       FreePool (ChildSaSession->SpdSelector);\r
-      \r
+\r
       return Status;\r
     }\r
 \r
     ChildSaSession->SpdSelector->RemoteAddressCount = ChildSaSession->Spd->Selector->RemoteAddressCount;\r
-    ChildSaSession->SpdSelector->LocalAddressCount = ChildSaSession->Spd->Selector->LocalAddressCount; \r
+    ChildSaSession->SpdSelector->LocalAddressCount = ChildSaSession->Spd->Selector->LocalAddressCount;\r
   }\r
 \r
   return Status;\r
@@ -1853,7 +1853,7 @@ Ikev2ChildSaSessionCreate (
 \r
   //\r
   // Set the specific parameters.\r
-  // \r
+  //\r
   ChildSaSession->Spd        = IkeSaSession->Spd;\r
   ChildSaCommon              = &ChildSaSession->SessionCommon;\r
   ChildSaCommon->IsInitiator = IkeSaSession->SessionCommon.IsInitiator;\r
@@ -1883,7 +1883,7 @@ Ikev2ChildSaSessionCreate (
     Ikev2ChildSaSessionFree (ChildSaSession);\r
     return NULL;\r
   }\r
-  \r
+\r
   ChildSaSession->NiBlkSize = IkeSaSession->NiBlkSize;\r
   CopyMem (ChildSaSession->NiBlock, IkeSaSession->NiBlock, IkeSaSession->NiBlkSize);\r
 \r
@@ -1892,13 +1892,13 @@ Ikev2ChildSaSessionCreate (
     Ikev2ChildSaSessionFree (ChildSaSession);\r
     return NULL;\r
   }\r
-  \r
+\r
   ChildSaSession->NrBlkSize = IkeSaSession->NrBlkSize;\r
   CopyMem (ChildSaSession->NrBlock, IkeSaSession->NrBlock, IkeSaSession->NrBlkSize);\r
 \r
   //\r
-  //  Only if the Create Child SA is called for the IKE_INIT Exchange and \r
-  //  IkeSaSession is initiator (Only Initiator's SPD is not NULL), Set the \r
+  //  Only if the Create Child SA is called for the IKE_INIT Exchange and\r
+  //  IkeSaSession is initiator (Only Initiator's SPD is not NULL), Set the\r
   //  Traffic Selectors related information here.\r
   //\r
   if (IkeSaSession->SessionCommon.State == IkeStateAuth && IkeSaSession->Spd != NULL) {\r
@@ -1918,20 +1918,20 @@ Ikev2ChildSaSessionCreate (
   Check if the SPD is related to the input Child SA Session.\r
 \r
   This function is the subfunction of Ikev1AssociateSpdEntry(). It is the call\r
-  back function of IpSecVisitConfigData(). \r
-  \r
+  back function of IpSecVisitConfigData().\r
+\r
 \r
   @param[in]  Type               Type of the input Config Selector.\r
-  @param[in]  Selector           Pointer to the Configure Selector to be checked. \r
-  @param[in]  Data               Pointer to the Configure Selector's Data passed \r
+  @param[in]  Selector           Pointer to the Configure Selector to be checked.\r
+  @param[in]  Data               Pointer to the Configure Selector's Data passed\r
                                  from the caller.\r
   @param[in]  SelectorSize       The buffer size of Selector.\r
   @param[in]  DataSize           The buffer size of the Data.\r
   @param[in]  Context            The data passed from the caller. It is a Child\r
                                  SA Session in this context.\r
 \r
-  @retval EFI_SUCCESS        The SPD Selector is not related to the Child SA Session. \r
-  @retval EFI_ABORTED        The SPD Selector is related to the Child SA session and \r
+  @retval EFI_SUCCESS        The SPD Selector is not related to the Child SA Session.\r
+  @retval EFI_ABORTED        The SPD Selector is related to the Child SA session and\r
                              set the ChildSaSession->Spd to point to this SPD Selector.\r
 \r
 **/\r
@@ -1962,7 +1962,7 @@ Ikev2MatchSpdEntry (
 \r
   ChildSaSession  = (IKEV2_CHILD_SA_SESSION *) Context;\r
   IpVersion       = ChildSaSession->SessionCommon.UdpService->IpVersion;\r
-  SpdSelector     = (EFI_IPSEC_SPD_SELECTOR *) Selector;  \r
+  SpdSelector     = (EFI_IPSEC_SPD_SELECTOR *) Selector;\r
   IsMatch         = TRUE;\r
 \r
   if (SpdSelector->NextLayerProtocol == EFI_IP_PROTO_UDP &&\r
@@ -1991,7 +1991,7 @@ Ikev2MatchSpdEntry (
     IsMatch = FALSE;\r
   }\r
 \r
-  IsMatch = (BOOLEAN) (IsMatch && \r
+  IsMatch = (BOOLEAN) (IsMatch &&\r
                        IpSecMatchIpAddress (\r
                          IpVersion,\r
                          &ChildSaSession->SessionCommon.LocalPeerIp,\r
@@ -1999,7 +1999,7 @@ Ikev2MatchSpdEntry (
                          SpdSelector->LocalAddressCount\r
                          ));\r
 \r
-  IsMatch = (BOOLEAN) (IsMatch && \r
+  IsMatch = (BOOLEAN) (IsMatch &&\r
                        IpSecMatchIpAddress (\r
                          IpVersion,\r
                          &ChildSaSession->SessionCommon.RemotePeerIp,\r
@@ -2073,12 +2073,12 @@ Ikev2IsSupportAlg (
 \r
   @param[in]  ProposalData              Pointer to related IKEV2_PROPOSAL_DATA.\r
   @param[out] PreferEncryptAlgorithm    Output of preferred encrypt algorithm.\r
-  @param[out] PreferIntegrityAlgorithm  Output of preferred integrity algorithm. \r
-  @param[out] PreferPrfAlgorithm        Output of preferred PRF algorithm. Only \r
+  @param[out] PreferIntegrityAlgorithm  Output of preferred integrity algorithm.\r
+  @param[out] PreferPrfAlgorithm        Output of preferred PRF algorithm. Only\r
                                         for IKE SA.\r
-  @param[out] PreferDhGroup             Output of preferred DH group. Only for \r
+  @param[out] PreferDhGroup             Output of preferred DH group. Only for\r
                                         IKE SA.\r
-  @param[out] PreferEncryptKeylength    Output of preferred encrypt key length \r
+  @param[out] PreferEncryptKeylength    Output of preferred encrypt key length\r
                                         in bytes.\r
   @param[out] IsSupportEsn              Output of value about the Extented Sequence\r
                                         Number is support or not. Only for Child SA.\r
@@ -2088,7 +2088,7 @@ Ikev2IsSupportAlg (
 **/\r
 VOID\r
 Ikev2ParseProposalData (\r
-  IN     IKEV2_PROPOSAL_DATA  *ProposalData, \r
+  IN     IKEV2_PROPOSAL_DATA  *ProposalData,\r
      OUT UINT16               *PreferEncryptAlgorithm,\r
      OUT UINT16               *PreferIntegrityAlgorithm,\r
      OUT UINT16               *PreferPrfAlgorithm,\r
@@ -2096,7 +2096,7 @@ Ikev2ParseProposalData (
      OUT UINTN                *PreferEncryptKeylength,\r
      OUT BOOLEAN              *IsSupportEsn,\r
   IN     BOOLEAN              IsChildSa\r
-) \r
+)\r
 {\r
   IKEV2_TRANSFORM_DATA *TransformData;\r
   UINT8                TransformIndex;\r
@@ -2105,7 +2105,7 @@ Ikev2ParseProposalData (
   // Check input parameters.\r
   //\r
   if (ProposalData == NULL ||\r
-      PreferEncryptAlgorithm == NULL || \r
+      PreferEncryptAlgorithm == NULL ||\r
       PreferIntegrityAlgorithm == NULL ||\r
       PreferEncryptKeylength == NULL\r
       ) {\r
@@ -2120,14 +2120,14 @@ Ikev2ParseProposalData (
     if (PreferPrfAlgorithm == NULL || PreferDhGroup == NULL) {\r
       return;\r
     }\r
-  }  \r
+  }\r
 \r
   TransformData = (IKEV2_TRANSFORM_DATA *)(ProposalData + 1);\r
   for (TransformIndex = 0; TransformIndex < ProposalData->NumTransforms; TransformIndex++) {\r
-    switch (TransformData->TransformType) {          \r
+    switch (TransformData->TransformType) {\r
     //\r
-    // For IKE SA there are four algorithm types. Encryption Algorithm, Pseudo-random Function, \r
-    // Integrity Algorithm, Diffie-Hellman Group. For Child SA, there are three algorithm types. \r
+    // For IKE SA there are four algorithm types. Encryption Algorithm, Pseudo-random Function,\r
+    // Integrity Algorithm, Diffie-Hellman Group. For Child SA, there are three algorithm types.\r
     // Encryption Algorithm, Integrity Algorithm, Extended Sequence Number.\r
     //\r
     case IKEV2_TRANSFORM_TYPE_ENCR:\r
@@ -2154,7 +2154,7 @@ Ikev2ParseProposalData (
         if (*PreferPrfAlgorithm == 0 && Ikev2IsSupportAlg (TransformData->TransformId, IKE_PRF_TYPE)) {\r
           *PreferPrfAlgorithm = TransformData->TransformId;\r
         }\r
-      }       \r
+      }\r
       break;\r
 \r
     case IKEV2_TRANSFORM_TYPE_INTEG :\r
@@ -2162,21 +2162,21 @@ Ikev2ParseProposalData (
         *PreferIntegrityAlgorithm = TransformData->TransformId;\r
       }\r
       break;\r
-      \r
+\r
     case IKEV2_TRANSFORM_TYPE_DH :\r
       if (!IsChildSa) {\r
         if (*PreferDhGroup == 0 && Ikev2IsSupportAlg (TransformData->TransformId, IKE_DH_TYPE)) {\r
           *PreferDhGroup = TransformData->TransformId;\r
         }\r
-      }        \r
+      }\r
       break;\r
-    \r
+\r
     case IKEV2_TRANSFORM_TYPE_ESN :\r
       if (IsChildSa) {\r
         if (TransformData->TransformId != 0) {\r
           *IsSupportEsn = TRUE;\r
         }\r
-      }        \r
+      }\r
       break;\r
 \r
     default:\r
@@ -2188,14 +2188,14 @@ Ikev2ParseProposalData (
 \r
 /**\r
   Parse the received Initial Exchange Packet.\r
-  \r
-  This function parse the SA Payload and Key Payload to find out the cryptographic \r
-  suite for the further IKE negotiation and fill it into the IKE SA Session's \r
+\r
+  This function parse the SA Payload and Key Payload to find out the cryptographic\r
+  suite for the further IKE negotiation and fill it into the IKE SA Session's\r
   CommonSession->SaParams.\r
 \r
   @param[in, out]  IkeSaSession  Pointer to related IKEV2_SA_SESSION.\r
   @param[in]       SaPayload     The received packet.\r
-  @param[in]       Type          The received packet IKE header flag. \r
+  @param[in]       Type          The received packet IKE header flag.\r
 \r
   @retval          TRUE          If the SA proposal in Packet is acceptable.\r
   @retval          FALSE         If the SA proposal in Packet is not acceptable.\r
@@ -2246,7 +2246,7 @@ Ikev2SaParseSaPayload (
         // Get the preferred algorithms.\r
         //\r
         Ikev2ParseProposalData (\r
-          ProposalData, \r
+          ProposalData,\r
           &PreferEncryptAlgorithm,\r
           &PreferIntegrityAlgorithm,\r
           &PreferPrfAlgorithm,\r
@@ -2258,17 +2258,17 @@ Ikev2SaParseSaPayload (
 \r
         if (PreferEncryptAlgorithm != 0 &&\r
               PreferIntegrityAlgorithm != 0 &&\r
-              PreferPrfAlgorithm != 0 && \r
+              PreferPrfAlgorithm != 0 &&\r
               PreferDhGroup != 0\r
               ) {\r
             //\r
-            // Find the matched one. \r
+            // Find the matched one.\r
             //\r
             IkeSaSession->SessionCommon.SaParams = AllocateZeroPool (sizeof (IKEV2_SA_PARAMS));\r
             if (IkeSaSession->SessionCommon.SaParams == NULL) {\r
               return FALSE;\r
             }\r
-            \r
+\r
             IkeSaSession->SessionCommon.SaParams->EncAlgId   = PreferEncryptAlgorithm;\r
             IkeSaSession->SessionCommon.SaParams->EnckeyLen  = PreferEncryptKeylength;\r
             IkeSaSession->SessionCommon.SaParams->DhGroup    = PreferDhGroup;\r
@@ -2296,13 +2296,13 @@ Ikev2SaParseSaPayload (
             // one than one transform with same type.\r
             //\r
             CopyMem (\r
-              (IKEV2_PROPOSAL_DATA *) (IkeSaSession->SaData + 1), \r
-               ProposalData, \r
+              (IKEV2_PROPOSAL_DATA *) (IkeSaSession->SaData + 1),\r
+               ProposalData,\r
                SaDataSize - sizeof (IKEV2_SA_DATA)\r
               );\r
 \r
             ((IKEV2_PROPOSAL_DATA *) (IkeSaSession->SaData + 1))->ProposalIndex = 1;\r
-            \r
+\r
             return TRUE;\r
           } else {\r
             PreferEncryptAlgorithm   = 0;\r
@@ -2315,21 +2315,21 @@ Ikev2SaParseSaPayload (
       //\r
       // Point to next Proposal.\r
       //\r
-      ProposalData = (IKEV2_PROPOSAL_DATA*)((UINT8*)(ProposalData + 1) + \r
+      ProposalData = (IKEV2_PROPOSAL_DATA*)((UINT8*)(ProposalData + 1) +\r
                      ProposalData->NumTransforms * sizeof (IKEV2_TRANSFORM_DATA));\r
     }\r
   } else if (Type == IKE_HEADER_FLAGS_RESPOND) {\r
     //\r
-    // First check the SA proposal's ProtoctolID and Transform Numbers. Since it is \r
-    // the responded SA proposal, suppose it only has one proposal and the transform Numbers \r
-    // is 4. \r
+    // First check the SA proposal's ProtoctolID and Transform Numbers. Since it is\r
+    // the responded SA proposal, suppose it only has one proposal and the transform Numbers\r
+    // is 4.\r
     //\r
     ProposalData  = (IKEV2_PROPOSAL_DATA *)((IKEV2_SA_DATA *) SaPayload->PayloadBuf + 1);\r
     if (ProposalData->ProtocolId != IPSEC_PROTO_ISAKMP || ProposalData->NumTransforms != 4) {\r
       return FALSE;\r
     }\r
     //\r
-    // Get the preferred algorithms. \r
+    // Get the preferred algorithms.\r
     //\r
     Ikev2ParseProposalData (\r
       ProposalData,\r
@@ -2338,17 +2338,17 @@ Ikev2SaParseSaPayload (
       &PreferPrfAlgorithm,\r
       &PreferDhGroup,\r
       &PreferEncryptKeylength,\r
-      NULL, \r
+      NULL,\r
       FALSE\r
       );\r
-    // \r
+    //\r
     // Check if the Sa proposal data from received packet is in the IkeSaSession->SaData.\r
     //\r
     ProposalData = (IKEV2_PROPOSAL_DATA *) (IkeSaSession->SaData + 1);\r
 \r
     for (ProposalIndex = 0; ProposalIndex < IkeSaSession->SaData->NumProposals && (!IsMatch); ProposalIndex++) {\r
       Ikev2ParseProposalData (\r
-          ProposalData, \r
+          ProposalData,\r
           &EncryptAlgorithm,\r
           &IntegrityAlgorithm,\r
           &PrfAlgorithm,\r
@@ -2369,11 +2369,11 @@ Ikev2SaParseSaPayload (
         IntegrityAlgorithm = 0;\r
         PrfAlgorithm       = 0;\r
         DhGroup            = 0;\r
-        EncryptKeylength   = 0; \r
+        EncryptKeylength   = 0;\r
       }\r
 \r
-      ProposalData = (IKEV2_PROPOSAL_DATA*)((UINT8*)(ProposalData + 1) + \r
-                     ProposalData->NumTransforms * sizeof (IKEV2_TRANSFORM_DATA));    \r
+      ProposalData = (IKEV2_PROPOSAL_DATA*)((UINT8*)(ProposalData + 1) +\r
+                     ProposalData->NumTransforms * sizeof (IKEV2_TRANSFORM_DATA));\r
     }\r
 \r
     if (IsMatch) {\r
@@ -2381,32 +2381,32 @@ Ikev2SaParseSaPayload (
         if (IkeSaSession->SessionCommon.SaParams == NULL) {\r
           return FALSE;\r
         }\r
-        \r
+\r
         IkeSaSession->SessionCommon.SaParams->EncAlgId   = PreferEncryptAlgorithm;\r
         IkeSaSession->SessionCommon.SaParams->EnckeyLen  = PreferEncryptKeylength;\r
         IkeSaSession->SessionCommon.SaParams->DhGroup    = PreferDhGroup;\r
         IkeSaSession->SessionCommon.SaParams->Prf        = PreferPrfAlgorithm;\r
         IkeSaSession->SessionCommon.SaParams->IntegAlgId = PreferIntegrityAlgorithm;\r
         IkeSaSession->SessionCommon.PreferDhGroup        = PreferDhGroup;\r
-      \r
+\r
         return TRUE;\r
     }\r
   }\r
-  \r
+\r
   return FALSE;\r
 }\r
 \r
 /**\r
   Parse the received Authentication Exchange Packet.\r
-  \r
+\r
   This function parse the SA Payload and Key Payload to find out the cryptographic\r
   suite for the ESP and fill it into the Child SA Session's CommonSession->SaParams.\r
-  \r
-  @param[in, out]  ChildSaSession  Pointer to IKEV2_CHILD_SA_SESSION related to \r
+\r
+  @param[in, out]  ChildSaSession  Pointer to IKEV2_CHILD_SA_SESSION related to\r
                                    this Authentication Exchange.\r
   @param[in]       SaPayload       The received packet.\r
-  @param[in]       Type            The IKE header's flag of received packet . \r
-  \r
+  @param[in]       Type            The IKE header's flag of received packet .\r
+\r
   @retval          TRUE            If the SA proposal in Packet is acceptable.\r
   @retval          FALSE           If the SA proposal in Packet is not acceptable.\r
 \r
@@ -2465,18 +2465,18 @@ Ikev2ChildSaParseSaPayload (
         //\r
         // Don't support the ESN now.\r
         //\r
-        if (PreferEncryptAlgorithm != 0 && \r
+        if (PreferEncryptAlgorithm != 0 &&\r
             PreferIntegrityAlgorithm != 0 &&\r
             !IsSupportEsn\r
             ) {\r
           //\r
-          // Find the matched one. \r
+          // Find the matched one.\r
           //\r
           ChildSaSession->SessionCommon.SaParams = AllocateZeroPool (sizeof (IKEV2_SA_PARAMS));\r
           if (ChildSaSession->SessionCommon.SaParams == NULL) {\r
             return FALSE;\r
           }\r
-          \r
+\r
           ChildSaSession->SessionCommon.SaParams->EncAlgId   = PreferEncryptAlgorithm;\r
           ChildSaSession->SessionCommon.SaParams->EnckeyLen  = PreferEncryptKeylength;\r
           ChildSaSession->SessionCommon.SaParams->IntegAlgId = PreferIntegrityAlgorithm;\r
@@ -2499,7 +2499,7 @@ Ikev2ChildSaParseSaPayload (
 \r
           //\r
           // BUGBUG: Suppose there are 4 transforms in the matched proposal. If\r
-          // the matched Proposal has more than 4 transforms that means there \r
+          // the matched Proposal has more than 4 transforms that means there\r
           // are more than one transform with same type.\r
           //\r
           CopyMem (\r
@@ -2511,17 +2511,17 @@ Ikev2ChildSaParseSaPayload (
           ((IKEV2_PROPOSAL_DATA *) (ChildSaSession->SaData + 1))->ProposalIndex = 1;\r
 \r
           ((IKEV2_PROPOSAL_DATA *) (ChildSaSession->SaData + 1))->Spi = AllocateCopyPool (\r
-                                                                          sizeof (ChildSaSession->LocalPeerSpi), \r
+                                                                          sizeof (ChildSaSession->LocalPeerSpi),\r
                                                                           &ChildSaSession->LocalPeerSpi\r
                                                                           );\r
           if (((IKEV2_PROPOSAL_DATA *) (ChildSaSession->SaData + 1))->Spi == NULL) {\r
             FreePool (ChildSaSession->SessionCommon.SaParams);\r
 \r
             FreePool (ChildSaSession->SaData );\r
-            \r
+\r
             return FALSE;\r
           }\r
-          \r
+\r
           return TRUE;\r
 \r
         } else {\r
@@ -2533,14 +2533,14 @@ Ikev2ChildSaParseSaPayload (
       //\r
       // Point to next Proposal\r
       //\r
-      ProposalData = (IKEV2_PROPOSAL_DATA *)((UINT8 *)(ProposalData + 1) + \r
+      ProposalData = (IKEV2_PROPOSAL_DATA *)((UINT8 *)(ProposalData + 1) +\r
                      ProposalData->NumTransforms * sizeof (IKEV2_TRANSFORM_DATA));\r
     }\r
   } else if (Type == IKE_HEADER_FLAGS_RESPOND) {\r
     //\r
-    // First check the SA proposal's ProtoctolID and Transform Numbers. Since it is \r
-    // the responded SA proposal, suppose it only has one proposal and the transform Numbers \r
-    // is 3. \r
+    // First check the SA proposal's ProtoctolID and Transform Numbers. Since it is\r
+    // the responded SA proposal, suppose it only has one proposal and the transform Numbers\r
+    // is 3.\r
     //\r
     ProposalData  = (IKEV2_PROPOSAL_DATA *)((IKEV2_SA_DATA *)SaPayload->PayloadBuf + 1);\r
     if (ProposalData->ProtocolId != IPSEC_PROTO_IPSEC_ESP || ProposalData->NumTransforms != 3) {\r
@@ -2564,7 +2564,7 @@ Ikev2ChildSaParseSaPayload (
 \r
     for (ProposalIndex = 0; ProposalIndex < ChildSaSession->SaData->NumProposals && (!IsMatch); ProposalIndex++) {\r
       Ikev2ParseProposalData (\r
-          ProposalData, \r
+          ProposalData,\r
           &EncryptAlgorithm,\r
           &IntegrityAlgorithm,\r
           NULL,\r
@@ -2576,7 +2576,7 @@ Ikev2ChildSaParseSaPayload (
       if (EncryptAlgorithm == PreferEncryptAlgorithm &&\r
           EncryptKeylength == PreferEncryptKeylength &&\r
           IntegrityAlgorithm == PreferIntegrityAlgorithm &&\r
-          IsSupportEsn == PreferIsSupportEsn          \r
+          IsSupportEsn == PreferIsSupportEsn\r
           ) {\r
         IsMatch = TRUE;\r
       } else {\r
@@ -2584,17 +2584,17 @@ Ikev2ChildSaParseSaPayload (
         PreferIntegrityAlgorithm = 0;\r
         IsSupportEsn             = TRUE;\r
       }\r
-       ProposalData = (IKEV2_PROPOSAL_DATA*)((UINT8*)(ProposalData + 1) + \r
-                     ProposalData->NumTransforms * sizeof (IKEV2_TRANSFORM_DATA));  \r
+       ProposalData = (IKEV2_PROPOSAL_DATA*)((UINT8*)(ProposalData + 1) +\r
+                     ProposalData->NumTransforms * sizeof (IKEV2_TRANSFORM_DATA));\r
     }\r
-  \r
+\r
     ProposalData  = (IKEV2_PROPOSAL_DATA *)((IKEV2_SA_DATA *)SaPayload->PayloadBuf + 1);\r
     if (IsMatch) {\r
         ChildSaSession->SessionCommon.SaParams = AllocateZeroPool (sizeof (IKEV2_SA_PARAMS));\r
         if (ChildSaSession->SessionCommon.SaParams == NULL) {\r
           return FALSE;\r
         }\r
-        \r
+\r
         ChildSaSession->SessionCommon.SaParams->EncAlgId   = PreferEncryptAlgorithm;\r
         ChildSaSession->SessionCommon.SaParams->EnckeyLen  = PreferEncryptKeylength;\r
         ChildSaSession->SessionCommon.SaParams->IntegAlgId = PreferIntegrityAlgorithm;\r
@@ -2609,17 +2609,17 @@ Ikev2ChildSaParseSaPayload (
 /**\r
   Generate Key buffer from fragments.\r
 \r
-  If the digest length of specified HashAlgId is larger than or equal with the \r
-  required output key length, derive the key directly. Otherwise, Key Material \r
-  needs to be PRF-based concatenation according to 2.13 of RFC 4306: \r
+  If the digest length of specified HashAlgId is larger than or equal with the\r
+  required output key length, derive the key directly. Otherwise, Key Material\r
+  needs to be PRF-based concatenation according to 2.13 of RFC 4306:\r
   prf+ (K,S) = T1 | T2 | T3 | T4 | ..., T1 = prf (K, S | 0x01),\r
   T2 = prf (K, T1 | S | 0x02), T3 = prf (K, T2 | S | 0x03),T4 = prf (K, T3 | S | 0x04)\r
   then derive the key from this key material.\r
-  \r
+\r
   @param[in]       HashAlgId        The Hash Algorithm ID used to generate key.\r
   @param[in]       HashKey          Pointer to a key buffer which contains hash key.\r
   @param[in]       HashKeyLength    The length of HashKey in bytes.\r
-  @param[in, out]  OutputKey        Pointer to buffer which is used to receive the \r
+  @param[in, out]  OutputKey        Pointer to buffer which is used to receive the\r
                                     output key.\r
   @param[in]       OutputKeyLength  The length of OutPutKey buffer.\r
   @param[in]       Fragments        Pointer to the data to be used to generate key.\r
@@ -2682,11 +2682,11 @@ Ikev2SaGenerateKey (
   if (OutputKeyLength <=  DigestSize) {\r
     Status = IpSecCryptoIoHmac (\r
                HashAlgId,\r
-               HashKey, \r
-               HashKeyLength, \r
-               (HASH_DATA_FRAGMENT *) Fragments, \r
-               NumFragments, \r
-               Digest, \r
+               HashKey,\r
+               HashKeyLength,\r
+               (HASH_DATA_FRAGMENT *) Fragments,\r
+               NumFragments,\r
+               Digest,\r
                DigestSize\r
                );\r
     if (EFI_ERROR (Status)) {\r
@@ -2713,7 +2713,7 @@ Ikev2SaGenerateKey (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto Exit;\r
   }\r
-  \r
+\r
   LocalFragments[1].DataSize = FragmentsSize;\r
 \r
   //\r
@@ -2722,7 +2722,7 @@ Ikev2SaGenerateKey (
   FragmentsSize = 0;\r
   for (Index = 0; Index < NumFragments; Index++) {\r
     CopyMem (\r
-      LocalFragments[1].Data + FragmentsSize, \r
+      LocalFragments[1].Data + FragmentsSize,\r
       Fragments[Index].Data,\r
       Fragments[Index].DataSize\r
       );\r
@@ -2743,17 +2743,17 @@ Ikev2SaGenerateKey (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto Exit;\r
   }\r
-  \r
+\r
   LocalFragments[0].DataSize = AuthKeyLength;\r
 \r
   Round = (OutputKeyLength - 1) / AuthKeyLength + 1;\r
   for (Index = 0; Index < Round; Index++) {\r
     Status = IpSecCryptoIoHmac (\r
-               HashAlgId, \r
-               HashKey, \r
-               HashKeyLength, \r
+               HashAlgId,\r
+               HashKey,\r
+               HashKeyLength,\r
                (HASH_DATA_FRAGMENT *)(Index == 0 ? &LocalFragments[1] : LocalFragments),\r
-               Index == 0 ? 2 : 3, \r
+               Index == 0 ? 2 : 3,\r
                Digest,\r
                DigestSize\r
                );\r
@@ -2761,25 +2761,25 @@ Ikev2SaGenerateKey (
       goto Exit;\r
     }\r
     CopyMem (\r
-      LocalFragments[0].Data, \r
-      Digest, \r
+      LocalFragments[0].Data,\r
+      Digest,\r
       DigestSize\r
       );\r
     if (OutputKeyLength > DigestSize * (Index + 1)) {\r
       CopyMem (\r
-        OutputKey + Index * DigestSize, \r
-        Digest, \r
+        OutputKey + Index * DigestSize,\r
+        Digest,\r
         DigestSize\r
         );\r
       LocalFragments[0].DataSize = DigestSize;\r
       TailData ++;\r
     } else {\r
-      // \r
+      //\r
       // The last round\r
       //\r
       CopyMem (\r
-        OutputKey + Index * DigestSize, \r
-        Digest, \r
+        OutputKey + Index * DigestSize,\r
+        Digest,\r
         OutputKeyLength - Index * DigestSize\r
       );\r
     }\r
index 319b6cb32ca9ecad5d0b93561892e8802ecaf21e..8383ff8dd63a2cd92db7c7f50e758519d0c45f82 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
-  The interfaces of IKE/Child session operations and payload related operations \r
+  The interfaces of IKE/Child session operations and payload related operations\r
   used by IKE Exchange Process.\r
 \r
-  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -76,8 +76,8 @@ Ikev2SaSessionLookup (
   Private->Ikev2SaSession list or Private->Ikev2EstablishedList list.\r
 \r
   @param[in]  SaSessionList   Pointer to list to be inserted into.\r
-  @param[in]  IkeSaSession    Pointer to IKEV2_SA_SESSION to be inserted. \r
-  @param[in]  RemotePeerIp    Pointer to EFI_IP_ADDRESSS to indicate the \r
+  @param[in]  IkeSaSession    Pointer to IKEV2_SA_SESSION to be inserted.\r
+  @param[in]  RemotePeerIp    Pointer to EFI_IP_ADDRESSS to indicate the\r
                               unique IKEV2_SA_SESSION.\r
 \r
 **/\r
@@ -94,7 +94,7 @@ Ikev2SaSessionInsert (
   @param[in]  SaSessionList   Pointer to list to be searched.\r
   @param[in]  RemotePeerIp    Pointer to EFI_IP_ADDRESS to use for SA Session search.\r
 \r
-  @retval Pointer to IKEV2_SA_SESSION with the specified remote IP address. \r
+  @retval Pointer to IKEV2_SA_SESSION with the specified remote IP address.\r
 \r
 **/\r
 IKEV2_SA_SESSION *\r
@@ -129,7 +129,7 @@ Ikev2SessionCommonRefresh (
   );\r
 \r
 /**\r
-  Free specified IKEV2 SA Session. \r
+  Free specified IKEV2 SA Session.\r
 \r
   @param[in]    IkeSaSession   Pointer to IKEV2_SA_SESSION to be freed.\r
 \r
@@ -140,7 +140,7 @@ Ikev2SaSessionFree (
   );\r
 \r
 /**\r
-  Free specified Seession Common. The session common would belong to a IKE SA or \r
+  Free specified Seession Common. The session common would belong to a IKE SA or\r
   a Child SA.\r
 \r
   @param[in]   SessionCommon   Pointer to a Session Common.\r
@@ -164,9 +164,9 @@ Ikev2SaSessionIncreaseMessageId (
 \r
 /**\r
   Allocate Momery for IKEV2 Child SA Session.\r
-  \r
+\r
   @param[in]   UdpService     Pointer to IKE_UDP_SERVICE.\r
-  @param[in]   IkeSaSession   Pointer to IKEV2_SA_SESSION related to this Child SA \r
+  @param[in]   IkeSaSession   Pointer to IKEV2_SA_SESSION related to this Child SA\r
                               Session.\r
 \r
   @retval  Pointer of a new created IKEV2 Child SA Session.\r
@@ -179,8 +179,8 @@ Ikev2ChildSaSessionAlloc (
   );\r
 \r
 /**\r
-  Register a established IKEv2 Child SA into IkeSaSession->ChildSaEstablishSessionList. \r
-  If the there is IKEV2_CHILD_SA_SESSION with same remote peer IP, remove the old one \r
+  Register a established IKEv2 Child SA into IkeSaSession->ChildSaEstablishSessionList.\r
+  If the there is IKEV2_CHILD_SA_SESSION with same remote peer IP, remove the old one\r
   then register the new one.\r
 \r
   @param[in]  ChildSaSession  Pointer to IKEV2_CHILD_SA_SESSION to be registered.\r
@@ -198,7 +198,7 @@ Ikev2ChildSaSessionReg (
 \r
   This functin find a ChildSA session by searching the ChildSaSessionlist of\r
   the input IKEV2_SA_SESSION by specified MessageID.\r
-  \r
+\r
   @param[in]  SaSessionList      Pointer to List to be searched.\r
   @param[in]  Spi                Specified SPI.\r
 \r
@@ -241,20 +241,20 @@ Ikev2ChildSaSessionInsert (
 \r
 /**\r
   Remove the IKEV2_CHILD_SA_SESSION from IkeSaSessionList.\r
-  \r
+\r
   @param[in]  SaSessionList      The SA Session List to be iterated.\r
   @param[in]  Spi                Spi used to identify the IKEV2_CHILD_SA_SESSION.\r
-  @param[in]  ListType           The type of the List to indicate whether it is a \r
-                                 Established. \r
+  @param[in]  ListType           The type of the List to indicate whether it is a\r
+                                 Established.\r
 \r
   @return The point to IKEV2_CHILD_SA_SESSION.\r
-  \r
+\r
 **/\r
 IKEV2_CHILD_SA_SESSION *\r
 Ikev2ChildSaSessionRemove (\r
   IN LIST_ENTRY           *SaSessionList,\r
-  IN UINT32               Spi, \r
-  IN UINT8                ListType  \r
+  IN UINT32               Spi,\r
+  IN UINT8                ListType\r
   );\r
 \r
 /**\r
@@ -271,7 +271,7 @@ Ikev2ChildSaSessionOnDeleting (
   );\r
 \r
 /**\r
-  Free the memory located for the specified IKEV2_CHILD_SA_SESSION. \r
+  Free the memory located for the specified IKEV2_CHILD_SA_SESSION.\r
 \r
   @param[in]  ChildSaSession  Pointer to IKEV2_CHILD_SA_SESSION.\r
 \r
@@ -285,7 +285,7 @@ Ikev2ChildSaSessionFree (
   Free the specified DhBuffer.\r
 \r
   @param[in] DhBuffer   Pointer to IKEV2_DH_BUFFER to be freed.\r
-  \r
+\r
 **/\r
 VOID\r
 Ikev2DhBufferFree (\r
@@ -315,7 +315,7 @@ Ikev2ChildSaSilentDelete (
 \r
 /**\r
   This function is to parse a request IKE packet and return its request type.\r
-  The request type is one of IKE CHILD SA creation, IKE SA rekeying and \r
+  The request type is one of IKE CHILD SA creation, IKE SA rekeying and\r
   IKE CHILD SA rekeying.\r
 \r
   @param[in] IkePacket  IKE packet to be prased.\r
@@ -330,7 +330,7 @@ Ikev2ChildExchangeRequestType(
 \r
 /**\r
   This function finds the SPI from Create Child Sa Exchange Packet.\r
\r
+\r
   @param[in] IkePacket       Pointer to IKE_PACKET to be searched.\r
 \r
   @retval SPI number.\r
@@ -345,10 +345,10 @@ Ikev2ChildExchangeRekeySpi(
 /**\r
   Associate a SPD selector to the Child SA Session.\r
 \r
-  This function is called when the Child SA is not the first child SA of its \r
+  This function is called when the Child SA is not the first child SA of its\r
   IKE SA. It associate a SPD to this Child SA.\r
 \r
-  @param[in, out]  ChildSaSession     Pointer to the Child SA Session to be associated to \r
+  @param[in, out]  ChildSaSession     Pointer to the Child SA Session to be associated to\r
                                       a SPD selector.\r
 \r
   @retval EFI_SUCCESS        Associate one SPD selector to this Child SA Session successfully.\r
@@ -441,13 +441,13 @@ Ikev2ChildSaAfterEncodePayload (
   Generate Ikev2 SA payload according to SessionSaData\r
 \r
   @param[in] SessionSaData   The data used in SA payload.\r
-  @param[in] NextPayload     The payload type presented in NextPayload field of \r
+  @param[in] NextPayload     The payload type presented in NextPayload field of\r
                              SA Payload header.\r
   @param[in] Type            The SA type. It MUST be neither (1) for IKE_SA or\r
                              (2) for CHILD_SA or (3) for INFO.\r
 \r
   @retval a Pointer to SA IKE payload.\r
-  \r
+\r
 **/\r
 IKE_PAYLOAD *\r
 Ikev2GenerateSaPayload (\r
@@ -460,7 +460,7 @@ Ikev2GenerateSaPayload (
   Generate a ID payload.\r
 \r
   @param[in] CommonSession   Pointer to IKEV2_SESSION_COMMON related to ID payload.\r
-  @param[in] NextPayload     The payload type presented in the NextPayload field \r
+  @param[in] NextPayload     The payload type presented in the NextPayload field\r
                              of ID Payload header.\r
 \r
   @retval Pointer to ID IKE payload.\r
@@ -476,7 +476,7 @@ Ikev2GenerateIdPayload (
   Generate a ID payload.\r
 \r
   @param[in] CommonSession   Pointer to IKEV2_SESSION_COMMON related to ID payload.\r
-  @param[in] NextPayload     The payload type presented in the NextPayload field \r
+  @param[in] NextPayload     The payload type presented in the NextPayload field\r
                              of ID Payload header.\r
   @param[in] InCert          Pointer to the Certificate which distinguished name\r
                              will be added into the Id payload.\r
@@ -488,7 +488,7 @@ Ikev2GenerateIdPayload (
 IKE_PAYLOAD *\r
 Ikev2GenerateCertIdPayload (\r
   IN IKEV2_SESSION_COMMON *CommonSession,\r
-  IN UINT8                NextPayload, \r
+  IN UINT8                NextPayload,\r
   IN UINT8                *InCert,\r
   IN UINTN                CertSize\r
   );\r
@@ -496,10 +496,10 @@ Ikev2GenerateCertIdPayload (
 /**\r
   Generate a Nonce payload contenting the input parameter NonceBuf.\r
 \r
-  @param[in]  NonceBuf       The nonce buffer content the whole Nonce payload block \r
+  @param[in]  NonceBuf       The nonce buffer content the whole Nonce payload block\r
                             except the payload header.\r
   @param[in]  NonceSize      The buffer size of the NonceBuf\r
-  @param[in]  NextPayload   The payload type presented in the NextPayload field \r
+  @param[in]  NextPayload   The payload type presented in the NextPayload field\r
                             of Nonce Payload header.\r
 \r
   @retval Pointer to Nonce IKE paload.\r
@@ -516,23 +516,23 @@ Ikev2GenerateNoncePayload (
   Generate the Notify payload.\r
 \r
   Since the structure of Notify payload which defined in RFC 4306 is simple, so\r
-  there is no internal data structure for Notify payload. This function generate \r
-  Notify payload defined in RFC 4306, but all the fields in this payload are still \r
-  in host order and need call Ikev2EncodePayload() to convert those fields from \r
+  there is no internal data structure for Notify payload. This function generate\r
+  Notify payload defined in RFC 4306, but all the fields in this payload are still\r
+  in host order and need call Ikev2EncodePayload() to convert those fields from\r
   the host order to network order beforing sending it.\r
 \r
   @param[in]  ProtocolId        The protocol type ID. For IKE_SA it MUST be one (1).\r
                                 For IPsec SAs it MUST be neither (2) for AH or (3)\r
                                 for ESP.\r
-  @param[in]  NextPayload       The next paylaod type in NextPayload field of \r
+  @param[in]  NextPayload       The next paylaod type in NextPayload field of\r
                                 the Notify payload.\r
   @param[in]  SpiSize           Size of the SPI in SPI size field of the Notify Payload.\r
-  @param[in]  MessageType       The message type in NotifyMessageType field of the \r
+  @param[in]  MessageType       The message type in NotifyMessageType field of the\r
                                 Notify Payload.\r
   @param[in]  SpiBuf            Pointer to buffer contains the SPI value.\r
   @param[in]  NotifyData        Pointer to buffer contains the notification data.\r
   @param[in]  NotifyDataSize    The size of NotifyData in bytes.\r
-  \r
+\r
 \r
   @retval Pointer to IKE Notify Payload.\r
 \r
@@ -551,14 +551,14 @@ Ikev2GenerateNotifyPayload (
 /**\r
   Generate the Delete payload.\r
 \r
-  Since the structure of Delete payload which defined in RFC 4306 is simple, \r
-  there is no internal data structure for Delete payload. This function generate \r
-  Delete payload defined in RFC 4306, but all the fields in this payload are still \r
-  in host order and need call Ikev2EncodePayload() to convert those fields from \r
+  Since the structure of Delete payload which defined in RFC 4306 is simple,\r
+  there is no internal data structure for Delete payload. This function generate\r
+  Delete payload defined in RFC 4306, but all the fields in this payload are still\r
+  in host order and need call Ikev2EncodePayload() to convert those fields from\r
   the host order to network order beforing sending it.\r
 \r
   @param[in]  IkeSaSession      Pointer to IKE SA Session to be used of Delete payload generation.\r
-  @param[in]  NextPayload       The next paylaod type in NextPayload field of \r
+  @param[in]  NextPayload       The next paylaod type in NextPayload field of\r
                                 the Delete payload.\r
   @param[in]  SpiSize           Size of the SPI in SPI size field of the Delete Payload.\r
   @param[in]  SpiNum            Number of SPI in NumofSPIs field of the Delete Payload.\r
@@ -573,19 +573,19 @@ Ikev2GenerateDeletePayload (
   IN UINT8             NextPayload,\r
   IN UINT8             SpiSize,\r
   IN UINT16            SpiNum,\r
-  IN UINT8             *SpiBuf  \r
+  IN UINT8             *SpiBuf\r
   );\r
 \r
 /**\r
   Generate the Configuration payload.\r
 \r
-  This function generates a configuration payload defined in RFC 4306, but all the \r
-  fields in this payload are still in host order and need call Ikev2EncodePayload() \r
+  This function generates a configuration payload defined in RFC 4306, but all the\r
+  fields in this payload are still in host order and need call Ikev2EncodePayload()\r
   to convert those fields from the host order to network order beforing sending it.\r
 \r
   @param[in]  IkeSaSession      Pointer to IKE SA Session to be used for Delete payload\r
                                 generation.\r
-  @param[in]  NextPayload       The next paylaod type in NextPayload field of \r
+  @param[in]  NextPayload       The next paylaod type in NextPayload field of\r
                                 the Delete payload.\r
   @param[in]  CfgType           The attribute type in the Configuration attribute.\r
 \r
@@ -602,15 +602,15 @@ Ikev2GenerateCpPayload (
 /**\r
   Generate a Authentication Payload.\r
 \r
-  This function is used for both Authentication generation and verification. When the \r
-  IsVerify is TRUE, it create a Auth Data for verification. This function choose the \r
+  This function is used for both Authentication generation and verification. When the\r
+  IsVerify is TRUE, it create a Auth Data for verification. This function choose the\r
   related IKE_SA_INIT Message for Auth data creation according to the IKE Session's type\r
   and the value of IsVerify parameter.\r
 \r
   @param[in]  IkeSaSession  Pointer to IKEV2_SA_SESSION related to.\r
-  @param[in]  IdPayload     Pointer to the ID payload to be used for Authentication \r
+  @param[in]  IdPayload     Pointer to the ID payload to be used for Authentication\r
                             payload generation.\r
-  @param[in]  NextPayload   The type filled into the Authentication Payload next \r
+  @param[in]  NextPayload   The type filled into the Authentication Payload next\r
                             payload field.\r
   @param[in]  IsVerify      If it is TURE, the Authentication payload is used for\r
                             verification.\r
@@ -627,26 +627,26 @@ Ikev2PskGenerateAuthPayload (
   );\r
 \r
 /**\r
-  Generate a Authentication Payload for Certificate Auth method.  \r
+  Generate a Authentication Payload for Certificate Auth method.\r
 \r
-  This function has two functions. One is creating a local Authentication \r
-  Payload for sending and other is creating the remote Authentication data \r
+  This function has two functions. One is creating a local Authentication\r
+  Payload for sending and other is creating the remote Authentication data\r
   for verification when the IsVerify is TURE.\r
 \r
   @param[in]  IkeSaSession      Pointer to IKEV2_SA_SESSION related to.\r
-  @param[in]  IdPayload         Pointer to the ID payload to be used for Authentication \r
+  @param[in]  IdPayload         Pointer to the ID payload to be used for Authentication\r
                                 payload generation.\r
-  @param[in]  NextPayload       The type filled into the Authentication Payload \r
+  @param[in]  NextPayload       The type filled into the Authentication Payload\r
                                 next payload field.\r
-  @param[in]  IsVerify          If it is TURE, the Authentication payload is used \r
+  @param[in]  IsVerify          If it is TURE, the Authentication payload is used\r
                                 for verification.\r
-  @param[in]  UefiPrivateKey    Pointer to the UEFI private key. Ignore it when \r
+  @param[in]  UefiPrivateKey    Pointer to the UEFI private key. Ignore it when\r
                                 verify the authenticate payload.\r
-  @param[in]  UefiPrivateKeyLen The size of UefiPrivateKey in bytes. Ignore it \r
+  @param[in]  UefiPrivateKeyLen The size of UefiPrivateKey in bytes. Ignore it\r
                                 when verify the authenticate payload.\r
-  @param[in]  UefiKeyPwd        Pointer to the password of UEFI private key. \r
+  @param[in]  UefiKeyPwd        Pointer to the password of UEFI private key.\r
                                 Ignore it when verify the authenticate payload.\r
-  @param[in]  UefiKeyPwdLen     The size of UefiKeyPwd in bytes.Ignore it when \r
+  @param[in]  UefiKeyPwdLen     The size of UefiKeyPwd in bytes.Ignore it when\r
                                 verify the authenticate payload.\r
 \r
   @return pointer to IKE Authentication payload for certification method.\r
@@ -670,9 +670,9 @@ Ikev2CertGenerateAuthPayload (
   This function generates TSi or TSr payload according to type of next payload.\r
   If the next payload is Responder TS, gereate TSi Payload. Otherwise, generate\r
   TSr payload\r
-  \r
+\r
   @param[in] ChildSa        Pointer to IKEV2_CHILD_SA_SESSION related to this TS payload.\r
-  @param[in] NextPayload    The payload type presented in the NextPayload field \r
+  @param[in] NextPayload    The payload type presented in the NextPayload field\r
                             of ID Payload header.\r
   @param[in] IsTunnel       It indicates that if the Ts Payload is after the CP payload.\r
                             If yes, it means the Tsi and Tsr payload should be with\r
@@ -696,7 +696,7 @@ Ikev2GenerateTsPayload (
   IPSEC_PROTO_ISAKMP or if the SpiSize is not zero or if the MessageType is not\r
   the COOKIE, return EFI_INVALID_PARAMETER.\r
 \r
-  @param[in]      IkeNCookie    Pointer to the IKE_PAYLOAD which contians the \r
+  @param[in]      IkeNCookie    Pointer to the IKE_PAYLOAD which contians the\r
                                 Notify Cookie payload.\r
                                 the Notify payload.\r
   @param[in, out] IkeSaSession  Pointer to the relevant IKE SA Session.\r
@@ -715,16 +715,16 @@ Ikev2ParserNotifyCookiePayload (
 /**\r
   Generate the Certificate payload or Certificate Request Payload.\r
 \r
-  Since the Certificate Payload structure is same with Certificate Request Payload, \r
+  Since the Certificate Payload structure is same with Certificate Request Payload,\r
   the only difference is that one contains the Certificate Data, other contains\r
-  the acceptable certificateion CA. This function generate Certificate payload \r
-  or Certificate Request Payload defined in RFC 4306, but all the fields \r
-  in the payload are still in host order and need call Ikev2EncodePayload() \r
+  the acceptable certificateion CA. This function generate Certificate payload\r
+  or Certificate Request Payload defined in RFC 4306, but all the fields\r
+  in the payload are still in host order and need call Ikev2EncodePayload()\r
   to convert those fields from the host order to network order beforing sending it.\r
 \r
-  @param[in]  IkeSaSession      Pointer to IKE SA Session to be used of Delete payload \r
+  @param[in]  IkeSaSession      Pointer to IKE SA Session to be used of Delete payload\r
                                 generation.\r
-  @param[in]  NextPayload       The next paylaod type in NextPayload field of \r
+  @param[in]  NextPayload       The next paylaod type in NextPayload field of\r
                                 the Delete payload.\r
   @param[in]  Certificate       Pointer of buffer contains the certification data.\r
   @param[in]  CertificateLen    The length of Certificate in byte.\r
@@ -747,15 +747,15 @@ Ikev2GenerateCertificatePayload (
   IN UINT8             EncodeType,\r
   IN BOOLEAN           IsRequest\r
   );\r
-  \r
+\r
 /**\r
   General interface of payload encoding.\r
 \r
-  This function encode the internal data structure into payload which \r
-  is defined in RFC 4306. The IkePayload->PayloadBuf used to store both the input \r
-  payload and converted payload. Only the SA payload use the interal structure \r
-  to store the attribute. Other payload use structure which is same with the RFC \r
-  defined, for this kind payloads just do host order to network order change of \r
+  This function encode the internal data structure into payload which\r
+  is defined in RFC 4306. The IkePayload->PayloadBuf used to store both the input\r
+  payload and converted payload. Only the SA payload use the interal structure\r
+  to store the attribute. Other payload use structure which is same with the RFC\r
+  defined, for this kind payloads just do host order to network order change of\r
   some fields.\r
 \r
   @param[in]      SessionCommon       Pointer to IKE Session Common used to encode the payload.\r
@@ -779,7 +779,7 @@ Ikev2EncodePayload (
 \r
   @param[in]      SessionCommon     Pointer to IKE Session Common to use for decoding.\r
   @param[in, out] IkePayload        Pointer to IKE payload to be decode as input, and\r
-                                    store the decoded result as output. \r
+                                    store the decoded result as output.\r
 \r
   @retval EFI_INVALID_PARAMETER  Meet error when decode the SA payload.\r
   @retval EFI_SUCCESS            Decode successfully.\r
@@ -796,18 +796,18 @@ Ikev2DecodePayload (
 \r
   This function decrpt the Encrypted IKE packet and put the result into IkePacket->PayloadBuf.\r
 \r
-  @param[in]      SessionCommon       Pointer to IKEV2_SESSION_COMMON containing \r
+  @param[in]      SessionCommon       Pointer to IKEV2_SESSION_COMMON containing\r
                                       some parameter used during decrypting.\r
-  @param[in, out] IkePacket           Point to IKE_PACKET to be decrypted as input, \r
+  @param[in, out] IkePacket           Point to IKE_PACKET to be decrypted as input,\r
                                       and the decrypted reslult as output.\r
   @param[in, out] IkeType             The type of IKE. IKE_SA_TYPE, IKE_INFO_TYPE and\r
                                       IKE_CHILD_TYPE are supportted.\r
 \r
-  @retval EFI_INVALID_PARAMETER      If the IKE packet length is zero or the \r
+  @retval EFI_INVALID_PARAMETER      If the IKE packet length is zero or the\r
                                      IKE packet length is not Algorithm Block Size\r
                                      alignment.\r
   @retval EFI_SUCCESS                Decrypt IKE packet successfully.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 Ikev2DecryptPacket (\r
@@ -821,7 +821,7 @@ Ikev2DecryptPacket (
 \r
   This function encrypt IKE packet before sending it. The Encrypted IKE packet\r
   is put in to IKEV2 Encrypted Payload.\r
-  \r
+\r
   @param[in]        SessionCommon     Pointer to IKEV2_SESSION_COMMON related to the IKE packet.\r
   @param[in, out]   IkePacket         Pointer to IKE packet to be encrypted.\r
 \r
@@ -840,9 +840,9 @@ Ikev2EncryptPacket (
 \r
   This function put all Payloads into one payload then encrypt it if needed.\r
 \r
-  @param[in]      SessionCommon      Pointer to IKEV2_SESSION_COMMON containing \r
+  @param[in]      SessionCommon      Pointer to IKEV2_SESSION_COMMON containing\r
                                      some parameter used during IKE packet encoding.\r
-  @param[in, out] IkePacket          Pointer to IKE_PACKET to be encoded as input, \r
+  @param[in, out] IkePacket          Pointer to IKE_PACKET to be encoded as input,\r
                                      and the encoded reslult as output.\r
   @param[in]      IkeType            The type of IKE. IKE_SA_TYPE, IKE_INFO_TYPE and\r
                                      IKE_CHILD_TYPE are supportted.\r
@@ -861,12 +861,12 @@ Ikev2EncodePacket (
 /**\r
   Decode the IKE packet.\r
 \r
-  This function first decrypts the IKE packet if needed , then separats the whole \r
+  This function first decrypts the IKE packet if needed , then separats the whole\r
   IKE packet from the IkePacket->PayloadBuf into IkePacket payload list.\r
-  \r
-  @param[in]      SessionCommon          Pointer to IKEV1_SESSION_COMMON containing \r
+\r
+  @param[in]      SessionCommon          Pointer to IKEV1_SESSION_COMMON containing\r
                                          some parameter used by IKE packet decoding.\r
-  @param[in, out] IkePacket              The IKE Packet to be decoded on input, and \r
+  @param[in, out] IkePacket              The IKE Packet to be decoded on input, and\r
                                          the decoded result on return.\r
   @param[in]      IkeType                The type of IKE. IKE_SA_TYPE, IKE_INFO_TYPE and\r
                                          IKE_CHILD_TYPE are supportted.\r
@@ -904,8 +904,8 @@ Ikev2OnPacketAccepted (
   @param[in]  IkeUdpService     Pointer to IKE_UDP_SERVICE used to send the IKE packet.\r
   @param[in]  SessionCommon     Pointer to IKEV1_SESSION_COMMON related to the IKE packet.\r
   @param[in]  IkePacket         Pointer to IKE_PACKET to be sent out.\r
-  @param[in]  IkeType           The type of IKE to point what's kind of the IKE \r
-                                packet is to be sent out. IKE_SA_TYPE, IKE_INFO_TYPE \r
+  @param[in]  IkeType           The type of IKE to point what's kind of the IKE\r
+                                packet is to be sent out. IKE_SA_TYPE, IKE_INFO_TYPE\r
                                 and IKE_CHILD_TYPE are supportted.\r
 \r
   @retval     EFI_SUCCESS       The operation complete successfully.\r
@@ -923,12 +923,12 @@ Ikev2SendIkePacket (
 /**\r
   Callback function for the IKE life time is over.\r
 \r
-  This function will mark the related IKE SA Session as deleting and trigger a \r
+  This function will mark the related IKE SA Session as deleting and trigger a\r
   Information negotiation.\r
 \r
   @param[in]    Event     The time out event.\r
   @param[in]    Context   Pointer to data passed by caller.\r
-  \r
+\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -952,11 +952,11 @@ Ikev2ResendNotify (
   );\r
 \r
 /**\r
-  Generate a Key Exchange payload according to the DH group type and save the \r
+  Generate a Key Exchange payload according to the DH group type and save the\r
   public Key into IkeSaSession IkeKey field.\r
 \r
   @param[in, out] IkeSaSession    Pointer of the IKE_SA_SESSION.\r
-  @param[in]      NextPayload     The payload type presented in the NextPayload field of Key \r
+  @param[in]      NextPayload     The payload type presented in the NextPayload field of Key\r
                                   Exchange Payload header.\r
 \r
   @retval Pointer to Key IKE payload.\r
@@ -964,28 +964,28 @@ Ikev2ResendNotify (
 **/\r
 IKE_PAYLOAD *\r
 Ikev2GenerateKePayload (\r
-  IN OUT IKEV2_SA_SESSION *IkeSaSession, \r
-  IN     UINT8            NextPayload      \r
+  IN OUT IKEV2_SA_SESSION *IkeSaSession,\r
+  IN     UINT8            NextPayload\r
   );\r
 \r
 /**\r
   Check if the SPD is related to the input Child SA Session.\r
 \r
   This function is the subfunction of Ikev1AssociateSpdEntry(). It is the call\r
-  back function of IpSecVisitConfigData(). \r
-  \r
+  back function of IpSecVisitConfigData().\r
+\r
 \r
   @param[in]  Type               Type of the input Config Selector.\r
-  @param[in]  Selector           Pointer to the Configure Selector to be checked. \r
-  @param[in]  Data               Pointer to the Configure Selector's Data passed \r
+  @param[in]  Selector           Pointer to the Configure Selector to be checked.\r
+  @param[in]  Data               Pointer to the Configure Selector's Data passed\r
                                  from the caller.\r
   @param[in]  SelectorSize       The buffer size of Selector.\r
   @param[in]  DataSize           The buffer size of the Data.\r
   @param[in]  Context            The data passed from the caller. It is a Child\r
                                  SA Session in this context.\r
 \r
-  @retval EFI_SUCCESS        The SPD Selector is not related to the Child SA Session. \r
-  @retval EFI_ABORTED        The SPD Selector is related to the Child SA session and \r
+  @retval EFI_SUCCESS        The SPD Selector is not related to the Child SA Session.\r
+  @retval EFI_ABORTED        The SPD Selector is related to the Child SA session and\r
                              set the ChildSaSession->Spd to point to this SPD Selector.\r
 \r
 **/\r
@@ -1033,14 +1033,14 @@ Ikev2ChildSaSessionCreate (
 \r
 /**\r
   Parse the received Initial Exchange Packet.\r
-  \r
-  This function parse the SA Payload and Key Payload to find out the cryptographic \r
-  suite for the further IKE negotiation and fill it into the IKE SA Session's \r
+\r
+  This function parse the SA Payload and Key Payload to find out the cryptographic\r
+  suite for the further IKE negotiation and fill it into the IKE SA Session's\r
   CommonSession->SaParams.\r
 \r
   @param[in, out]  IkeSaSession  Pointer to related IKEV2_SA_SESSION.\r
   @param[in]       SaPayload     The received packet.\r
-  @param[in]       Type          The received packet IKE header flag. \r
+  @param[in]       Type          The received packet IKE header flag.\r
 \r
   @retval          TRUE          If the SA proposal in Packet is acceptable.\r
   @retval          FALSE         If the SA proposal in Packet is not acceptable.\r
@@ -1055,15 +1055,15 @@ Ikev2SaParseSaPayload (
 \r
 /**\r
   Parse the received Authentication Exchange Packet.\r
-  \r
+\r
   This function parse the SA Payload and Key Payload to find out the cryptographic\r
   suite for the ESP and fill it into the Child SA Session's CommonSession->SaParams.\r
-  \r
-  @param[in, out]  ChildSaSession  Pointer to IKEV2_CHILD_SA_SESSION related to \r
+\r
+  @param[in, out]  ChildSaSession  Pointer to IKEV2_CHILD_SA_SESSION related to\r
                                    this Authentication Exchange.\r
   @param[in]       SaPayload       The received packet.\r
-  @param[in]       Type            The IKE header's flag of received packet . \r
-  \r
+  @param[in]       Type            The IKE header's flag of received packet .\r
+\r
   @retval          TRUE            If the SA proposal in Packet is acceptable.\r
   @retval          FALSE           If the SA proposal in Packet is not acceptable.\r
 \r
@@ -1078,17 +1078,17 @@ Ikev2ChildSaParseSaPayload (
 /**\r
   Generate Key buffer from fragments.\r
 \r
-  If the digest length of specified HashAlgId is larger than or equal with the \r
-  required output key length, derive the key directly. Otherwise, Key Material \r
-  needs to be PRF-based concatenation according to 2.13 of RFC 4306: \r
+  If the digest length of specified HashAlgId is larger than or equal with the\r
+  required output key length, derive the key directly. Otherwise, Key Material\r
+  needs to be PRF-based concatenation according to 2.13 of RFC 4306:\r
   prf+ (K,S) = T1 | T2 | T3 | T4 | ..., T1 = prf (K, S | 0x01),\r
   T2 = prf (K, T1 | S | 0x02), T3 = prf (K, T2 | S | 0x03),T4 = prf (K, T3 | S | 0x04)\r
   then derive the key from this key material.\r
-  \r
+\r
   @param[in]       HashAlgId        The Hash Algorithm ID used to generate key.\r
   @param[in]       HashKey          Pointer to a key buffer which contains hash key.\r
   @param[in]       HashKeyLength    The length of HashKey in bytes.\r
-  @param[in, out]  OutputKey        Pointer to buffer which is used to receive the \r
+  @param[in, out]  OutputKey        Pointer to buffer which is used to receive the\r
                                     output key.\r
   @param[in]       OutputKeyLength  The length of OutPutKey buffer.\r
   @param[in]       Fragments        Pointer to the data to be used to generate key.\r
@@ -1115,14 +1115,14 @@ Ikev2SaGenerateKey (
   Copy ChildSaSession->Spd->Selector to ChildSaSession->SpdSelector.\r
 \r
   ChildSaSession->SpdSelector stores the real Spdselector for its SA. Sometime,\r
-  the SpdSelector in ChildSaSession is more accurated or the scope is smaller \r
+  the SpdSelector in ChildSaSession is more accurated or the scope is smaller\r
   than the one in ChildSaSession->Spd, especially for the tunnel mode.\r
-    \r
+\r
   @param[in, out]  ChildSaSession  Pointer to IKEV2_CHILD_SA_SESSION related to.\r
 \r
   @retval EFI_SUCCESS            The operation complete successfully.\r
   @retval EFI_OUT_OF_RESOURCES   If the required resource can't be allocated.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 Ikev2ChildSaSessionSpdSelectorCreate (\r
index 4a51bff96f420bf2cbb7a95576f6051f6949a87c..8893d49a9fe37a2d53eff453a5afc83025d4355d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The implementation of IPSEC_CONFIG_PROTOCOL.\r
 \r
-  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -97,7 +97,7 @@ EFI_IPSEC_CONFIG_PROTOCOL mIpSecConfigInstance = {
   Get the all IPSec configuration variables and store those variables\r
   to the internal data structure.\r
 \r
-  This founction is called by IpSecConfigInitialize() that is to intialize the \r
+  This founction is called by IpSecConfigInitialize() that is to intialize the\r
   IPsecConfiguration Protocol.\r
 \r
   @param[in]  Private            Point to IPSEC_PRIVATE_DATA.\r
@@ -121,7 +121,7 @@ IpSecConfigRestore (
 \r
   @retval  TRUE    The specified AddressInfo is in the AddressInfoList.\r
   @retval  FALSE   The specified AddressInfo is not in the AddressInfoList.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 IsInAddressInfoList(\r
@@ -152,20 +152,20 @@ IsInAddressInfoList(
           AddressInfo,\r
           &AddressInfoList[Index].Address,\r
           sizeof (EFI_IP_ADDRESS)\r
-          ) == 0 && \r
+          ) == 0 &&\r
           AddressInfo->PrefixLength == AddressInfoList[Index].PrefixLength\r
-          ) { \r
+          ) {\r
        return TRUE;\r
      }\r
   }\r
   return FALSE;\r
 }\r
\r
+\r
 /**\r
   Compare two SPD Selectors.\r
 \r
   Compare two SPD Selector by the fields of LocalAddressCount/RemoteAddressCount/\r
-  NextLayerProtocol/LocalPort/LocalPortRange/RemotePort/RemotePortRange and the \r
+  NextLayerProtocol/LocalPort/LocalPortRange/RemotePort/RemotePortRange and the\r
   Local Addresses and remote Addresses.\r
 \r
   @param[in]   Selector1           Pointer of first SPD Selector.\r
@@ -173,7 +173,7 @@ IsInAddressInfoList(
 \r
   @retval  TRUE    This two Selector have the same value in above fields.\r
   @retval  FALSE   Not all above fields have the same value in these two Selectors.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 CompareSpdSelector (\r
@@ -193,7 +193,7 @@ CompareSpdSelector (
   //\r
   // Compare the LocalAddressCount/RemoteAddressCount/NextLayerProtocol/\r
   // LocalPort/LocalPortRange/RemotePort/RemotePortRange fields in the\r
-  // two Spdselectors. Since the SPD supports two directions, it needs to \r
+  // two Spdselectors. Since the SPD supports two directions, it needs to\r
   // compare two directions.\r
   //\r
   if ((SpdSel1->LocalAddressCount != SpdSel2->LocalAddressCount &&\r
@@ -209,10 +209,10 @@ CompareSpdSelector (
     IsMatch = FALSE;\r
     return IsMatch;\r
   }\r
-  \r
+\r
   //\r
   // Compare the all LocalAddress and RemoteAddress fields in the two Spdselectors.\r
-  // First, SpdSel1->LocalAddress to SpdSel2->LocalAddress && Compare \r
+  // First, SpdSel1->LocalAddress to SpdSel2->LocalAddress && Compare\r
   // SpdSel1->RemoteAddress to SpdSel2->RemoteAddress. If all match, return\r
   // TRUE.\r
   //\r
@@ -263,14 +263,14 @@ CompareSpdSelector (
     }\r
   }\r
   //\r
-  // Finish the one direction compare. If it is matched, return; otherwise, \r
+  // Finish the one direction compare. If it is matched, return; otherwise,\r
   // compare the other direction.\r
   //\r
   if (IsMatch) {\r
     return IsMatch;\r
   }\r
   //\r
-  // Secondly, the SpdSel1->LocalAddress doesn't equal to  SpdSel2->LocalAddress and \r
+  // Secondly, the SpdSel1->LocalAddress doesn't equal to  SpdSel2->LocalAddress and\r
   // SpdSel1->RemoteAddress doesn't equal to SpdSel2->RemoteAddress. Try to compare\r
   // the RemoteAddress to LocalAddress.\r
   //\r
@@ -328,16 +328,16 @@ CompareSpdSelector (
   Find if the two SPD Selectors has subordinative.\r
 \r
   Compare two SPD Selector by the fields of LocalAddressCount/RemoteAddressCount/\r
-  NextLayerProtocol/LocalPort/LocalPortRange/RemotePort/RemotePortRange and the \r
+  NextLayerProtocol/LocalPort/LocalPortRange/RemotePort/RemotePortRange and the\r
   Local Addresses and remote Addresses.\r
 \r
   @param[in]   Selector1           Pointer of first SPD Selector.\r
   @param[in]   Selector2           Pointer of second SPD Selector.\r
 \r
   @retval  TRUE    The first SPD Selector is subordinate Selector of second SPD Selector.\r
-  @retval  FALSE   The first SPD Selector is not subordinate Selector of second \r
+  @retval  FALSE   The first SPD Selector is not subordinate Selector of second\r
                    SPD Selector.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 IsSubSpdSelector (\r
@@ -357,7 +357,7 @@ IsSubSpdSelector (
   //\r
   // Compare the LocalAddressCount/RemoteAddressCount/NextLayerProtocol/\r
   // LocalPort/LocalPortRange/RemotePort/RemotePortRange fields in the\r
-  // two Spdselectors. Since the SPD supports two directions, it needs to \r
+  // two Spdselectors. Since the SPD supports two directions, it needs to\r
   // compare two directions.\r
   //\r
   if (SpdSel1->LocalAddressCount > SpdSel2->LocalAddressCount ||\r
@@ -370,10 +370,10 @@ IsSubSpdSelector (
       ) {\r
     IsMatch = FALSE;\r
   }\r
-  \r
+\r
   //\r
   // Compare the all LocalAddress and RemoteAddress fields in the two Spdselectors.\r
-  // First, SpdSel1->LocalAddress to SpdSel2->LocalAddress && Compare \r
+  // First, SpdSel1->LocalAddress to SpdSel2->LocalAddress && Compare\r
   // SpdSel1->RemoteAddress to SpdSel2->RemoteAddress. If all match, return\r
   // TRUE.\r
   //\r
@@ -405,14 +405,14 @@ IsSubSpdSelector (
   if (IsMatch) {\r
     return IsMatch;\r
   }\r
-  \r
+\r
   //\r
   //\r
   // The SPD selector in SPD entry is two way.\r
   //\r
   // Compare the LocalAddressCount/RemoteAddressCount/NextLayerProtocol/\r
   // LocalPort/LocalPortRange/RemotePort/RemotePortRange fields in the\r
-  // two Spdselectors. Since the SPD supports two directions, it needs to \r
+  // two Spdselectors. Since the SPD supports two directions, it needs to\r
   // compare two directions.\r
   //\r
   IsMatch = TRUE;\r
@@ -427,10 +427,10 @@ IsSubSpdSelector (
     IsMatch = FALSE;\r
     return IsMatch;\r
   }\r
-  \r
+\r
   //\r
   // Compare the all LocalAddress and RemoteAddress fields in the two Spdselectors.\r
-  // First, SpdSel1->LocalAddress to SpdSel2->RemoteAddress && Compare \r
+  // First, SpdSel1->LocalAddress to SpdSel2->RemoteAddress && Compare\r
   // SpdSel1->RemoteAddress to SpdSel2->LocalAddress. If all match, return\r
   // TRUE.\r
   //\r
@@ -458,7 +458,7 @@ IsSubSpdSelector (
     }\r
   }\r
   return IsMatch;\r
-  \r
+\r
 }\r
 \r
 /**\r
@@ -469,7 +469,7 @@ IsSubSpdSelector (
 \r
   @retval  TRUE    This two Selectors have the same SA ID.\r
   @retval  FALSE   This two Selecotrs don't have the same SA ID.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 CompareSaId (\r
@@ -500,7 +500,7 @@ CompareSaId (
 \r
   @retval  TRUE    This two Selectors have the same PAD ID.\r
   @retval  FALSE   This two Selecotrs don't have the same PAD ID.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 ComparePadId (\r
@@ -589,7 +589,7 @@ IsZeroSaId (
 {\r
   BOOLEAN                   IsZero;\r
   EFI_IPSEC_CONFIG_SELECTOR ZeroSelector;\r
-  \r
+\r
   IsZero    = FALSE;\r
 \r
   ZeroMem (&ZeroSelector, sizeof (EFI_IPSEC_CONFIG_SELECTOR));\r
@@ -636,14 +636,14 @@ IsZeroPadId (
 \r
   @param[in, out] DstSel             Pointer of Destination SPD Selector.\r
   @param[in]      SrcSel             Pointer of Source SPD Selector.\r
-  @param[in, out] Size               The size of the Destination SPD Selector. If it \r
-                                     not NULL and its value less than the size of \r
-                                     Source SPD Selector, the value of Source SPD \r
+  @param[in, out] Size               The size of the Destination SPD Selector. If it\r
+                                     not NULL and its value less than the size of\r
+                                     Source SPD Selector, the value of Source SPD\r
                                      Selector's size will be passed to caller by this\r
                                      parameter.\r
 \r
   @retval EFI_INVALID_PARAMETER  If the Destination or Source SPD Selector is NULL\r
-  @retval EFI_BUFFER_TOO_SMALL   If the input Size is less than size of the Source SPD Selector. \r
+  @retval EFI_BUFFER_TOO_SMALL   If the input Size is less than size of the Source SPD Selector.\r
   @retval EFI_SUCCESS            Copy Source SPD Selector to the Destination SPD\r
                                  Selector successfully.\r
 \r
@@ -702,13 +702,13 @@ DuplicateSpdSelector (
 \r
   @param[in, out] DstSel             Pointer of Destination SA ID.\r
   @param[in]      SrcSel             Pointer of Source SA ID.\r
-  @param[in, out] Size               The size of the Destination SA ID. If it \r
-                                     not NULL and its value less than the size of \r
-                                     Source SA ID, the value of Source SA ID's size \r
+  @param[in, out] Size               The size of the Destination SA ID. If it\r
+                                     not NULL and its value less than the size of\r
+                                     Source SA ID, the value of Source SA ID's size\r
                                      will be passed to caller by this parameter.\r
 \r
   @retval EFI_INVALID_PARAMETER  If the Destination or Source SA ID is NULL.\r
-  @retval EFI_BUFFER_TOO_SMALL   If the input Size less than size of source SA ID. \r
+  @retval EFI_BUFFER_TOO_SMALL   If the input Size less than size of source SA ID.\r
   @retval EFI_SUCCESS            Copy Source SA ID  to the Destination SA ID successfully.\r
 \r
 **/\r
@@ -744,9 +744,9 @@ DuplicateSaId (
 \r
   @param[in, out] DstSel             Pointer of Destination PAD ID.\r
   @param[in]      SrcSel             Pointer of Source PAD ID.\r
-  @param[in, out] Size               The size of the Destination PAD ID. If it \r
-                                     not NULL and its value less than the size of \r
-                                     Source PAD ID, the value of Source PAD ID's size \r
+  @param[in, out] Size               The size of the Destination PAD ID. If it\r
+                                     not NULL and its value less than the size of\r
+                                     Source PAD ID, the value of Source PAD ID's size\r
                                      will be passed to caller by this parameter.\r
 \r
   @retval EFI_INVALID_PARAMETER  If the Destination or Source PAD ID is NULL.\r
@@ -782,11 +782,11 @@ DuplicatePadId (
 }\r
 \r
 /**\r
-  Fix the value of some members of SPD Selector. \r
+  Fix the value of some members of SPD Selector.\r
 \r
-  This function is called by IpSecCopyPolicyEntry()which copy the Policy \r
-  Entry into the Variable. Since some members in SPD Selector are pointers, \r
-  a physical address to relative address convertion is required before copying \r
+  This function is called by IpSecCopyPolicyEntry()which copy the Policy\r
+  Entry into the Variable. Since some members in SPD Selector are pointers,\r
+  a physical address to relative address convertion is required before copying\r
   this SPD entry into the variable.\r
 \r
   @param[in]       Selector              Pointer of SPD Selector.\r
@@ -817,11 +817,11 @@ FixSpdEntry (
 }\r
 \r
 /**\r
-  Fix the value of some members of SA ID. \r
+  Fix the value of some members of SA ID.\r
 \r
-  This function is called by IpSecCopyPolicyEntry()which copy the Policy \r
-  Entry into the Variable. Since some members in SA ID are pointers, \r
-  a physical address to relative address conversion is required before copying \r
+  This function is called by IpSecCopyPolicyEntry()which copy the Policy\r
+  Entry into the Variable. Since some members in SA ID are pointers,\r
+  a physical address to relative address conversion is required before copying\r
   this SAD into the variable.\r
 \r
   @param[in]       SaId                  Pointer of SA ID\r
@@ -858,10 +858,10 @@ FixSadEntry (
 }\r
 \r
 /**\r
-  Fix the value of some members of PAD ID. \r
+  Fix the value of some members of PAD ID.\r
 \r
-  This function is called by IpSecCopyPolicyEntry()which copy the Policy \r
-  Entry into the Variable. Since some members in PAD ID are pointers, \r
+  This function is called by IpSecCopyPolicyEntry()which copy the Policy\r
+  Entry into the Variable. Since some members in PAD ID are pointers,\r
   a physical address to relative address conversion is required before copying\r
   this PAD into the variable.\r
 \r
@@ -890,7 +890,7 @@ FixPadEntry (
 }\r
 \r
 /**\r
-  Recover the value of some members of SPD Selector. \r
+  Recover the value of some members of SPD Selector.\r
 \r
   This function is corresponding to FixSpdEntry(). It recovers the value of members\r
   of SPD Selector that are fixed by FixSpdEntry().\r
@@ -918,11 +918,11 @@ UnfixSpdEntry (
       UNFIX_REF_BUF_ADDR (Data->ProcessingPolicy->TunnelOption, Data);\r
     }\r
   }\r
-  \r
+\r
 }\r
 \r
 /**\r
-  Recover the value of some members of SA ID. \r
+  Recover the value of some members of SA ID.\r
 \r
   This function is corresponding to FixSadEntry(). It recovers the value of members\r
   of SAD ID that are fixed by FixSadEntry().\r
@@ -961,7 +961,7 @@ UnfixSadEntry (
 }\r
 \r
 /**\r
-  Recover the value of some members of PAD ID. \r
+  Recover the value of some members of PAD ID.\r
 \r
   This function is corresponding to FixPadEntry(). It recovers the value of members\r
   of PAD ID that are fixed by FixPadEntry().\r
@@ -993,32 +993,32 @@ UnfixPadEntry (
 /**\r
   Set the security policy information for the EFI IPsec driver.\r
 \r
-  The IPsec configuration data has a unique selector/identifier separately to \r
+  The IPsec configuration data has a unique selector/identifier separately to\r
   identify a data entry.\r
 \r
-  @param[in]  Selector           Pointer to an entry selector on operated \r
-                                 configuration data specified by DataType. \r
-                                 A NULL Selector causes the entire specified-type \r
+  @param[in]  Selector           Pointer to an entry selector on operated\r
+                                 configuration data specified by DataType.\r
+                                 A NULL Selector causes the entire specified-type\r
                                  configuration information to be flushed.\r
-  @param[in]  Data               The data buffer to be set. The structure \r
+  @param[in]  Data               The data buffer to be set. The structure\r
                                  of the data buffer should be EFI_IPSEC_SPD_DATA.\r
-  @param[in]  Context            Pointer to one entry selector that describes \r
-                                 the expected position the new data entry will \r
+  @param[in]  Context            Pointer to one entry selector that describes\r
+                                 the expected position the new data entry will\r
                                  be added. If Context is NULL, the new entry will\r
                                  be appended the end of database.\r
 \r
   @retval EFI_INVALID_PARAMETER  One or more of the following are TRUE:\r
-                                   - Selector is not NULL and its LocalAddress \r
+                                   - Selector is not NULL and its LocalAddress\r
                                      is NULL or its RemoteAddress is NULL.\r
-                                   - Data is not NULL and its Action is Protected \r
+                                   - Data is not NULL and its Action is Protected\r
                                      and its plolicy is NULL.\r
                                    - Data is not NULL, its Action is not protected,\r
                                      and its policy is not NULL.\r
-                                   - The Action of Data is Protected, its policy \r
+                                   - The Action of Data is Protected, its policy\r
                                      mode is Tunnel, and its tunnel option is NULL.\r
-                                   - The Action of Data is protected and its policy \r
+                                   - The Action of Data is protected and its policy\r
                                      mode is not Tunnel and it tunnel option is not NULL.\r
-                                   - SadEntry requied to be set into new SpdEntry's Sas has \r
+                                   - SadEntry requied to be set into new SpdEntry's Sas has\r
                                      been found but it is invalid.\r
   @retval EFI_OUT_OF_RESOURCED  The required system resource could not be allocated.\r
   @retval EFI_SUCCESS           The specified configuration data was obtained successfully.\r
@@ -1085,7 +1085,7 @@ SetSpdEntry (
 \r
     SpdEntry = IPSEC_SPD_ENTRY_FROM_LIST (Entry);\r
 \r
-    if (SpdSel == NULL || \r
+    if (SpdSel == NULL ||\r
         CompareSpdSelector ((EFI_IPSEC_CONFIG_SELECTOR *) SpdEntry->Selector, (EFI_IPSEC_CONFIG_SELECTOR *) SpdSel)\r
         ) {\r
       //\r
@@ -1098,26 +1098,26 @@ SetSpdEntry (
       // Update the reverse ref of SAD entry in the SPD.sas list.\r
       //\r
       SpdSas = &SpdEntry->Data->Sas;\r
-      \r
+\r
       //\r
-      // Remove the related SAs from Sas(SadEntry->BySpd). If the SA entry is established by \r
-      // IKE, remove from mConfigData list(SadEntry->List) and then free it directly since its \r
+      // Remove the related SAs from Sas(SadEntry->BySpd). If the SA entry is established by\r
+      // IKE, remove from mConfigData list(SadEntry->List) and then free it directly since its\r
       // SpdEntry will be freed later.\r
       //\r
       NET_LIST_FOR_EACH_SAFE (Entry2, NextEntry2, SpdSas) {\r
         SadEntry = IPSEC_SAD_ENTRY_FROM_SPD (Entry2);\r
-        \r
+\r
         if (SadEntry->Data->SpdEntry != NULL) {\r
           RemoveEntryList (&SadEntry->BySpd);\r
           SadEntry->Data->SpdEntry = NULL;\r
         }\r
-        \r
+\r
         if (!(SadEntry->Data->ManualSet)) {\r
           RemoveEntryList (&SadEntry->List);\r
           FreePool (SadEntry);\r
         }\r
       }\r
-      \r
+\r
       //\r
       // Free the existed SPD entry\r
       //\r
@@ -1184,7 +1184,7 @@ SetSpdEntry (
   SpdEntry->Data->PackageFlag      = SpdData->PackageFlag;\r
   SpdEntry->Data->TrafficDirection = SpdData->TrafficDirection;\r
   SpdEntry->Data->Action           = SpdData->Action;\r
-  \r
+\r
   //\r
   // Fix the address of ProcessingPolicy and copy it if need, which is continous\r
   // memory and close to the base structure of SAD data.\r
@@ -1229,9 +1229,9 @@ SetSpdEntry (
             return EFI_INVALID_PARAMETER;\r
           }\r
         }\r
-      }      \r
+      }\r
   }\r
-  \r
+\r
   //\r
   // Insert the new SPD entry.\r
   //\r
@@ -1243,17 +1243,17 @@ SetSpdEntry (
 /**\r
   Set the security association information for the EFI IPsec driver.\r
 \r
-  The IPsec configuration data has a unique selector/identifier separately to \r
+  The IPsec configuration data has a unique selector/identifier separately to\r
   identify a data entry.\r
 \r
-  @param[in]  Selector           Pointer to an entry selector on operated \r
-                                 configuration data specified by DataType. \r
-                                 A NULL Selector causes the entire specified-type \r
+  @param[in]  Selector           Pointer to an entry selector on operated\r
+                                 configuration data specified by DataType.\r
+                                 A NULL Selector causes the entire specified-type\r
                                  configuration information to be flushed.\r
-  @param[in]  Data               The data buffer to be set. The structure \r
+  @param[in]  Data               The data buffer to be set. The structure\r
                                  of the data buffer should be EFI_IPSEC_SA_DATA.\r
-  @param[in]  Context            Pointer to one entry selector which describes \r
-                                 the expected position the new data entry will \r
+  @param[in]  Context            Pointer to one entry selector which describes\r
+                                 the expected position the new data entry will\r
                                  be added. If Context is NULL,the new entry will\r
                                  be appended the end of database.\r
 \r
@@ -1279,7 +1279,7 @@ SetSadEntry (
   EFI_IPSEC_SA_ID   *InsertBefore;\r
   LIST_ENTRY        *EntryInsertBefore;\r
   UINTN             SadEntrySize;\r
-  \r
+\r
   SaId          = (Selector == NULL) ? NULL : &Selector->SaId;\r
   SaData        = (Data == NULL) ? NULL : (EFI_IPSEC_SA_DATA2 *) Data;\r
   InsertBefore  = (Context == NULL) ? NULL : &((EFI_IPSEC_CONFIG_SELECTOR *) Context)->SaId;\r
@@ -1297,7 +1297,7 @@ SetSadEntry (
 \r
     SadEntry = IPSEC_SAD_ENTRY_FROM_LIST (Entry);\r
 \r
-    if (SaId == NULL || \r
+    if (SaId == NULL ||\r
         CompareSaId (\r
           (EFI_IPSEC_CONFIG_SELECTOR *) SadEntry->Id,\r
           (EFI_IPSEC_CONFIG_SELECTOR *) SaId\r
@@ -1348,7 +1348,7 @@ SetSadEntry (
   SadEntrySize  = ALIGN_VARIABLE (sizeof (IPSEC_SAD_ENTRY));\r
   SadEntrySize  = ALIGN_VARIABLE (SadEntrySize + sizeof (EFI_IPSEC_SA_ID));\r
   SadEntrySize  = ALIGN_VARIABLE (SadEntrySize + sizeof (IPSEC_SAD_DATA));\r
-  \r
+\r
   if (SaId->Proto == EfiIPsecAH) {\r
     SadEntrySize += SaData->AlgoInfo.AhAlgoInfo.AuthKeyLength;\r
   } else {\r
@@ -1405,7 +1405,7 @@ SetSadEntry (
 \r
     if (SadEntry->Data->AlgoInfo.EspAlgoInfo.EncKeyLength != 0) {\r
       SadEntry->Data->AlgoInfo.EspAlgoInfo.EncKey = (VOID *) ALIGN_POINTER (\r
-                                                               ((UINT8 *) (SadEntry->Data + 1) + \r
+                                                               ((UINT8 *) (SadEntry->Data + 1) +\r
                                                                  SadEntry->Data->AlgoInfo.EspAlgoInfo.AuthKeyLength),\r
                                                                  sizeof (UINTN)\r
                                                                  );\r
@@ -1479,17 +1479,17 @@ SetSadEntry (
 /**\r
   Set the peer authorization configuration information for the EFI IPsec driver.\r
 \r
-  The IPsec configuration data has a unique selector/identifier separately to \r
+  The IPsec configuration data has a unique selector/identifier separately to\r
   identify a data entry.\r
 \r
-  @param[in]  Selector           Pointer to an entry selector on operated \r
-                                 configuration data specified by DataType. \r
-                                 A NULL Selector causes the entire specified-type \r
+  @param[in]  Selector           Pointer to an entry selector on operated\r
+                                 configuration data specified by DataType.\r
+                                 A NULL Selector causes the entire specified-type\r
                                  configuration information to be flushed.\r
-  @param[in]  Data               The data buffer to be set. The structure \r
+  @param[in]  Data               The data buffer to be set. The structure\r
                                  of the data buffer should be EFI_IPSEC_PAD_DATA.\r
-  @param[in]  Context            Pointer to one entry selector that describes \r
-                                 the expected position the new data entry will \r
+  @param[in]  Context            Pointer to one entry selector that describes\r
+                                 the expected position the new data entry will\r
                                  be added. If Context is NULL, the new entry will\r
                                  be appended the end of database.\r
 \r
@@ -1513,7 +1513,7 @@ SetPadEntry (
   EFI_IPSEC_PAD_ID    *InsertBefore;\r
   LIST_ENTRY          *EntryInsertBefore;\r
   UINTN               PadEntrySize;\r
-   \r
+\r
   PadId         = (Selector == NULL) ? NULL : &Selector->PadId;\r
   PadData       = (Data == NULL) ? NULL : (EFI_IPSEC_PAD_DATA *) Data;\r
   InsertBefore  = (Context == NULL) ? NULL : &((EFI_IPSEC_CONFIG_SELECTOR *) Context)->PadId;\r
@@ -1531,7 +1531,7 @@ SetPadEntry (
 \r
     PadEntry = IPSEC_PAD_ENTRY_FROM_LIST (Entry);\r
 \r
-    if (PadId == NULL || \r
+    if (PadId == NULL ||\r
         ComparePadId ((EFI_IPSEC_CONFIG_SELECTOR *) PadEntry->Id, (EFI_IPSEC_CONFIG_SELECTOR *) PadId)\r
         ) {\r
       //\r
@@ -1631,16 +1631,16 @@ SetPadEntry (
 }\r
 \r
 /**\r
-  This function lookup the data entry from IPsec SPD. Return the configuration \r
+  This function lookup the data entry from IPsec SPD. Return the configuration\r
   value of the specified SPD Entry.\r
 \r
-  @param[in]      Selector      Pointer to an entry selector which is an identifier \r
+  @param[in]      Selector      Pointer to an entry selector which is an identifier\r
                                 of the SPD entry.\r
   @param[in, out] DataSize      On output the size of data returned in Data.\r
-  @param[out]     Data          The buffer to return the contents of the IPsec \r
-                                configuration data. The type of the data buffer \r
-                                is associated with the DataType. \r
\r
+  @param[out]     Data          The buffer to return the contents of the IPsec\r
+                                configuration data. The type of the data buffer\r
+                                is associated with the DataType.\r
+\r
   @retval EFI_SUCCESS           The specified configuration data was obtained successfully.\r
   @retval EFI_INVALID_PARAMETER Data is NULL and *DataSize is not zero.\r
   @retval EFI_NOT_FOUND         The configuration data specified by Selector is not found.\r
@@ -1713,7 +1713,7 @@ GetSpdEntry (
       SpdData->PackageFlag      = SpdEntry->Data->PackageFlag;\r
       SpdData->TrafficDirection = SpdEntry->Data->TrafficDirection;\r
       SpdData->Action           = SpdEntry->Data->Action;\r
-      \r
+\r
       if (SpdData->Action != EfiIPsecActionProtect) {\r
         SpdData->ProcessingPolicy = NULL;\r
       } else {\r
@@ -1733,16 +1733,16 @@ GetSpdEntry (
 }\r
 \r
 /**\r
-  This function lookup the data entry from IPsec SAD. Return the configuration \r
+  This function lookup the data entry from IPsec SAD. Return the configuration\r
   value of the specified SAD Entry.\r
 \r
-  @param[in]      Selector      Pointer to an entry selector which is an identifier \r
+  @param[in]      Selector      Pointer to an entry selector which is an identifier\r
                                 of the SAD entry.\r
   @param[in, out] DataSize      On output, the size of data returned in Data.\r
-  @param[out]     Data          The buffer to return the contents of the IPsec \r
-                                configuration data. The type of the data buffer \r
-                                is associated with the DataType. \r
\r
+  @param[out]     Data          The buffer to return the contents of the IPsec\r
+                                configuration data. The type of the data buffer\r
+                                is associated with the DataType.\r
+\r
   @retval EFI_SUCCESS           The specified configuration data was obtained successfully.\r
   @retval EFI_NOT_FOUND         The configuration data specified by Selector is not found.\r
   @retval EFI_BUFFER_TOO_SMALL  The DataSize is too small for the result. DataSize has been\r
@@ -1783,8 +1783,8 @@ GetSadEntry (
       // |EFI_IPSEC_SA_DATA\r
       // |AuthKey\r
       // |EncryptKey  (Optional)\r
-      // |SpdSelector (Optional)     \r
-      // \r
+      // |SpdSelector (Optional)\r
+      //\r
       RequiredSize  = ALIGN_VARIABLE (sizeof (EFI_IPSEC_SA_DATA2));\r
 \r
       if (SaId->Proto == EfiIPsecAH) {\r
@@ -1797,12 +1797,12 @@ GetSadEntry (
       if (SadEntry->Data->SpdSelector != NULL) {\r
         RequiredSize += SIZE_OF_SPD_SELECTOR (SadEntry->Data->SpdSelector);\r
       }\r
-      \r
+\r
       if (*DataSize < RequiredSize) {\r
         *DataSize = RequiredSize;\r
         return EFI_BUFFER_TOO_SMALL;\r
       }\r
-      \r
+\r
       //\r
       // Fill the data fields of SAD entry.\r
       //\r
@@ -1895,7 +1895,7 @@ GetSadEntry (
                                 RequiredSize -\r
                                 SIZE_OF_SPD_SELECTOR (SadEntry->Data->SpdSelector)\r
                                 );\r
-       \r
+\r
         DuplicateSpdSelector (\r
           (EFI_IPSEC_CONFIG_SELECTOR *) SaData->SpdSelector,\r
           (EFI_IPSEC_CONFIG_SELECTOR *) SadEntry->Data->SpdSelector,\r
@@ -1917,16 +1917,16 @@ GetSadEntry (
 }\r
 \r
 /**\r
-  This function lookup the data entry from IPsec PAD. Return the configuration \r
+  This function lookup the data entry from IPsec PAD. Return the configuration\r
   value of the specified PAD Entry.\r
 \r
-  @param[in]      Selector      Pointer to an entry selector which is an identifier \r
+  @param[in]      Selector      Pointer to an entry selector which is an identifier\r
                                 of the PAD entry.\r
   @param[in, out] DataSize      On output the size of data returned in Data.\r
-  @param[out]     Data          The buffer to return the contents of the IPsec \r
-                                configuration data. The type of the data buffer \r
-                                is associated with the DataType. \r
\r
+  @param[out]     Data          The buffer to return the contents of the IPsec\r
+                                configuration data. The type of the data buffer\r
+                                is associated with the DataType.\r
+\r
   @retval EFI_SUCCESS           The specified configuration data was obtained successfully.\r
   @retval EFI_NOT_FOUND         The configuration data specified by Selector is not found.\r
   @retval EFI_BUFFER_TOO_SMALL  The DataSize is too small for the result. DataSize has been\r
@@ -2089,7 +2089,7 @@ IpSecGetSizeOfEfiSpdData (
 \r
 /**\r
   Calculate the a whole size of IPSEC_SPD_DATA which includes the buffer size pointed\r
-  to by the pointer members and the buffer size used by the Sa List. \r
+  to by the pointer members and the buffer size used by the Sa List.\r
 \r
   @param[in]  SpdData       Pointer to the specified IPSEC_SPD_DATA.\r
 \r
@@ -2125,25 +2125,25 @@ IpSecGetSizeOfSpdData (
   Get the IPsec Variable.\r
 \r
   Get the all variables which start with the string contained in VaraiableName.\r
-  Since all IPsec related variable store in continual space, those kinds of \r
-  variable can be searched by the EfiGetNextVariableName. Those variables also are \r
+  Since all IPsec related variable store in continual space, those kinds of\r
+  variable can be searched by the EfiGetNextVariableName. Those variables also are\r
   returned in a continual buffer.\r
-  \r
+\r
   @param[in]      VariableName          Pointer to a specified Variable Name.\r
   @param[in]      VendorGuid            Pointer to a specified Vendor Guid.\r
-  @param[in]      Attributes            Point to memory location to return the attributes \r
-                                        of variable. If the point is NULL, the parameter \r
+  @param[in]      Attributes            Point to memory location to return the attributes\r
+                                        of variable. If the point is NULL, the parameter\r
                                         would be ignored.\r
-  @param[in, out] DataSize              As input, point to the maximum size of return \r
-                                        Data-Buffer. As output, point to the actual \r
+  @param[in, out] DataSize              As input, point to the maximum size of return\r
+                                        Data-Buffer. As output, point to the actual\r
                                         size of the returned Data-Buffer.\r
   @param[in]      Data                  Point to return Data-Buffer.\r
-        \r
+\r
   @retval  EFI_ABORTED           If the Variable size which contained in the variable\r
-                                 structure doesn't match the variable size obtained \r
+                                 structure doesn't match the variable size obtained\r
                                  from the EFIGetVariable.\r
   @retval  EFI_BUFFER_TOO_SMALL  The DataSize is too small for the result. DataSize has\r
-                                 been updated with the size needed to complete the request.   \r
+                                 been updated with the size needed to complete the request.\r
   @retval  EFI_SUCCESS           The function completed successfully.\r
   @retval  others                Other errors found during the variable getting.\r
 **/\r
@@ -2179,7 +2179,7 @@ IpSecGetVariable (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   //\r
   // Construct the varible name of ipsecconfig meta data.\r
   //\r
@@ -2318,14 +2318,14 @@ ON_EXIT:
   @param[in]  VariableName  The name of the vendor's variable. It is a\r
                             Null-Terminated Unicode String.\r
   @param[in]  VendorGuid    Unify identifier for vendor.\r
-  @param[in]  Attributes    Point to memory location to return the attributes of \r
+  @param[in]  Attributes    Point to memory location to return the attributes of\r
                             variable. If the point is NULL, the parameter would be ignored.\r
   @param[in]  DataSize      The size in bytes of Data-Buffer.\r
   @param[in]  Data          Points to the content of the variable.\r
 \r
   @retval  EFI_SUCCESS      The firmware successfully stored the variable and its data, as\r
                             defined by the Attributes.\r
-  @retval  others           Storing the variables failed.      \r
+  @retval  others           Storing the variables failed.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -2355,7 +2355,7 @@ IpSecSetVariable (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // "VariableName + Info/0001/0002/... + NULL"\r
   //\r
@@ -2372,7 +2372,7 @@ IpSecSetVariable (
   //\r
   UnicodeSPrint (VariableNameI, VariableNameSize, L"%s%s", VariableName, L"Info");\r
   MaximumVariableSize -= VariableNameSize;\r
-  \r
+\r
   IpSecVariableInfo.VariableCount       = (UINT32) ((DataSize + (UINTN) MaximumVariableSize - 1) / (UINTN) MaximumVariableSize);\r
   IpSecVariableInfo.VariableSize        = (UINT32) DataSize;\r
   IpSecVariableInfo.SingleVariableSize  = (UINT32) MaximumVariableSize;\r
@@ -2397,7 +2397,7 @@ IpSecSetVariable (
     // Construct and set the variable of ipsecconfig data one by one.\r
     // The index of variable name begin from 0001, and the varaible name\r
     // likes "VariableName0001", "VaraiableName0002"....\r
-    // \r
+    //\r
     UnicodeSPrint (VariableNameI, VariableNameSize, L"%s%04d", VariableName, VariableIndex + 1);\r
     Status = gRT->SetVariable (\r
                     VariableNameI,\r
@@ -2424,20 +2424,20 @@ ON_EXIT:
 }\r
 \r
 /**\r
-  Return the configuration value for the EFI IPsec driver. \r
+  Return the configuration value for the EFI IPsec driver.\r
 \r
   This function lookup the data entry from IPsec database or IKEv2 configuration\r
   information. The expected data type and unique identification are described in\r
-  DataType and Selector parameters.        \r
+  DataType and Selector parameters.\r
 \r
   @param[in]      This          Pointer to the EFI_IPSEC_CONFIG_PROTOCOL instance.\r
   @param[in]      DataType      The type of data to retrieve.\r
-  @param[in]      Selector      Pointer to an entry selector that is an identifier of the IPsec \r
+  @param[in]      Selector      Pointer to an entry selector that is an identifier of the IPsec\r
                                 configuration data entry.\r
   @param[in, out] DataSize      On output the size of data returned in Data.\r
-  @param[out]     Data          The buffer to return the contents of the IPsec configuration data. \r
-                                The type of the data buffer associated with the DataType. \r
\r
+  @param[out]     Data          The buffer to return the contents of the IPsec configuration data.\r
+                                The type of the data buffer associated with the DataType.\r
+\r
   @retval EFI_SUCCESS           The specified configuration data was obtained successfully.\r
   @retval EFI_INVALID_PARAMETER One or more of the followings are TRUE:\r
                                 - This is NULL.\r
@@ -2477,26 +2477,26 @@ EfiIpSecConfigGetData (
 \r
 /**\r
   Set the security association, security policy and peer authorization configuration\r
-  information for the EFI IPsec driver. \r
+  information for the EFI IPsec driver.\r
 \r
   This function is used to set the IPsec configuration information of type DataType for\r
   the EFI IPsec driver.\r
   The IPsec configuration data has a unique selector/identifier separately to identify\r
   a data entry. The selector structure depends on DataType's definition.\r
   Using SetData() with a Data of NULL causes the IPsec configuration data entry identified\r
-  by DataType and Selector to be deleted.        \r
+  by DataType and Selector to be deleted.\r
 \r
   @param[in] This               Pointer to the EFI_IPSEC_CONFIG_PROTOCOL instance.\r
   @param[in] DataType           The type of data to be set.\r
-  @param[in] Selector           Pointer to an entry selector on operated configuration data \r
-                                specified by DataType. A NULL Selector causes the entire \r
+  @param[in] Selector           Pointer to an entry selector on operated configuration data\r
+                                specified by DataType. A NULL Selector causes the entire\r
                                 specified-type configuration information to be flushed.\r
-  @param[in] Data               The data buffer to be set. The structure of the data buffer is \r
+  @param[in] Data               The data buffer to be set. The structure of the data buffer is\r
                                 associated with the DataType.\r
   @param[in] InsertBefore       Pointer to one entry selector which describes the expected\r
                                 position the new data entry will be added. If InsertBefore is NULL,\r
                                 the new entry will be appended to the end of the database.\r
\r
+\r
   @retval EFI_SUCCESS           The specified configuration entry data was set successfully.\r
   @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:\r
                                 - This is NULL.\r
@@ -2523,7 +2523,7 @@ EfiIpSecConfigSetData (
   if (DataType >= IPsecConfigDataTypeMaximum) {\r
     return EFI_UNSUPPORTED;\r
   }\r
-  \r
+\r
   Status = mSetPolicyEntry[DataType](Selector, Data, InsertBefore);\r
 \r
   if (!EFI_ERROR (Status) && !mSetBySelf) {\r
@@ -2537,30 +2537,30 @@ EfiIpSecConfigSetData (
 }\r
 \r
 /**\r
-  Enumerates the current selector for IPsec configuration data entry. \r
+  Enumerates the current selector for IPsec configuration data entry.\r
 \r
   This function is called multiple times to retrieve the entry Selector in IPsec\r
-  configuration database. On each call to GetNextSelector(), the next entry \r
+  configuration database. On each call to GetNextSelector(), the next entry\r
   Selector are retrieved into the output interface.\r
\r
-  If the entire IPsec configuration database has been iterated, the error \r
+\r
+  If the entire IPsec configuration database has been iterated, the error\r
   EFI_NOT_FOUND is returned.\r
-  If the Selector buffer is too small for the next Selector copy, an \r
-  EFI_BUFFER_TOO_SMALL error is returned, and SelectorSize is updated to reflect \r
+  If the Selector buffer is too small for the next Selector copy, an\r
+  EFI_BUFFER_TOO_SMALL error is returned, and SelectorSize is updated to reflect\r
   the size of buffer needed.\r
 \r
   On the initial call to GetNextSelector() to start the IPsec configuration database\r
-  search, a pointer to the buffer with all zero value is passed in Selector. Calls \r
-  to SetData() between calls to GetNextSelector may produce unpredictable results.         \r
+  search, a pointer to the buffer with all zero value is passed in Selector. Calls\r
+  to SetData() between calls to GetNextSelector may produce unpredictable results.\r
 \r
   @param[in]      This          Pointer to the EFI_IPSEC_CONFIG_PROTOCOL instance.\r
   @param[in]      DataType      The type of IPsec configuration data to retrieve.\r
   @param[in, out] SelectorSize  The size of the Selector buffer.\r
-  @param[in, out] Selector      On input, supplies the pointer to last Selector that was \r
+  @param[in, out] Selector      On input, supplies the pointer to last Selector that was\r
                                 returned by GetNextSelector().\r
                                 On output, returns one copy of the current entry Selector\r
-                                of a given DataType. \r
\r
+                                of a given DataType.\r
+\r
   @retval EFI_SUCCESS           The specified configuration data was obtained successfully.\r
   @retval EFI_INVALID_PARAMETER One or more of the followings are TRUE:\r
                                 - This is NULL.\r
@@ -2569,7 +2569,7 @@ EfiIpSecConfigSetData (
   @retval EFI_NOT_FOUND         The next configuration data entry was not found.\r
   @retval EFI_UNSUPPORTED       The specified DataType is not supported.\r
   @retval EFI_BUFFER_TOO_SMALL  The SelectorSize is too small for the result. This parameter\r
-                                has been updated with the size needed to complete the search \r
+                                has been updated with the size needed to complete the search\r
                                 request.\r
 \r
 **/\r
@@ -2618,14 +2618,14 @@ EfiIpSecConfigGetNextSelector (
 \r
 /**\r
   Register an event that is to be signaled whenever a configuration process on the\r
-  specified IPsec configuration information is done. \r
+  specified IPsec configuration information is done.\r
 \r
   The register function is not surpport now and always returns EFI_UNSUPPORTED.\r
-  \r
+\r
   @param[in] This               Pointer to the EFI_IPSEC_CONFIG_PROTOCOL instance.\r
   @param[in] DataType           The type of data to be registered the event for.\r
   @param[in] Event              The event to be registered.\r
\r
+\r
   @retval EFI_SUCCESS           The event is registered successfully.\r
   @retval EFI_INVALID_PARAMETER This is NULL or Event is NULL.\r
   @retval EFI_ACCESS_DENIED     The Event is already registered for the DataType.\r
@@ -2646,16 +2646,16 @@ EfiIpSecConfigRegisterNotify (
 \r
 /**\r
   Remove the specified event that was previously registered on the specified IPsec\r
-  configuration data. \r
+  configuration data.\r
 \r
   This function is not support now and alwasy return EFI_UNSUPPORTED.\r
 \r
   @param[in] This               Pointer to the EFI_IPSEC_CONFIG_PROTOCOL instance.\r
   @param[in] DataType           The configuration data type to remove the registered event for.\r
   @param[in] Event              The event to be unregistered.\r
\r
+\r
   @retval EFI_SUCCESS           The event was removed successfully.\r
-  @retval EFI_NOT_FOUND         The Event specified by DataType could not be found in the \r
+  @retval EFI_NOT_FOUND         The Event specified by DataType could not be found in the\r
                                 database.\r
   @retval EFI_INVALID_PARAMETER This is NULL or Event is NULL.\r
   @retval EFI_UNSUPPORTED       The notify registration is unsupported, or the specified\r
@@ -2677,10 +2677,10 @@ EfiIpSecConfigUnregisterNotify (
   Copy whole data in specified EFI_SIPEC_CONFIG_SELECTOR and the Data to a buffer.\r
 \r
   This function is a caller defined function, and it is called by the IpSecVisitConfigData().\r
-  The orignal caller is IpSecConfigSave(), which calls the IpsecVisitConfigData() to \r
+  The orignal caller is IpSecConfigSave(), which calls the IpsecVisitConfigData() to\r
   copy all types of IPsec Config datas into one buffer and store this buffer into firmware in\r
   the form of several variables.\r
-  \r
+\r
   @param[in]      Type              A specified IPSEC_CONFIG_DATA_TYPE.\r
   @param[in]      Selector          Points to a EFI_IPSEC_CONFIG_SELECTOR to be copied\r
                                     to the buffer.\r
@@ -2708,7 +2708,7 @@ IpSecCopyPolicyEntry (
   IPSEC_VAR_ITEM_HEADER DataHeader;\r
   UINTN                 EntrySize;\r
   UINT8                 *TempPoint;\r
-  \r
+\r
   if (Type == IPsecConfigDataTypeSad) {\r
     //\r
     // Don't save automatically-generated SA entry into variable.\r
@@ -2724,7 +2724,7 @@ IpSecCopyPolicyEntry (
   EntrySize  = ALIGN_VARIABLE (EntrySize + SelectorSize);\r
   EntrySize  = ALIGN_VARIABLE (EntrySize + sizeof (SelectorHeader));\r
   EntrySize  = ALIGN_VARIABLE (EntrySize + DataSize);\r
-  \r
+\r
   //EntrySize = SelectorSize + DataSize + 2 * sizeof (SelectorHeader);\r
   if (Buffer->Capacity - Buffer->Size < EntrySize) {\r
     //\r
@@ -2732,7 +2732,7 @@ IpSecCopyPolicyEntry (
     //\r
     Buffer->Capacity += EntrySize;\r
     TempPoint         = AllocatePool (Buffer->Capacity);\r
-    \r
+\r
     if (TempPoint == NULL) {\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
@@ -2741,8 +2741,8 @@ IpSecCopyPolicyEntry (
     //\r
     CopyMem (TempPoint, Buffer->Ptr, Buffer->Size);\r
     FreePool (Buffer->Ptr);\r
-    \r
-    Buffer->Ptr       =  TempPoint;    \r
+\r
+    Buffer->Ptr       =  TempPoint;\r
   }\r
 \r
   mFixPolicyEntry[Type](Selector, Data);\r
@@ -2759,7 +2759,7 @@ IpSecCopyPolicyEntry (
     sizeof (SelectorHeader)\r
     );\r
   Buffer->Size  = ALIGN_VARIABLE (Buffer->Size + sizeof (SelectorHeader));\r
-  \r
+\r
   //\r
   // Copy the selector into buffer.\r
   //\r
@@ -2791,7 +2791,7 @@ IpSecCopyPolicyEntry (
     DataSize\r
     );\r
   Buffer->Size  = ALIGN_VARIABLE (Buffer->Size + DataSize);\r
-  \r
+\r
   mUnfixPolicyEntry[Type](Selector, Data);\r
 \r
   return EFI_SUCCESS;\r
@@ -3002,7 +3002,7 @@ IpSecConfigSave (
   Get the all IPSec configuration variables and store those variables\r
   to the internal data structure.\r
 \r
-  This founction is called by IpSecConfigInitialize() which is to intialize the \r
+  This founction is called by IpSecConfigInitialize() which is to intialize the\r
   IPsecConfiguration Protocol.\r
 \r
   @param[in]  Private            Point to IPSEC_PRIVATE_DATA.\r
@@ -3080,10 +3080,10 @@ IpSecConfigRestore (
       Header  = (IPSEC_VAR_ITEM_HEADER *) Ptr;\r
       Type    = (EFI_IPSEC_CONFIG_DATA_TYPE) (Header->Type & IPSEC_VAR_ITEM_HEADER_CONTENT_BIT);\r
       ASSERT (((Header->Type & 0x80) == IPSEC_VAR_ITEM_HEADER_LOGO_BIT) && (Type < IPsecConfigDataTypeMaximum));\r
-      \r
+\r
       Selector  = (EFI_IPSEC_CONFIG_SELECTOR *) ALIGN_POINTER (Header + 1, sizeof (UINTN));\r
       Header    = (IPSEC_VAR_ITEM_HEADER *) ALIGN_POINTER (\r
-                                              (UINT8 *) Selector + Header->Size, \r
+                                              (UINT8 *) Selector + Header->Size,\r
                                               sizeof (UINTN)\r
                                               );\r
       ASSERT (Header->Type == Type);\r
index 23e68805ad980b122519f09c45b83f752d7c152d..cc722e6a7b95e8a99e66b86a2e744f4c7c92e3d2 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Definitions related to IPSEC_CONFIG_PROTOCOL implementations.\r
 \r
-  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -345,16 +345,16 @@ IpSecDuplicateProcessPolicy (
   Find if the two SPD Selectors has subordinative.\r
 \r
   Compare two SPD Selector by the fields of LocalAddressCount/RemoteAddressCount/\r
-  NextLayerProtocol/LocalPort/LocalPortRange/RemotePort/RemotePortRange and the \r
+  NextLayerProtocol/LocalPort/LocalPortRange/RemotePort/RemotePortRange and the\r
   Local Addresses and remote Addresses.\r
 \r
   @param[in]   Selector1           Pointer of first SPD Selector.\r
   @param[in]   Selector2           Pointer of second SPD Selector.\r
 \r
   @retval  TRUE    The first SPD Selector is subordinate Selector of second SPD Selector.\r
-  @retval  FALSE   The first SPD Selector is not subordinate Selector of second \r
+  @retval  FALSE   The first SPD Selector is not subordinate Selector of second\r
                    SPD Selector.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 IsSubSpdSelector (\r
index 31fa4fb447859407979102e3e48f8aa9c074a42f..e0e210bcadc81347560893be5655f9007bb1248f 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Common interfaces to call Security library.\r
 \r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -19,7 +19,7 @@
 //\r
 GLOBAL_REMOVE_IF_UNREFERENCED ENCRYPT_ALGORITHM mIpsecEncryptAlgorithmList[IPSEC_ENCRYPT_ALGORITHM_LIST_SIZE] = {\r
   {IKE_EALG_NULL, 0, 0, 1, NULL, NULL, NULL, NULL},\r
-  {IKE_EALG_NONE, 0, 0, 1, NULL, NULL, NULL, NULL},  \r
+  {IKE_EALG_NONE, 0, 0, 1, NULL, NULL, NULL, NULL},\r
   {IKE_EALG_3DESCBC, 24, 8, 8, TdesGetContextSize, TdesInit, TdesCbcEncrypt, TdesCbcDecrypt},\r
   {IKE_EALG_AESCBC, 16, 16, 16, AesGetContextSize, AesInit, AesCbcEncrypt, AesCbcDecrypt}\r
 };\r
@@ -186,7 +186,7 @@ IpSecGenerateIv (
   if (IvSize != 0) {\r
     return IpSecCryptoIoGenerateRandomBytes (IvBuffer, IvSize);\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -196,7 +196,7 @@ IpSecGenerateIv (
   @param[in]  AlgorithmId          The encryption algorithm ID.\r
 \r
   @return the index.\r
-  \r
+\r
 **/\r
 UINTN\r
 IpSecGetIndexFromEncList (\r
@@ -204,13 +204,13 @@ IpSecGetIndexFromEncList (
   )\r
 {\r
   UINT8 Index;\r
-  \r
+\r
   for (Index = 0; Index < IPSEC_ENCRYPT_ALGORITHM_LIST_SIZE; Index++) {\r
     if (AlgorithmId == mIpsecEncryptAlgorithmList[Index].AlgorithmId) {\r
       return Index;\r
     }\r
   }\r
-  \r
+\r
   return (UINTN) -1;\r
 }\r
 \r
@@ -220,7 +220,7 @@ IpSecGetIndexFromEncList (
   @param[in]  AlgorithmId          The encryption algorithm ID.\r
 \r
   @return the index.\r
-  \r
+\r
 **/\r
 UINTN\r
 IpSecGetIndexFromAuthList (\r
@@ -228,7 +228,7 @@ IpSecGetIndexFromAuthList (
   )\r
 {\r
   UINT8 Index;\r
-  \r
+\r
   for (Index = 0; Index < IPSEC_AUTH_ALGORITHM_LIST_SIZE; Index++) {\r
     if (AlgorithmId == mIpsecAuthAlgorithmList[Index].AlgorithmId) {\r
       //\r
@@ -237,7 +237,7 @@ IpSecGetIndexFromAuthList (
       return Index;\r
     }\r
   }\r
-  \r
+\r
   return (UINTN) -1;\r
 }\r
 \r
@@ -275,14 +275,14 @@ IpSecCryptoIoEncrypt (
   IN       UINTN      InDataLength,\r
      OUT   UINT8      *OutData\r
   )\r
-{  \r
+{\r
   UINTN         Index;\r
   UINTN         ContextSize;\r
   UINT8         *Context;\r
   EFI_STATUS    Status;\r
-  \r
+\r
   Status = EFI_UNSUPPORTED;\r
-  \r
+\r
   switch (AlgorithmId) {\r
 \r
   case IKE_EALG_NULL:\r
@@ -323,7 +323,7 @@ IpSecCryptoIoEncrypt (
   if (Context != NULL) {\r
     FreePool (Context);\r
   }\r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -361,7 +361,7 @@ IpSecCryptoIoDecrypt (
   IN       UINTN      InDataLength,\r
      OUT   UINT8      *OutData\r
   )\r
-{  \r
+{\r
   UINTN         Index;\r
   UINTN         ContextSize;\r
   UINT8         *Context;\r
@@ -397,7 +397,7 @@ IpSecCryptoIoDecrypt (
     //\r
     if (mIpsecEncryptAlgorithmList[Index].CipherInitiate (Context, Key, KeyBits)) {\r
       if (mIpsecEncryptAlgorithmList[Index].CipherDecrypt (Context, InData, InDataLength, Ivec, OutData)) {\r
-        Status = EFI_SUCCESS;      \r
+        Status = EFI_SUCCESS;\r
       }\r
     }\r
     break;\r
@@ -420,7 +420,7 @@ IpSecCryptoIoDecrypt (
   the input algorithm ID. It computes all datas from InDataFragment and output\r
   the result into the OutData buffer. If the OutDataSize is larger than the related\r
   HMAC algorithm output size, return EFI_INVALID_PARAMETER.\r
-  \r
+\r
   @param[in]      AlgorithmId     The authentication Identification.\r
   @param[in]      Key             Pointer of the authentication key.\r
   @param[in]      KeyLength       The length of the Key in bytes.\r
@@ -519,8 +519,8 @@ IpSecCryptoIoHmac (
       }\r
 \r
       goto Exit;\r
-    }    \r
-      \r
+    }\r
+\r
   default:\r
     return Status;\r
   }\r
@@ -577,11 +577,11 @@ IpSecCryptoIoHash (
 \r
   Status      = EFI_UNSUPPORTED;\r
   OutHashData = NULL;\r
-  \r
+\r
   OutHashSize = IpSecGetHmacDigestLength (AlgorithmId);\r
   //\r
   // If the expected hash data size is larger than the related Hash algorithm\r
-  // output length, return EFI_INVALID_PARAMETER.  \r
+  // output length, return EFI_INVALID_PARAMETER.\r
   //\r
   if (OutDataSize > OutHashSize) {\r
     return EFI_INVALID_PARAMETER;\r
@@ -590,7 +590,7 @@ IpSecCryptoIoHash (
   if (OutHashData == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   switch (AlgorithmId) {\r
 \r
   case IKE_AALG_NONE:\r
@@ -611,7 +611,7 @@ IpSecCryptoIoHash (
       Status = EFI_OUT_OF_RESOURCES;\r
       goto Exit;\r
     }\r
-    \r
+\r
     //\r
     // Initiate Hash context and hash the input data.\r
     //\r
@@ -631,13 +631,13 @@ IpSecCryptoIoHash (
         // In some cases, like the Icv computing, the Icv size might be less than\r
         // the key length size, so copy the part of hash data to the OutData.\r
         //\r
-        CopyMem (OutData, OutHashData, OutDataSize);            \r
+        CopyMem (OutData, OutHashData, OutDataSize);\r
         Status = EFI_SUCCESS;\r
       }\r
-      \r
-      goto Exit;        \r
-    }    \r
-    \r
+\r
+      goto Exit;\r
+    }\r
+\r
   default:\r
     return Status;\r
   }\r
@@ -685,10 +685,10 @@ IpSecCryptoIoDhGetPublicKey (
   IN CONST UINT8  *Prime,\r
      OUT   UINT8  *PublicKey,\r
   IN OUT   UINTN  *PublicKeySize\r
-  ) \r
+  )\r
 {\r
   EFI_STATUS   Status;\r
-  \r
+\r
   *DhContext = DhNew ();\r
   ASSERT (*DhContext != NULL);\r
   if (!DhSetParameter (*DhContext, Generator, PrimeLength, Prime)) {\r
@@ -707,7 +707,7 @@ Exit:
     DhFree (*DhContext);\r
     DhContext = NULL;\r
   }\r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -731,7 +731,7 @@ Exit:
 **/\r
 EFI_STATUS\r
 IpSecCryptoIoDhComputeKey (\r
-  IN   OUT   UINT8  *DhContext,     \r
+  IN   OUT   UINT8  *DhContext,\r
   IN   CONST UINT8  *PeerPublicKey,\r
   IN         UINTN  PeerPublicKeySize,\r
        OUT   UINT8  *Key,\r
@@ -752,13 +752,13 @@ IpSecCryptoIoDhComputeKey (
 \r
   @retval EFI_SUCCESS              The operation performs successfully.\r
   @retval EFI_INVALID_PARAMETER    The DhContext is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 IpSecCryptoIoFreeDh (\r
   IN   OUT   UINT8  **DhContext\r
   )\r
-{ \r
+{\r
   if (*DhContext == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -807,7 +807,7 @@ IpSecCryptoIoGenerateRandomBytes (
   @param[in]      KeyPwdSize      The size of Key Password in bytes.\r
   @param[out]     OutData         The pointer to the signed data.\r
   @param[in, out] OutDataSize     Pointer to contain the size of out data.\r
\r
+\r
 **/\r
 VOID\r
 IpSecCryptoIoAuthDataWithCertificate (\r
@@ -824,7 +824,7 @@ IpSecCryptoIoAuthDataWithCertificate (
   UINT8         *RsaContext;\r
   UINT8         *Signature;\r
   UINTN         SigSize;\r
-   \r
+\r
   SigSize   = 0;\r
   RsaContext = NULL;\r
 \r
@@ -844,12 +844,12 @@ IpSecCryptoIoAuthDataWithCertificate (
   //\r
   // Sign data\r
   //\r
-  Signature = NULL;  \r
+  Signature = NULL;\r
   if (!RsaPkcs1Sign (RsaContext, InData, InDataSize, Signature, &SigSize)) {\r
     Signature = AllocateZeroPool (SigSize);\r
   } else {\r
     return;\r
-  } \r
+  }\r
 \r
   RsaPkcs1Sign (RsaContext, InData, InDataSize, Signature, &SigSize);\r
 \r
@@ -876,7 +876,7 @@ IpSecCryptoIoAuthDataWithCertificate (
 \r
   @retval  TRUE   Valid signature encoded in PKCS1-v1_5.\r
   @retval  FALSE  Invalid signature or invalid RSA context.\r
\r
+\r
 **/\r
 BOOLEAN\r
 IpSecCryptoIoVerifySignDataByCertificate (\r
@@ -912,7 +912,7 @@ IpSecCryptoIoVerifySignDataByCertificate (
   // Retrieve the RSA public Key from Certificate\r
   //\r
   RsaGetPublicKeyFromX509 ((CONST UINT8 *)InCert, CertLen, (VOID **)&RsaContext);\r
\r
+\r
   //\r
   // Verify data\r
   //\r
@@ -964,9 +964,9 @@ IpSecCryptoIoGetPublicKeyFromCert (
   }\r
 \r
   *PublicKeyLen = 0;\r
\r
+\r
   RsaGetKey (RsaContext, RsaKeyN, NULL, PublicKeyLen);\r
\r
+\r
   *PublicKey = AllocateZeroPool (*PublicKeyLen);\r
   if (*PublicKey == NULL) {\r
     Status = EFI_OUT_OF_RESOURCES;\r
@@ -992,10 +992,10 @@ EXIT:
   @param[in]     CertSize          The size of the X509 certificate in bytes.\r
   @param[out]    CertSubject       Pointer to the retrieved certificate subject.\r
   @param[out]    SubjectSize       The size of Certificate Subject in bytes.\r
-  \r
+\r
   @retval  EFI_SUCCESS            Retrieved the certificate subject successfully.\r
   @retval  EFI_INVALID_PARAMETER  The certificate is malformed.\r
\r
+\r
 **/\r
 EFI_STATUS\r
 IpSecCryptoIoGetSubjectFromCert (\r
index 0ef83eb4cab4ab1a1be475fec6b6bb0cd970086b..d21ae9d5580c21e85f05e8df6e93ae9f7d72d316 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Definitions related to the Cryptographic Operations in IPsec.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -47,9 +47,9 @@
 \r
 /**\r
   Prototype of HMAC GetContextSize.\r
-  \r
+\r
   Retrieves the size, in bytes, of the context buffer required.\r
-  \r
+\r
   @return  The size, in bytes, of the context buffer required.\r
 \r
 **/\r
@@ -61,13 +61,13 @@ UINTN
 \r
 /**\r
   Prototype of HMAC Operation Initiating.\r
-  \r
+\r
   Initialization with a new context.\r
 \r
   @param[out]     Context  Input Context.\r
   @param[in]      Key      Pointer to the key for HMAC.\r
   @param[in]      KeySize  The length of the Key in bytes.\r
\r
+\r
   @retval TRUE  Initialization Successfully.\r
 \r
 **/\r
@@ -251,7 +251,7 @@ BOOLEAN
 \r
 /**\r
   Prototype of Hash Update\r
-  \r
+\r
   Digests the input data and updates hash context.\r
 \r
   This function performs digest on a data buffer of the specified size.\r
@@ -354,7 +354,7 @@ typedef struct _AUTH_ALGORITHM {
   UINT8                    AlgorithmId;\r
   //\r
   // The Key length of the Algorithm\r
-  // \r
+  //\r
   UINTN                    DigestLength;\r
   //\r
   // The ICV length of the Algorithm\r
@@ -578,7 +578,7 @@ IpSecCryptoIoDecrypt (
   the input algorithm ID. It computes all datas from InDataFragment and output\r
   the result into the OutData buffer. If the OutDataSize is larger than the related\r
   HMAC algorithm output size, return EFI_INVALID_PARAMETER.\r
-  \r
+\r
   @param[in]      AlgorithmId     The authentication Identification.\r
   @param[in]      Key             Pointer of the authentication key.\r
   @param[in]      KeyLength       The length of the Key in bytes.\r
@@ -704,7 +704,7 @@ IpSecCryptoIoDhComputeKey (
 \r
   @retval EFI_SUCCESS              The operation performs successfully.\r
   @retval EFI_INVALID_PARAMETER    The DhContext is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 IpSecCryptoIoFreeDh (\r
@@ -740,7 +740,7 @@ IpSecCryptoIoGenerateRandomBytes (
   @param[in]      KeyPwdSize      The size of Key Password in bytes.\r
   @param[out]     OutData         The pointer to the signed data.\r
   @param[in, out] OutDataSize     Pointer to contain the size of out data.\r
\r
+\r
 **/\r
 VOID\r
 IpSecCryptoIoAuthDataWithCertificate (\r
@@ -769,7 +769,7 @@ IpSecCryptoIoAuthDataWithCertificate (
 \r
   @retval  TRUE   Valid signature encoded in PKCS1-v1_5.\r
   @retval  FALSE  Invalid signature or invalid RSA context.\r
\r
+\r
 **/\r
 BOOLEAN\r
 IpSecCryptoIoVerifySignDataByCertificate (\r
@@ -810,10 +810,10 @@ IpSecCryptoIoGetPublicKeyFromCert (
   @param[in]     CertSize          The size of the X509 certificate in bytes.\r
   @param[out]    CertSubject       Pointer to the retrieved certificate subject.\r
   @param[out]    SubjectSize       The size of Certificate Subject in bytes.\r
-  \r
+\r
   @retval  EFI_SUCCESS            Retrieved the certificate subject successfully.\r
   @retval  EFI_INVALID_PARAMETER  The certificate is malformed.\r
\r
+\r
 **/\r
 EFI_STATUS\r
 IpSecCryptoIoGetSubjectFromCert (\r
index 636e775969d6b3352ef3325f7e3998f35718708b..30d190a3c81d5bda577da8ffb377ead8804991f0 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The Interfaces of IPsec debug information printing.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -167,21 +167,21 @@ IkeDumpState (
   )\r
 {\r
   if (Previous >= IKE_STATE_NUM || Current >= IKE_STATE_NUM) {\r
-    return; \r
+    return;\r
   }\r
-  \r
+\r
   if (Previous == Current) {\r
     if (IkeVersion == 1) {\r
       DEBUG ((DEBUG_INFO, "\n****Current state is %a\n", mIkev1StateStr[Previous]));\r
     } else if (IkeVersion == 2) {\r
       DEBUG ((DEBUG_INFO, "\n****Current state is %a\n", mIkev2StateStr[Previous]));\r
-    }    \r
+    }\r
   } else {\r
     if (IkeVersion == 1) {\r
       DEBUG ((DEBUG_INFO, "\n****Change state from %a to %a\n", mIkev1StateStr[Previous], mIkev1StateStr[Current]));\r
     } else {\r
       DEBUG ((DEBUG_INFO, "\n****Change state from %a to %a\n", mIkev2StateStr[Previous], mIkev2StateStr[Current]));\r
-    }    \r
+    }\r
   }\r
 }\r
 \r
@@ -223,7 +223,7 @@ IpSecDumpPacket (
   case IKE_XCG_TYPE_QM:\r
     TypeStr = mExchangeStr[2];\r
     break;\r
-    \r
+\r
   case IKE_XCG_TYPE_SA_INIT:\r
     TypeStr = mExchangeStr[3];\r
     break;\r
@@ -239,7 +239,7 @@ IpSecDumpPacket (
   case IKE_XCG_TYPE_INFO2:\r
     TypeStr = mExchangeStr[6];\r
     break;\r
-    \r
+\r
   default:\r
     TypeStr = mExchangeStr[7];\r
     break;\r
@@ -275,7 +275,7 @@ IpSecDumpPacket (
 \r
   @param[in]  IkePayload  Point to payload to be printed.\r
   @param[in]  IkeVersion  The specified version of IKE.\r
\r
+\r
 **/\r
 VOID\r
 IpSecDumpPayload (\r
index 16bbcd53c6eaad52e79ca4d9c8d4a81796eeefa0..8b1c06c513de7bf4d063f3e7ed6471bef61c4bf1 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The definition of functions and MACROs used for IPsec debug information printting.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -57,7 +57,7 @@ IpSecDumpAddress (
 VOID\r
 IkeDumpState (\r
   IN UINT32              Previous,\r
-  IN UINT32              Current, \r
+  IN UINT32              Current,\r
   IN UINT8               IkeVersion\r
   );\r
 \r
@@ -81,7 +81,7 @@ IpSecDumpPacket (
 \r
   @param[in]  IkePayload  Point to payload to be printed.\r
   @param[in]  IkeVersion  The specified version of IKE.\r
\r
+\r
 **/\r
 VOID\r
 IpSecDumpPayload (\r
index d8282b5e2fdab6c8d1732c238d31bfbe5bb735d8..f66f89a4398e98721aee00a0233e53ef9803f7cc 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Driver Binding Protocol for IPsec Driver.\r
 \r
-  Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -28,7 +28,7 @@
   @param[in]  RemainingDevicePath  Optional parameter used to pick a specific child\r
                                    device to start.\r
   @param[in]  IpVersion            IP_VERSION_4 or IP_VERSION_6.\r
-  \r
+\r
   @retval EFI_SUCCES           This driver supports this device.\r
   @retval EFI_ALREADY_STARTED  This driver is already running on this device.\r
   @retval other                This driver does not support this device.\r
@@ -45,7 +45,7 @@ IpSecSupported (
 {\r
   EFI_STATUS  Status;\r
   EFI_GUID    *UdpServiceBindingGuid;\r
-  \r
+\r
   if (IpVersion == IP_VERSION_4) {\r
     UdpServiceBindingGuid  = &gEfiUdp4ServiceBindingProtocolGuid;\r
   } else {\r
@@ -213,7 +213,7 @@ IpSecStop (
     //\r
     if (!IsListEmpty (&Private->Ikev2EstablishedList)) {\r
       NET_LIST_FOR_EACH_SAFE (Entry, Next, &Private->Ikev2EstablishedList) {\r
-        Ikev2SaSession = IKEV2_SA_SESSION_BY_SESSION (Entry); \r
+        Ikev2SaSession = IKEV2_SA_SESSION_BY_SESSION (Entry);\r
         RemoveEntryList (&Ikev2SaSession->BySessionTable);\r
         Ikev2SaSessionFree (Ikev2SaSession);\r
       }\r
index 583305b4f8a3b869314c7d40557f47264156b92b..59215774e00a239ee4368c44b533a926bccdb22e 100644 (file)
@@ -6,7 +6,7 @@
 #  packet-level security for IP datagram. It provides the IP packet protection via\r
 #  ESP and it supports IKEv2 for key negotiation.\r
 #\r
-#  Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -63,7 +63,7 @@
   Ikev2/Info.c\r
   Ikev2/Payload.c\r
   Ikev2/Exchange.c\r
-  \r
+\r
 \r
 \r
 [Packages]\r
   BaseCryptLib\r
   DpcLib\r
   UdpIoLib\r
-  NetLib  \r
+  NetLib\r
   PcdLib\r
-  \r
+\r
 [Protocols]\r
   gEfiIp4Config2ProtocolGuid                    ## SOMETIMES_CONSUMES\r
-  gEfiUdp4ServiceBindingProtocolGuid            ## SOMETIMES_CONSUMES  \r
+  gEfiUdp4ServiceBindingProtocolGuid            ## SOMETIMES_CONSUMES\r
   gEfiUdp4ProtocolGuid                          ## SOMETIMES_CONSUMES\r
-  gEfiUdp6ServiceBindingProtocolGuid            ## SOMETIMES_CONSUMES  \r
+  gEfiUdp6ServiceBindingProtocolGuid            ## SOMETIMES_CONSUMES\r
   gEfiUdp6ProtocolGuid                          ## SOMETIMES_CONSUMES\r
   gEfiIpSecConfigProtocolGuid                   ## PRODUCES\r
   gEfiIpSec2ProtocolGuid                        ## PRODUCES\r
-  \r
+\r
 [Pcd]\r
   gEfiNetworkPkgTokenSpaceGuid.PcdIpsecCertificateEnabled       ## SOMETIMES_CONSUMES\r
   gEfiNetworkPkgTokenSpaceGuid.PcdIpsecUefiCaFile               ## SOMETIMES_CONSUMES\r
index 92031745411c9ccf4e5fb42e90b93e1254c6faa5..55d29ae73df5f4e605e229e497c9c659c5e5b7a0 100644 (file)
@@ -6,13 +6,13 @@
 // packet-level security for IP datagram. It provides the IP packet protection via\r
 // ESP and it supports IKEv2 for key negotiation.\r
 //\r
-// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
 // which accompanies this distribution. The full text of the license may be found at\r
 // http://opensource.org/licenses/bsd-license.php.\r
-// \r
+//\r
 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 //\r
index 35b0bb9042d34bcac7e3d556a33d54ae562ab9c0..806d00ae7829a8ee6895ef66ac5cc6c0d9e8a693 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // IpSecDxe Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -13,8 +13,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "IpSec DXE"\r
 \r
 \r
index 625f154ff4104aa7a9a352a06792bcbd25ae780f..da981842083b9fca8409ecbe988ffe6e6cc53d4f 100644 (file)
@@ -2,7 +2,7 @@
   The implementation of IPsec.\r
 \r
   (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -1220,7 +1220,7 @@ IpSecTunnelOutboundPacket (
     if (InnerHead == NULL) {\r
       return NULL;\r
     }\r
-    \r
+\r
     CopyMem (\r
       InnerHead,\r
       IpHead,\r
@@ -1236,7 +1236,7 @@ IpSecTunnelOutboundPacket (
     if (InnerHead == NULL) {\r
       return NULL;\r
     }\r
-    \r
+\r
     CopyMem (\r
       InnerHead,\r
       IpHead,\r
@@ -1271,7 +1271,7 @@ IpSecTunnelOutboundPacket (
     FreePool (InnerHead);\r
     return NULL;\r
   }\r
-  \r
+\r
   //\r
   // 3. Check the Last Header, if it is TCP, UDP or ICMP recalcualate its pesudo\r
   //    CheckSum.\r
index 89597bdc807b2cc6316cc18a3bbf8628285959e1..94cbaa77e3491676a30d36ccb5e30b511671141d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The definitions related to IPsec protocol implementation.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -151,11 +151,11 @@ struct _IPSEC_PRIVATE_DATA {
 /**\r
   This function processes the inbound traffic with IPsec.\r
 \r
-  It checks the received packet security property, trims the ESP/AH header, and then \r
+  It checks the received packet security property, trims the ESP/AH header, and then\r
   returns without an IPsec protected IP Header and FragmentTable.\r
-  \r
+\r
   @param[in]      IpVersion          The version of IP.\r
-  @param[in, out] IpHead             Points to IP header containing the ESP/AH header \r
+  @param[in, out] IpHead             Points to IP header containing the ESP/AH header\r
                                      to be trimed on input, and without ESP/AH header\r
                                      on return.\r
   @param[in, out] LastHead           The Last Header in IP header on return.\r
@@ -281,7 +281,7 @@ IpSecLookupSpdEntry (
   IN     VOID                    *IpHead,\r
   IN     UINT8                   *IpPayload,\r
   IN     UINT8                   Protocol,\r
-  IN     BOOLEAN                 IsOutbound, \r
+  IN     BOOLEAN                 IsOutbound,\r
      OUT EFI_IPSEC_ACTION        *Action\r
   );\r
 \r
index a2fefa70d7127b009ec5f6e11fbb0ba642dd9eb9..a193dd5a000bdf1ab2a24bf5dbe5adaa115bb05a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The mian interface of IPsec Protocol.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -70,9 +70,9 @@ IpSecProcess (
   UINT8                  OldLastHead;\r
   BOOLEAN                IsOutbound;\r
 \r
-  if (OptionsBuffer == NULL || \r
-      OptionsLength == NULL || \r
-      FragmentTable == NULL || \r
+  if (OptionsBuffer == NULL ||\r
+      OptionsLength == NULL ||\r
+      FragmentTable == NULL ||\r
       FragmentCount == NULL\r
       ) {\r
     return EFI_INVALID_PARAMETER;\r
@@ -83,7 +83,7 @@ IpSecProcess (
   OldLastHead     = *LastHead;\r
   *RecycleSignal  = NULL;\r
   SpdList         = &mConfigData[IPsecConfigDataTypeSpd];\r
-  \r
+\r
   if (!IsOutbound) {\r
     //\r
     // For inbound traffic, process the ipsec header of the packet.\r
@@ -108,7 +108,7 @@ IpSecProcess (
     }\r
 \r
     if (Status == EFI_SUCCESS) {\r
-      \r
+\r
       //\r
       // Check the spd entry if the packet is accessible.\r
       //\r
@@ -120,18 +120,18 @@ IpSecProcess (
       Status =  EFI_ACCESS_DENIED;\r
       NET_LIST_FOR_EACH (Entry, SpdList) {\r
         SpdEntry = IPSEC_SPD_ENTRY_FROM_LIST (Entry);\r
-        if (IsSubSpdSelector (               \r
+        if (IsSubSpdSelector (\r
               (EFI_IPSEC_CONFIG_SELECTOR *) SpdSelector,\r
               (EFI_IPSEC_CONFIG_SELECTOR *) SpdEntry->Selector\r
               )) {\r
           Status = EFI_SUCCESS;\r
         }\r
-      }      \r
+      }\r
       goto ON_EXIT;\r
-    }       \r
+    }\r
   }\r
 \r
-  Status  = EFI_ACCESS_DENIED;  \r
+  Status  = EFI_ACCESS_DENIED;\r
 \r
   NET_LIST_FOR_EACH (Entry, SpdList) {\r
     //\r
@@ -145,7 +145,7 @@ IpSecProcess (
                      IpHead,\r
                      IpPayload,\r
                      OldLastHead,\r
-                     IsOutbound, \r
+                     IsOutbound,\r
                      &Action\r
                      ))) {\r
       //\r
@@ -222,20 +222,20 @@ IpSecProcess (
       goto ON_EXIT;\r
 \r
     case EfiIPsecActionDiscard:\r
-      goto ON_EXIT;   \r
+      goto ON_EXIT;\r
     }\r
   }\r
-   \r
+\r
   //\r
   // If don't find the related SPD entry, return the EFI_ACCESS_DENIED and discard it.\r
   // But it the packet is NS/NA, it should be by passed even not find the related SPD entry.\r
   //\r
-  if (OldLastHead == IP6_ICMP && \r
+  if (OldLastHead == IP6_ICMP &&\r
       (*IpPayload == ICMP_V6_NEIGHBOR_SOLICIT || *IpPayload == ICMP_V6_NEIGHBOR_ADVERTISE)\r
       ){\r
     Status = EFI_SUCCESS;\r
   }\r
-  \r
+\r
 ON_EXIT:\r
   return Status;\r
 }\r
index f4327abcf90ffee5b256228994ac6c53e188ad53..497c8bec9318cb3432130f3f938125ae99dcd7b5 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   UEFI Component Name(2) protocol implementation for Mtftp6 driver.\r
 \r
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -233,10 +233,10 @@ Mtftp6ComponentNameGetDriverName (
 \r
   @param  Mtftp6[in]                A pointer to the EFI_MTFTP6_PROTOCOL.\r
 \r
-  \r
+\r
   @retval EFI_SUCCESS               Update the ControllerNameTable of this instance successfully.\r
   @retval EFI_INVALID_PARAMETER     The input parameter is invalid.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 UpdateName (\r
@@ -261,7 +261,7 @@ UpdateName (
     if (EFI_ERROR (Status)) {\r
       return Status;\r
     }\r
-    UnicodeSPrint (HandleName, sizeof (HandleName), \r
+    UnicodeSPrint (HandleName, sizeof (HandleName),\r
       L"MTFTPv6(ServerIp=%s, InitialServerPort=%d)",\r
       Address,\r
       Mtftp6ModeData.ConfigData.InitialServerPort\r
@@ -274,7 +274,7 @@ UpdateName (
     FreeUnicodeStringTable (gMtftp6ControllerNameTable);\r
     gMtftp6ControllerNameTable = NULL;\r
   }\r
-  \r
+\r
   Status = AddUnicodeString2 (\r
              "eng",\r
              gMtftp6ComponentName.SupportedLanguages,\r
@@ -285,7 +285,7 @@ UpdateName (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   return AddUnicodeString2 (\r
            "en",\r
            gMtftp6ComponentName2.SupportedLanguages,\r
@@ -383,13 +383,13 @@ Mtftp6ComponentNameGetControllerName (
   if (ChildHandle == NULL) {\r
     return EFI_UNSUPPORTED;\r
   }\r
-  \r
-  // \r
-  // Make sure this driver produced ChildHandle \r
-  // \r
+\r
+  //\r
+  // Make sure this driver produced ChildHandle\r
+  //\r
   Status = EfiTestChildHandle (\r
              ControllerHandle,\r
-             ChildHandle, \r
+             ChildHandle,\r
              &gEfiUdp6ProtocolGuid\r
              );\r
   if (EFI_ERROR (Status)) {\r
@@ -416,7 +416,7 @@ Mtftp6ComponentNameGetControllerName (
   //\r
   Status = UpdateName (Mtftp6);\r
   if (EFI_ERROR (Status)) {\r
-    return Status; \r
+    return Status;\r
   }\r
 \r
   return LookupUnicodeString2 (\r
index 5f47938c2d5f3fa6f698cb29a2ce71c6ed727fbd..a4888c0c0e4ce59b34d76437b5c906c14a6c5aa7 100644 (file)
@@ -2,7 +2,7 @@
   Driver Binding functions and Service Binding functions\r
   implementation for Mtftp6 Driver.\r
 \r
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -238,7 +238,7 @@ Mtftp6CreateInstance (
 \r
 /**\r
   Callback function which provided by user to remove one node in NetDestroyLinkList process.\r
-  \r
+\r
   @param[in]    Entry           The entry to be removed.\r
   @param[in]    Context         Pointer to the callback context corresponds to the Context in NetDestroyLinkList.\r
 \r
@@ -473,7 +473,7 @@ Mtftp6DriverBindingStop (
   EFI_STATUS                                 Status;\r
   LIST_ENTRY                                 *List;\r
   MTFTP6_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT Context;\r
-  \r
+\r
   //\r
   // Locate the Nic handle to retrieve the Mtftp6 private data.\r
   //\r
index 5853d2e3281c03b10c40e05ec24e0c26c5a6339f..26243010550507ac4adcbb8a13abe1e02893dec0 100644 (file)
@@ -4,13 +4,13 @@
 // This module produces EFI MTFTPv6 Protocol which provides basic services for\r
 // client-side unicast and/or multicast TFTP.\r
 //\r
-// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
 // which accompanies this distribution. The full text of the license may be found at\r
 // http://opensource.org/licenses/bsd-license.php.\r
-// \r
+//\r
 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 //\r
index e6b4127b785d82e448ac6a24e854e719324b3192..282a9c8e4942e54dc385bc5e5038556c38b8ba62 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Mtftp6 support functions implementation.\r
 \r
-  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -538,7 +538,7 @@ Mtftp6SendRequest (
 \r
   Packet->OpCode = HTONS (Operation);\r
   BufferLength  -= sizeof (Packet->OpCode);\r
-  \r
+\r
   Cur            = Packet->Rrq.Filename;\r
   Status         = AsciiStrCpyS ((CHAR8 *) Cur, BufferLength, (CHAR8 *) Token->Filename);\r
   ASSERT_EFI_ERROR (Status);\r
@@ -555,17 +555,17 @@ Mtftp6SendRequest (
   for (Index = 0; Index < Token->OptionCount; ++Index) {\r
     OptionStrLength = AsciiStrLen ((CHAR8 *) Options[Index].OptionStr);\r
     ValueStrLength  = AsciiStrLen ((CHAR8 *) Options[Index].ValueStr);\r
-    \r
+\r
     Status          = AsciiStrCpyS ((CHAR8 *) Cur, BufferLength, (CHAR8 *) Options[Index].OptionStr);\r
     ASSERT_EFI_ERROR (Status);\r
     BufferLength   -= (UINT32) (OptionStrLength + 1);\r
     Cur            += OptionStrLength + 1;\r
-    \r
+\r
     Status          = AsciiStrCpyS ((CHAR8 *) Cur, BufferLength, (CHAR8 *) Options[Index].ValueStr);\r
     ASSERT_EFI_ERROR (Status);\r
     BufferLength   -= (UINT32) (ValueStrLength + 1);\r
     Cur            += ValueStrLength + 1;\r
-    \r
+\r
   }\r
 \r
   //\r
index 784e658b66f846120ae3e45dcc6ee9e10ffb8ad0..aae36226d5f285223b1ef1b8b86838fdf0dee29b 100644 (file)
@@ -42,7 +42,7 @@
 \r
   # Include/Guid/TlsAuthConfigHii.h\r
   gTlsAuthConfigGuid            = { 0xb0eae4f8, 0x9a04, 0x4c6d, { 0xa7, 0x48, 0x79, 0x3d, 0xaa, 0xf, 0x65, 0xdf }}\r
-  \r
+\r
   # Include/Guid/TlsAuthentication.h\r
   gEfiTlsCaCertificateGuid      = { 0xfd2340D0, 0x3dab, 0x4349, { 0xa6, 0xc7, 0x3b, 0x4f, 0x12, 0xb4, 0x8e, 0xae }}\r
 \r
index dcca5f9fbac6a99e1c7bc85b2da24e4dcf8316bd..cc8d6cabcfa4aff717310c7767e33cff84bd1622 100644 (file)
@@ -57,7 +57,7 @@
   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf\r
   IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf\r
   TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf\r
-  DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf  \r
+  DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf\r
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf\r
   FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf\r
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf\r
index cdaee76f7ec0e8b274d3b7d4e9dc52b835c0a8fa..5604b1bf32380d408a17366ba701acfad5eb42c1 100644 (file)
@@ -3,13 +3,13 @@
 //\r
 // This package provides network modules that conform to UEFI 2.4 specification.\r
 //\r
-// Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials are licensed and made available under\r
 // the terms and conditions of the BSD License which accompanies this distribution.\r
 // The full text of the license may be found at\r
 // http://opensource.org/licenses/bsd-license.php\r
-// \r
+//\r
 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 //\r
index 339cb86ffbe4b2af6e2dd201109fdadf6802f05c..84e851908ff8ccd9fe674cc19d835e49018c155f 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // Network Package Localized Strings and Content.\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials are licensed and made available under\r
 // the terms and conditions of the BSD License which accompanies this distribution.\r
@@ -13,7 +13,7 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_PACKAGE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_PACKAGE_NAME\r
+#language en-US\r
 "Network package"\r
 \r
index 41eb5a5e13b63376e4b39b54cdb1833c99e8d6d2..7e1bef6adcfe5b08d5e320a254631745418e3ea7 100644 (file)
@@ -2,7 +2,7 @@
   Implementation of protocols EFI_COMPONENT_NAME_PROTOCOL and\r
   EFI_COMPONENT_NAME2_PROTOCOL.\r
 \r
-  Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -231,10 +231,10 @@ TcpComponentNameGetDriverName (
 \r
   @param  Tcp4[in]                   A pointer to the EFI_TCP4_PROTOCOL.\r
 \r
-  \r
+\r
   @retval EFI_SUCCESS                Update the ControllerNameTable of this instance successfully.\r
   @retval EFI_INVALID_PARAMETER      The input parameter is invalid.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 UpdateTcp4Name (\r
@@ -276,7 +276,7 @@ UpdateTcp4Name (
     FreeUnicodeStringTable (gTcpControllerNameTable);\r
     gTcpControllerNameTable = NULL;\r
   }\r
-  \r
+\r
   Status = AddUnicodeString2 (\r
              "eng",\r
              gTcpComponentName.SupportedLanguages,\r
@@ -287,7 +287,7 @@ UpdateTcp4Name (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   return AddUnicodeString2 (\r
            "en",\r
            gTcpComponentName2.SupportedLanguages,\r
@@ -302,10 +302,10 @@ UpdateTcp4Name (
 \r
   @param  Tcp6[in]                   A pointer to the EFI_TCP6_PROTOCOL.\r
 \r
-  \r
+\r
   @retval EFI_SUCCESS                Update the ControllerNameTable of this instance successfully.\r
   @retval EFI_INVALID_PARAMETER      The input parameter is invalid.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 UpdateTcp6Name (\r
@@ -343,7 +343,7 @@ UpdateTcp6Name (
     FreeUnicodeStringTable (gTcpControllerNameTable);\r
     gTcpControllerNameTable = NULL;\r
   }\r
-  \r
+\r
   Status = AddUnicodeString2 (\r
              "eng",\r
              gTcpComponentName.SupportedLanguages,\r
@@ -354,7 +354,7 @@ UpdateTcp6Name (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   return AddUnicodeString2 (\r
            "en",\r
            gTcpComponentName2.SupportedLanguages,\r
index c5fb1762551d88e4ab480c89df5e1de1e5f47cf3..f68044f813b008a29076b61e3ef9cff44704f01e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation of the Socket.\r
 \r
-  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -577,13 +577,13 @@ SockWakeRcvToken (
 /**\r
   Cancel the tokens in the specific token list.\r
 \r
-  @param[in]       Token                 Pointer to the Token. If NULL, all tokens \r
-                                         in SpecifiedTokenList will be canceled.  \r
+  @param[in]       Token                 Pointer to the Token. If NULL, all tokens\r
+                                         in SpecifiedTokenList will be canceled.\r
   @param[in, out]  SpecifiedTokenList    Pointer to the token list to be checked.\r
-  \r
+\r
   @retval EFI_SUCCESS          Cancel the tokens in the specific token listsuccessfully.\r
   @retval EFI_NOT_FOUND        The Token is not found in SpecifiedTokenList.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 SockCancelToken (\r
@@ -602,19 +602,19 @@ SockCancelToken (
   if (IsListEmpty (SpecifiedTokenList) && Token != NULL) {\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
+\r
   //\r
   // Iterate through the SpecifiedTokenList.\r
   //\r
   Entry = SpecifiedTokenList->ForwardLink;\r
   while (Entry != SpecifiedTokenList) {\r
     SockToken = NET_LIST_USER_STRUCT (Entry, SOCK_TOKEN, TokenList);\r
-    \r
+\r
     if (Token == NULL) {\r
       SIGNAL_TOKEN (SockToken->Token, EFI_ABORTED);\r
       RemoveEntryList (&SockToken->TokenList);\r
       FreePool (SockToken);\r
-      \r
+\r
       Entry = SpecifiedTokenList->ForwardLink;\r
       Status = EFI_SUCCESS;\r
     } else {\r
@@ -622,18 +622,18 @@ SockCancelToken (
         SIGNAL_TOKEN (Token, EFI_ABORTED);\r
         RemoveEntryList (&(SockToken->TokenList));\r
         FreePool (SockToken);\r
-        \r
+\r
         return EFI_SUCCESS;\r
       }\r
 \r
       Status = EFI_NOT_FOUND;\r
-      \r
+\r
       Entry = Entry->ForwardLink;\r
-    } \r
+    }\r
   }\r
 \r
   ASSERT (IsListEmpty (SpecifiedTokenList) || Token != NULL);\r
-  \r
+\r
   return Status;\r
 }\r
 \r
index 80692b161eff95ac8f3df028aa64735984917116..b8ed3c703f54bccd447e3ab29d422756a46e91fd 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The function declaration that provided for Socket Interface.\r
 \r
-  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -80,13 +80,13 @@ SockConnFlush (
 /**\r
   Cancel the tokens in the specific token list.\r
 \r
-  @param[in]       Token                 Pointer to the Token. If NULL, all tokens \r
-                                         in SpecifiedTokenList will be canceled.  \r
+  @param[in]       Token                 Pointer to the Token. If NULL, all tokens\r
+                                         in SpecifiedTokenList will be canceled.\r
   @param[in, out]  SpecifiedTokenList    Pointer to the token list to be checked.\r
-  \r
+\r
   @retval EFI_SUCCESS          Cancel the tokens in the specific token listsuccessfully.\r
   @retval EFI_NOT_FOUND        The Token is not found in SpecifiedTokenList.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 SockCancelToken (\r
index 0dfc0a71d37ce605f2ce838a97b4e0173731edb7..0a3c07835af01bc1dcb0ccf216eb71308e02aa0d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Interface function of the Socket.\r
 \r
-  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -985,7 +985,7 @@ EFI_STATUS
 SockCancel (\r
   IN OUT SOCKET  *Sock,\r
   IN     VOID    *Token\r
-  ) \r
+  )\r
 {\r
   EFI_STATUS     Status;\r
 \r
@@ -1008,7 +1008,7 @@ SockCancel (
     Status = EFI_NOT_STARTED;\r
     goto Exit;\r
   }\r
-  \r
+\r
   //\r
   // 1. Check ConnectionToken.\r
   //\r
@@ -1039,7 +1039,7 @@ SockCancel (
   if (Token != NULL && !EFI_ERROR (Status)) {\r
     goto Exit;\r
   }\r
-  \r
+\r
   //\r
   // 4. Check SndTokenList.\r
   //\r
@@ -1052,7 +1052,7 @@ SockCancel (
   // 5. Check ProcessingSndTokenList.\r
   //\r
   Status = SockCancelToken (Token, &Sock->ProcessingSndTokenList);\r
-  \r
+\r
 Exit:\r
   EfiReleaseLock (&(Sock->Lock));\r
   return Status;\r
index 9a352b1531e1d85899fedc3d976313fbbb4f79c4..ce8441d72097bfd2fd4e494739836518b8765a67 100644 (file)
@@ -2,7 +2,7 @@
   The implementation of a dispatch routine for processing TCP requests.\r
 \r
   (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -360,7 +360,7 @@ TcpAttachPcb (
   } else {\r
     IpProtocolGuid = &gEfiIp6ProtocolGuid;\r
   }\r
-  \r
+\r
   Tcb = AllocateZeroPool (sizeof (TCP_CB));\r
 \r
   if (Tcb == NULL) {\r
@@ -398,7 +398,7 @@ TcpAttachPcb (
     IpIoRemoveIp (IpIo, Tcb->IpInfo);\r
     return Status;\r
   }\r
-  \r
+\r
   InitializeListHead (&Tcb->List);\r
   InitializeListHead (&Tcb->SndQue);\r
   InitializeListHead (&Tcb->RcvQue);\r
@@ -430,7 +430,7 @@ TcpDetachPcb (
   ASSERT (Tcb != NULL);\r
 \r
   TcpFlushPcb (Tcb);\r
-  \r
+\r
   IpIoRemoveIp (ProtoData->TcpService->IpIo, Tcb->IpInfo);\r
 \r
   FreePool (Tcb);\r
index 6f815ef841a064056c0e677ce3eb3d7560e127a9..2d4b16cd9e27bc315bae18f9dc5c3e5968126462 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The driver binding and service binding protocol for the TCP driver.\r
 \r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -365,7 +365,7 @@ ON_ERROR:
 \r
 /**\r
   Callback function which provided by user to remove one node in NetDestroyLinkList process.\r
-  \r
+\r
   @param[in]    Entry           The entry to be removed.\r
   @param[in]    Context         Pointer to the callback context corresponds to the Context in NetDestroyLinkList.\r
 \r
@@ -410,7 +410,7 @@ TcpDestroyChildEntryInHandleBuffer (
   @param[in]  NumberOfChildren   Number of Handles in ChildHandleBuffer. If number\r
                                  of children is zero stop the entire bus driver.\r
   @param[in]  ChildHandleBuffer  An array of child handles to be freed. May be NULL\r
-                                 if NumberOfChildren is 0.  \r
+                                 if NumberOfChildren is 0.\r
   @param[in]  IpVersion          IP_VERSION_4 or IP_VERSION_6\r
 \r
   @retval EFI_SUCCESS            The resources used by the instance were cleaned up.\r
@@ -545,7 +545,7 @@ Tcp4DriverBindingSupported (
   if (!EFI_ERROR (Status)) {\r
     return EFI_ALREADY_STARTED;\r
   }\r
-  \r
+\r
   //\r
   // Test for the Ip4ServiceBinding Protocol\r
   //\r
@@ -662,7 +662,7 @@ Tcp6DriverBindingSupported (
   if (!EFI_ERROR (Status)) {\r
     return EFI_ALREADY_STARTED;\r
   }\r
-  \r
+\r
   //\r
   // Test for the Ip6ServiceBinding Protocol\r
   //\r
index fde0dcecbe11661197ac1e07ccc01e8f9d7bd3e7..3d1344b0f2ed2605a56e85bc8d393099d26e8578 100644 (file)
@@ -2,11 +2,11 @@
 #  TCPv4 I/O and TCPv6 I/O services.\r
 #\r
 #  This module provides EFI TCPv4 Protocol and EFI TCPv6 Protocol to send and receive data stream.\r
-#  It might provide TCPv4 Protocol or TCPv6 Protocol or both of them that depends on \r
+#  It might provide TCPv4 Protocol or TCPv6 Protocol or both of them that depends on\r
 #  which network stack has been loaded in system.\r
 #\r
 #\r
-#  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
index 112f017d81cb7a5efebb1ce7609fe5f9136d350f..2f559dee97b5d181ac00fd80e813439672a398d7 100644 (file)
@@ -5,13 +5,13 @@
 // It might provide TCPv4 Protocol or TCPv6 Protocol or both of them that depends on\r
 // which network stack has been loaded in system.\r
 //\r
-// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
 // which accompanies this distribution. The full text of the license may be found at\r
 // http://opensource.org/licenses/bsd-license.php.\r
-// \r
+//\r
 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 //\r
index 097203cbdbb4f813d2846d8ac4e8f42b83b543e4..94ce1d8261b47b379a071ab9f7caa29f04e01b69 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // TcpDxe Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -13,8 +13,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "TCP DXE"\r
 \r
 \r
index 92a0ab8c35148b75921d6995d7d8f0bb197550c2..5b74fdcdc362ff3f1f5888920bf5c2a0a90db6be 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   TCP input process routines.\r
 \r
-  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -436,7 +436,7 @@ TcpDeliverData (
       NetbufFree (Nbuf);\r
       return -1;\r
     }\r
-    \r
+\r
     ASSERT (Nbuf->Tcp == NULL);\r
 \r
     if (TCP_SEQ_GT (Seg->Seq, Seq)) {\r
@@ -775,18 +775,18 @@ TcpInput (
 \r
   Head    = (TCP_HEAD *) NetbufGetByte (Nbuf, 0, NULL);\r
   ASSERT (Head != NULL);\r
-  \r
+\r
   if (Nbuf->TotalSize < sizeof (TCP_HEAD)) {\r
     DEBUG ((EFI_D_NET, "TcpInput: received a malformed packet\n"));\r
     goto DISCARD;\r
   }\r
-  \r
+\r
   Len     = Nbuf->TotalSize - (Head->HeadLen << 2);\r
 \r
   if ((Head->HeadLen < 5) || (Len < 0)) {\r
 \r
     DEBUG ((EFI_D_NET, "TcpInput: received a malformed packet\n"));\r
-    \r
+\r
     goto DISCARD;\r
   }\r
 \r
@@ -1322,7 +1322,7 @@ TcpInput (
 \r
       goto DISCARD;\r
     }\r
-    \r
+\r
     Tcb->SndUna = Seg->Ack;\r
 \r
     if (TCP_FLG_ON (Tcb->CtrlFlag, TCP_CTRL_SND_URG) &&\r
@@ -1564,7 +1564,7 @@ StepSix:
 \r
       goto DISCARD;\r
     }\r
-    \r
+\r
     if (TcpDeliverData (Tcb) == -1) {\r
       goto RESET_THEN_DROP;\r
     }\r
@@ -1664,7 +1664,7 @@ TcpIcmpInput (
   if (Nbuf->TotalSize < sizeof (TCP_HEAD)) {\r
     goto CLEAN_EXIT;\r
   }\r
-  \r
+\r
   Head = (TCP_HEAD *) NetbufGetByte (Nbuf, 0, NULL);\r
   ASSERT (Head != NULL);\r
 \r
index e349d2dce6f20a0bff84219f4abe9a15a7267d37..b108985e29a5c40631a5b50f34ff5ca07415e0f3 100644 (file)
@@ -2,7 +2,7 @@
   Implementation of EFI_TCP4_PROTOCOL and EFI_TCP6_PROTOCOL.\r
 \r
   (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -153,7 +153,7 @@ Tcp4Configure (
     if (IP4_IS_LOCAL_BROADCAST (NTOHL (Ip))) {\r
       return EFI_INVALID_PARAMETER;\r
     }\r
-    \r
+\r
     if (TcpConfigData->AccessPoint.ActiveFlag && (0 == TcpConfigData->AccessPoint.RemotePort || (Ip == 0))) {\r
       return EFI_INVALID_PARAMETER;\r
     }\r
@@ -162,7 +162,7 @@ Tcp4Configure (
 \r
       CopyMem (&Ip, &TcpConfigData->AccessPoint.StationAddress, sizeof (IP4_ADDR));\r
       CopyMem (&SubnetMask, &TcpConfigData->AccessPoint.SubnetMask, sizeof (IP4_ADDR));\r
-      if (!IP4_IS_VALID_NETMASK (NTOHL (SubnetMask)) || \r
+      if (!IP4_IS_VALID_NETMASK (NTOHL (SubnetMask)) ||\r
           (SubnetMask != 0 && !NetIp4IsUnicast (NTOHL (Ip), NTOHL (SubnetMask)))) {\r
         return EFI_INVALID_PARAMETER;\r
       }\r
index 1697514a92bff1b1e4981e0ff1b71f4a5af430e0..5c5da9338cc2a13273057ba2dfeec9cee974783a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   TCP output process routines.\r
 \r
-  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -295,7 +295,7 @@ TcpTransmitSegment (
   ASSERT ((Nbuf != NULL) && (Nbuf->Tcp == NULL));\r
 \r
   if (TcpVerifySegment (Nbuf) == 0) {\r
-    return -1; \r
+    return -1;\r
   }\r
 \r
   DataLen = Nbuf->TotalSize;\r
@@ -642,7 +642,7 @@ TcpGetSegment (
     NetbufFree (Nbuf);\r
     return NULL;\r
   }\r
-  \r
+\r
   return Nbuf;\r
 }\r
 \r
@@ -688,10 +688,10 @@ TcpRetransmit (
       "TcpRetransmit: retransmission without regard to the receiver window for TCB %p\n",\r
       Tcb)\r
       );\r
-    \r
+\r
   } else if (TCP_SEQ_GEQ (Tcb->SndWl2 + Tcb->SndWnd, Seq)) {\r
     Len = TCP_SUB_SEQ (Tcb->SndWl2 + Tcb->SndWnd, Seq);\r
-    \r
+\r
   } else {\r
     DEBUG (\r
       (EFI_D_WARN,\r
index 403afbb815382e0c75bd1bb85e46deae671b67af..9cdad09fb4917e452bdfc8a27a3c89cc705bd7ea 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The DriverEntryPoint for TlsAuthConfigDxe driver.\r
 \r
-  Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -128,7 +128,7 @@ TlsAuthConfigDxeDriverEntryPoint (
 \r
 ON_ERROR:\r
   TlsAuthConfigFormUnload (PrivateData);\r
-  \r
+\r
   return Status;\r
 }\r
 \r
index cbdd5f0664bd64145ca71fdad582895023831a27..31450b3e4a1bf2882564184980ccbf7beabc5430 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The Miscellaneous Routines for TlsAuthConfigDxe driver.\r
 \r
-Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -1560,7 +1560,7 @@ TlsAuthConfigAccessCallback (
   HiiGetBrowserData (&gTlsAuthConfigGuid, mTlsAuthConfigStorageName, BufferSize, (UINT8 *) IfrNvData);\r
 \r
   if ((Action != EFI_BROWSER_ACTION_CHANGED) &&\r
-      (Action != EFI_BROWSER_ACTION_CHANGING) && \r
+      (Action != EFI_BROWSER_ACTION_CHANGING) &&\r
       (Action != EFI_BROWSER_ACTION_FORM_CLOSE)) {\r
     Status = EFI_UNSUPPORTED;\r
     goto EXIT;\r
@@ -1593,10 +1593,10 @@ TlsAuthConfigAccessCallback (
       break;\r
     case KEY_TLS_AUTH_CONFIG_ENROLL_CERT_FROM_FILE:\r
       //\r
-      // If the file is already opened, clean the file related resource first. \r
+      // If the file is already opened, clean the file related resource first.\r
       //\r
       CleanFileContext (Private);\r
-      \r
+\r
       ChooseFile( NULL, NULL, UpdateCAFromFile, &File);\r
       break;\r
 \r
index a026075f362d1580f543cfaacec8d7ecdd4f2b7c..ea83dbd04f539820d2a8a6e193a02c5dab654cf1 100644 (file)
@@ -106,7 +106,7 @@ TlsEncryptPacket (
     BufferInPtr += TLS_RECORD_HEADER_LENGTH + RecordHeaderIn->Length;\r
     RecordCount ++;\r
   }\r
-  \r
+\r
   //\r
   // Allocate enough buffer to hold TLS Ciphertext.\r
   //\r
index 93c2003f348e89eaaa31c286517b05571fac3827..7330c50fb7f8b91a9bbfaae35e1b5748e129a236 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   UEFI Component Name(2) protocol implementation for UDP6 driver.\r
 \r
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -237,10 +237,10 @@ Udp6ComponentNameGetDriverName (
 \r
   @param  Udp6[in]                  A pointer to the EFI_UDP6_PROTOCOL.\r
 \r
-  \r
+\r
   @retval EFI_SUCCESS               Update the ControllerNameTable of this instance successfully.\r
   @retval EFI_INVALID_PARAMETER     The input parameter is invalid.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 UpdateName (\r
index f9d528e68fb3cd623840d113a821e31453895d11..0647c0214fe67f17c42a906c2d2009458e2eeb90 100644 (file)
@@ -177,7 +177,7 @@ EXIT:
 \r
 /**\r
   Callback function which provided by user to remove one node in NetDestroyLinkList process.\r
-  \r
+\r
   @param[in]    Entry           The entry to be removed.\r
   @param[in]    Context         Pointer to the callback context corresponds to the Context in NetDestroyLinkList.\r
 \r
@@ -296,7 +296,7 @@ Udp6DriverBindingStop (
                &Udp6Service->ServiceBinding,\r
                NULL\r
                );\r
\r
+\r
     Udp6CleanService (Udp6Service);\r
     FreePool (Udp6Service);\r
   }\r
@@ -405,7 +405,7 @@ Udp6ServiceBindingCreateChild (
   if (EFI_ERROR (Status)) {\r
     goto ON_ERROR;\r
   }\r
-  \r
+\r
   OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
 \r
   //\r
index 05dc5ef4febd8ffc94d0847506922a44ebd8edf6..fe88c548c9f2e5acd03c0f05861616b26ee42707 100644 (file)
@@ -1,10 +1,10 @@
 ## @file Udp6Dxe.inf\r
 #  UDP packet service based on IPv6 stack.\r
-#  \r
+#\r
 #  This module produces EFI UDPv6 Protocol which provides simple packet-oriented\r
 #  services to transmit and receive UDP packets.\r
-#                                                                                \r
-#  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+#\r
+#  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
index 5f1f19bdbac358757980d163bc7fa5cbf6d17ced..88a93abf405a41bd1c4f9bd354eb2c56c860a8fb 100644 (file)
@@ -4,13 +4,13 @@
 // This module produces EFI UDPv6 Protocol which provides simple packet-oriented\r
 // services to transmit and receive UDP packets.\r
 //\r
-// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
 // which accompanies this distribution. The full text of the license may be found at\r
 // http://opensource.org/licenses/bsd-license.php.\r
-// \r
+//\r
 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 //\r
index 1185113f3c80ab2c1597aee17a3fb39b63a4748b..3566e1f2f37fecd0e4bfc523bfbe5866f97bacb0 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // Udp6Dxe Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -13,8 +13,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "UDP6 DXE"\r
 \r
 \r
index d014e2dcbc88912638bbbd925ec0ba1a71aa0f63..25336362b0c19515cd95ade036dd4e561bee8307 100644 (file)
@@ -372,7 +372,7 @@ ON_ERROR:
 \r
   IpIoDestroy (Udp6Service->IpIo);\r
   Udp6Service->IpIo = NULL;\r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -398,7 +398,7 @@ Udp6CleanService (
   //\r
   IpIoDestroy (Udp6Service->IpIo);\r
   Udp6Service->IpIo = NULL;\r
-  \r
+\r
   ZeroMem (Udp6Service, sizeof (UDP6_SERVICE_DATA));\r
 }\r
 \r
@@ -1621,7 +1621,7 @@ Udp6Demultiplex (
     NetbufFree (Packet);\r
     return;\r
   }\r
-  \r
+\r
   //\r
   // Get the datagram header from the packet buffer.\r
   //\r
@@ -1873,7 +1873,7 @@ Udp6IcmpHandler (
     NetbufFree (Packet);\r
     return;\r
   }\r
-  \r
+\r
   Udp6Header = (EFI_UDP_HEADER *) NetbufGetByte (Packet, 0, NULL);\r
   ASSERT (Udp6Header != NULL);\r
   if (Udp6Header == NULL) {\r
@@ -1975,7 +1975,7 @@ Udp6NetVectorExtFree (
   IN VOID  *Context\r
   )\r
 {\r
-} \r
+}\r
 \r
 /**\r
   Find the key in the netmap.\r
index 09f315f50b0af10bcd71ca981e53436921bf5ff4..ff59e80cd4ed7f77aab92a230b78abdf2f23e9bc 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Udp6 driver's whole implementation and internal data structures.\r
 \r
-  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -144,7 +144,7 @@ Udp6CreateService (
   IN EFI_HANDLE         ImageHandle,\r
   IN EFI_HANDLE         ControllerHandle\r
   );\r
\r
+\r
 /**\r
   This function cleans the udp instance.\r
 \r
@@ -155,7 +155,7 @@ VOID
 Udp6CleanInstance (\r
   IN OUT UDP6_INSTANCE_DATA  *Instance\r
   );\r
\r
+\r
 /**\r
   This function intializes the new created udp instance.\r
 \r
index e9d94dd00c21af2ebc05dbca3e57f379a70cac3b..71684bc285aa08453836d1148eec26fdd09d3ff1 100644 (file)
@@ -284,7 +284,7 @@ Udp6Configure (
 \r
     ASSERT (IsListEmpty (&Instance->DeliveredDgramQue));\r
   }\r
\r
+\r
 ON_EXIT:\r
 \r
   gBS->RestoreTPL (OldTpl);\r
@@ -384,7 +384,7 @@ Udp6Groups (
     Status = NetMapIterate (&Instance->McastIps, Udp6LeaveGroup, MulticastAddress);\r
     if ((MulticastAddress != NULL) && (Status == EFI_ABORTED)) {\r
       Status = EFI_SUCCESS;\r
-    } \r
+    }\r
   }\r
 \r
 ON_EXIT:\r
@@ -535,7 +535,7 @@ Udp6Transmit (
     Status = EFI_OUT_OF_RESOURCES;\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   ConfigData = &Instance->ConfigData;\r
 \r
   //\r
index 6e48d4aa188f2e6b73acd4cd0dc0dadcf9141adc..40af1dac0e62f70c0bbff438de3db21c6d84df18 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   UEFI Component Name(2) protocol implementation for UefiPxeBc driver.\r
 \r
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -324,7 +324,7 @@ PxeBcComponentNameGetControllerName (
   if (ControllerHandle == NULL || ChildHandle != NULL) {\r
     return EFI_UNSUPPORTED;\r
   }\r
-  \r
+\r
   NicHandle = PxeBcGetNicByIp4Children (ControllerHandle);\r
   if (NicHandle == NULL) {\r
     NicHandle = PxeBcGetNicByIp6Children (ControllerHandle);\r
index 1f8895fdaa68480046a972169a78084004603eb0..46a13c5b1fd7396b1d7c28b6af3821bcbbd961db 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Boot functions implementation for UefiPxeBc Driver.\r
 \r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
   (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 \r
   This program and the accompanying materials\r
@@ -102,14 +102,14 @@ PxeBcSelectBootPrompt (
   //\r
   // According to the PXE specification 2.1, Table 2-1 PXE DHCP Options,\r
   // we must not consider a boot prompt or boot menu if all of the following hold:\r
-  //   - the PXE_DISCOVERY_CONTROL tag(6) is present inside the Vendor Options(43), and has bit 3 set  \r
+  //   - the PXE_DISCOVERY_CONTROL tag(6) is present inside the Vendor Options(43), and has bit 3 set\r
   //   - a boot file name has been presented in the initial DHCP or ProxyDHCP offer packet.\r
   //\r
   if (IS_DISABLE_PROMPT_MENU (VendorOpt->DiscoverCtrl) &&\r
       Cache->Dhcp4.OptList[PXEBC_DHCP4_TAG_INDEX_BOOTFILE] != NULL) {\r
     return EFI_ABORTED;\r
   }\r
-  \r
+\r
   if (!IS_VALID_BOOT_PROMPT (VendorOpt->BitMap)) {\r
     return EFI_TIMEOUT;\r
   }\r
@@ -471,7 +471,7 @@ PxeBcDhcp4BootInfo (
   UINT16                      Value;\r
   PXEBC_VENDOR_OPTION         *VendorOpt;\r
   PXEBC_BOOT_SVR_ENTRY        *Entry;\r
-  \r
+\r
   PxeBc       = &Private->PxeBc;\r
   Mode        = PxeBc->Mode;\r
   Status      = EFI_SUCCESS;\r
@@ -789,8 +789,8 @@ PxeBcExtractDiscoverInfo (
       if (Info->IpCnt >= 1) {\r
         *DiscoverInfo = AllocatePool (sizeof (*Info) + (Info->IpCnt - 1) * sizeof (**SrvList));\r
         if (*DiscoverInfo == NULL) {\r
-          return EFI_OUT_OF_RESOURCES;       \r
-        }     \r
+          return EFI_OUT_OF_RESOURCES;\r
+        }\r
         CopyMem (*DiscoverInfo, Info, sizeof (*Info));\r
         Info = *DiscoverInfo;\r
       }\r
@@ -951,7 +951,7 @@ PxeBcDiscoverBootFile (
           &Mode->ProxyOffer.Dhcpv4,\r
           &Mode->PxeReply.Dhcpv4,\r
           Private->PxeReply.Dhcp4.Packet.Ack.Length\r
-          );      \r
+          );\r
       }\r
       Mode->ProxyOfferReceived = TRUE;\r
     }\r
index bb65445fc9f0f3b95b6285ea9bfb0a46579f927f..140e687736cc4ad142b347cf9d4b2269a495bfda 100644 (file)
@@ -438,7 +438,7 @@ PxeBcCacheDhcp4Packet (
   if (Dst->Size < Src->Length) {\r
     return EFI_BUFFER_TOO_SMALL;\r
   }\r
-  \r
+\r
   CopyMem (&Dst->Dhcp4, &Src->Dhcp4, Src->Length);\r
   Dst->Length = Src->Length;\r
 \r
@@ -492,7 +492,7 @@ PxeBcParseDhcp4Packet (
                        );\r
   }\r
   //\r
-  // Second, Check if bootfilename and serverhostname is overloaded to carry DHCP options refers to rfc-2132. \r
+  // Second, Check if bootfilename and serverhostname is overloaded to carry DHCP options refers to rfc-2132.\r
   // If yes, try to parse options from the BootFileName field, then ServerName field.\r
   //\r
   Option = Options[PXEBC_DHCP4_TAG_INDEX_OVERLOAD];\r
@@ -657,7 +657,7 @@ PxeBcCopyDhcp4Ack (
     CopyMem (&Mode->DhcpAck.Dhcpv4, &Ack->Dhcp4, Ack->Length);\r
     Mode->DhcpAckReceived = TRUE;\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -695,7 +695,7 @@ PxeBcCopyProxyOffer (
   if (EFI_ERROR(Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   PxeBcParseDhcp4Packet (&Private->ProxyOffer.Dhcp4);\r
 \r
   //\r
@@ -871,7 +871,7 @@ PxeBcCacheDhcp4Offer (
         //\r
         Private->OfferIndex[OfferType][Private->OfferCount[OfferType]] = Private->OfferNum;\r
         Private->OfferCount[OfferType]++;\r
-      } else if ((OfferType == PxeOfferTypeProxyPxe10 || OfferType == PxeOfferTypeProxyWfm11a) && \r
+      } else if ((OfferType == PxeOfferTypeProxyPxe10 || OfferType == PxeOfferTypeProxyWfm11a) &&\r
                  Private->OfferCount[OfferType] < 1) {\r
         //\r
         // Only cache the first PXE10/WFM11a offer, and discard the others.\r
@@ -1274,7 +1274,7 @@ PxeBcDhcp4CallBack (
       Status = EFI_ABORTED;\r
       break;\r
     }\r
-    \r
+\r
     if (Mode->SendGUID) {\r
       //\r
       // Send the system Guid instead of the MAC address as the hardware address if required.\r
@@ -1310,7 +1310,7 @@ PxeBcDhcp4CallBack (
 \r
   case Dhcp4SelectOffer:\r
     ASSERT (NewPacket != NULL);\r
-    \r
+\r
     //\r
     // Select offer by the default policy or by order, and record the SelectIndex\r
     // and SelectProxyType.\r
@@ -1586,7 +1586,7 @@ PxeBcDhcp4Discover (
     }\r
   }\r
 ON_EXIT:\r
-  \r
+\r
   if (Token.ResponseList != NULL) {\r
     FreePool (Token.ResponseList);\r
   }\r
@@ -1606,7 +1606,7 @@ ON_EXIT:
 \r
 **/\r
 EFI_STATUS\r
-PxeBcSetIp4Policy (   \r
+PxeBcSetIp4Policy (\r
   IN PXEBC_PRIVATE_DATA            *Private\r
   )\r
 {\r
@@ -1626,7 +1626,7 @@ PxeBcSetIp4Policy (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   if (Policy != Ip4Config2PolicyStatic) {\r
     Policy = Ip4Config2PolicyStatic;\r
     Status= Ip4Config2->SetData (\r
@@ -1637,7 +1637,7 @@ PxeBcSetIp4Policy (
                           );\r
     if (EFI_ERROR (Status)) {\r
       return Status;\r
-    } \r
+    }\r
   }\r
 \r
   return  EFI_SUCCESS;\r
@@ -1713,7 +1713,7 @@ PxeBcDhcp4Dora (
     if (Status == EFI_TIMEOUT && Private->OfferNum > 0) {\r
       Status = EFI_NO_RESPONSE;\r
     }\r
-    \r
+\r
     goto ON_EXIT;\r
   }\r
 \r
index 27794c911a128e3b1f752c2a792c9c9373b704ea..742fdde5e772c5990a537a952cbba5fc1a2786c6 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Functions declaration related with DHCPv4 for UefiPxeBc Driver.\r
 \r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -108,7 +108,7 @@ typedef enum {
 \r
 #define IS_VALID_BOOT_SERVERS(x) \\r
   ((((x)[0]) & BIT (PXEBC_VENDOR_TAG_BOOT_SERVERS)) \\r
-   == BIT (PXEBC_VENDOR_TAG_BOOT_SERVERS))  \r
+   == BIT (PXEBC_VENDOR_TAG_BOOT_SERVERS))\r
 \r
 #define IS_VALID_BOOT_PROMPT(x) \\r
   ((((x)[0]) & BIT (PXEBC_VENDOR_TAG_MENU_PROMPT)) \\r
@@ -346,7 +346,7 @@ PxeBcDhcp4Discover (
 \r
 **/\r
 EFI_STATUS\r
-PxeBcSetIp4Policy (   \r
+PxeBcSetIp4Policy (\r
   IN PXEBC_PRIVATE_DATA            *Private\r
   );\r
 \r
index 7c2baa8eac01c995742e0a34ab736ef1884971a3..c06b0242bb44390111dd8eff9955833b0a521f9c 100644 (file)
@@ -236,13 +236,13 @@ PxeBcFreeBootFileOption (
   @retval EFI_OUT_OF_RESOURCES    Failed to allocate needed resources.\r
   @retval EFI_DEVICE_ERROR        An unexpected network error occurred.\r
   @retval Others                  Other errors as indicated.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 PxeBcDns6 (\r
   IN PXEBC_PRIVATE_DATA           *Private,\r
   IN     CHAR16                   *HostName,\r
-     OUT EFI_IPv6_ADDRESS         *IpAddress                \r
+     OUT EFI_IPv6_ADDRESS         *IpAddress\r
   )\r
 {\r
   EFI_STATUS                      Status;\r
@@ -252,7 +252,7 @@ PxeBcDns6 (
   EFI_HANDLE                      Dns6Handle;\r
   EFI_IPv6_ADDRESS                *DnsServerList;\r
   BOOLEAN                         IsDone;\r
-  \r
+\r
   Dns6                = NULL;\r
   Dns6Handle          = NULL;\r
   DnsServerList       = Private->DnsServer;\r
@@ -269,8 +269,8 @@ PxeBcDns6 (
              );\r
   if (EFI_ERROR (Status)) {\r
     goto Exit;\r
-  } \r
-  \r
+  }\r
+\r
   Status = gBS->OpenProtocol (\r
                   Dns6Handle,\r
                   &gEfiDns6ProtocolGuid,\r
@@ -331,7 +331,7 @@ PxeBcDns6 (
   //\r
   // Name resolution is done, check result.\r
   //\r
-  Status = Token.Status;  \r
+  Status = Token.Status;\r
   if (!EFI_ERROR (Status)) {\r
     if (Token.RspData.H2AData == NULL) {\r
       Status = EFI_DEVICE_ERROR;\r
@@ -347,7 +347,7 @@ PxeBcDns6 (
     IP6_COPY_ADDRESS (IpAddress, Token.RspData.H2AData->IpList);\r
     Status = EFI_SUCCESS;\r
   }\r
-  \r
+\r
 Exit:\r
   FreePool (HostName);\r
 \r
@@ -363,7 +363,7 @@ Exit:
 \r
   if (Dns6 != NULL) {\r
     Dns6->Configure (Dns6, NULL);\r
-    \r
+\r
     gBS->CloseProtocol (\r
            Dns6Handle,\r
            &gEfiDns6ProtocolGuid,\r
@@ -384,8 +384,8 @@ Exit:
   if (DnsServerList != NULL) {\r
     FreePool (DnsServerList);\r
   }\r
-  \r
-  return Status;  \r
+\r
+  return Status;\r
 }\r
 \r
 /**\r
@@ -474,14 +474,14 @@ PxeBcExtractBootFileUrl (
     while (*ServerAddress != '\0' && *ServerAddress != PXEBC_ADDR_END_DELIMITER) {\r
       ServerAddress++;\r
     }\r
-    \r
+\r
     if (*ServerAddress != PXEBC_ADDR_END_DELIMITER) {\r
       FreePool (TmpStr);\r
       return EFI_INVALID_PARAMETER;\r
     }\r
-    \r
+\r
     *ServerAddress = '\0';\r
-    \r
+\r
     //\r
     // Convert the string of server address to Ipv6 address format and store it.\r
     //\r
@@ -941,7 +941,7 @@ PxeBcRequestBootService (
   //\r
   // Find Server ID Option from ProxyOffer.\r
   //\r
-  if (Private->OfferBuffer[Index].Dhcp6.OfferType == PxeOfferTypeProxyBinl) {  \r
+  if (Private->OfferBuffer[Index].Dhcp6.OfferType == PxeOfferTypeProxyBinl) {\r
     Option = PxeBcDhcp6SeekOption (\r
                IndexOffer->Dhcp6.Option,\r
                IndexOffer->Length - 4,\r
@@ -950,7 +950,7 @@ PxeBcRequestBootService (
     if (Option == NULL) {\r
       return EFI_NOT_FOUND;\r
     }\r
-  \r
+\r
     //\r
     // Add Server ID Option.\r
     //\r
@@ -979,7 +979,7 @@ PxeBcRequestBootService (
   }\r
 \r
   //\r
-  // Update Elapsed option in the package \r
+  // Update Elapsed option in the package\r
   //\r
   Option = PxeBcDhcp6SeekOption (\r
              Discover->DhcpOptions,\r
@@ -989,7 +989,7 @@ PxeBcRequestBootService (
   if (Option != NULL) {\r
     CalcElapsedTime (Private);\r
     WriteUnaligned16 ((UINT16*)(Option + 4), HTONS((UINT16) Private->ElapsedTime));\r
-  }  \r
+  }\r
 \r
   Status = PxeBc->UdpWrite (\r
                     PxeBc,\r
@@ -1023,7 +1023,7 @@ PxeBcRequestBootService (
   if (EFI_ERROR (Status)) {\r
     goto ON_ERROR;\r
   }\r
-    \r
+\r
   Status = PxeBc->UdpRead (\r
                     PxeBc,\r
                     EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP | EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP,\r
@@ -1051,7 +1051,7 @@ PxeBcRequestBootService (
   Reply->Length = (UINT32) ReadSize;\r
 \r
   return EFI_SUCCESS;\r
-  \r
+\r
 ON_ERROR:\r
   if (Discover != NULL) {\r
     FreePool (Discover);\r
@@ -1208,7 +1208,7 @@ PxeBcCacheDhcp6Offer (
       //\r
       Private->OfferIndex[OfferType][Private->OfferCount[OfferType]] = Private->OfferNum;\r
       Private->OfferCount[OfferType]++;\r
-    } else if ((OfferType == PxeOfferTypeProxyPxe10 || OfferType == PxeOfferTypeProxyWfm11a) && \r
+    } else if ((OfferType == PxeOfferTypeProxyPxe10 || OfferType == PxeOfferTypeProxyWfm11a) &&\r
                  Private->OfferCount[OfferType] < 1) {\r
       //\r
       // Only cache the first PXE10/WFM11a offer, and discard the others.\r
@@ -1499,7 +1499,7 @@ PxeBcUnregisterIp6Address (
 \r
 /**\r
   Check whether IP driver could route the message which will be sent to ServerIp address.\r
-  \r
+\r
   This function will check the IP6 route table every 1 seconds until specified timeout is expired, if a valid\r
   route is found in IP6 route table, the address will be filed in GatewayAddr and return.\r
 \r
@@ -1510,7 +1510,7 @@ PxeBcUnregisterIp6Address (
   @retval     EFI_SUCCESS         Found a valid gateway address successfully.\r
   @retval     EFI_TIMEOUT         The operation is time out.\r
   @retval     Other               Unexpect error happened.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 PxeBcCheckRouteTable (\r
@@ -1571,13 +1571,13 @@ PxeBcCheckRouteTable (
     if (Ip6ModeData.IcmpTypeList != NULL) {\r
       FreePool (Ip6ModeData.IcmpTypeList);\r
     }\r
-    \r
+\r
     if (GatewayIsFound || RetryCount == TimeOutInSecond) {\r
       break;\r
     }\r
-    \r
+\r
     RetryCount++;\r
-    \r
+\r
     //\r
     // Delay 1 second then recheck it again.\r
     //\r
@@ -1602,19 +1602,19 @@ PxeBcCheckRouteTable (
       Ip6->Poll (Ip6);\r
     }\r
   }\r
-  \r
+\r
 ON_EXIT:\r
   if (TimeOutEvt != NULL) {\r
     gBS->CloseEvent (TimeOutEvt);\r
   }\r
-  \r
+\r
   if (GatewayIsFound) {\r
     Status = EFI_SUCCESS;\r
   } else if (RetryCount == TimeOutInSecond) {\r
     Status = EFI_TIMEOUT;\r
   }\r
 \r
-  return Status; \r
+  return Status;\r
 }\r
 \r
 /**\r
@@ -1668,7 +1668,7 @@ PxeBcRegisterIp6Address (
   if (EFI_ERROR (Status)) {\r
     NoGateway = TRUE;\r
   }\r
-  \r
+\r
   //\r
   // There is no channel between IP6 and PXE driver about address setting,\r
   // so it has to set the new address by Ip6ConfigProtocol manually.\r
@@ -1767,7 +1767,7 @@ PxeBcRegisterIp6Address (
       goto ON_EXIT;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Set the default gateway address back if needed.\r
   //\r
@@ -1854,7 +1854,7 @@ PxeBcSetIp6Policy (
 \r
 /**\r
   This function will register the station IP address and flush IP instance to start using the new IP address.\r
-  \r
+\r
   @param[in]  Private             The pointer to PXEBC_PRIVATE_DATA.\r
 \r
   @retval     EFI_SUCCESS         The new IP address has been configured successfully.\r
@@ -1868,7 +1868,7 @@ PxeBcSetIp6Address (
 {\r
   EFI_STATUS                  Status;\r
   EFI_DHCP6_PROTOCOL          *Dhcp6;\r
-    \r
+\r
   Dhcp6 = Private->Dhcp6;\r
 \r
   CopyMem (&Private->StationIp.v6, &Private->TmpStationIp.v6, sizeof (EFI_IPv6_ADDRESS));\r
@@ -1972,7 +1972,7 @@ PxeBcDhcp6CallBack (
       Status = EFI_ABORTED;\r
       break;\r
     }\r
-    \r
+\r
     //\r
     // Record the first Solicate msg time\r
     //\r
@@ -2011,7 +2011,7 @@ PxeBcDhcp6CallBack (
       Status = EFI_ABORTED;\r
       break;\r
     }\r
-    \r
+\r
     //\r
     // Store the request packet as seed packet for discover.\r
     //\r
@@ -2188,7 +2188,7 @@ PxeBcDhcp6Discover (
   if (EFI_ERROR (Status)) {\r
     goto ON_ERROR;\r
   }\r
-  \r
+\r
   Status = PxeBc->UdpRead (\r
                     PxeBc,\r
                     EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP,\r
@@ -2345,13 +2345,13 @@ PxeBcDhcp6Sarr (
     }\r
 \r
     do {\r
-      \r
+\r
       TimerStatus = gBS->CheckEvent (Timer);\r
       if (!EFI_ERROR (TimerStatus)) {\r
         Status = Dhcp6->Start (Dhcp6);\r
       }\r
     } while (TimerStatus == EFI_NOT_READY);\r
-    \r
+\r
     gBS->CloseEvent (Timer);\r
   }\r
   if (EFI_ERROR (Status)) {\r
@@ -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\r
   // router address in IP6 is the router discovery mechanism (the RS and RA, which only be handled when\r
   // the IP policy is Automatic). So we just hold the station IP address here and leave the IP policy as\r
-  // Automatic, until we get the server IP address. This could let IP6 driver finish the router discovery \r
+  // Automatic, until we get the server IP address. This could let IP6 driver finish the router discovery\r
   // to find a valid router address.\r
   //\r
   CopyMem (&Private->TmpStationIp.v6, &Mode.Ia->IaAddress[0].IpAddress, sizeof (EFI_IPv6_ADDRESS));\r
@@ -2394,6 +2394,6 @@ PxeBcDhcp6Sarr (
     Dhcp6->Stop (Dhcp6);\r
     return Status;\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
index 39efcfaa778830c13a0c686c768d341baa9b64a6..f3dcd89743b0dc95080ff9d8be4c5d5506c6754e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Functions declaration related with DHCPv6 for UefiPxeBc Driver.\r
 \r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -253,7 +253,7 @@ PxeBcSetIp6Policy (
 \r
 /**\r
   This function will register the station IP address and flush IP instance to start using the new IP address.\r
-  \r
+\r
   @param[in]  Private             The pointer to PXEBC_PRIVATE_DATA.\r
 \r
   @retval     EFI_SUCCESS         The new IP address has been configured successfully.\r
index 8dd787be1a00aed74701804713b3d7a6ff77ed75..bc9dc914f3201996d3cb993f34b557b97f1d4121 100644 (file)
@@ -256,7 +256,7 @@ PxeBcDestroyIp4Children (
            );\r
     FreePool (Private->Ip4Nic->DevicePath);\r
 \r
-    if (Private->Snp != NULL) { \r
+    if (Private->Snp != NULL) {\r
       //\r
       // Close SNP from the child virtual handle\r
       //\r
@@ -266,7 +266,7 @@ PxeBcDestroyIp4Children (
              This->DriverBindingHandle,\r
              Private->Ip4Nic->Controller\r
              );\r
-             \r
+\r
       gBS->UninstallProtocolInterface (\r
              Private->Ip4Nic->Controller,\r
              &gEfiSimpleNetworkProtocolGuid,\r
@@ -416,7 +416,7 @@ PxeBcDestroyIp6Children (
            NULL\r
            );\r
     FreePool (Private->Ip6Nic->DevicePath);\r
-    \r
+\r
     if (Private->Snp != NULL) {\r
       //\r
       // Close SNP from the child virtual handle\r
@@ -489,7 +489,7 @@ PxeBcCheckIpv6Support (
 \r
   //\r
   // Get the NIC handle by SNP protocol.\r
-  //  \r
+  //\r
   Handle = NetLibGetSnpHandle (ControllerHandle, NULL);\r
   if (Handle == NULL) {\r
     return EFI_NOT_FOUND;\r
@@ -535,7 +535,7 @@ PxeBcCheckIpv6Support (
   if (EFI_ERROR (Status) || InfoBlock == NULL) {\r
     FreePool (InfoBlock);\r
     return EFI_NOT_FOUND;\r
-  }  \r
+  }\r
 \r
   *Ipv6Support = ((EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT *) InfoBlock)->Ipv6Support;\r
   FreePool (InfoBlock);\r
@@ -814,7 +814,7 @@ PxeBcCreateIp4Children (
     }\r
 \r
     //\r
-    // Open SNP on the child handle BY_DRIVER. It will prevent any additionally \r
+    // Open SNP on the child handle BY_DRIVER. It will prevent any additionally\r
     // layering to perform the experiment.\r
     //\r
     Status = gBS->OpenProtocol (\r
@@ -951,7 +951,7 @@ PxeBcCreateIp6Children (
   if (Private->Snp != NULL) {\r
     for (Index = 0; Index < Private->Snp->Mode->HwAddressSize; Index++) {\r
       Private->IaId |= (Private->Snp->Mode->CurrentAddress.Addr[Index] << ((Index << 3) & 31));\r
-    }  \r
+    }\r
   }\r
 \r
   //\r
@@ -1140,7 +1140,7 @@ PxeBcCreateIp6Children (
   if (EFI_ERROR (Status)) {\r
     goto ON_ERROR;\r
   }\r
-  \r
+\r
   if (Private->Snp != NULL) {\r
     //\r
     // Install SNP protocol on purpose is for some OS loader backward\r
@@ -1157,7 +1157,7 @@ PxeBcCreateIp6Children (
     }\r
 \r
     //\r
-    // Open SNP on the child handle BY_DRIVER. It will prevent any additionally \r
+    // Open SNP on the child handle BY_DRIVER. It will prevent any additionally\r
     // layering to perform the experiment.\r
     //\r
     Status = gBS->OpenProtocol (\r
@@ -1293,7 +1293,7 @@ PxeBcDriverEntryPoint (
   @param[in]  RemainingDevicePath Optional parameter used to pick a specific child\r
                                   device to be started.\r
   @param[in]  IpVersion           IP_VERSION_4 or IP_VERSION_6.\r
-  \r
+\r
   @retval EFI_SUCCESS         This driver supports this device.\r
   @retval EFI_UNSUPPORTED     This driver does not support this device.\r
 \r
@@ -1310,7 +1310,7 @@ PxeBcSupported (
   EFI_STATUS                      Status;\r
   EFI_GUID                        *DhcpServiceBindingGuid;\r
   EFI_GUID                        *MtftpServiceBindingGuid;\r
-  \r
+\r
   if (IpVersion == IP_VERSION_4) {\r
     DhcpServiceBindingGuid  = &gEfiDhcp4ServiceBindingProtocolGuid;\r
     MtftpServiceBindingGuid = &gEfiMtftp4ServiceBindingProtocolGuid;\r
@@ -1453,7 +1453,7 @@ PxeBcStart (
 \r
     //\r
     // Install PxeBaseCodePrivate protocol onto the real NIC handler.\r
-    // PxeBaseCodePrivate protocol is only used to keep the relationship between \r
+    // PxeBaseCodePrivate protocol is only used to keep the relationship between\r
     // NIC handle and virtual child handles.\r
     // gEfiCallerIdGuid will be used as its protocol guid.\r
     //\r
@@ -1470,7 +1470,7 @@ PxeBcStart (
     //\r
     // Try to locate SNP protocol.\r
     //\r
-    NetLibGetSnpHandle(ControllerHandle, &Private->Snp);    \r
+    NetLibGetSnpHandle(ControllerHandle, &Private->Snp);\r
   }\r
 \r
   if (IpVersion == IP_VERSION_4) {\r
index b828d24288990ea1cc1f1062f39969452dca4688..13396903f5853176d55667488ff4095641f4842f 100644 (file)
@@ -91,7 +91,7 @@ EfiPxeBcStart (
     if (EFI_ERROR (Status)) {\r
       goto ON_ERROR;\r
     }\r
-    \r
+\r
     //\r
     // Configure block size for TFTP as a default value to handle all link layers.\r
     //\r
@@ -144,7 +144,7 @@ EfiPxeBcStart (
     if (EFI_ERROR (Status)) {\r
       goto ON_ERROR;\r
     }\r
-    \r
+\r
     //\r
     // Configure block size for TFTP as a default value to handle all link layers.\r
     //\r
@@ -206,10 +206,10 @@ EfiPxeBcStart (
     }\r
 \r
     //\r
-    //DHCP4 service allows only one of its children to be configured in  \r
-    //the active state, If the DHCP4 D.O.R.A started by IP4 auto  \r
-    //configuration and has not been completed, the Dhcp4 state machine \r
-    //will not be in the right state for the PXE to start a new round D.O.R.A. \r
+    //DHCP4 service allows only one of its children to be configured in\r
+    //the active state, If the DHCP4 D.O.R.A started by IP4 auto\r
+    //configuration and has not been completed, the Dhcp4 state machine\r
+    //will not be in the right state for the PXE to start a new round D.O.R.A.\r
     //so we need to switch it's policy to static.\r
     //\r
     Status = PxeBcSetIp4Policy (Private);\r
@@ -745,13 +745,13 @@ ON_EXIT:
   if (NewCreatedInfo != NULL && NewCreatedInfo != &DefaultInfo) {\r
     FreePool (NewCreatedInfo);\r
   }\r
-  \r
+\r
   if (Mode->UsingIpv6) {\r
     Private->Udp6Read->Configure (Private->Udp6Read, &Private->Udp6CfgData);\r
   } else {\r
     Private->Udp4Read->Configure (Private->Udp4Read, &Private->Udp4CfgData);\r
   }\r
-  \r
+\r
   //\r
   // Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP\r
   // receive filter list emptied and the filter set to EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP.\r
@@ -1093,7 +1093,7 @@ EfiPxeBcUdpWrite (
     DoNotFragment = TRUE;\r
   }\r
 \r
-  if (!Mode->UsingIpv6 && GatewayIp != NULL && Mode->SubnetMask.Addr[0] != 0 && \r
+  if (!Mode->UsingIpv6 && GatewayIp != NULL && Mode->SubnetMask.Addr[0] != 0 &&\r
       !NetIp4IsUnicast (NTOHL (GatewayIp->Addr[0]), EFI_NTOHL(Mode->SubnetMask))) {\r
     //\r
     // Gateway is provided but it's not a unicast IPv4 address, while it will be ignored for IPv6.\r
@@ -1659,13 +1659,13 @@ EfiPxeBcSetIpFilter (
     //\r
     Udp4Cfg = &Private->Udp4CfgData;\r
     if ((AcceptPromiscuous != Udp4Cfg->AcceptPromiscuous)   ||\r
-         (AcceptBroadcast != Udp4Cfg->AcceptBroadcast)     || MultiCastUpdate) {\r
+        (AcceptBroadcast != Udp4Cfg->AcceptBroadcast)     || MultiCastUpdate) {\r
       //\r
       // Clear the UDP4 instance configuration, all joined groups will be left\r
       // during the operation.\r
       //\r
       Private->Udp4Read->Configure (Private->Udp4Read, NULL);\r
-  \r
+\r
       //\r
       // Configure the UDP instance with the new configuration.\r
       //\r
@@ -1675,7 +1675,7 @@ EfiPxeBcSetIpFilter (
       if (EFI_ERROR (Status)) {\r
         return Status;\r
       }\r
-  \r
+\r
       //\r
       // In not Promiscuous mode, need to join the new multicast group.\r
       //\r
@@ -1704,7 +1704,7 @@ EfiPxeBcSetIpFilter (
       // during the operation.\r
       //\r
       Private->Udp6Read->Configure (Private->Udp6Read, NULL);\r
-  \r
+\r
       //\r
       // Configure the UDP instance with the new configuration.\r
       //\r
@@ -1713,7 +1713,7 @@ EfiPxeBcSetIpFilter (
       if (EFI_ERROR (Status)) {\r
         return Status;\r
       }\r
-  \r
+\r
       //\r
       // In not Promiscuous mode, need to join the new multicast group.\r
       //\r
@@ -2023,13 +2023,13 @@ EfiPxeBcSetStationIP (
   }\r
 \r
   if (!Mode->UsingIpv6 && NewStationIp != NULL) {\r
-    if (IP4_IS_UNSPECIFIED(NTOHL (NewStationIp->Addr[0])) || \r
+    if (IP4_IS_UNSPECIFIED(NTOHL (NewStationIp->Addr[0])) ||\r
         IP4_IS_LOCAL_BROADCAST(NTOHL (NewStationIp->Addr[0])) ||\r
         (NewSubnetMask != NULL && NewSubnetMask->Addr[0] != 0 && !NetIp4IsUnicast (NTOHL (NewStationIp->Addr[0]), NTOHL (NewSubnetMask->Addr[0])))) {\r
       return EFI_INVALID_PARAMETER;\r
     }\r
   }\r
-  \r
+\r
   if (!Mode->Started) {\r
     return EFI_NOT_STARTED;\r
   }\r
@@ -2058,7 +2058,7 @@ EfiPxeBcSetStationIP (
   if (!EFI_ERROR (Status)) {\r
     Private->IsAddressOk = TRUE;\r
   }\r
-  \r
+\r
 ON_EXIT:\r
   return Status;\r
 }\r
@@ -2343,14 +2343,14 @@ EfiPxeLoadFile (
   if (This == NULL || BufferSize == NULL || FilePath == NULL || !IsDevicePathEnd (FilePath)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // Only support BootPolicy\r
   //\r
   if (!BootPolicy) {\r
     return EFI_UNSUPPORTED;\r
   }\r
-  \r
+\r
   VirtualNic = PXEBC_VIRTUAL_NIC_FROM_LOADFILE (This);\r
   Private    = VirtualNic->Private;\r
   PxeBc      = &Private->PxeBc;\r
@@ -2403,7 +2403,7 @@ EfiPxeLoadFile (
   } else {\r
     //\r
     // The DHCP4 can have only one configured child instance so we need to stop\r
-    // reset the DHCP4 child before we return. Otherwise these programs which \r
+    // reset the DHCP4 child before we return. Otherwise these programs which\r
     // also need to use DHCP4 will be impacted.\r
     //\r
     if (!PxeBc->Mode->UsingIpv6) {\r
index 7f1ecfbe6bcbc2b049b064b29ad0eeefbe67f9a9..0bb5d51e93b6cbc91d6d03e9d17cf69405304017 100644 (file)
@@ -2,7 +2,7 @@
   This EFI_PXE_BASE_CODE_PROTOCOL and EFI_LOAD_FILE_PROTOCOL.\r
   interfaces declaration.\r
 \r
-  Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -107,7 +107,7 @@ struct _PXEBC_PRIVATE_DATA {
   EFI_HANDLE                                Image;\r
 \r
   PXEBC_PRIVATE_PROTOCOL                    Id;\r
-  EFI_SIMPLE_NETWORK_PROTOCOL               *Snp; \r
+  EFI_SIMPLE_NETWORK_PROTOCOL               *Snp;\r
 \r
   PXEBC_VIRTUAL_NIC                         *Ip4Nic;\r
   PXEBC_VIRTUAL_NIC                         *Ip6Nic;\r
index 4b6f8c9c7feff899abe478e69962476b0d2f8790..60509fc9e61288097257cb19addf4fb2c2787e22 100644 (file)
@@ -48,7 +48,7 @@ PxeBcFlushStationIp (
     //\r
     CopyMem (&Private->Udp6CfgData.StationAddress, StationIp, sizeof (EFI_IPv6_ADDRESS));\r
     CopyMem (&Private->Ip6CfgData.StationAddress, StationIp, sizeof (EFI_IPv6_ADDRESS));\r
-    \r
+\r
     //\r
     // Reconfigure the Ip6 instance to capture background ICMP6 packets with new station Ip address.\r
     //\r
@@ -79,7 +79,7 @@ PxeBcFlushStationIp (
       CopyMem (&Private->Udp4CfgData.StationAddress, StationIp, sizeof (EFI_IPv4_ADDRESS));\r
       CopyMem (&Private->Ip4CfgData.StationAddress, StationIp, sizeof (EFI_IPv4_ADDRESS));\r
     }\r
-    \r
+\r
     if (SubnetMask != NULL) {\r
       //\r
       // Overwrite Udp4CfgData/Ip4CfgData SubnetMask.\r
@@ -97,7 +97,7 @@ PxeBcFlushStationIp (
       Mode->RouteTable[0].SubnetMask.Addr[0] = SubnetMask->Addr[0];\r
       Mode->RouteTable[0].GwAddr.Addr[0]     = 0;\r
     }\r
-    \r
+\r
     if (StationIp != NULL || SubnetMask != NULL) {\r
       //\r
       // Reconfigure the Ip4 instance to capture background ICMP packets with new station Ip address.\r
@@ -306,7 +306,7 @@ PxeBcIcmpErrorDpcHandle (
     //\r
     goto ON_RECYCLE;\r
   }\r
-  \r
+\r
   //\r
   // The protocol has been configured to only receive ICMP packet.\r
   //\r
@@ -482,7 +482,7 @@ PxeBcIcmp6ErrorDpcHandle (
 \r
 ON_RECYCLE:\r
   gBS->SignalEvent (RxData->RecycleSignal);\r
-  \r
+\r
 ON_EXIT:\r
   Private->Icmp6Token.Status = EFI_NOT_READY;\r
   Ip6->Receive (Ip6, &Private->Icmp6Token);\r
@@ -517,7 +517,7 @@ PxeBcIcmp6ErrorUpdate (
   @param[in, out]  SrcPort              The pointer to the source port.\r
   @param[in]       DoNotFragment        If TRUE, fragment is not enabled.\r
                                         Otherwise, fragment is enabled.\r
-  @param[in]       Ttl                  The time to live field of the IP header. \r
+  @param[in]       Ttl                  The time to live field of the IP header.\r
   @param[in]       ToS                  The type of service field of the IP header.\r
 \r
   @retval          EFI_SUCCESS          Successfully configured this instance.\r
index 17bee5c27968f51caa049752b29b2e091f72b18e..3f1a22ba8b89c6b275a9c9fd9d6a3a91a5cdeafa 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Support functions declaration for UefiPxeBc Driver.\r
 \r
-  Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -135,7 +135,7 @@ PxeBcIcmp6ErrorUpdate (
   @param[in, out]  SrcPort              The pointer to the source port.\r
   @param[in]       DoNotFragment        If TRUE, fragment is not enabled.\r
                                         Otherwise, fragment is enabled.\r
-  @param[in]       Ttl                  The time to live field of the IP header. \r
+  @param[in]       Ttl                  The time to live field of the IP header.\r
   @param[in]       ToS                  The type of service field of the IP header.\r
 \r
   @retval          EFI_SUCCESS          Successfully configured this instance.\r
@@ -453,7 +453,7 @@ PxeBcUintnToAscDecWithFormat (
   @param[in]  Number         Numeric value to be converted.\r
   @param[in]  Buffer         Pointer to the buffer for ASCII string.\r
   @param[in]  BufferSize     The maxsize of the buffer.\r
-  \r
+\r
   @return     Length         The actual length of the ASCII string.\r
 \r
 **/\r
index 6d1102b6b7df7ffeedfd99dd14f3d12573d2d20b..d95cf06ab1758f82a186ca14124f1298e231ed5d 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
 #  Access PXE-compatible devices for network access and network booting.\r
-#  \r
+#\r
 #  This driver provides PXE Base Code Protocol which is used to accessing\r
 #  PXE-compatible device for network access or booting. It could work together\r
 #  with an IPv4 stack, an IPv6 stack or both.\r
 #\r
 #\r
-#  Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -73,7 +73,7 @@
 [Protocols]\r
   ## TO_START\r
   ## SOMETIMES_CONSUMES\r
-  gEfiDevicePathProtocolGuid                           \r
+  gEfiDevicePathProtocolGuid\r
   gEfiNetworkInterfaceIdentifierProtocolGuid_31        ## SOMETIMES_CONSUMES\r
   gEfiArpServiceBindingProtocolGuid                    ## TO_START\r
   gEfiArpProtocolGuid                                  ## TO_START\r
index 1a1c9593a499f6d1c6887ba85df536009eee9dcb..d84ec8534bf58030d6b4097bef6f8499b2505413 100644 (file)
@@ -5,13 +5,13 @@
 // PXE-compatible device for network access or booting. It could work together\r
 // with an IPv4 stack, an IPv6 stack or both.\r
 //\r
-// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
 // which accompanies this distribution. The full text of the license may be found at\r
 // http://opensource.org/licenses/bsd-license.php.\r
-// \r
+//\r
 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 //\r
index ef45972576b85d73e53577ee8cba85236bbacab1..6aeed63290fb2f12748f74627c56b3b153d02eaa 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // UefiPxeBcDxe Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -13,8 +13,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "Uefi PXE DXE"\r
 \r
 \r