Ryujinx/Ryujinx.HLE/HOS/Services/Nifm/StaticService/Types/DnsSetting.cs
Thog e9a37ca6a8
Implement GetCurrentIpConfigInfo (#943)
* Implement GetCurrentIpConfigInfo

This is needed by Rocket League.

Also fix GetCurrentIpConfigInfo to not return ipv6 addresses

* Address Ac_K comment
2020-02-17 16:28:41 +01:00

21 lines
746 B
C#

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]);
}
}
}