144 lines
4.8 KiB
C#
144 lines
4.8 KiB
C#
using System;
|
|
|
|
namespace System.Net.NetworkInformation
|
|
{
|
|
// Token: 0x02000172 RID: 370
|
|
internal class Win32IPInterfaceProperties2 : IPInterfaceProperties
|
|
{
|
|
// Token: 0x06000C97 RID: 3223 RVA: 0x00025B94 File Offset: 0x00023D94
|
|
public Win32IPInterfaceProperties2(Win32_IP_ADAPTER_ADDRESSES addr, Win32_MIB_IFROW mib4, Win32_MIB_IFROW mib6)
|
|
{
|
|
this.addr = addr;
|
|
this.mib4 = mib4;
|
|
this.mib6 = mib6;
|
|
}
|
|
|
|
// Token: 0x06000C98 RID: 3224 RVA: 0x00025BB4 File Offset: 0x00023DB4
|
|
public override IPv4InterfaceProperties GetIPv4Properties()
|
|
{
|
|
Win32_IP_ADAPTER_INFO adapterInfoByIndex = Win32NetworkInterface2.GetAdapterInfoByIndex(this.mib4.Index);
|
|
return (adapterInfoByIndex == null) ? null : new Win32IPv4InterfaceProperties(adapterInfoByIndex, this.mib4);
|
|
}
|
|
|
|
// Token: 0x06000C99 RID: 3225 RVA: 0x00025BF0 File Offset: 0x00023DF0
|
|
public override IPv6InterfaceProperties GetIPv6Properties()
|
|
{
|
|
Win32_IP_ADAPTER_INFO adapterInfoByIndex = Win32NetworkInterface2.GetAdapterInfoByIndex(this.mib6.Index);
|
|
return (adapterInfoByIndex == null) ? null : new Win32IPv6InterfaceProperties(this.mib6);
|
|
}
|
|
|
|
// Token: 0x1700036B RID: 875
|
|
// (get) Token: 0x06000C9A RID: 3226 RVA: 0x00025C28 File Offset: 0x00023E28
|
|
public override IPAddressInformationCollection AnycastAddresses
|
|
{
|
|
get
|
|
{
|
|
return IPAddressInformationImplCollection.Win32FromAnycast(this.addr.FirstAnycastAddress);
|
|
}
|
|
}
|
|
|
|
// Token: 0x1700036C RID: 876
|
|
// (get) Token: 0x06000C9B RID: 3227 RVA: 0x00025C3C File Offset: 0x00023E3C
|
|
public override IPAddressCollection DhcpServerAddresses
|
|
{
|
|
get
|
|
{
|
|
Win32_IP_ADAPTER_INFO adapterInfoByIndex = Win32NetworkInterface2.GetAdapterInfoByIndex(this.mib4.Index);
|
|
return (adapterInfoByIndex == null) ? Win32IPAddressCollection.Empty : new Win32IPAddressCollection(new Win32_IP_ADDR_STRING[] { adapterInfoByIndex.DhcpServer });
|
|
}
|
|
}
|
|
|
|
// Token: 0x1700036D RID: 877
|
|
// (get) Token: 0x06000C9C RID: 3228 RVA: 0x00025C8C File Offset: 0x00023E8C
|
|
public override IPAddressCollection DnsAddresses
|
|
{
|
|
get
|
|
{
|
|
return Win32IPAddressCollection.FromDnsServer(this.addr.FirstDnsServerAddress);
|
|
}
|
|
}
|
|
|
|
// Token: 0x1700036E RID: 878
|
|
// (get) Token: 0x06000C9D RID: 3229 RVA: 0x00025CA0 File Offset: 0x00023EA0
|
|
public override string DnsSuffix
|
|
{
|
|
get
|
|
{
|
|
return this.addr.DnsSuffix;
|
|
}
|
|
}
|
|
|
|
// Token: 0x1700036F RID: 879
|
|
// (get) Token: 0x06000C9E RID: 3230 RVA: 0x00025CB0 File Offset: 0x00023EB0
|
|
public override GatewayIPAddressInformationCollection GatewayAddresses
|
|
{
|
|
get
|
|
{
|
|
Win32_IP_ADAPTER_INFO adapterInfoByIndex = Win32NetworkInterface2.GetAdapterInfoByIndex(this.mib4.Index);
|
|
return (adapterInfoByIndex == null) ? Win32GatewayIPAddressInformationCollection.Empty : new Win32GatewayIPAddressInformationCollection(new Win32_IP_ADDR_STRING[] { adapterInfoByIndex.GatewayList });
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000370 RID: 880
|
|
// (get) Token: 0x06000C9F RID: 3231 RVA: 0x00025D00 File Offset: 0x00023F00
|
|
public override bool IsDnsEnabled
|
|
{
|
|
get
|
|
{
|
|
return Win32_FIXED_INFO.Instance.EnableDns != 0U;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000371 RID: 881
|
|
// (get) Token: 0x06000CA0 RID: 3232 RVA: 0x00025D14 File Offset: 0x00023F14
|
|
public override bool IsDynamicDnsEnabled
|
|
{
|
|
get
|
|
{
|
|
return this.addr.DdnsEnabled;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000372 RID: 882
|
|
// (get) Token: 0x06000CA1 RID: 3233 RVA: 0x00025D24 File Offset: 0x00023F24
|
|
public override MulticastIPAddressInformationCollection MulticastAddresses
|
|
{
|
|
get
|
|
{
|
|
return MulticastIPAddressInformationImplCollection.Win32FromMulticast(this.addr.FirstMulticastAddress);
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000373 RID: 883
|
|
// (get) Token: 0x06000CA2 RID: 3234 RVA: 0x00025D38 File Offset: 0x00023F38
|
|
public override UnicastIPAddressInformationCollection UnicastAddresses
|
|
{
|
|
get
|
|
{
|
|
Win32_IP_ADAPTER_INFO adapterInfoByIndex = Win32NetworkInterface2.GetAdapterInfoByIndex(this.mib4.Index);
|
|
return (adapterInfoByIndex == null) ? UnicastIPAddressInformationImplCollection.Empty : UnicastIPAddressInformationImplCollection.Win32FromUnicast((int)adapterInfoByIndex.Index, this.addr.FirstUnicastAddress);
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000374 RID: 884
|
|
// (get) Token: 0x06000CA3 RID: 3235 RVA: 0x00025D80 File Offset: 0x00023F80
|
|
public override IPAddressCollection WinsServersAddresses
|
|
{
|
|
get
|
|
{
|
|
Win32_IP_ADAPTER_INFO adapterInfoByIndex = Win32NetworkInterface2.GetAdapterInfoByIndex(this.mib4.Index);
|
|
return (adapterInfoByIndex == null) ? Win32IPAddressCollection.Empty : new Win32IPAddressCollection(new Win32_IP_ADDR_STRING[] { adapterInfoByIndex.PrimaryWinsServer, adapterInfoByIndex.SecondaryWinsServer });
|
|
}
|
|
}
|
|
|
|
// Token: 0x04000BE5 RID: 3045
|
|
private readonly Win32_IP_ADAPTER_ADDRESSES addr;
|
|
|
|
// Token: 0x04000BE6 RID: 3046
|
|
private readonly Win32_MIB_IFROW mib4;
|
|
|
|
// Token: 0x04000BE7 RID: 3047
|
|
private readonly Win32_MIB_IFROW mib6;
|
|
}
|
|
}
|