summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c')
-rw-r--r--ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c
index e23588afdb..fda062de1d 100644
--- a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c
+++ b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c
@@ -955,7 +955,7 @@ PingCreateIpInstance (
//
Status = gBS->HandleProtocol (
HandleBuffer[HandleIndex],
- Private->IpChoice == PING_IP_CHOICE_IP6?&gEfiIp6ConfigProtocolGuid:&gEfiIp4ConfigProtocolGuid,
+ Private->IpChoice == PING_IP_CHOICE_IP6?&gEfiIp6ConfigProtocolGuid:&gEfiIp4Config2ProtocolGuid,
(VOID **) &IpXCfg
);
@@ -973,8 +973,9 @@ PingCreateIpInstance (
NULL
);
} else {
- Status = ((EFI_IP4_CONFIG_PROTOCOL*)IpXCfg)->GetData (
+ Status = ((EFI_IP4_CONFIG2_PROTOCOL*)IpXCfg)->GetData (
IpXCfg,
+ Ip4Config2DataTypeInterfaceInfo,
&IfInfoSize,
NULL
);
@@ -1009,8 +1010,9 @@ PingCreateIpInstance (
IpXInterfaceInfo
);
} else {
- Status = ((EFI_IP4_CONFIG_PROTOCOL*)IpXCfg)->GetData (
+ Status = ((EFI_IP4_CONFIG2_PROTOCOL*)IpXCfg)->GetData (
IpXCfg,
+ Ip4Config2DataTypeInterfaceInfo,
&IfInfoSize,
IpXInterfaceInfo
);
@@ -1045,7 +1047,7 @@ PingCreateIpInstance (
//
// IP4 address check
//
- if (EFI_IP4_EQUAL (&Private->SrcAddress, &((EFI_IP4_IPCONFIG_DATA*)IpXInterfaceInfo)->StationAddress)) {
+ if (EFI_IP4_EQUAL (&Private->SrcAddress, &((EFI_IP4_CONFIG2_INTERFACE_INFO*)IpXInterfaceInfo)->StationAddress)) {
//
// Match a certain interface address.
//
@@ -1137,11 +1139,6 @@ PingCreateIpInstance (
//
// Configure the ip4 instance for icmp4 packet exchange.
//
-// PING_IP4_COPY_ADDRESS (&Ip4Config.StationAddress, &Private->SrcAddress);
-// Ip4Config.SubnetMask.Addr[0] = 0xFF;
-// Ip4Config.SubnetMask.Addr[1] = 0xFF;
-// Ip4Config.SubnetMask.Addr[2] = 0xFF;
-// Ip4Config.SubnetMask.Addr[3] = 0x00;
Ip4Config.DefaultProtocol = 1;
Ip4Config.AcceptAnyProtocol = FALSE;
Ip4Config.AcceptBroadcast = FALSE;
@@ -1429,6 +1426,10 @@ ON_EXIT:
@param[in] ImageHandle Handle to the Image (NULL if Internal).
@param[in] SystemTable Pointer to the System Table (NULL if Internal).
+
+ @retval SHELL_SUCCESS The ping processed successfullly.
+ @retval others The ping processed unsuccessfully.
+
**/
SHELL_STATUS
EFIAPI