Added ICMPv6 support to Windows.
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user