mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2025-01-30 16:16:04 +00:00
22 lines
440 B
HolyC
22 lines
440 B
HolyC
|
|
||
|
U8 dst_mac[6] = {0xF0, 0x0D, 0xBE, 0xAD, 0xDE, 0xAF};
|
||
|
|
||
|
U32 dst_ip = 0x01020304;
|
||
|
|
||
|
U0 ICMPTest()
|
||
|
{
|
||
|
U8 *data_payload = CAlloc(8);
|
||
|
|
||
|
*(data_payload(U64 *)) = EndianU64(0xDEADC0DEBEEFFADE);
|
||
|
|
||
|
ARPCachePut(dst_ip, dst_mac); // Force entry into ARP Cache so IPV4 can match it with IPV4AddressMACGet
|
||
|
|
||
|
while (TRUE)
|
||
|
{
|
||
|
ICMPReplySend(dst_ip, EndianU16(0xDEAD), EndianU16(0xBEEF), EndianU16(0xC0DE), data_payload, 8);
|
||
|
Sleep(300);
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
ICMPTest;
|