scripts
This commit is contained in:
@@ -0,0 +1,107 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x02000178 RID: 376
|
||||
internal sealed class Win32IPv4InterfaceProperties : IPv4InterfaceProperties
|
||||
{
|
||||
// Token: 0x06000CB8 RID: 3256 RVA: 0x00025EF0 File Offset: 0x000240F0
|
||||
public Win32IPv4InterfaceProperties(Win32_IP_ADAPTER_INFO ainfo, Win32_MIB_IFROW mib)
|
||||
{
|
||||
this.ainfo = ainfo;
|
||||
this.mib = mib;
|
||||
int num = 0;
|
||||
Win32IPv4InterfaceProperties.GetPerAdapterInfo(mib.Index, null, ref num);
|
||||
this.painfo = new Win32_IP_PER_ADAPTER_INFO();
|
||||
int perAdapterInfo = Win32IPv4InterfaceProperties.GetPerAdapterInfo(mib.Index, this.painfo, ref num);
|
||||
if (perAdapterInfo != 0)
|
||||
{
|
||||
throw new NetworkInformationException(perAdapterInfo);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000CB9 RID: 3257
|
||||
[DllImport("iphlpapi.dll")]
|
||||
private static extern int GetPerAdapterInfo(int IfIndex, Win32_IP_PER_ADAPTER_INFO pPerAdapterInfo, ref int pOutBufLen);
|
||||
|
||||
// Token: 0x17000385 RID: 901
|
||||
// (get) Token: 0x06000CBA RID: 3258 RVA: 0x00025F50 File Offset: 0x00024150
|
||||
public override int Index
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.mib.Index;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000386 RID: 902
|
||||
// (get) Token: 0x06000CBB RID: 3259 RVA: 0x00025F60 File Offset: 0x00024160
|
||||
public override bool IsAutomaticPrivateAddressingActive
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.painfo.AutoconfigActive != 0U;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000387 RID: 903
|
||||
// (get) Token: 0x06000CBC RID: 3260 RVA: 0x00025F74 File Offset: 0x00024174
|
||||
public override bool IsAutomaticPrivateAddressingEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.painfo.AutoconfigEnabled != 0U;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000388 RID: 904
|
||||
// (get) Token: 0x06000CBD RID: 3261 RVA: 0x00025F88 File Offset: 0x00024188
|
||||
public override bool IsDhcpEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.ainfo.DhcpEnabled != 0U;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000389 RID: 905
|
||||
// (get) Token: 0x06000CBE RID: 3262 RVA: 0x00025F9C File Offset: 0x0002419C
|
||||
public override bool IsForwardingEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return Win32_FIXED_INFO.Instance.EnableRouting != 0U;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700038A RID: 906
|
||||
// (get) Token: 0x06000CBF RID: 3263 RVA: 0x00025FB0 File Offset: 0x000241B0
|
||||
public override int Mtu
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.mib.Mtu;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700038B RID: 907
|
||||
// (get) Token: 0x06000CC0 RID: 3264 RVA: 0x00025FC0 File Offset: 0x000241C0
|
||||
public override bool UsesWins
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.ainfo.HaveWins;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000C02 RID: 3074
|
||||
private Win32_IP_ADAPTER_INFO ainfo;
|
||||
|
||||
// Token: 0x04000C03 RID: 3075
|
||||
private Win32_IP_PER_ADAPTER_INFO painfo;
|
||||
|
||||
// Token: 0x04000C04 RID: 3076
|
||||
private Win32_MIB_IFROW mib;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user