Added ICMPv6 support to Linux.

This commit is contained in:
2025-03-27 00:15:02 -07:00
parent d41f71f17d
commit 42b26045a6
6 changed files with 293 additions and 41 deletions

View File

@@ -25,6 +25,8 @@ namespace ehs
IP version;
public:
virtual ~BaseICMP() = default;
BaseICMP();
BaseICMP(IP version);
@@ -39,15 +41,17 @@ namespace ehs
virtual UInt_64 Send(const Str_8 &address, ICMP_Header header, const Byte *data, UInt_64 size);
virtual UInt_64 Receive(Str_8 &address, ICMP_Header header, Serializer<UInt_64> &data);
virtual UInt_64 Receive(Str_8 &address, ICMP_Header &header, Serializer<UInt_64> &data);
void SendEchoRequest(const Str_8 &address, ICMP_EchoRequest er, const Byte *data, UInt_64 size);
virtual void SetReceiveTimeout(UInt_64 timeout);
IP GetVersion() const;
virtual bool IsValid() const;
protected:
static UInt_16 ComputeChecksum(UInt_16 *buffer, Size length);
static UInt_16 ComputeChecksumV4(UInt_16 *buffer, Size length);
};
}