mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[PING][TRACERT] Fully support Win64 ICMP_ECHO_REPLY32 (#2427)
This commit is contained in:
parent
2712762538
commit
8532c3b6f6
2 changed files with 21 additions and 0 deletions
|
@ -433,9 +433,17 @@ Ping(void)
|
||||||
ZeroMemory(SendBuffer, RequestSize);
|
ZeroMemory(SendBuffer, RequestSize);
|
||||||
|
|
||||||
if (Family == AF_INET6)
|
if (Family == AF_INET6)
|
||||||
|
{
|
||||||
ReplySize += sizeof(ICMPV6_ECHO_REPLY);
|
ReplySize += sizeof(ICMPV6_ECHO_REPLY);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
#ifdef _WIN64
|
||||||
|
ReplySize += sizeof(ICMP_ECHO_REPLY32);
|
||||||
|
#else
|
||||||
ReplySize += sizeof(ICMP_ECHO_REPLY);
|
ReplySize += sizeof(ICMP_ECHO_REPLY);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
ReplySize += RequestSize + SIZEOF_ICMP_ERROR + SIZEOF_IO_STATUS_BLOCK;
|
ReplySize += RequestSize + SIZEOF_ICMP_ERROR + SIZEOF_IO_STATUS_BLOCK;
|
||||||
|
|
||||||
|
@ -566,10 +574,18 @@ Ping(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef _WIN64
|
||||||
|
PICMP_ECHO_REPLY32 pEchoReply;
|
||||||
|
#else
|
||||||
PICMP_ECHO_REPLY pEchoReply;
|
PICMP_ECHO_REPLY pEchoReply;
|
||||||
|
#endif
|
||||||
IPAddr *IP4Addr;
|
IPAddr *IP4Addr;
|
||||||
|
|
||||||
|
#ifdef _WIN64
|
||||||
|
pEchoReply = (PICMP_ECHO_REPLY32)ReplyBuffer;
|
||||||
|
#else
|
||||||
pEchoReply = (PICMP_ECHO_REPLY)ReplyBuffer;
|
pEchoReply = (PICMP_ECHO_REPLY)ReplyBuffer;
|
||||||
|
#endif
|
||||||
|
|
||||||
IP4Addr = (IPAddr *)&pEchoReply->Address;
|
IP4Addr = (IPAddr *)&pEchoReply->Address;
|
||||||
SockAddrIn.sin_family = AF_INET;
|
SockAddrIn.sin_family = AF_INET;
|
||||||
|
|
|
@ -296,8 +296,13 @@ DecodeResponse(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef _WIN64
|
||||||
|
PICMP_ECHO_REPLY32 EchoReplyV4;
|
||||||
|
EchoReplyV4 = (PICMP_ECHO_REPLY32)ReplyBuffer;
|
||||||
|
#else
|
||||||
PICMP_ECHO_REPLY EchoReplyV4;
|
PICMP_ECHO_REPLY EchoReplyV4;
|
||||||
EchoReplyV4 = (PICMP_ECHO_REPLY)ReplyBuffer;
|
EchoReplyV4 = (PICMP_ECHO_REPLY)ReplyBuffer;
|
||||||
|
#endif
|
||||||
Status = EchoReplyV4->Status;
|
Status = EchoReplyV4->Status;
|
||||||
RoundTripTime = EchoReplyV4->RoundTripTime;
|
RoundTripTime = EchoReplyV4->RoundTripTime;
|
||||||
AddressInfo = &EchoReplyV4->Address;
|
AddressInfo = &EchoReplyV4->Address;
|
||||||
|
|
Loading…
Reference in a new issue