\r
#include "ArpImpl.h"\r
\r
-\r
/**\r
This function is used to assign a station address to the ARP cache for this instance\r
of the ARP driver.\r
}\r
\r
if ((ConfigData != NULL) &&\r
- ((ConfigData->SwAddressLength == 0) ||\r
- (ConfigData->StationAddress == NULL) ||\r
- (ConfigData->SwAddressType <= 1500))) {\r
+ ((ConfigData->SwAddressLength == 0) ||\r
+ (ConfigData->StationAddress == NULL) ||\r
+ (ConfigData->SwAddressType <= 1500)))\r
+ {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
return Status;\r
}\r
\r
-\r
/**\r
This function is used to insert entries into the ARP cache.\r
\r
}\r
\r
if (((!DenyFlag) && ((TargetHwAddress == NULL) || (TargetSwAddress == NULL))) ||\r
- (DenyFlag && (TargetHwAddress != NULL) && (TargetSwAddress != NULL)) ||\r
- ((TargetHwAddress == NULL) && (TargetSwAddress == NULL))) {\r
+ (DenyFlag && (TargetHwAddress != NULL) && (TargetSwAddress != NULL)) ||\r
+ ((TargetHwAddress == NULL) && (TargetSwAddress == NULL)))\r
+ {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
// Fill the hardware address part in the MatchAddress.\r
//\r
MatchAddress[Hardware].Type = SnpMode->IfType;\r
- MatchAddress[Hardware].Length = (UINT8) SnpMode->HwAddressSize;\r
+ MatchAddress[Hardware].Length = (UINT8)SnpMode->HwAddressSize;\r
MatchAddress[Hardware].AddressPtr = TargetHwAddress;\r
\r
//\r
return Status;\r
}\r
\r
-\r
/**\r
This function searches the ARP cache for matching entries and allocates a buffer into\r
which those entries are copied.\r
EFI_TPL OldTpl;\r
\r
if ((This == NULL) ||\r
- (!Refresh && (EntryCount == NULL) && (EntryLength == NULL)) ||\r
- ((Entries != NULL) && ((EntryLength == NULL) || (EntryCount == NULL)))) {\r
+ (!Refresh && (EntryCount == NULL) && (EntryLength == NULL)) ||\r
+ ((Entries != NULL) && ((EntryLength == NULL) || (EntryCount == NULL))))\r
+ {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- Instance = ARP_INSTANCE_DATA_FROM_THIS (This);\r
+ Instance = ARP_INSTANCE_DATA_FROM_THIS (This);\r
\r
if (!Instance->Configured) {\r
return EFI_NOT_STARTED;\r
return Status;\r
}\r
\r
-\r
/**\r
This function removes specified ARP cache entries.\r
\r
return (Count == 0) ? EFI_NOT_FOUND : EFI_SUCCESS;\r
}\r
\r
-\r
/**\r
This function delete all dynamic entries from the ARP cache that match the specified\r
software protocol type.\r
return (Count == 0) ? EFI_NOT_FOUND : EFI_SUCCESS;\r
}\r
\r
-\r
/**\r
This function tries to resolve the TargetSwAddress and optionally returns a\r
TargetHwAddress if it already exists in the ARP cache.\r
SnpMode = &ArpService->SnpMode;\r
\r
if ((TargetSwAddress == NULL) ||\r
- ((Instance->ConfigData.SwAddressType == IPV4_ETHER_PROTO_TYPE) &&\r
- IP4_IS_LOCAL_BROADCAST (*((UINT32 *)TargetSwAddress)))) {\r
+ ((Instance->ConfigData.SwAddressType == IPV4_ETHER_PROTO_TYPE) &&\r
+ IP4_IS_LOCAL_BROADCAST (*((UINT32 *)TargetSwAddress))))\r
+ {\r
//\r
// Return the hardware broadcast address.\r
//\r
}\r
\r
if ((Instance->ConfigData.SwAddressType == IPV4_ETHER_PROTO_TYPE) &&\r
- IP4_IS_MULTICAST (NTOHL (*((UINT32 *)TargetSwAddress)))) {\r
+ IP4_IS_MULTICAST (NTOHL (*((UINT32 *)TargetSwAddress))))\r
+ {\r
//\r
// If the software address is an IPv4 multicast address, invoke Mnp to\r
// resolve the address.\r
//\r
// Create a request context for this arp request.\r
//\r
- RequestContext = AllocatePool (sizeof(USER_REQUEST_CONTEXT));\r
+ RequestContext = AllocatePool (sizeof (USER_REQUEST_CONTEXT));\r
if (RequestContext == NULL) {\r
DEBUG ((DEBUG_ERROR, "ArpRequest: Allocate memory for RequestContext failed.\n"));\r
\r
NULL\r
);\r
if (CacheEntry != NULL) {\r
-\r
CacheEntry->NextRetryTime = Instance->ConfigData.RetryTimeOut;\r
CacheEntry->RetryCount = Instance->ConfigData.RetryCount;\r
} else {\r
return Status;\r
}\r
\r
-\r
/**\r
This function aborts the previous ARP request (identified by This, TargetSwAddress\r
and ResolvedEvent) that is issued by EFI_ARP_PROTOCOL.Request().\r
EFI_TPL OldTpl;\r
\r
if ((This == NULL) ||\r
- ((TargetSwAddress != NULL) && (ResolvedEvent == NULL)) ||\r
- ((TargetSwAddress == NULL) && (ResolvedEvent != NULL))) {\r
+ ((TargetSwAddress != NULL) && (ResolvedEvent == NULL)) ||\r
+ ((TargetSwAddress == NULL) && (ResolvedEvent != NULL)))\r
+ {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r