if (!Socket.SupportsIPv4)
throw new NetworkInformationException ();
Win32_MIB_IPSTATS stats;
- GetIPStatisticsEx (out stats, AF_INET);
+ GetIpStatisticsEx (out stats, AF_INET);
return new Win32IPGlobalStatistics (stats);
}
if (!Socket.OSSupportsIPv6)
throw new NetworkInformationException ();
Win32_MIB_IPSTATS stats;
- GetIPStatisticsEx (out stats, AF_INET6);
+ GetIpStatisticsEx (out stats, AF_INET6);
return new Win32IPGlobalStatistics (stats);
}
static extern int GetIcmpStatisticsEx (out Win32_MIB_ICMP_EX pStats, int dwFamily);
[DllImport ("Iphlpapi.dll")]
- static extern int GetIPStatisticsEx (out Win32_MIB_IPSTATS pStats, int dwFamily);
+ static extern int GetIpStatisticsEx (out Win32_MIB_IPSTATS pStats, int dwFamily);
// Win32 structures
#if NET_2_0
using System.Collections.Specialized;
using System.Globalization;
+using System.Runtime.InteropServices;
namespace System.Net.NetworkInformation {
public abstract class IPGlobalStatistics {
}
}
+ [StructLayout (LayoutKind.Sequential)]
struct Win32_MIB_IPSTATS
{
public int Forwarding;