Added ICMPv6 support to Windows.
Some checks failed
Build & Release / Linux-AMD64-Build (push) Has been cancelled
Build & Release / Linux-AARCH64-Build (push) Has been cancelled
Build & Release / Windows-AMD64-Build (push) Has been cancelled

This commit is contained in:
2025-03-28 20:47:27 -07:00
parent 42b26045a6
commit d8c5327180
6 changed files with 306 additions and 52 deletions

View File

@@ -79,20 +79,18 @@ namespace ehs
return *this;
}
UInt_64 ICMP::Send(const Str_8 &address, ICMP_Header header, const Byte *data, const UInt_64 size)
void ICMP::Release()
{
if (GetVersion() == IP::V6)
return SendV6(address, header, data, size);
if (close(hdl) == -1)
{
EHS_LOG_INT(LogType::ERR, 0, "Failed to close socket.");
return SendV4(address, header, data, size);
}
return;
}
UInt_64 ICMP::Receive(Str_8 &address, ICMP_Header &header, Serializer<UInt_64> &data)
{
if (GetVersion() == IP::V6)
return ReceiveV6(address, header, data);
hdl = EHS_INVALID_SOCKET;
return ReceiveV4(address, header, data);
EHS_LOG_SUCCESS();
}
void ICMP::SetReceiveTimeout(const UInt_64 timeout)