mirror of
https://github.com/netchx/netch.git
synced 2026-04-03 19:35:10 +08:00
[Redirector] Support custom icmp delay
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "IPEventHandler.h"
|
||||
|
||||
extern DWORD icmping;
|
||||
|
||||
USHORT IPv4Checksum(PBYTE buffer, ULONG64 size)
|
||||
{
|
||||
UINT32 sum = 0;
|
||||
@@ -76,6 +78,7 @@ void ipSend(const char* buffer, int length, PNF_IP_PACKET_OPTIONS options)
|
||||
data[options->ipHeaderSize + 2] = icmpsum & 0xff;
|
||||
data[options->ipHeaderSize + 3] = (icmpsum >> 8);
|
||||
|
||||
Sleep(icmping);
|
||||
printf("[Redirector][IPEventHandler][ipSend] Fake ICMP response for %d.%d.%d.%d\n", data[12], data[13], data[14], data[15]);
|
||||
|
||||
nf_ipPostReceive((PCHAR)data, length, options);
|
||||
|
||||
Reference in New Issue
Block a user