mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-10-21 03:41:41 +00:00
e9a37ca6a8
* Implement GetCurrentIpConfigInfo This is needed by Rocket League. Also fix GetCurrentIpConfigInfo to not return ipv6 addresses * Address Ac_K comment
23 lines
939 B
C#
23 lines
939 B
C#
using System.Net.NetworkInformation;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService.Types
|
|
{
|
|
[StructLayout(LayoutKind.Sequential, Pack = 1, Size = 0xd)]
|
|
struct IpAddressSetting
|
|
{
|
|
[MarshalAs(UnmanagedType.U1)]
|
|
public bool IsDhcpEnabled;
|
|
public IpV4Address Address;
|
|
public IpV4Address IPv4Mask;
|
|
public IpV4Address GatewayAddress;
|
|
|
|
public IpAddressSetting(IPInterfaceProperties interfaceProperties, UnicastIPAddressInformation unicastIPAddressInformation)
|
|
{
|
|
IsDhcpEnabled = interfaceProperties.DhcpServerAddresses.Count != 0;
|
|
Address = new IpV4Address(unicastIPAddressInformation.Address);
|
|
IPv4Mask = new IpV4Address(unicastIPAddressInformation.IPv4Mask);
|
|
GatewayAddress = new IpV4Address(interfaceProperties.GatewayAddresses[0].Address);
|
|
}
|
|
}
|
|
}
|