12 internal static class IpHlpApi
61 [StructLayout(
LayoutKind.Sequential, Pack = 1)]
87 : base(ownsHandle: true)
97 [DllImport(
"iphlpapi.dll", SetLastError =
true)]
100 [DllImport(
"iphlpapi.dll", SetLastError =
true)]
103 [DllImport(
"iphlpapi.dll", SetLastError =
true)]
106 [DllImport(
"iphlpapi.dll", SetLastError =
true)]
107 internal static extern uint
IcmpSendEcho2(
SafeCloseIcmpHandle icmpHandle,
SafeWaitHandle Event,
IntPtr apcRoutine,
IntPtr apcContext, uint ipAddress, [In]
SafeLocalAllocHandle data, ushort dataSize, ref
IPOptions options,
SafeLocalAllocHandle replyBuffer, uint replySize, uint
timeout);
109 [DllImport(
"iphlpapi.dll", SetLastError =
true)]
110 internal static extern uint
Icmp6SendEcho2(
SafeCloseIcmpHandle icmpHandle,
SafeWaitHandle Event,
IntPtr apcRoutine,
IntPtr apcContext,
byte[] sourceSocketAddress,
byte[] destSocketAddress, [In]
SafeLocalAllocHandle data, ushort dataSize, ref
IPOptions options,
SafeLocalAllocHandle replyBuffer, uint replySize, uint
timeout);
115 [StructLayout(
LayoutKind.Sequential, Size = 408)]
116 private struct WSAData
122 [DllImport(
"ws2_32.dll", ExactSpelling =
true, SetLastError =
true)]
125 [DllImport(
"ws2_32.dll",
CharSet =
CharSet.Unicode, SetLastError =
true)]
134 unsafe
static void Initialize()
138 if (socketError != 0)
149 [DllImport(
"ws2_32.dll")]
152 [DllImport(
"ws2_32.dll")]
override bool ReleaseHandle()
static SafeCloseIcmpHandle Icmp6CreateFile()
static SafeCloseIcmpHandle IcmpCreateFile()
static uint IcmpSendEcho2(SafeCloseIcmpHandle icmpHandle, SafeWaitHandle Event, IntPtr apcRoutine, IntPtr apcContext, uint ipAddress, [In] SafeLocalAllocHandle data, ushort dataSize, ref IPOptions options, SafeLocalAllocHandle replyBuffer, uint replySize, uint timeout)
static uint Icmp6SendEcho2(SafeCloseIcmpHandle icmpHandle, SafeWaitHandle Event, IntPtr apcRoutine, IntPtr apcContext, byte[] sourceSocketAddress, byte[] destSocketAddress, [In] SafeLocalAllocHandle data, ushort dataSize, ref IPOptions options, SafeLocalAllocHandle replyBuffer, uint replySize, uint timeout)
static bool IcmpCloseHandle(IntPtr handle)
static SocketError WSACleanup()
static SocketError closesocket([In] IntPtr socketHandle)
static void EnsureInitialized()
static IntPtr WSASocketW([In] AddressFamily addressFamily, [In] System.Net.Internals.SocketType socketType, [In] int protocolType, [In] IntPtr protocolInfo, [In] int group, [In] int flags)
static unsafe SocketError WSAStartup(short wVersionRequested, WSAData *lpWSAData)
static int CompareExchange(ref int location1, int value, int comparand)
IPOptions(PingOptions options)
static readonly IntPtr Zero