mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2025-02-23 11:38:32 +00:00

Fix ARP not updating cached entries on ARPCachePut calls. Fix DNS not updating cached entries on DNSCachePut calls. Clean up repeated gross syntax in DHCPOfferParse. Fix Host() and DNSRep IPV4 kludge, use proper switch case block based on result address family type. Change CNetQueueEntry member variable length to packet_length. Remove Debug statements when sockets use AF_INET6 or AF_UNSPEC, change to NetErr. Change UDP message queues to be allocated and initialized when UDPSocket is called, instead of when binding. Standardize filenames in Tests/ folder. Remove old test files. Remove outdated TODO comments.
22 lines
No EOL
440 B
HolyC
Executable file
22 lines
No EOL
440 B
HolyC
Executable file
|
|
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; |