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