Merge pull request #4248 from Unity-Technologies/boehm-gc-alloc-fixed
[mono.git] / mcs / class / System / System.Net.NetworkInformation / IPv4InterfaceProperties.cs
index 9202c0f09a8564eb49657348597f3a4aa050d35f..86fba917ab9079eb6233cc33681d9b15a66960ef 100644 (file)
@@ -31,20 +31,6 @@ using System.IO;
 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;
@@ -137,6 +123,7 @@ namespace System.Net.NetworkInformation {
                }
        }
        
+#if WIN_PLATFORM
        sealed class Win32IPv4InterfaceProperties : IPv4InterfaceProperties
        {
                [DllImport ("iphlpapi.dll")]
@@ -178,7 +165,7 @@ namespace System.Net.NetworkInformation {
 
                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 {
@@ -198,5 +185,6 @@ namespace System.Net.NetworkInformation {
                public IntPtr CurrentDnsServer; // to Win32_IP_ADDR_STRING
                public Win32_IP_ADDR_STRING DnsServerList;
        }
+#endif
 }