scripts
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x020001C5 RID: 453
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal class Win32_FIXED_INFO
|
||||
{
|
||||
// Token: 0x06000EDF RID: 3807
|
||||
[DllImport("iphlpapi.dll", SetLastError = true)]
|
||||
private static extern int GetNetworkParams(byte[] bytes, ref int size);
|
||||
|
||||
// Token: 0x1700050B RID: 1291
|
||||
// (get) Token: 0x06000EE0 RID: 3808 RVA: 0x000296C4 File Offset: 0x000278C4
|
||||
public static Win32_FIXED_INFO Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Win32_FIXED_INFO.fixed_info == null)
|
||||
{
|
||||
Win32_FIXED_INFO.fixed_info = Win32_FIXED_INFO.GetInstance();
|
||||
}
|
||||
return Win32_FIXED_INFO.fixed_info;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000EE1 RID: 3809 RVA: 0x000296E0 File Offset: 0x000278E0
|
||||
private unsafe static Win32_FIXED_INFO GetInstance()
|
||||
{
|
||||
int num = 0;
|
||||
Win32_FIXED_INFO.GetNetworkParams(null, ref num);
|
||||
byte[] array = new byte[num];
|
||||
Win32_FIXED_INFO.GetNetworkParams(array, ref num);
|
||||
Win32_FIXED_INFO win32_FIXED_INFO = new Win32_FIXED_INFO();
|
||||
fixed (byte* ptr = (ref array != null && array.Length != 0 ? ref array[0] : ref *null))
|
||||
{
|
||||
Marshal.PtrToStructure((IntPtr)((void*)ptr), win32_FIXED_INFO);
|
||||
}
|
||||
return win32_FIXED_INFO;
|
||||
}
|
||||
|
||||
// Token: 0x04000D27 RID: 3367
|
||||
private const int MAX_HOSTNAME_LEN = 128;
|
||||
|
||||
// Token: 0x04000D28 RID: 3368
|
||||
private const int MAX_DOMAIN_NAME_LEN = 128;
|
||||
|
||||
// Token: 0x04000D29 RID: 3369
|
||||
private const int MAX_SCOPE_ID_LEN = 256;
|
||||
|
||||
// Token: 0x04000D2A RID: 3370
|
||||
private static Win32_FIXED_INFO fixed_info;
|
||||
|
||||
// Token: 0x04000D2B RID: 3371
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 132)]
|
||||
public string HostName;
|
||||
|
||||
// Token: 0x04000D2C RID: 3372
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 132)]
|
||||
public string DomainName;
|
||||
|
||||
// Token: 0x04000D2D RID: 3373
|
||||
public IntPtr CurrentDnsServer;
|
||||
|
||||
// Token: 0x04000D2E RID: 3374
|
||||
public Win32_IP_ADDR_STRING DnsServerList;
|
||||
|
||||
// Token: 0x04000D2F RID: 3375
|
||||
public NetBiosNodeType NodeType;
|
||||
|
||||
// Token: 0x04000D30 RID: 3376
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
|
||||
public string ScopeId;
|
||||
|
||||
// Token: 0x04000D31 RID: 3377
|
||||
public uint EnableRouting;
|
||||
|
||||
// Token: 0x04000D32 RID: 3378
|
||||
public uint EnableProxy;
|
||||
|
||||
// Token: 0x04000D33 RID: 3379
|
||||
public uint EnableDns;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user