0
0
Fork 0
mirror of https://github.com/ryujinx-mirror/ryujinx.git synced 2024-10-19 19:21:41 +00:00
ryujinx-fork/Ryujinx.HLE/HOS/Services/Nifm/StaticService/Types/DnsSetting.cs

22 lines
746 B
C#
Raw Normal View History

using System.Net.NetworkInformation;
using System.Runtime.InteropServices;
namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService.Types
{
[StructLayout(LayoutKind.Sequential, Pack = 1, Size = 9)]
struct DnsSetting
{
[MarshalAs(UnmanagedType.U1)]
public bool IsDynamicDnsEnabled;
public IpV4Address PrimaryDns;
public IpV4Address SecondaryDns;
public DnsSetting(IPInterfaceProperties interfaceProperties)
{
IsDynamicDnsEnabled = interfaceProperties.IsDynamicDnsEnabled;
PrimaryDns = new IpV4Address(interfaceProperties.DnsAddresses[0]);
SecondaryDns = new IpV4Address(interfaceProperties.DnsAddresses[1]);
}
}
}