Added IPv4 ICMP support to Windows.
All checks were successful
Build & Release / Windows-AMD64-Build (push) Successful in 5m1s
Build & Release / Linux-AMD64-Build (push) Successful in 14m41s
Build & Release / Linux-AARCH64-Build (push) Successful in 43m40s

This commit is contained in:
2025-03-26 11:45:54 -07:00
parent c19c0bc80b
commit d41f71f17d
3 changed files with 215 additions and 6 deletions

View File

@@ -1,7 +1,9 @@
#pragma once
#include "ehs/system/OS.h"
#ifdef EHS_OS_WINDOWS
#include "BaseICMP.h"
#include "ICMP_W32.h"
#else
#include "ICMP_LNX.h"
#include "ICMP_LNX.h"
#endif

View File

@@ -4,7 +4,30 @@
namespace ehs
{
class ICMP : public virtual BaseICMP
class ICMP : public BaseICMP
{
private:
Int_32 hdl;
public:
ICMP();
ICMP(IP version);
ICMP(ICMP &&icmp) noexcept;
ICMP(const ICMP &icmp);
ICMP &operator=(ICMP &&icmp) noexcept;
ICMP &operator=(const ICMP &icmp);
UInt_64 Send(const Str_8 &address, ICMP_Header header, const Byte *data, UInt_64 size) override;
UInt_64 Receive(Str_8 &address, ICMP_Header header, Serializer<UInt_64> &data) override;
void SetReceiveTimeout(UInt_64 timeout) override;
bool IsValid() const override;
};
}