AuroraRuntime/Source/IO/Net/AuNetAdapter.hpp
Reece 85a575eb95 [+] Network interfaces API
[+] Logger IFormatter API
[*] Clean up
2022-12-14 20:08:52 +00:00

47 lines
1.2 KiB
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuNetAdapter.hpp
Date: 2022-11-14
Author: Reece
***/
#pragma once
namespace Aurora::IO::Net
{
struct NetAdapter : INetAdapter
{
const AuString &ToName() override;
const AuString &ToDevice() override;
AuUInt16 GetIndex() override;
EIPProtocol ToFamily() override;
IPAddress ToAddress() override;
IPAddress ToBroadcastAddress() override;
IPAddress ToAnycastAddress() override;
IPAddress ToSubnetMask() override;
IPAddress ToGateway() override;
AuList<IPAddress> GetDNS() override;
// FriendlyName
static AuString GetHostname();
static AuList<AuSPtr<INetAdapter>> GetIPv4s(); // must be called first under lock
static AuList<AuSPtr<INetAdapter>> GetIPv6s(); // followed by me
// other protocols can go here
AuString name;
AuString device;
IPAddress address;
IPAddress broadcast;
IPAddress anycast;
IPAddress subnet;
IPAddress gateway;
AuList<IPAddress> dns;
AuUInt16 index {};
};
}