summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
diff options
context:
space:
mode:
Diffstat (limited to 'NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c')
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c78
1 files changed, 39 insertions, 39 deletions
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
index 7c2baa8eac..c06b0242bb 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
@@ -236,13 +236,13 @@ PxeBcFreeBootFileOption (
@retval EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
@retval EFI_DEVICE_ERROR An unexpected network error occurred.
@retval Others Other errors as indicated.
-
+
**/
EFI_STATUS
PxeBcDns6 (
IN PXEBC_PRIVATE_DATA *Private,
IN CHAR16 *HostName,
- OUT EFI_IPv6_ADDRESS *IpAddress
+ OUT EFI_IPv6_ADDRESS *IpAddress
)
{
EFI_STATUS Status;
@@ -252,7 +252,7 @@ PxeBcDns6 (
EFI_HANDLE Dns6Handle;
EFI_IPv6_ADDRESS *DnsServerList;
BOOLEAN IsDone;
-
+
Dns6 = NULL;
Dns6Handle = NULL;
DnsServerList = Private->DnsServer;
@@ -269,8 +269,8 @@ PxeBcDns6 (
);
if (EFI_ERROR (Status)) {
goto Exit;
- }
-
+ }
+
Status = gBS->OpenProtocol (
Dns6Handle,
&gEfiDns6ProtocolGuid,
@@ -331,7 +331,7 @@ PxeBcDns6 (
//
// Name resolution is done, check result.
//
- Status = Token.Status;
+ Status = Token.Status;
if (!EFI_ERROR (Status)) {
if (Token.RspData.H2AData == NULL) {
Status = EFI_DEVICE_ERROR;
@@ -347,7 +347,7 @@ PxeBcDns6 (
IP6_COPY_ADDRESS (IpAddress, Token.RspData.H2AData->IpList);
Status = EFI_SUCCESS;
}
-
+
Exit:
FreePool (HostName);
@@ -363,7 +363,7 @@ Exit:
if (Dns6 != NULL) {
Dns6->Configure (Dns6, NULL);
-
+
gBS->CloseProtocol (
Dns6Handle,
&gEfiDns6ProtocolGuid,
@@ -384,8 +384,8 @@ Exit:
if (DnsServerList != NULL) {
FreePool (DnsServerList);
}
-
- return Status;
+
+ return Status;
}
/**
@@ -474,14 +474,14 @@ PxeBcExtractBootFileUrl (
while (*ServerAddress != '\0' && *ServerAddress != PXEBC_ADDR_END_DELIMITER) {
ServerAddress++;
}
-
+
if (*ServerAddress != PXEBC_ADDR_END_DELIMITER) {
FreePool (TmpStr);
return EFI_INVALID_PARAMETER;
}
-
+
*ServerAddress = '\0';
-
+
//
// Convert the string of server address to Ipv6 address format and store it.
//
@@ -941,7 +941,7 @@ PxeBcRequestBootService (
//
// Find Server ID Option from ProxyOffer.
//
- if (Private->OfferBuffer[Index].Dhcp6.OfferType == PxeOfferTypeProxyBinl) {
+ if (Private->OfferBuffer[Index].Dhcp6.OfferType == PxeOfferTypeProxyBinl) {
Option = PxeBcDhcp6SeekOption (
IndexOffer->Dhcp6.Option,
IndexOffer->Length - 4,
@@ -950,7 +950,7 @@ PxeBcRequestBootService (
if (Option == NULL) {
return EFI_NOT_FOUND;
}
-
+
//
// Add Server ID Option.
//
@@ -979,7 +979,7 @@ PxeBcRequestBootService (
}
//
- // Update Elapsed option in the package
+ // Update Elapsed option in the package
//
Option = PxeBcDhcp6SeekOption (
Discover->DhcpOptions,
@@ -989,7 +989,7 @@ PxeBcRequestBootService (
if (Option != NULL) {
CalcElapsedTime (Private);
WriteUnaligned16 ((UINT16*)(Option + 4), HTONS((UINT16) Private->ElapsedTime));
- }
+ }
Status = PxeBc->UdpWrite (
PxeBc,
@@ -1023,7 +1023,7 @@ PxeBcRequestBootService (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
Status = PxeBc->UdpRead (
PxeBc,
EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP | EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP,
@@ -1051,7 +1051,7 @@ PxeBcRequestBootService (
Reply->Length = (UINT32) ReadSize;
return EFI_SUCCESS;
-
+
ON_ERROR:
if (Discover != NULL) {
FreePool (Discover);
@@ -1208,7 +1208,7 @@ PxeBcCacheDhcp6Offer (
//
Private->OfferIndex[OfferType][Private->OfferCount[OfferType]] = Private->OfferNum;
Private->OfferCount[OfferType]++;
- } else if ((OfferType == PxeOfferTypeProxyPxe10 || OfferType == PxeOfferTypeProxyWfm11a) &&
+ } else if ((OfferType == PxeOfferTypeProxyPxe10 || OfferType == PxeOfferTypeProxyWfm11a) &&
Private->OfferCount[OfferType] < 1) {
//
// Only cache the first PXE10/WFM11a offer, and discard the others.
@@ -1499,7 +1499,7 @@ PxeBcUnregisterIp6Address (
/**
Check whether IP driver could route the message which will be sent to ServerIp address.
-
+
This function will check the IP6 route table every 1 seconds until specified timeout is expired, if a valid
route is found in IP6 route table, the address will be filed in GatewayAddr and return.
@@ -1510,7 +1510,7 @@ PxeBcUnregisterIp6Address (
@retval EFI_SUCCESS Found a valid gateway address successfully.
@retval EFI_TIMEOUT The operation is time out.
@retval Other Unexpect error happened.
-
+
**/
EFI_STATUS
PxeBcCheckRouteTable (
@@ -1571,13 +1571,13 @@ PxeBcCheckRouteTable (
if (Ip6ModeData.IcmpTypeList != NULL) {
FreePool (Ip6ModeData.IcmpTypeList);
}
-
+
if (GatewayIsFound || RetryCount == TimeOutInSecond) {
break;
}
-
+
RetryCount++;
-
+
//
// Delay 1 second then recheck it again.
//
@@ -1602,19 +1602,19 @@ PxeBcCheckRouteTable (
Ip6->Poll (Ip6);
}
}
-
+
ON_EXIT:
if (TimeOutEvt != NULL) {
gBS->CloseEvent (TimeOutEvt);
}
-
+
if (GatewayIsFound) {
Status = EFI_SUCCESS;
} else if (RetryCount == TimeOutInSecond) {
Status = EFI_TIMEOUT;
}
- return Status;
+ return Status;
}
/**
@@ -1668,7 +1668,7 @@ PxeBcRegisterIp6Address (
if (EFI_ERROR (Status)) {
NoGateway = TRUE;
}
-
+
//
// There is no channel between IP6 and PXE driver about address setting,
// so it has to set the new address by Ip6ConfigProtocol manually.
@@ -1767,7 +1767,7 @@ PxeBcRegisterIp6Address (
goto ON_EXIT;
}
}
-
+
//
// Set the default gateway address back if needed.
//
@@ -1854,7 +1854,7 @@ PxeBcSetIp6Policy (
/**
This function will register the station IP address and flush IP instance to start using the new IP address.
-
+
@param[in] Private The pointer to PXEBC_PRIVATE_DATA.
@retval EFI_SUCCESS The new IP address has been configured successfully.
@@ -1868,7 +1868,7 @@ PxeBcSetIp6Address (
{
EFI_STATUS Status;
EFI_DHCP6_PROTOCOL *Dhcp6;
-
+
Dhcp6 = Private->Dhcp6;
CopyMem (&Private->StationIp.v6, &Private->TmpStationIp.v6, sizeof (EFI_IPv6_ADDRESS));
@@ -1972,7 +1972,7 @@ PxeBcDhcp6CallBack (
Status = EFI_ABORTED;
break;
}
-
+
//
// Record the first Solicate msg time
//
@@ -2011,7 +2011,7 @@ PxeBcDhcp6CallBack (
Status = EFI_ABORTED;
break;
}
-
+
//
// Store the request packet as seed packet for discover.
//
@@ -2188,7 +2188,7 @@ PxeBcDhcp6Discover (
if (EFI_ERROR (Status)) {
goto ON_ERROR;
}
-
+
Status = PxeBc->UdpRead (
PxeBc,
EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP,
@@ -2345,13 +2345,13 @@ PxeBcDhcp6Sarr (
}
do {
-
+
TimerStatus = gBS->CheckEvent (Timer);
if (!EFI_ERROR (TimerStatus)) {
Status = Dhcp6->Start (Dhcp6);
}
} while (TimerStatus == EFI_NOT_READY);
-
+
gBS->CloseEvent (Timer);
}
if (EFI_ERROR (Status)) {
@@ -2376,7 +2376,7 @@ PxeBcDhcp6Sarr (
// DHCP6 doesn't have an option to specify the router address on the subnet, the only way to get the
// router address in IP6 is the router discovery mechanism (the RS and RA, which only be handled when
// the IP policy is Automatic). So we just hold the station IP address here and leave the IP policy as
- // Automatic, until we get the server IP address. This could let IP6 driver finish the router discovery
+ // Automatic, until we get the server IP address. This could let IP6 driver finish the router discovery
// to find a valid router address.
//
CopyMem (&Private->TmpStationIp.v6, &Mode.Ia->IaAddress[0].IpAddress, sizeof (EFI_IPv6_ADDRESS));
@@ -2394,6 +2394,6 @@ PxeBcDhcp6Sarr (
Dhcp6->Stop (Dhcp6);
return Status;
}
-
+
return EFI_SUCCESS;
}