X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ShellPkg%2FLibrary%2FUefiShellNetwork1CommandsLib%2FPing.c;h=fda062de1d73c7d11019a239b563349881a442a8;hb=7c25b7ea5b2c029a9e7a0be57f7c20f31d720c7d;hp=e23588afdb76ec73eb3bd20a13dcc9db26cde45f;hpb=cceb4ebd0839a923739b1f4075f7ec1bf8591eeb;p=mirror_edk2.git 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