]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/IpSecDxe/IkeCommon.c
NetworkPkg: Clean up source files
[mirror_edk2.git] / NetworkPkg / IpSecDxe / IkeCommon.c
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