mirror of
https://gitea.tendokyu.moe/Dniel97/segatools.git
synced 2024-11-15 09:37:35 +01:00
Merge pull request 'fix(netenv): Print IP addresses properly' (#4) from beerpsi/segatools:fix/print-ip-addresses-properly into develop
Reviewed-on: https://gitea.tendokyu.moe/Dniel97/segatools/pulls/4
This commit is contained in:
commit
a8bd98706f
@ -1,5 +1,4 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <wincrypt.h>
|
|
||||||
#include <iphlpapi.h>
|
#include <iphlpapi.h>
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
@ -372,9 +371,12 @@ static uint32_t WINAPI hook_GetBestRoute(
|
|||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
dprintf("Netenv: GetBestRoute ip4 %x -> ip4 %x\n",
|
uint32_t src_addr = _byteswap_ulong(src_ip);
|
||||||
(int) _byteswap_ulong(src_ip),
|
uint32_t dest_addr = _byteswap_ulong(dest_ip);
|
||||||
(int) _byteswap_ulong(dest_ip));
|
|
||||||
|
dprintf("Netenv: GetBestRoute ip4 %u.%u.%u.%u -> ip4 %u.%u.%u.%u\n",
|
||||||
|
(src_addr >> 24) & 0xff, (src_addr >> 16) & 0xff, (src_addr >> 8) & 0xff, src_addr & 0xff,
|
||||||
|
(dest_addr >> 24) & 0xff, (dest_addr >> 16) & 0xff, (dest_addr >> 8) & 0xff, dest_addr & 0xff);
|
||||||
|
|
||||||
memset(route, 0, sizeof(*route));
|
memset(route, 0, sizeof(*route));
|
||||||
|
|
||||||
@ -469,8 +471,10 @@ static uint32_t WINAPI hook_IcmpSendEcho2(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
dprintf("Netenv: Virtualized ICMP Ping to ip4 %x\n",
|
uint32_t addr = _byteswap_ulong(DestinationAddress);
|
||||||
(int) _byteswap_ulong(DestinationAddress));
|
|
||||||
|
dprintf("Netenv: Virtualized ICMP Ping to ip4 %u.%u.%u.%u\n",
|
||||||
|
(addr >> 24) & 0xff, (addr >> 16) & 0xff, (addr >> 8) & 0xff, addr & 0xff);
|
||||||
|
|
||||||
pong = (ICMP_ECHO_REPLY *) ReplyBuffer;
|
pong = (ICMP_ECHO_REPLY *) ReplyBuffer;
|
||||||
memset(pong, 0, sizeof(*pong));
|
memset(pong, 0, sizeof(*pong));
|
||||||
|
Loading…
Reference in New Issue
Block a user