using System.Runtime.InteropServices;
namespace System.Net.NetworkInformation {
- public abstract class IPv4InterfaceProperties {
- protected IPv4InterfaceProperties ()
- {
- }
-
- public abstract int Index { get; }
- public abstract bool IsAutomaticPrivateAddressingActive { get; }
- public abstract bool IsAutomaticPrivateAddressingEnabled { get; }
- public abstract bool IsDhcpEnabled { get; }
- public abstract bool IsForwardingEnabled { get; }
- public abstract int Mtu { get; }
- public abstract bool UsesWins { get; }
- }
-
abstract class UnixIPv4InterfaceProperties : IPv4InterfaceProperties
{
protected UnixNetworkInterface iface;
}
}
-#if !MOBILE
+#if WIN_PLATFORM
sealed class Win32IPv4InterfaceProperties : IPv4InterfaceProperties
{
[DllImport ("iphlpapi.dll")]
public override bool IsForwardingEnabled {
// Is it the right answer? In Vista there is MIB_IPINTERFACEROW.ForwardingEnabled, but not in former versions.
- get { return Win32_FIXED_INFO.Instance.EnableRouting != 0; }
+ get { return Win32NetworkInterface.FixedInfo.EnableRouting != 0; }
}
public override int Mtu {