Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Interop.cs
Go to the documentation of this file.
1using System;
3
4internal static class Interop
5{
6 internal static class IpHlpApi
7 {
8 public struct FIXED_INFO
9 {
10 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 132)]
11 public string hostName;
12
13 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 132)]
14 public string domainName;
15
17
18 public IP_ADDR_STRING DnsServerList;
19
20 public uint nodeType;
21
22 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
23 public string scopeId;
24
25 public bool enableRouting;
26
27 public bool enableProxy;
28
29 public bool enableDns;
30 }
31
32 public struct IP_ADDR_STRING
33 {
34 public IntPtr Next;
35
36 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
37 public string IpAddress;
38
39 [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
40 public string IpMask;
41
42 public uint Context;
43 }
44
45 [DllImport("iphlpapi.dll", ExactSpelling = true)]
46 internal static extern uint GetNetworkParams(IntPtr pFixedInfo, ref uint pOutBufLen);
47
48 [DllImport("iphlpapi.dll", SetLastError = true)]
49 internal static extern uint if_nametoindex(string name);
50 }
51}
static uint GetNetworkParams(IntPtr pFixedInfo, ref uint pOutBufLen)
static uint if_nametoindex(string name)
IP_ADDR_STRING DnsServerList
Definition Interop.cs:22