AuroraRuntime/Include/Aurora/IO/Net/INetAdapter.hpp
2023-12-01 13:26:44 +00:00

43 lines
1.2 KiB
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: INetAdapter.hpp
Date: 2022-12-11
Author: Reece
***/
#pragma once
namespace Aurora::IO::Net
{
AUE_DEFINE_VA(ENetworkAdapterStatus, eUp, eDown);
AUE_DEFINE_VA(ENetworkAdapterType, eUnknown, eOther, eIPGRE, eTunnel, eLoopback, eEthernet, eIEEE80211, eMobileNetwork, eTokenRing);
struct INetAdapter
{
virtual const AuString &ToName() = 0;
virtual const AuString &ToDevice() = 0;
virtual AuUInt16 GetIndex() = 0;
virtual ENetworkAdapterType ToNetworkType() = 0;
virtual ENetworkAdapterStatus ToStatus() = 0;
virtual EIPProtocol ToFamily() = 0;
virtual IPAddress ToAddress() = 0;
virtual IPAddress ToBroadcastAddress() = 0;
virtual IPAddress ToAnycastAddress() = 0;
virtual IPAddress ToSubnetMask() = 0;
virtual IPAddress ToGateway() = 0;
virtual AuArray<AuUInt8, 8> ToMacAddress() = 0;
virtual bool HasDHCP() = 0;
virtual AuUInt32 GetMTU() = 0;
virtual AuUInt64 GetTransmitBytesPerSec() = 0;
virtual AuUInt64 GetReceiveBytesPerSec() = 0;
virtual AuList<IPAddress> GetDNS() = 0;
};
};