Merge pull request #3003 from marek-safar/rs-NetworkInformation
authorMarek Safar <marek.safar@gmail.com>
Wed, 18 May 2016 14:18:28 +0000 (16:18 +0200)
committerMarek Safar <marek.safar@gmail.com>
Wed, 18 May 2016 14:18:28 +0000 (16:18 +0200)
[System] Common NetworkInformation code from referencesource

52 files changed:
mcs/class/System/System.Net.NetworkInformation/DuplicateAddressDetectionState.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/GatewayIPAddressInformation.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/GatewayIPAddressInformationCollection.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/IPAddressCollection.cs
mcs/class/System/System.Net.NetworkInformation/IPAddressInformation.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/IPAddressInformationCollection.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/IPGlobalProperties.cs
mcs/class/System/System.Net.NetworkInformation/IPGlobalStatistics.cs
mcs/class/System/System.Net.NetworkInformation/IPInterfaceProperties.cs
mcs/class/System/System.Net.NetworkInformation/IPStatus.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/IPv4InterfaceProperties.cs
mcs/class/System/System.Net.NetworkInformation/IPv6InterfaceProperties.cs
mcs/class/System/System.Net.NetworkInformation/IcmpV4Statistics.cs
mcs/class/System/System.Net.NetworkInformation/IcmpV6Statistics.cs
mcs/class/System/System.Net.NetworkInformation/MulticastIPAddressInformation.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/MulticastIPAddressInformationCollection.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/NetBiosNodeType.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/NetworkAddressChangedEventHandler.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/NetworkAvailabilityChangedEventHandler.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/NetworkAvailabilityEventArgs.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/NetworkInformationAccess.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/NetworkInformationException.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/NetworkInformationPermission.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/NetworkInformationPermissionAttribute.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs
mcs/class/System/System.Net.NetworkInformation/NetworkInterfaceComponent.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/NetworkInterfaceType.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/OperationalStatus.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/PhysicalAddress.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/PingException.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/PingOptions.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/PingReply.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/PrefixOrigin.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/SuffixOrigin.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/TcpConnectionInformation.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/TcpState.cs [deleted file]
mcs/class/System/System.Net.NetworkInformation/TcpStatistics.cs
mcs/class/System/System.Net.NetworkInformation/UdpStatistics.cs
mcs/class/System/System.Net.NetworkInformation/UnicastIPAddressInformation.cs
mcs/class/System/System.Net.NetworkInformation/UnicastIPAddressInformationCollection.cs [deleted file]
mcs/class/System/System.dll.sources
mcs/class/System/mobile_System.dll.sources
mcs/class/referencesource/System/net/System/Net/NetworkInformation/IPGlobalProperties.cs
mcs/class/referencesource/System/net/System/Net/NetworkInformation/NetworkAddressChange.cs
mcs/class/referencesource/System/net/System/Net/NetworkInformation/PingOptions.cs
mcs/class/referencesource/System/net/System/Net/NetworkInformation/PingReply.cs
mcs/class/referencesource/System/net/System/Net/NetworkInformation/SystemGatewayIPAddressInformation.cs
mcs/class/referencesource/System/net/System/Net/NetworkInformation/SystemIPAddressInformation.cs
mcs/class/referencesource/System/net/System/Net/NetworkInformation/SystemIPGlobalProperties.cs
mcs/class/referencesource/System/net/System/Net/NetworkInformation/SystemTcpConnection.cs
mcs/class/referencesource/System/net/System/Net/NetworkInformation/SystemUnicastIPAddressInformation.cs
mcs/class/referencesource/System/net/System/Net/_SafeNetHandles.cs

diff --git a/mcs/class/System/System.Net.NetworkInformation/DuplicateAddressDetectionState.cs b/mcs/class/System/System.Net.NetworkInformation/DuplicateAddressDetectionState.cs
deleted file mode 100644 (file)
index 5625522..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// System.Net.NetworkInformation.DuplicateAddressDetectionState
-//
-// Author:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//
-// Copyright (c) 2006 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-namespace System.Net.NetworkInformation {
-       public enum DuplicateAddressDetectionState {
-               Invalid,
-               Tentative,
-               Duplicate,
-               Deprecated,
-               Preferred
-       }
-}
-
diff --git a/mcs/class/System/System.Net.NetworkInformation/GatewayIPAddressInformation.cs b/mcs/class/System/System.Net.NetworkInformation/GatewayIPAddressInformation.cs
deleted file mode 100644 (file)
index ea761a3..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-// System.Net.NetworkInformation.GatewayIPAddressInformation
-//
-// Authors:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//     Atsushi Enomoto (atsushi@ximian.com)
-//
-// Copyright (c) 2006-2007 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-namespace System.Net.NetworkInformation {
-       public abstract class GatewayIPAddressInformation {
-               protected GatewayIPAddressInformation ()
-               {
-               }
-               
-               public abstract IPAddress Address { get; }
-       }
-
-       class GatewayIPAddressInformationImpl : GatewayIPAddressInformation
-       {
-               IPAddress address;
-
-               public GatewayIPAddressInformationImpl (IPAddress address)
-               {
-                       this.address = address;
-               }
-               
-               public override IPAddress Address {
-                       get { return address; }
-               }
-       }
-}
-
diff --git a/mcs/class/System/System.Net.NetworkInformation/GatewayIPAddressInformationCollection.cs b/mcs/class/System/System.Net.NetworkInformation/GatewayIPAddressInformationCollection.cs
deleted file mode 100644 (file)
index 14767dd..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-//
-// System.Net.NetworkInformation.GatewayIPAddressInformationCollection
-//
-// Authors:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//     Atsushi Enomoto (atsushi@ximian.com)
-//
-// Copyright (c) 2006-2007 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System.Collections;
-using System.Collections.Generic;
-using System.Runtime.InteropServices;
-
-namespace System.Net.NetworkInformation {
-       public class GatewayIPAddressInformationCollection : ICollection<GatewayIPAddressInformation>, IEnumerable<GatewayIPAddressInformation>, IEnumerable {
-               List<GatewayIPAddressInformation> list = new List<GatewayIPAddressInformation> ();
-               
-               protected GatewayIPAddressInformationCollection ()
-               {
-               }
-
-               public virtual void Add (GatewayIPAddressInformation address)
-               {
-                       if (IsReadOnly)
-                               throw new NotSupportedException ("The collection is read-only.");
-                       list.Add (address);
-               }
-
-               public virtual void Clear ()
-               {
-                       if (IsReadOnly)
-                               throw new NotSupportedException ("The collection is read-only.");
-                       list.Clear ();
-               }
-
-               public virtual bool Contains (GatewayIPAddressInformation address)
-               {
-                       return list.Contains (address);
-               }
-
-               public virtual void CopyTo (GatewayIPAddressInformation [] array, int offset)
-               {
-                       list.CopyTo (array, offset);
-               }
-
-               public virtual IEnumerator<GatewayIPAddressInformation> GetEnumerator ()
-               {
-                       return ((IEnumerable<GatewayIPAddressInformation>)list).GetEnumerator ();
-               }
-
-               public virtual bool Remove (GatewayIPAddressInformation address)
-               {
-                       if (IsReadOnly)
-                               throw new NotSupportedException ("The collection is read-only.");
-                       return list.Remove (address);
-               }
-
-               IEnumerator IEnumerable.GetEnumerator ()
-               {
-                       return list.GetEnumerator ();
-               }
-
-               public virtual int Count {
-                       get { return list.Count; }
-               }
-
-               public virtual bool IsReadOnly {
-                       get { return true; }
-               }
-
-               public virtual GatewayIPAddressInformation this [int index] {
-                       get { return list [index]; }
-               }
-       }
-
-#if !MOBILE
-       class Win32GatewayIPAddressInformationCollection : GatewayIPAddressInformationCollection
-       {
-               public static readonly Win32GatewayIPAddressInformationCollection Empty = new Win32GatewayIPAddressInformationCollection (true);
-
-               bool is_readonly;
-
-               private Win32GatewayIPAddressInformationCollection (bool isReadOnly)
-               {
-                       this.is_readonly = isReadOnly;
-               }
-
-               public Win32GatewayIPAddressInformationCollection (params Win32_IP_ADDR_STRING [] al)
-               {
-                       foreach (Win32_IP_ADDR_STRING a in al) {
-                               if (String.IsNullOrEmpty (a.IpAddress))
-                                       continue;
-                               Add (new GatewayIPAddressInformationImpl (IPAddress.Parse (a.IpAddress)));
-                               AddSubsequently (a.Next);
-                       }
-                       is_readonly = true;
-               }
-
-               void AddSubsequently (IntPtr head)
-               {
-                       Win32_IP_ADDR_STRING a;
-                       for (IntPtr p = head; p != IntPtr.Zero; p = a.Next) {
-                               a = (Win32_IP_ADDR_STRING) Marshal.PtrToStructure (p, typeof (Win32_IP_ADDR_STRING));
-                               Add (new GatewayIPAddressInformationImpl (IPAddress.Parse (a.IpAddress)));
-                       }
-               }
-
-               public override bool IsReadOnly {
-                       get { return is_readonly; }
-               }
-       }
-#endif
-
-       class UnixGatewayIPAddressInformationCollection : GatewayIPAddressInformationCollection
-       {
-               public static readonly UnixGatewayIPAddressInformationCollection Empty = new UnixGatewayIPAddressInformationCollection (true);
-
-               bool is_readonly;
-
-               private UnixGatewayIPAddressInformationCollection (bool isReadOnly)
-               {
-                       this.is_readonly = isReadOnly;
-               }
-
-               public UnixGatewayIPAddressInformationCollection (IPAddressCollection col)
-               {
-                       foreach (IPAddress a in col)
-                               Add (new GatewayIPAddressInformationImpl (a));
-                       this.is_readonly = true;
-               }
-               
-               public override bool IsReadOnly {
-                       get { return is_readonly; }
-               }
-       }
-}
-
index 3900ac1f192f00d9d8d6f91690e8f010644ce870..2b39ff8311c427735dc99ddcab36b62839b8590b 100644 (file)
@@ -33,72 +33,6 @@ using System.Net;
 using System.Runtime.InteropServices;
 
 namespace System.Net.NetworkInformation {
-       public class IPAddressCollection : ICollection<IPAddress>, IEnumerable<IPAddress>, IEnumerable {
-               IList <IPAddress> list = new List<IPAddress> ();
-
-               protected internal IPAddressCollection ()
-               {
-               }
-
-               internal void SetReadOnly ()
-               {
-                       if (!IsReadOnly)
-                               list = ((List<IPAddress>) list).AsReadOnly ();
-               }
-
-               public virtual void Add (IPAddress address)
-               {
-                       if (IsReadOnly)
-                               throw new NotSupportedException ("The collection is read-only.");
-                       list.Add (address);
-               }
-
-               public virtual void Clear ()
-               {
-                       if (IsReadOnly)
-                               throw new NotSupportedException ("The collection is read-only.");
-                       list.Clear ();
-               }
-
-               public virtual bool Contains (IPAddress address)
-               {
-                       return list.Contains (address);
-               }
-
-               public virtual void CopyTo (IPAddress [] array, int offset)
-               {
-                       list.CopyTo (array, offset);
-               }
-
-               public virtual IEnumerator<IPAddress> GetEnumerator ()
-               {
-                       return ((IEnumerable<IPAddress>)list).GetEnumerator ();
-               }
-
-               public virtual bool Remove (IPAddress address)
-               {
-                       if (IsReadOnly)
-                               throw new NotSupportedException ("The collection is read-only.");
-                       return list.Remove (address);
-               }
-
-               IEnumerator IEnumerable.GetEnumerator ()
-               {
-                       return list.GetEnumerator ();
-               }
-
-               public virtual int Count {
-                       get { return list.Count; }
-               }
-
-               public virtual bool IsReadOnly {
-                       get { return list.IsReadOnly; }
-               }
-
-               public virtual IPAddress this [int index] {
-                       get { return list [index]; }
-               }
-       }
 
 #if !MOBILE
        class Win32IPAddressCollection : IPAddressCollection
diff --git a/mcs/class/System/System.Net.NetworkInformation/IPAddressInformation.cs b/mcs/class/System/System.Net.NetworkInformation/IPAddressInformation.cs
deleted file mode 100644 (file)
index 092ba2e..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-//
-// System.Net.NetworkInformation.IPAddressInformation
-//
-// Authors:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//     Atsushi Enomoto (atsushi@ximian.com)
-//
-// Copyright (c) 2006-2007 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-
-namespace System.Net.NetworkInformation {
-       public abstract class IPAddressInformation {
-               protected IPAddressInformation ()
-               {
-               }
-               
-               public abstract IPAddress Address { get; }
-               public abstract bool IsDnsEligible { get; }
-               public abstract bool IsTransient { get; }
-       }
-
-       class IPAddressInformationImpl : IPAddressInformation 
-       {
-               IPAddress address;
-               bool is_dns_eligible, is_transient;
-
-               public IPAddressInformationImpl (IPAddress address, bool isDnsEligible, bool isTransient)
-               {
-                       this.address = address;
-                       this.is_dns_eligible = isDnsEligible;
-                       this.is_transient = isTransient;
-               }
-
-               public override IPAddress Address {
-                       get { return address; }
-               }
-
-               public override bool IsDnsEligible {
-                       get { return is_dns_eligible; }
-               }
-
-               [MonoTODO ("Always false on Linux")]
-               public override bool IsTransient {
-                       get { return is_transient; }
-               }
-       }
-}
-
diff --git a/mcs/class/System/System.Net.NetworkInformation/IPAddressInformationCollection.cs b/mcs/class/System/System.Net.NetworkInformation/IPAddressInformationCollection.cs
deleted file mode 100644 (file)
index 1492fe0..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-//
-// System.Net.NetworkInformation.IPAddressInformationCollection
-//
-// Authors:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//     Atsushi Enomoto (atsushi@ximian.com)
-//
-// Copyright (c) 2006-2007 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Runtime.InteropServices;
-
-namespace System.Net.NetworkInformation {
-       public class IPAddressInformationCollection : ICollection<IPAddressInformation>, IEnumerable<IPAddressInformation>, IEnumerable {
-               List <IPAddressInformation> list = new List <IPAddressInformation> ();
-
-               internal IPAddressInformationCollection ()
-               {
-               }
-
-               public virtual void Add (IPAddressInformation address)
-               {
-                       if (IsReadOnly)
-                               throw new NotSupportedException ("The collection is read-only.");
-                       list.Add (address);
-               }
-
-               public virtual void Clear ()
-               {
-                       if (IsReadOnly)
-                               throw new NotSupportedException ("The collection is read-only.");
-                       list.Clear ();
-               }
-
-               public virtual bool Contains (IPAddressInformation address)
-               {
-                       return list.Contains (address);
-               }
-
-               public virtual void CopyTo (IPAddressInformation [] array, int offset)
-               {
-                       list.CopyTo (array, offset);
-               }
-
-               public virtual IEnumerator<IPAddressInformation> GetEnumerator ()
-               {
-                       return ((IEnumerable<IPAddressInformation>)list).GetEnumerator ();
-               }
-
-               public virtual bool Remove (IPAddressInformation address)
-               {
-                       if (IsReadOnly)
-                               throw new NotSupportedException ("The collection is read-only.");
-                       return list.Remove (address);
-               }
-
-               IEnumerator IEnumerable.GetEnumerator ()
-               {
-                       return list.GetEnumerator ();
-               }
-
-               public virtual int Count {
-                       get { return list.Count; }
-               }
-
-               public virtual bool IsReadOnly {
-                       get { return true; }
-               }
-
-               public virtual IPAddressInformation this [int index] {
-                       get { return list [index]; }
-               }
-       }
-
-       class IPAddressInformationImplCollection : IPAddressInformationCollection
-       {
-               public static readonly IPAddressInformationImplCollection Empty = new IPAddressInformationImplCollection (true);
-
-               bool is_readonly;
-
-               // for static methods
-               IPAddressInformationImplCollection (bool isReadOnly)
-               {
-                       is_readonly = isReadOnly;
-               }
-
-               public override bool IsReadOnly {
-                       get { return is_readonly; }
-               }
-
-#if !MOBILE
-               public static IPAddressInformationCollection Win32FromAnycast (IntPtr ptr)
-               {
-                       IPAddressInformationImplCollection c = new IPAddressInformationImplCollection (false);
-                       Win32_IP_ADAPTER_ANYCAST_ADDRESS a;
-                       for (IntPtr p = ptr; p != IntPtr.Zero; p = a.Next) {
-                               a = (Win32_IP_ADAPTER_ANYCAST_ADDRESS) Marshal.PtrToStructure (p, typeof (Win32_IP_ADAPTER_ANYCAST_ADDRESS));
-                               c.Add (new IPAddressInformationImpl (
-                                      a.Address.GetIPAddress (),
-                                      a.LengthFlags.IsDnsEligible,
-                                      a.LengthFlags.IsTransient));
-                       }
-                       c.is_readonly = true;
-                       return c;
-               }
-#endif
-
-               public static IPAddressInformationImplCollection LinuxFromAnycast (IList<IPAddress> addresses)
-               {
-                       IPAddressInformationImplCollection c = new IPAddressInformationImplCollection (false);
-                       foreach (IPAddress address in addresses) {
-                               c.Add (new IPAddressInformationImpl (address, false, false));
-                       }
-                       c.is_readonly = true;
-                       return c;
-               }
-       }
-}
-
index b22a33c9ad541f5e1e196b79841c9ce1f2f2e6bb..be2d13b71c02383937747b08837e1de486198005 100644 (file)
@@ -37,62 +37,6 @@ using System.Runtime.InteropServices;
 using System.Text;
 
 namespace System.Net.NetworkInformation {
-       public abstract class IPGlobalProperties {
-               protected IPGlobalProperties ()
-               {
-               }
-
-               public static IPGlobalProperties GetIPGlobalProperties ()
-               {
-#if MONODROID
-                       return new AndroidIPGlobalProperties ();
-#elif MONOTOUCH || XAMMAC || MOBILE_STATIC
-                       return new UnixIPGlobalProperties ();
-#else
-                       switch (Environment.OSVersion.Platform) {
-                       case PlatformID.Unix:
-                               MibIPGlobalProperties impl = null;
-                               if (Directory.Exists (MibIPGlobalProperties.ProcDir)) {
-                                       impl = new MibIPGlobalProperties (MibIPGlobalProperties.ProcDir);
-                                       if (File.Exists (impl.StatisticsFile))
-                                               return impl;
-                               }
-                               if (Directory.Exists (MibIPGlobalProperties.CompatProcDir)) {
-                                       impl = new MibIPGlobalProperties (MibIPGlobalProperties.CompatProcDir);
-                                       if (File.Exists (impl.StatisticsFile))
-                                               return impl;
-                               }
-                               return new UnixIPGlobalProperties ();
-                       default:
-                               return new Win32IPGlobalProperties ();
-                       }
-#endif
-               }
-
-               internal static IPGlobalProperties InternalGetIPGlobalProperties()
-               {
-                       return GetIPGlobalProperties ();
-               }
-
-               public abstract TcpConnectionInformation [] GetActiveTcpConnections ();
-               public abstract IPEndPoint [] GetActiveTcpListeners ();
-               public abstract IPEndPoint [] GetActiveUdpListeners ();
-               public abstract IcmpV4Statistics GetIcmpV4Statistics ();
-               public abstract IcmpV6Statistics GetIcmpV6Statistics ();
-               public abstract IPGlobalStatistics GetIPv4GlobalStatistics ();
-               public abstract IPGlobalStatistics GetIPv6GlobalStatistics ();
-               public abstract TcpStatistics GetTcpIPv4Statistics ();
-               public abstract TcpStatistics GetTcpIPv6Statistics ();
-               public abstract UdpStatistics GetUdpIPv4Statistics ();
-               public abstract UdpStatistics GetUdpIPv6Statistics ();
-
-               public abstract string DhcpScopeName { get; }
-               public abstract string DomainName { get; }
-               public abstract string HostName { get; }
-               public abstract bool IsWinsProxy { get; }
-               public abstract NetBiosNodeType NodeType { get; }
-       }
-
        abstract class CommonUnixIPGlobalProperties : IPGlobalProperties
        {
                [DllImport ("libc")]
@@ -343,7 +287,7 @@ namespace System.Net.NetworkInformation {
                                IPEndPoint local = ToEndpoint (list [i] [1]);
                                IPEndPoint remote = ToEndpoint (list [i] [2]);
                                TcpState state = (TcpState) int.Parse (list [i] [3], NumberStyles.HexNumber);
-                               ret [i] = new TcpConnectionInformationImpl (local, remote, state);
+                               ret [i] = new SystemTcpConnectionInformation (local, remote, state);
                        }
                        return ret;
                }
@@ -690,7 +634,7 @@ namespace System.Net.NetworkInformation {
                        }
 
                        public TcpConnectionInformation TcpInfo {
-                               get { return new TcpConnectionInformationImpl (LocalEndPoint, RemoteEndPoint, State); }
+                               get { return new SystemTcpConnectionInformation (LocalEndPoint, RemoteEndPoint, State); }
                        }
                }
 
@@ -714,7 +658,7 @@ namespace System.Net.NetworkInformation {
                        }
 
                        public TcpConnectionInformation TcpInfo {
-                               get { return new TcpConnectionInformationImpl (LocalEndPoint, RemoteEndPoint, State); }
+                               get { return new SystemTcpConnectionInformation (LocalEndPoint, RemoteEndPoint, State); }
                        }
                }
 
index 749be358302b0390c4d6454279649f045cd58d69..7822dfc6f360b7c6f045047d4b6135219b03100f 100644 (file)
@@ -31,35 +31,6 @@ using System.Globalization;
 using System.Runtime.InteropServices;
 
 namespace System.Net.NetworkInformation {
-       public abstract class IPGlobalStatistics {
-               protected IPGlobalStatistics ()
-               {
-               }
-
-               public abstract int DefaultTtl { get; }
-               public abstract bool ForwardingEnabled { get; }
-               public abstract int NumberOfInterfaces { get; }
-               public abstract int NumberOfIPAddresses { get; }
-               public abstract int NumberOfRoutes { get; }
-               public abstract long OutputPacketRequests { get; }
-               public abstract long OutputPacketRoutingDiscards { get; }
-               public abstract long OutputPacketsDiscarded { get; }
-               public abstract long OutputPacketsWithNoRoute { get; }
-               public abstract long PacketFragmentFailures { get; }
-               public abstract long PacketReassembliesRequired { get; }
-               public abstract long PacketReassemblyFailures { get; }
-               public abstract long PacketReassemblyTimeout { get; }
-               public abstract long PacketsFragmented { get; }
-               public abstract long PacketsReassembled { get; }
-               public abstract long ReceivedPackets { get; }
-               public abstract long ReceivedPacketsDelivered { get; }
-               public abstract long ReceivedPacketsDiscarded { get; }
-               public abstract long ReceivedPacketsForwarded { get; }
-               public abstract long ReceivedPacketsWithAddressErrors { get; }
-               public abstract long ReceivedPacketsWithHeadersErrors { get; }
-               public abstract long ReceivedPacketsWithUnknownProtocol { get; }
-       }
-
        class MibIPGlobalStatistics : IPGlobalStatistics
        {
                StringDictionary dic;
index 3a37594d7553aeb1528d170399781c88f97dce47..4ffe6c81f15fe320ce4815fa176c1f7e0744b0a0 100644 (file)
@@ -32,28 +32,9 @@ using System.IO;
 using System.Net.Sockets;
 using System.Runtime.CompilerServices;
 using System.Text.RegularExpressions;
+using System.Runtime.InteropServices;
 
 namespace System.Net.NetworkInformation {
-       public abstract class IPInterfaceProperties {
-               protected IPInterfaceProperties ()
-               {
-               }
-
-               public abstract IPv4InterfaceProperties GetIPv4Properties ();
-               public abstract IPv6InterfaceProperties GetIPv6Properties ();
-
-               public abstract IPAddressInformationCollection AnycastAddresses { get; }
-               public abstract IPAddressCollection DhcpServerAddresses { get; }
-               public abstract IPAddressCollection DnsAddresses { get; }
-               public abstract string DnsSuffix { get; }
-               public abstract GatewayIPAddressInformationCollection GatewayAddresses { get; }
-               public abstract bool IsDnsEnabled { get; }
-               public abstract bool IsDynamicDnsEnabled { get; }
-               public abstract MulticastIPAddressInformationCollection MulticastAddresses { get; }
-               public abstract UnicastIPAddressInformationCollection UnicastAddresses { get; }
-               public abstract IPAddressCollection WinsServersAddresses { get; }
-       }
-
        abstract class UnixIPInterfaceProperties : IPInterfaceProperties
        {
                protected IPv4InterfaceProperties ipv4iface_properties;
@@ -98,7 +79,7 @@ namespace System.Net.NetworkInformation {
                                                        try {
                                                                str = match.Groups ["address"].Value;
                                                                str = str.Trim ();
-                                                               dns_servers.Add (IPAddress.Parse (str));
+                                                               dns_servers.InternalAdd (IPAddress.Parse (str));
                                                        } catch {
                                                        }
                                                } else {
@@ -112,22 +93,16 @@ namespace System.Net.NetworkInformation {
                                        }
                                }
                        } catch {
-                       } finally {
-                               dns_servers.SetReadOnly ();
                        }
                }
 
                public override IPAddressInformationCollection AnycastAddresses {
                        get {
-                               List<IPAddress> anycastAddresses = new List<IPAddress> ();
-                               /* XXX:
+                               var c = new IPAddressInformationCollection ();
                                foreach (IPAddress address in addresses) {
-                                       if (is_anycast_address (address)) {
-                                               anycastAddresses.Add (address);
-                                       }
+                                       c.InternalAdd (new SystemIPAddressInformation (address, false, false));
                                }
-                               */
-                               return IPAddressInformationImplCollection.LinuxFromAnycast (anycastAddresses);
+                               return c;
                        }
                }
 
@@ -138,7 +113,6 @@ namespace System.Net.NetworkInformation {
                                // that all store their configuration differently.
                                // I'm not sure what to do here.
                                IPAddressCollection coll = new IPAddressCollection ();
-                               coll.SetReadOnly ();
                                return coll;
                        }
                }
@@ -173,37 +147,37 @@ namespace System.Net.NetworkInformation {
 
                public override MulticastIPAddressInformationCollection MulticastAddresses {
                        get {
-                               List<IPAddress> multicastAddresses = new List<IPAddress> ();
+                               var multicastAddresses = new MulticastIPAddressInformationCollection ();
                                foreach (IPAddress address in addresses) {
                                        byte[] addressBytes = address.GetAddressBytes ();
                                        if (addressBytes[0] >= 224 && addressBytes[0] <= 239) {
-                                               multicastAddresses.Add (address);
+                                               multicastAddresses.InternalAdd (new SystemMulticastIPAddressInformation (new SystemIPAddressInformation (address, true, false)));
                                        }
                                }
-                               return MulticastIPAddressInformationImplCollection.LinuxFromList (multicastAddresses);
+                               return multicastAddresses;
                        }
                }
 
                public override UnicastIPAddressInformationCollection UnicastAddresses {
                        get {
-                               List<IPAddress> unicastAddresses = new List<IPAddress> ();
+                               var unicastAddresses = new UnicastIPAddressInformationCollection ();
                                foreach (IPAddress address in addresses) {
                                        switch (address.AddressFamily) {
                                                case AddressFamily.InterNetwork:
                                                        byte top = address.GetAddressBytes () [0];
                                                        if (top >= 224 && top <= 239)
                                                                continue;
-                                                       unicastAddresses.Add (address);
+                                                       unicastAddresses.InternalAdd (new LinuxUnicastIPAddressInformation (address));
                                                        break;
 
                                                case AddressFamily.InterNetworkV6:
                                                        if (address.IsIPv6Multicast)
                                                                continue;
-                                                       unicastAddresses.Add (address);
+                                                       unicastAddresses.InternalAdd (new LinuxUnicastIPAddressInformation (address));
                                                        break;
                                        }
                                }
-                               return UnicastIPAddressInformationImplCollection.LinuxFromList (unicastAddresses);
+                               return unicastAddresses;
                        }
                }
 
@@ -218,8 +192,6 @@ namespace System.Net.NetworkInformation {
 
        class LinuxIPInterfaceProperties : UnixIPInterfaceProperties
        {
-               IPAddressCollection gateways;
-
                public LinuxIPInterfaceProperties (LinuxNetworkInterface iface, List <IPAddress> addresses)
                        : base (iface, addresses)
                {
@@ -233,8 +205,9 @@ namespace System.Net.NetworkInformation {
                        return ipv4iface_properties;
                }
 
-               void ParseRouteInfo (string iface)
+               IPAddressCollection ParseRouteInfo (string iface)
                {
+                       var col = new IPAddressCollection ();
                        try {
                                using (StreamReader reader = new StreamReader ("/proc/net/route")) {
                                        string line;
@@ -255,31 +228,26 @@ namespace System.Net.NetworkInformation {
                                                                        continue;
                                                        }
                                                        IPAddress ip = new IPAddress (ipbytes);
-                                                       if (!ip.Equals (IPAddress.Any) && !gateways.Contains (ip))
-                                                               gateways.Add (ip);
+                                                       if (!ip.Equals (IPAddress.Any) && !col.Contains (ip))
+                                                               col.InternalAdd (ip);
                                                }
                                        }
                                }
                        } catch {
                        }
+
+                       return col;
                }
 
                public override GatewayIPAddressInformationCollection GatewayAddresses {
                        get {
-                               gateways = new IPAddressCollection ();
-                               ParseRouteInfo (this.iface.Name.ToString());
-                               if (gateways.Count > 0)
-                                       return new UnixGatewayIPAddressInformationCollection (gateways);
-                               else
-                                       return UnixGatewayIPAddressInformationCollection.Empty;
+                               return SystemGatewayIPAddressInformation.ToGatewayIpAddressInformationCollection (ParseRouteInfo (this.iface.Name.ToString()));
                        }
                }
        }
 
        class MacOsIPInterfaceProperties : UnixIPInterfaceProperties
        {
-               IPAddressCollection gateways;
-
                public MacOsIPInterfaceProperties (MacOsNetworkInterface iface, List <IPAddress> addresses)
                        : base (iface, addresses)
                {
@@ -298,16 +266,16 @@ namespace System.Net.NetworkInformation {
 
                public override GatewayIPAddressInformationCollection GatewayAddresses {
                        get {
-                               gateways = new IPAddressCollection ();
+                               var gateways = new IPAddressCollection ();
                                string[] gw_addrlist;
                                if (!ParseRouteInfo_internal (this.iface.Name.ToString(), out gw_addrlist))
-                                       return UnixGatewayIPAddressInformationCollection.Empty;
+                                       return new GatewayIPAddressInformationCollection ();
 
                                for(int i=0; i<gw_addrlist.Length; i++) {
                                        try {
                                                IPAddress ip = IPAddress.Parse(gw_addrlist[i]);
                                                if (!ip.Equals (IPAddress.Any) && !gateways.Contains (ip))
-                                                       gateways.Add (ip);
+                                                       gateways.InternalAdd (ip);
                                        } catch (ArgumentNullException) {
                                                /* Ignore this, as the
                                                 * internal call might have
@@ -317,10 +285,7 @@ namespace System.Net.NetworkInformation {
                                        }
                                }
 
-                               if (gateways.Count > 0)
-                                       return new UnixGatewayIPAddressInformationCollection (gateways);
-                               else
-                                       return UnixGatewayIPAddressInformationCollection.Empty;
+                               return SystemGatewayIPAddressInformation.ToGatewayIpAddressInformationCollection (gateways);
                        }
                }
        }
@@ -351,7 +316,21 @@ namespace System.Net.NetworkInformation {
                }
 
                public override IPAddressInformationCollection AnycastAddresses {
-                       get { return IPAddressInformationImplCollection.Win32FromAnycast (addr.FirstAnycastAddress); }
+                       get { return Win32FromAnycast (addr.FirstAnycastAddress); }
+               }
+
+               static IPAddressInformationCollection Win32FromAnycast (IntPtr ptr)
+               {
+                       var c = new IPAddressInformationCollection ();
+                       Win32_IP_ADAPTER_ANYCAST_ADDRESS a;
+                       for (IntPtr p = ptr; p != IntPtr.Zero; p = a.Next) {
+                               a = (Win32_IP_ADAPTER_ANYCAST_ADDRESS) Marshal.PtrToStructure (p, typeof (Win32_IP_ADAPTER_ANYCAST_ADDRESS));
+                               c.InternalAdd (new SystemIPAddressInformation (
+                                      a.Address.GetIPAddress (),
+                                      a.LengthFlags.IsDnsEligible,
+                                      a.LengthFlags.IsTransient));
+                       }
+                       return c;
                }
 
                public override IPAddressCollection DhcpServerAddresses {
@@ -374,7 +353,26 @@ namespace System.Net.NetworkInformation {
                        get {
                                Win32_IP_ADAPTER_INFO v4info = Win32NetworkInterface2.GetAdapterInfoByIndex (mib4.Index);
                                // FIXME: should ipv6 DhcpServer be considered?
-                               return v4info != null ? new Win32GatewayIPAddressInformationCollection (v4info.GatewayList) : Win32GatewayIPAddressInformationCollection.Empty;
+
+                               var col = new GatewayIPAddressInformationCollection ();
+                               if (v4info != null) {
+                                       var a = v4info.GatewayList;
+                                       if (!String.IsNullOrEmpty (a.IpAddress)) {
+                                               col.InternalAdd(new SystemGatewayIPAddressInformation(IPAddress.Parse (a.IpAddress)));
+                                               AddSubsequently (a.Next, col);
+                                       }
+                               }
+
+                               return col;
+                       }
+               }
+
+               static void AddSubsequently (IntPtr head, GatewayIPAddressInformationCollection col)
+               {
+                       Win32_IP_ADDR_STRING a;
+                       for (IntPtr p = head; p != IntPtr.Zero; p = a.Next) {
+                               a = (Win32_IP_ADDR_STRING) Marshal.PtrToStructure (p, typeof (Win32_IP_ADDR_STRING));
+                               col.InternalAdd (new SystemGatewayIPAddressInformation (IPAddress.Parse (a.IpAddress)));
                        }
                }
 
@@ -387,17 +385,42 @@ namespace System.Net.NetworkInformation {
                }
 
                public override MulticastIPAddressInformationCollection MulticastAddresses {
-                       get { return MulticastIPAddressInformationImplCollection.Win32FromMulticast (addr.FirstMulticastAddress); }
+                       get { return Win32FromMulticast (addr.FirstMulticastAddress); }
+               }
+
+               static MulticastIPAddressInformationCollection Win32FromMulticast (IntPtr ptr)
+               {
+                       var c = new MulticastIPAddressInformationCollection ();
+                       Win32_IP_ADAPTER_MULTICAST_ADDRESS a;
+                       for (IntPtr p = ptr; p != IntPtr.Zero; p = a.Next) {
+                               a = (Win32_IP_ADAPTER_MULTICAST_ADDRESS) Marshal.PtrToStructure (p, typeof (Win32_IP_ADAPTER_MULTICAST_ADDRESS));
+                               c.InternalAdd (new SystemMulticastIPAddressInformation (new SystemIPAddressInformation (
+                                      a.Address.GetIPAddress (),
+                                      a.LengthFlags.IsDnsEligible,
+                                      a.LengthFlags.IsTransient)));
+                       }
+                       return c;
                }
 
                public override UnicastIPAddressInformationCollection UnicastAddresses {
                        get {
                                Win32_IP_ADAPTER_INFO ai = Win32NetworkInterface2.GetAdapterInfoByIndex (mib4.Index);
                                // FIXME: should ipv6 DhcpServer be considered?
-                               return ai != null ? UnicastIPAddressInformationImplCollection.Win32FromUnicast ((int) ai.Index, addr.FirstUnicastAddress) : UnicastIPAddressInformationImplCollection.Empty;
+                               return ai != null ? Win32FromUnicast ((int) ai.Index, addr.FirstUnicastAddress) : new UnicastIPAddressInformationCollection ();
                        }
                }
 
+               static UnicastIPAddressInformationCollection Win32FromUnicast (int ifIndex, IntPtr ptr)
+               {
+                       UnicastIPAddressInformationCollection c = new UnicastIPAddressInformationCollection ();
+                       Win32_IP_ADAPTER_UNICAST_ADDRESS a;
+                       for (IntPtr p = ptr; p != IntPtr.Zero; p = a.Next) {
+                               a = (Win32_IP_ADAPTER_UNICAST_ADDRESS) Marshal.PtrToStructure (p, typeof (Win32_IP_ADAPTER_UNICAST_ADDRESS));
+                               c.Add (new Win32UnicastIPAddressInformation (ifIndex, a));
+                       }
+                       return c;
+               }
+
                public override IPAddressCollection WinsServersAddresses {
                        get {
                                Win32_IP_ADAPTER_INFO v4info = Win32NetworkInterface2.GetAdapterInfoByIndex (mib4.Index);
@@ -408,6 +431,7 @@ namespace System.Net.NetworkInformation {
 
        }
 #endif
+
 }
 
 
diff --git a/mcs/class/System/System.Net.NetworkInformation/IPStatus.cs b/mcs/class/System/System.Net.NetworkInformation/IPStatus.cs
deleted file mode 100644 (file)
index 0d21b3b..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-//
-// System.Net.NetworkInformation.IPStatus
-//
-// Author:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//
-// Copyright (c) 2006 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-namespace System.Net.NetworkInformation {
-       public enum IPStatus {
-               Unknown = -1,
-               Success = 0,
-               DestinationNetworkUnreachable = 11002,
-               DestinationHostUnreachable = 11003,
-               DestinationProhibited = 11004,
-               DestinationProtocolUnreachable = 11004,
-               DestinationPortUnreachable = 11005,
-               NoResources = 11006,
-               BadOption = 11007,
-               HardwareError = 11008,
-               PacketTooBig = 11009,
-               TimedOut = 11010,
-               BadRoute = 11012,
-               TtlExpired = 11013,
-               TtlReassemblyTimeExceeded = 11014,
-               ParameterProblem = 11015,
-               SourceQuench = 11016,
-               BadDestination = 11018,
-               DestinationUnreachable = 11040,
-               TimeExceeded = 11041,
-               BadHeader = 11042,
-               UnrecognizedNextHeader = 11043,
-               IcmpError = 11044,
-               DestinationScopeMismatch = 11045
-       }
-}
-
-
index 33264fb4d6a7d07376d26f8f318849d69af19e54..c3c34f847a0f549668c6a69a543dbf12ac056e86 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;
index bf31050377aed351375a6e76145611ef864fa5b7..d7a3dcfe20ac6e17c22a39ce98255886d52774e8 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 namespace System.Net.NetworkInformation {
-       public abstract class IPv6InterfaceProperties {
-               protected IPv6InterfaceProperties ()
-               {
-               }
-
-               public abstract int Index { get; }
-               public abstract int Mtu { get; }
-       }
 #if !MOBILE
        class Win32IPv6InterfaceProperties : IPv6InterfaceProperties
        {
index 3ad40ed2e1cd13361e8af8d0bb0ab2ac14b265b6..c3888abeafd736812dd3f58968fbc3d65de2b0a1 100644 (file)
@@ -30,39 +30,6 @@ using System.Collections.Specialized;
 using System.Globalization;
 
 namespace System.Net.NetworkInformation {
-       public abstract class IcmpV4Statistics {
-               protected IcmpV4Statistics ()
-               {
-               }
-
-               public abstract long AddressMaskRepliesReceived { get; }
-               public abstract long AddressMaskRepliesSent { get; }
-               public abstract long AddressMaskRequestsReceived { get; }
-               public abstract long AddressMaskRequestsSent { get; }
-               public abstract long DestinationUnreachableMessagesReceived { get; }
-               public abstract long DestinationUnreachableMessagesSent { get; }
-               public abstract long EchoRepliesReceived { get; }
-               public abstract long EchoRepliesSent { get; }
-               public abstract long EchoRequestsReceived { get; }
-               public abstract long EchoRequestsSent { get; }
-               public abstract long ErrorsReceived { get; }
-               public abstract long ErrorsSent { get; }
-               public abstract long MessagesReceived { get; }
-               public abstract long MessagesSent { get; }
-               public abstract long ParameterProblemsReceived { get; }
-               public abstract long ParameterProblemsSent { get; }
-               public abstract long RedirectsReceived { get; }
-               public abstract long RedirectsSent { get; }
-               public abstract long SourceQuenchesReceived { get; }
-               public abstract long SourceQuenchesSent { get; }
-               public abstract long TimeExceededMessagesReceived { get; }
-               public abstract long TimeExceededMessagesSent { get; }
-               public abstract long TimestampRepliesReceived { get; }
-               public abstract long TimestampRepliesSent { get; }
-               public abstract long TimestampRequestsReceived { get; }
-               public abstract long TimestampRequestsSent { get; }
-       }
-
        class MibIcmpV4Statistics : IcmpV4Statistics
        {
                StringDictionary dic;
index 94b05b143429e883141eb4e4e54029371f3ebc0c..ffe247afc6271447e604dc80ba9b06883e446c9f 100644 (file)
@@ -31,45 +31,6 @@ using System.Globalization;
 using System.Runtime.InteropServices;
 
 namespace System.Net.NetworkInformation {
-       public abstract class IcmpV6Statistics {
-               protected IcmpV6Statistics ()
-               {
-               }
-
-               public abstract long DestinationUnreachableMessagesReceived { get; }
-               public abstract long DestinationUnreachableMessagesSent { get; }
-               public abstract long EchoRepliesReceived { get; }
-               public abstract long EchoRepliesSent { get; }
-               public abstract long EchoRequestsReceived { get; }
-               public abstract long EchoRequestsSent { get; }
-               public abstract long ErrorsReceived { get; }
-               public abstract long ErrorsSent { get; }
-               public abstract long MembershipQueriesReceived { get; }
-               public abstract long MembershipQueriesSent { get; }
-               public abstract long MembershipReductionsReceived { get; }
-               public abstract long MembershipReductionsSent { get; }
-               public abstract long MembershipReportsReceived { get; }
-               public abstract long MembershipReportsSent { get; }
-               public abstract long MessagesReceived { get; }
-               public abstract long MessagesSent { get; }
-               public abstract long NeighborAdvertisementsReceived { get; }
-               public abstract long NeighborAdvertisementsSent { get; }
-               public abstract long NeighborSolicitsReceived { get; }
-               public abstract long NeighborSolicitsSent { get; }
-               public abstract long PacketTooBigMessagesReceived { get; }
-               public abstract long PacketTooBigMessagesSent { get; }
-               public abstract long ParameterProblemsReceived { get; }
-               public abstract long ParameterProblemsSent { get; }
-               public abstract long RedirectsReceived { get; }
-               public abstract long RedirectsSent { get; }
-               public abstract long RouterAdvertisementsReceived { get; }
-               public abstract long RouterAdvertisementsSent { get; }
-               public abstract long RouterSolicitsReceived { get; }
-               public abstract long RouterSolicitsSent { get; }
-               public abstract long TimeExceededMessagesReceived { get; }
-               public abstract long TimeExceededMessagesSent { get; }
-       }
-
        class MibIcmpV6Statistics : IcmpV6Statistics
        {
                StringDictionary dic;
diff --git a/mcs/class/System/System.Net.NetworkInformation/MulticastIPAddressInformation.cs b/mcs/class/System/System.Net.NetworkInformation/MulticastIPAddressInformation.cs
deleted file mode 100644 (file)
index 3aa4127..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-//
-// System.Net.NetworkInformation.MulticastIPAddressInformation
-//
-// Authors:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//     Atsushi Enomoto (atsushi@ximian.com)
-//
-// Copyright (c) 2006-2007 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System.Runtime.InteropServices;
-
-namespace System.Net.NetworkInformation {
-       public abstract class MulticastIPAddressInformation : IPAddressInformation {
-               protected MulticastIPAddressInformation ()
-               {
-               }
-
-               public abstract long AddressPreferredLifetime { get; }
-               public abstract long AddressValidLifetime { get; }
-               public abstract long DhcpLeaseLifetime { get; }
-               public abstract DuplicateAddressDetectionState DuplicateAddressDetectionState { get; }
-               public abstract PrefixOrigin PrefixOrigin { get; }
-               public abstract SuffixOrigin SuffixOrigin { get; }
-       }
-
-       // So, why are there many pointless members in the base class?
-       class MulticastIPAddressInformationImpl : MulticastIPAddressInformation
-       {
-               IPAddress address;
-               bool is_dns_eligible, is_transient;
-
-               public MulticastIPAddressInformationImpl (IPAddress address, bool isDnsEligible, bool isTransient)
-               {
-                       this.address = address;
-                       this.is_dns_eligible = isDnsEligible;
-                       this.is_transient = isTransient;
-               }
-
-               public override IPAddress Address {
-                       get { return address; }
-               }
-
-               public override bool IsDnsEligible {
-                       get { return is_dns_eligible; }
-               }
-
-               public override bool IsTransient {
-                       get { return is_transient; }
-               }
-
-               public override long AddressPreferredLifetime {
-                       get { return 0; }
-               }
-
-               public override long AddressValidLifetime {
-                       get { return 0; }
-               }
-
-               public override long DhcpLeaseLifetime {
-                       get { return 0; }
-               }
-
-               public override DuplicateAddressDetectionState DuplicateAddressDetectionState {
-                       get { return DuplicateAddressDetectionState.Invalid; }
-               }
-
-               public override PrefixOrigin PrefixOrigin {
-                       get { return PrefixOrigin.Other; }
-               }
-
-               public override SuffixOrigin SuffixOrigin {
-                       get { return SuffixOrigin.Other; }
-               }
-
-       }
-}
diff --git a/mcs/class/System/System.Net.NetworkInformation/MulticastIPAddressInformationCollection.cs b/mcs/class/System/System.Net.NetworkInformation/MulticastIPAddressInformationCollection.cs
deleted file mode 100644 (file)
index 36bd9c4..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-//
-// System.Net.NetworkInformation.MulticastIPAddressInformationCollection
-//
-// Authors:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//     Atsushi Enomoto (atsushi@ximian.com)
-//     Eric Butler (eric@extremeboredom.net)
-//
-// Copyright (c) 2006-2007 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System.Collections;
-using System.Collections.Generic;
-using System.Runtime.InteropServices;
-
-namespace System.Net.NetworkInformation {
-       public class MulticastIPAddressInformationCollection : ICollection<MulticastIPAddressInformation>, IEnumerable<MulticastIPAddressInformation>, IEnumerable {
-               List<MulticastIPAddressInformation> list = new List<MulticastIPAddressInformation> ();
-               
-               protected internal MulticastIPAddressInformationCollection ()
-               {
-               }
-
-               public virtual void Add (MulticastIPAddressInformation address)
-               {
-                       if (IsReadOnly)
-                               throw new NotSupportedException ("The collection is read-only.");
-                       list.Add (address);
-               }
-
-               public virtual void Clear ()
-               {
-                       if (IsReadOnly)
-                               throw new NotSupportedException ("The collection is read-only.");
-                       list.Clear ();
-               }
-
-               public virtual bool Contains (MulticastIPAddressInformation address)
-               {
-                       return list.Contains (address);
-               }
-
-               public virtual void CopyTo (MulticastIPAddressInformation [] array, int offset)
-               {
-                       list.CopyTo (array, offset);
-               }
-
-               public virtual IEnumerator<MulticastIPAddressInformation> GetEnumerator ()
-               {
-                       return ((IEnumerable<MulticastIPAddressInformation>)list).GetEnumerator ();
-               }
-
-               public virtual bool Remove (MulticastIPAddressInformation address)
-               {
-                       if (IsReadOnly)
-                               throw new NotSupportedException ("The collection is read-only.");
-                       return list.Remove (address);
-               }
-
-               IEnumerator IEnumerable.GetEnumerator ()
-               {
-                       return list.GetEnumerator ();
-               }
-
-               public virtual int Count {
-                       get { return list.Count; }
-               }
-
-               public virtual bool IsReadOnly {
-                       get { return true; }
-               }
-
-               public virtual MulticastIPAddressInformation this [int index] {
-                       get { return list [index]; }
-               }
-       }
-
-       class MulticastIPAddressInformationImplCollection : MulticastIPAddressInformationCollection
-       {
-               public static readonly MulticastIPAddressInformationImplCollection Empty = new MulticastIPAddressInformationImplCollection (true);
-
-               bool is_readonly;
-
-               // for static methods
-               MulticastIPAddressInformationImplCollection (bool isReadOnly)
-               {
-                       is_readonly = isReadOnly;
-               }
-
-               public override bool IsReadOnly {
-                       get { return is_readonly; }
-               }
-
-#if !MOBILE
-               public static MulticastIPAddressInformationCollection Win32FromMulticast (IntPtr ptr)
-               {
-                       MulticastIPAddressInformationImplCollection c = new MulticastIPAddressInformationImplCollection (false);
-                       Win32_IP_ADAPTER_MULTICAST_ADDRESS a;
-                       for (IntPtr p = ptr; p != IntPtr.Zero; p = a.Next) {
-                               a = (Win32_IP_ADAPTER_MULTICAST_ADDRESS) Marshal.PtrToStructure (p, typeof (Win32_IP_ADAPTER_MULTICAST_ADDRESS));
-                               c.Add (new MulticastIPAddressInformationImpl (
-                                      a.Address.GetIPAddress (),
-                                      a.LengthFlags.IsDnsEligible,
-                                      a.LengthFlags.IsTransient));
-                       }
-                       c.is_readonly = true;
-                       return c;
-               }
-#endif
-
-               public static MulticastIPAddressInformationImplCollection LinuxFromList (List<IPAddress> addresses)
-               {
-                       MulticastIPAddressInformationImplCollection c = new MulticastIPAddressInformationImplCollection (false);
-                       foreach (IPAddress address in addresses) {
-                               c.Add (new MulticastIPAddressInformationImpl (
-                                       address,
-                                       true,
-                                       false));
-                       }
-                       c.is_readonly = true;
-                       return c;
-               }
-       }
-}
diff --git a/mcs/class/System/System.Net.NetworkInformation/NetBiosNodeType.cs b/mcs/class/System/System.Net.NetworkInformation/NetBiosNodeType.cs
deleted file mode 100644 (file)
index 42fb66d..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// System.Net.NetworkInformation.NetBiosNodeType
-//
-// Author:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//
-// Copyright (c) 2006 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-namespace System.Net.NetworkInformation {
-       public enum NetBiosNodeType {
-               Unknown = 0,
-               Broadcast = 1,
-               Peer2Peer = 1 << 1,
-               Mixed = 1 << 2,
-               Hybrid = 1 << 3,
-       }
-}
-
diff --git a/mcs/class/System/System.Net.NetworkInformation/NetworkAddressChangedEventHandler.cs b/mcs/class/System/System.Net.NetworkInformation/NetworkAddressChangedEventHandler.cs
deleted file mode 100644 (file)
index 4242c9b..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-//
-// System.Net.NetworkInformation.NetworkAddressChangeEventHandler
-//
-// Author:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//
-// Copyright (c) 2006 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-namespace System.Net.NetworkInformation {
-       public delegate void NetworkAddressChangedEventHandler (object sender, EventArgs e);
-}
-
diff --git a/mcs/class/System/System.Net.NetworkInformation/NetworkAvailabilityChangedEventHandler.cs b/mcs/class/System/System.Net.NetworkInformation/NetworkAvailabilityChangedEventHandler.cs
deleted file mode 100644 (file)
index df580bb..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-//
-// System.Net.NetworkInformation.NetworkAvailabilityChangedEventHandler
-//
-// Author:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//
-// Copyright (c) 2006 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Net.NetworkInformation {
-       public delegate void NetworkAvailabilityChangedEventHandler (object sender, NetworkAvailabilityEventArgs e);
-}
diff --git a/mcs/class/System/System.Net.NetworkInformation/NetworkAvailabilityEventArgs.cs b/mcs/class/System/System.Net.NetworkInformation/NetworkAvailabilityEventArgs.cs
deleted file mode 100644 (file)
index af78934..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// System.Net.NetworkInformation.NetworkAvailabilityEventArgs
-//
-// Author:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//
-// Copyright (c) 2006 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-
-namespace System.Net.NetworkInformation {
-       public class NetworkAvailabilityEventArgs : EventArgs {
-               bool available;
-
-               internal NetworkAvailabilityEventArgs (bool available)
-               {
-                       this.available = available;
-               }
-
-               public bool IsAvailable {
-                       get { return available; }
-               }
-       }
-}
-
diff --git a/mcs/class/System/System.Net.NetworkInformation/NetworkInformationAccess.cs b/mcs/class/System/System.Net.NetworkInformation/NetworkInformationAccess.cs
deleted file mode 100644 (file)
index b51aa38..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// System.Net.NetworkInformation.NetworkInformationAccess
-//
-// Author:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//
-// Copyright (c) 2006 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-namespace System.Net.NetworkInformation {
-       [Flags]
-       public enum NetworkInformationAccess {
-               None,
-               Read,
-               Ping = 4
-       }
-}
-
diff --git a/mcs/class/System/System.Net.NetworkInformation/NetworkInformationException.cs b/mcs/class/System/System.Net.NetworkInformation/NetworkInformationException.cs
deleted file mode 100644 (file)
index 0770801..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-//
-// System.Net.NetworkInformation.NetworkInformationException
-//
-// Author:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//
-// Copyright (c) 2006 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System.ComponentModel;
-using System.Runtime.Serialization;
-
-namespace System.Net.NetworkInformation {
-       [Serializable]
-       public class NetworkInformationException
-#if !NET_2_1
-               : Win32Exception
-#else
-               : Exception
-#endif
-       {
-               int error_code;
-               
-               public NetworkInformationException ()
-               {
-               }
-
-#if !NET_2_1
-               public NetworkInformationException (int errorCode) : base (errorCode)
-               {
-               }
-#else
-               public NetworkInformationException (int errorCode)
-               {
-                       error_code = errorCode;
-               }
-#endif
-
-#if !NET_2_1
-               protected NetworkInformationException (SerializationInfo info, StreamingContext context)
-                       : base (info, context)
-               {
-                       error_code = info.GetInt32 ("ErrorCode");
-               }
-#endif
-
-               public
-#if !NET_2_1
-               override
-#endif
-               int ErrorCode {
-                       get { return error_code; }
-               }
-       }
-}
-
diff --git a/mcs/class/System/System.Net.NetworkInformation/NetworkInformationPermission.cs b/mcs/class/System/System.Net.NetworkInformation/NetworkInformationPermission.cs
deleted file mode 100644 (file)
index 2ffeb88..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-//
-// System.Net.NetworkInformation.NetworkInformationPermission
-//
-// Author:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//
-// Copyright (c) 2006 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-using System.Security;
-using System.Security.Permissions;
-
-namespace System.Net.NetworkInformation {
-       [Serializable]
-       public sealed class NetworkInformationPermission : CodeAccessPermission, IUnrestrictedPermission {
-               private const int version = 1;
-
-               [MonoTODO]
-               public NetworkInformationPermission (PermissionState state)
-               {
-               }
-
-               [MonoTODO]
-               public NetworkInformationPermission (NetworkInformationAccess access)
-               {
-               }
-
-               [MonoTODO]
-               public void AddPermission (NetworkInformationAccess access)
-               {
-               }
-
-               [MonoTODO]
-               public override IPermission Copy ()
-               {
-                       return null;
-               }
-
-               [MonoTODO]
-               public override void FromXml (SecurityElement securityElement)
-               {
-               }
-
-               [MonoTODO]
-               public override IPermission Intersect (System.Security.IPermission target)
-               {
-                       return null;
-               }
-
-               [MonoTODO]
-               public override bool IsSubsetOf (IPermission target)
-               {
-                       return false;
-               }
-
-               [MonoTODO]
-               public bool IsUnrestricted ()
-               {
-                       return false;
-               }
-
-               [MonoTODO]
-               public override SecurityElement ToXml ()
-               {
-                       SecurityElement se = PermissionHelper.Element (typeof (NetworkInformationPermission), version);
-
-                       // FIXME: add fields
-
-                       return se;
-               }
-
-               [MonoTODO]
-               public override IPermission Union (IPermission target)
-               {
-                       return null;
-               }
-               
-               [MonoTODO]
-               public NetworkInformationAccess Access {
-                       get { return 0; }
-               }
-       }
-}
-
diff --git a/mcs/class/System/System.Net.NetworkInformation/NetworkInformationPermissionAttribute.cs b/mcs/class/System/System.Net.NetworkInformation/NetworkInformationPermissionAttribute.cs
deleted file mode 100644 (file)
index 6b37c4f..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-//
-// System.Net.NetworkInformation.NetworkInformationPermissionAttribute
-//
-// Author:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//
-// Copyright (c) 2006 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-using System.Security;
-using System.Security.Permissions;
-
-namespace System.Net.NetworkInformation {
-       [Serializable]
-       [AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple = true, Inherited = false)]
-       public sealed class NetworkInformationPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute {
-               string access;
-
-               public NetworkInformationPermissionAttribute (SecurityAction action)
-                       : base (action)
-               {
-               }
-
-               [MonoTODO ("verify implementation")]
-               public override IPermission CreatePermission ()
-               {
-                       NetworkInformationAccess a = NetworkInformationAccess.None;
-                       switch (Access) {
-                       case "Read":
-                               a = NetworkInformationAccess.Read;
-                               break;
-                       case "Full":
-                               a = NetworkInformationAccess.Read | NetworkInformationAccess.Ping;
-                               break;
-                       }
-                       return new NetworkInformationPermission (a);
-               }
-
-               public string Access {
-                       get { return access; }
-                       set {
-                               switch (access) {
-                               case "Read":
-                               case "Full":
-                               case "None":
-                                       break;
-                               default:
-                                       throw new ArgumentException ("Only 'Read', 'Full' and 'None' are allowed");
-                               }
-                               access = value; 
-                       }
-               }
-       }
-}
-
index 27927a81f61092cf2d17a009c4e756bc54b62d6a..ece698af2b45ee2714a2c52e822ce4a09c90083d 100644 (file)
@@ -41,15 +41,11 @@ using System.IO;
 using System.Globalization;
 
 namespace System.Net.NetworkInformation {
-       public abstract class NetworkInterface {
+       static class SystemNetworkInterface {
 
                static readonly NetworkInterfaceFactory nif = NetworkInterfaceFactory.Create ();
 
-               protected NetworkInterface ()
-               {
-               }
-
-               public static NetworkInterface [] GetAllNetworkInterfaces ()
+               public static NetworkInterface [] GetNetworkInterfaces ()
                {
                        try {
                                return nif.GetAllNetworkInterfaces ();
@@ -58,36 +54,28 @@ namespace System.Net.NetworkInformation {
                        }
                }
 
-               [MonoTODO("Always returns true")]
-               public static bool GetIsNetworkAvailable ()
+               public static bool InternalGetIsNetworkAvailable ()
                {
+                       // TODO:
                        return true;
                }
-               
-               public static int LoopbackInterfaceIndex {
+
+               public static int InternalLoopbackInterfaceIndex {
                        get {
                                return nif.GetLoopbackInterfaceIndex ();
                        }
                }
 
+               public static int InternalIPv6LoopbackInterfaceIndex {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
+
                public static IPAddress GetNetMask (IPAddress address)
                {
                        return nif.GetNetMask (address);
                }
-
-               public abstract IPInterfaceProperties GetIPProperties ();
-               public abstract IPv4InterfaceStatistics GetIPv4Statistics ();
-               public abstract PhysicalAddress GetPhysicalAddress ();
-               public abstract bool Supports (NetworkInterfaceComponent networkInterfaceComponent);
-
-               public abstract string Description { get; }
-               public abstract string Id { get; }
-               public abstract bool IsReceiveOnly { get; }
-               public abstract string Name { get; }
-               public abstract NetworkInterfaceType NetworkInterfaceType { get; }
-               public abstract OperationalStatus OperationalStatus { get; }
-               public abstract long Speed { get; }
-               public abstract bool SupportsMulticast { get; }
        }
 
        abstract class NetworkInterfaceFactory
diff --git a/mcs/class/System/System.Net.NetworkInformation/NetworkInterfaceComponent.cs b/mcs/class/System/System.Net.NetworkInformation/NetworkInterfaceComponent.cs
deleted file mode 100644 (file)
index daf09e4..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// System.Net.NetworkInformation.NetworkInterfaceComponent
-//
-// Author:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//
-// Copyright (c) 2006 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-namespace System.Net.NetworkInformation {
-       public enum NetworkInterfaceComponent {
-               IPv4,
-               IPv6
-       }
-}
-
diff --git a/mcs/class/System/System.Net.NetworkInformation/NetworkInterfaceType.cs b/mcs/class/System/System.Net.NetworkInformation/NetworkInterfaceType.cs
deleted file mode 100644 (file)
index 7658091..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-//
-// System.Net.NetworkInformation.NetworkInterfaceType
-//
-// Author:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//
-// Copyright (c) 2006 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-namespace System.Net.NetworkInformation {
-       public enum NetworkInterfaceType {
-               Unknown = 1,
-               Ethernet = 6,
-               TokenRing = 9,
-               Fddi = 15,
-               BasicIsdn = 20,
-               PrimaryIsdn = 21,
-               Ppp = 23,
-               Loopback = 24,
-               Ethernet3Megabit = 26,
-               Slip = 28,
-               Atm = 37,
-               GenericModem = 48,
-               FastEthernetT = 62,
-               Isdn = 63,
-               FastEthernetFx = 69,
-               Wireless80211 = 71,
-               AsymmetricDsl = 94,
-               RateAdaptDsl = 95,
-               SymmetricDsl = 96,
-               VeryHighSpeedDsl = 97,
-               IPOverAtm = 114,
-               GigabitEthernet = 117,
-               Tunnel = 131,
-               MultiRateSymmetricDsl = 143,
-               HighPerformanceSerialBus = 144
-       }
-}
-
diff --git a/mcs/class/System/System.Net.NetworkInformation/OperationalStatus.cs b/mcs/class/System/System.Net.NetworkInformation/OperationalStatus.cs
deleted file mode 100644 (file)
index 1050f98..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-// System.Net.NetworkInformation.OperationalStatus
-//
-// Author:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//
-// Copyright (c) 2006 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-namespace System.Net.NetworkInformation {
-       public enum OperationalStatus {
-               Up = 1,
-               Down = 2,
-               Testing = 3,
-               Unknown = 4,
-               Dormant = 5,
-               NotPresent = 6,
-               LowerLayerDown = 7
-       }
-}
-
diff --git a/mcs/class/System/System.Net.NetworkInformation/PhysicalAddress.cs b/mcs/class/System/System.Net.NetworkInformation/PhysicalAddress.cs
deleted file mode 100644 (file)
index 2c0c933..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-//
-// System.Net.NetworkInformation.PhysicalAddress
-//
-// Author:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//
-// Copyright (c) 2006 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-using System.Text;
-using System.Globalization;
-
-namespace System.Net.NetworkInformation {
-       public class PhysicalAddress {
-               public static readonly PhysicalAddress None = new PhysicalAddress (new byte [0]);
-               private const int numberOfBytes = 6;
-               byte [] bytes;
-               
-               public PhysicalAddress (byte [] address)
-               {
-                       this.bytes = address;
-               }
-
-               internal static PhysicalAddress ParseEthernet (string address)
-               {
-                       if (address == null)
-                               return None;
-
-                       string [] blocks = address.Split (':');
-                       byte [] bytes = new byte [blocks.Length];
-                       int i = 0;
-                       foreach (string b in blocks){
-                               bytes [i++] = Byte.Parse (b, NumberStyles.HexNumber);
-                       }
-                       return new PhysicalAddress (bytes);
-               }
-               
-               public static PhysicalAddress Parse (string address)
-               {
-                       if (address == null)
-                               return None;
-
-                       if (address == string.Empty)
-                               throw new FormatException("An invalid physical address was specified.");
-
-                       string[] addrSplit = address.Split('-');
-
-                       if (addrSplit.Length == 1) {
-                               if (address.Length != numberOfBytes * 2)
-                                       throw new FormatException("An invalid physical address was specified.");
-
-                               addrSplit = new string[numberOfBytes];
-                               for (int index = 0; index < addrSplit.Length; index++) {
-                                       addrSplit[index] = address.Substring(index * 2, 2);
-                               }
-                       }
-
-                       if (addrSplit.Length == numberOfBytes) {
-                               foreach (string str in addrSplit)
-                                       if (str.Length > 2)
-                                               throw new FormatException("An invalid physical address was specified.");
-                                       else if (str.Length < 2)
-                                               throw new IndexOutOfRangeException("An invalid physical address was specified.");
-                       }
-                       else
-                               throw new FormatException("An invalid physical address was specified.");
-
-                       byte[] data = new byte[numberOfBytes];
-                       for (int i = 0; i < numberOfBytes; i++) {
-                               byte b = (byte)(GetValue(addrSplit[i][0]) << 4);
-                               b += GetValue(addrSplit[i][1]);
-                               data[i] = b;
-                       }
-
-                       return new PhysicalAddress (data);
-               }
-
-               static byte GetValue (char c)
-               {
-                       if (c >= '0' && c <= '9')
-                               return (byte) (c - '0');
-
-                       if (c >= 'a' && c <= 'f')
-                               return (byte) (c - 'a' + 10);
-
-                       if (c >= 'A' && c <= 'F')
-                               return (byte) (c - 'A' + 10);
-
-                       throw new FormatException ("Invalid physical address.");
-               }
-
-               public override bool Equals (object comparand)
-               {
-                       PhysicalAddress other = comparand as PhysicalAddress;
-                       if (other == null)
-                               return false;
-
-                       if (bytes.Length != other.bytes.Length)
-                               return false;
-
-                       for (int index = 0; index < bytes.Length; index++)
-                               if (bytes[index] != other.bytes[index])
-                                       return false;
-
-                       return true;
-               }
-
-               public override int GetHashCode ()
-               {
-                       return (bytes[5] << 8) ^ (bytes[4]) ^ (bytes[3] << 24) ^ (bytes[2] << 16) ^ (bytes[1] << 8) ^ (bytes[0]);
-               }
-
-               public byte [] GetAddressBytes ()
-               {
-                       return bytes;
-               }
-
-               public override string ToString ()
-               {
-                       if (bytes == null)
-                               return "";
-
-                       StringBuilder sb = new StringBuilder ();
-                       foreach (byte b in bytes)
-                               sb.AppendFormat("{0:X2}", b);
-                       return sb.ToString ();
-               }
-       }
-}
diff --git a/mcs/class/System/System.Net.NetworkInformation/PingException.cs b/mcs/class/System/System.Net.NetworkInformation/PingException.cs
deleted file mode 100644 (file)
index 6a10817..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-// System.Net.NetworkInformation.PingException
-//
-// Author:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//
-// Copyright (c) 2006 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-using System.Collections;
-using System.Runtime.Serialization;
-
-namespace System.Net.NetworkInformation {
-       [Serializable]
-       public class PingException : InvalidOperationException {
-               public PingException (string message)
-                       : base (message)
-               {
-               }
-
-               public PingException (string message, Exception innerException)
-                       : base (message, innerException)
-               {
-               }
-
-               protected PingException (SerializationInfo serializationInfo, StreamingContext streamingContext)
-                       : base (serializationInfo, streamingContext)
-               {
-               }
-
-       }
-}
-
diff --git a/mcs/class/System/System.Net.NetworkInformation/PingOptions.cs b/mcs/class/System/System.Net.NetworkInformation/PingOptions.cs
deleted file mode 100644 (file)
index f1dbecd..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-//
-// System.Net.NetworkInformation.PingOptions
-//
-// Author:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//
-// Copyright (c) 2006 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-namespace System.Net.NetworkInformation {
-       public class PingOptions {
-               int ttl = 128;
-               bool dont_fragment;
-
-               public PingOptions ()
-               {
-               }
-
-               public PingOptions (int ttl, bool dontFragment)
-               {
-                       if (ttl <= 0)
-                               throw new ArgumentOutOfRangeException ("Must be greater than zero.", "ttl");
-                       this.ttl = ttl;
-                       this.dont_fragment = dontFragment;
-               }
-
-               public bool DontFragment {
-                       get { return dont_fragment; }
-                       set { dont_fragment = value; }
-               }
-
-               public int Ttl {
-                       get { return ttl; }
-                       set { ttl = value; }
-               }
-       }
-}
-
diff --git a/mcs/class/System/System.Net.NetworkInformation/PingReply.cs b/mcs/class/System/System.Net.NetworkInformation/PingReply.cs
deleted file mode 100644 (file)
index ecdd001..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-//
-// System.Net.NetworkInformation.PingReply
-//
-// Authors:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//     Atsushi Enomoto (atsushi@ximian.com)
-//
-// Copyright (c) 2006-2007 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-namespace System.Net.NetworkInformation {
-       public class PingReply {
-               IPAddress address;
-               byte [] buffer;
-               PingOptions options;
-               long rtt;
-               IPStatus status;
-
-               internal PingReply (IPAddress address, byte [] buffer, PingOptions options, long roundtripTime, IPStatus status)
-               {
-                       this.address = address;
-                       this.buffer = buffer;
-                       this.options = options;
-                       this.rtt = roundtripTime;
-                       this.status = status;
-               }
-
-               public IPAddress Address {
-                       get { return address; }
-               }
-
-               public byte [] Buffer {
-                       get { return buffer; }
-               }
-
-               public PingOptions Options {
-                       get { return options; }
-               }
-
-               public long RoundtripTime {
-                       get { return rtt; }
-               }
-
-               public IPStatus Status {
-                       get { return status; }
-               }
-       }
-}
-
diff --git a/mcs/class/System/System.Net.NetworkInformation/PrefixOrigin.cs b/mcs/class/System/System.Net.NetworkInformation/PrefixOrigin.cs
deleted file mode 100644 (file)
index f61cf42..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// System.Net.NetworkInformation.PrefixOrigin
-//
-// Author:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//
-// Copyright (c) 2006 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-namespace System.Net.NetworkInformation {
-       public enum PrefixOrigin {
-               Other = 0,
-               Manual = 1,
-               WellKnown = 2,
-               Dhcp = 3,
-               RouterAdvertisement = 4
-       }
-}
-
diff --git a/mcs/class/System/System.Net.NetworkInformation/SuffixOrigin.cs b/mcs/class/System/System.Net.NetworkInformation/SuffixOrigin.cs
deleted file mode 100644 (file)
index 44d44f2..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// System.Net.NetworkInformation.SuffixOrigin
-//
-// Author:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//
-// Copyright (c) 2006 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-namespace System.Net.NetworkInformation {
-       public enum SuffixOrigin {
-               Other = 0,
-               Manual = 1,
-               WellKnown = 2,
-               OriginDhcp = 3,
-               LinkLayerAddress = 4,
-               Random = 5
-       }
-}
-
diff --git a/mcs/class/System/System.Net.NetworkInformation/TcpConnectionInformation.cs b/mcs/class/System/System.Net.NetworkInformation/TcpConnectionInformation.cs
deleted file mode 100644 (file)
index f2aa862..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-//
-// System.Net.NetworkInformation.TcpConnectionInformation
-//
-// Authors:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//     Atsushi Enomoto (atsushi@ximian.com)
-//
-// Copyright (c) 2006-2007 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System.Net;
-
-namespace System.Net.NetworkInformation {
-       public abstract class TcpConnectionInformation {
-               protected TcpConnectionInformation ()
-               {
-               }
-               
-               public abstract IPEndPoint LocalEndPoint { get; }
-               public abstract IPEndPoint RemoteEndPoint { get; }
-               public abstract TcpState State { get; }
-       }
-
-       class TcpConnectionInformationImpl : TcpConnectionInformation
-       {
-               IPEndPoint local;
-               IPEndPoint remote;
-               TcpState state;
-
-               public TcpConnectionInformationImpl (IPEndPoint local, IPEndPoint remote, TcpState state)
-               {
-                       this.local = local;
-                       this.remote = remote;
-                       this.state = state;
-               }
-
-               public override IPEndPoint LocalEndPoint {
-                       get { return local; }
-               }
-               public override IPEndPoint RemoteEndPoint {
-                       get { return remote; }
-               }
-               public override TcpState State {
-                       get { return state; }
-               }
-       }
-}
-
diff --git a/mcs/class/System/System.Net.NetworkInformation/TcpState.cs b/mcs/class/System/System.Net.NetworkInformation/TcpState.cs
deleted file mode 100644 (file)
index 75c097b..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// System.Net.NetworkInformation.TcpState
-//
-// Author:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//
-// Copyright (c) 2006 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-namespace System.Net.NetworkInformation {
-       public enum TcpState {
-               Unknown = 0,
-               Closed = 1,
-               Listen = 2,
-               SynSent = 3,
-               SynReceived = 4,
-               Established = 5,
-               FinWait1 = 6,
-               FinWait2 = 7,
-               CloseWait = 8,
-               Closing = 9,
-               LastAck = 10,
-               TimeWait = 11,
-               DeleteTcb = 12
-       }
-}
-
index 9f8c88a2eb3f8fd0fd2024a0e0c8fb3745e86046..6e5fff4fdfe015b3403ad51f8cda8585e76e1fb6 100644 (file)
@@ -30,27 +30,6 @@ using System.Collections.Specialized;
 using System.Globalization;
 
 namespace System.Net.NetworkInformation {
-       public abstract class TcpStatistics {
-               protected TcpStatistics ()
-               {
-               }
-               
-               public abstract long ConnectionsAccepted { get; }
-               public abstract long ConnectionsInitiated { get; }
-               public abstract long CumulativeConnections { get; }
-               public abstract long CurrentConnections { get; }
-               public abstract long ErrorsReceived { get; }
-               public abstract long FailedConnectionAttempts { get; }
-               public abstract long MaximumConnections { get; }
-               public abstract long MaximumTransmissionTimeout { get; }
-               public abstract long MinimumTransmissionTimeout { get; }
-               public abstract long ResetConnections { get; }
-               public abstract long ResetsSent { get; }
-               public abstract long SegmentsReceived { get; }
-               public abstract long SegmentsResent { get; }
-               public abstract long SegmentsSent { get; }
-       }
-
        class MibTcpStatistics : TcpStatistics
        {
                StringDictionary dic;
index 2c9d6962912f899d777f1fc66e6e886630a5c604..2adcdec433ccc8721d41a843763909306d4a5962 100644 (file)
@@ -30,18 +30,6 @@ using System.Collections.Specialized;
 using System.Globalization;
 
 namespace System.Net.NetworkInformation {
-       public abstract class UdpStatistics {
-               protected UdpStatistics ()
-               {
-               }
-
-               public abstract long DatagramsReceived { get; }
-               public abstract long DatagramsSent { get; }
-               public abstract long IncomingDatagramsDiscarded { get; }
-               public abstract long IncomingDatagramsWithErrors { get; }
-               public abstract int UdpListeners { get; }
-       }
-
        class MibUdpStatistics : UdpStatistics
        {
                StringDictionary dic;
index a7510f033e9bca3608bcf551146d2381f44f10a2..439cab07cf091c553d92b9ba5565fdd1d81bb0dc 100644 (file)
@@ -159,7 +159,7 @@ namespace System.Net.NetworkInformation {
                                        return IPAddress.Any;
 
                                if (ipv4Mask == null)
-                                       ipv4Mask = NetworkInterface.GetNetMask (address);
+                                       ipv4Mask = SystemNetworkInterface.GetNetMask (address);
 
                                return ipv4Mask;
                        }
diff --git a/mcs/class/System/System.Net.NetworkInformation/UnicastIPAddressInformationCollection.cs b/mcs/class/System/System.Net.NetworkInformation/UnicastIPAddressInformationCollection.cs
deleted file mode 100644 (file)
index b83959a..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-//
-// System.Net.NetworkInformation.UnicastIPAddressInformationCollection
-//
-// Authors:
-//     Gonzalo Paniagua Javier (gonzalo@novell.com)
-//     Atsushi Enomoto (atsushi@ximian.com)
-//
-// Copyright (c) 2006-2007 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Runtime.InteropServices;
-
-namespace System.Net.NetworkInformation {
-       public class UnicastIPAddressInformationCollection : ICollection<UnicastIPAddressInformation>,
-                                               IEnumerable<UnicastIPAddressInformation> {
-
-               List<UnicastIPAddressInformation> list = new List<UnicastIPAddressInformation> ();
-
-               protected internal UnicastIPAddressInformationCollection ()
-               {
-               }
-
-               public virtual void Add (UnicastIPAddressInformation address)
-               {
-                       if (IsReadOnly)
-                               throw new NotSupportedException ("The collection is read-only.");
-                       list.Add (address);
-               }
-
-               public virtual void Clear ()
-               {
-                       if (IsReadOnly)
-                               throw new NotSupportedException ("The collection is read-only.");
-                       list.Clear ();
-               }
-
-               public virtual bool Contains (UnicastIPAddressInformation address)
-               {
-                       return list.Contains (address);
-               }
-
-               public virtual void CopyTo (UnicastIPAddressInformation [] array, int offset)
-               {
-                       list.CopyTo (array, offset);
-               }
-
-               public virtual IEnumerator<UnicastIPAddressInformation> GetEnumerator ()
-               {
-                       return ((IEnumerable<UnicastIPAddressInformation>)list).GetEnumerator ();
-               }
-
-               public virtual bool Remove (UnicastIPAddressInformation address)
-               {
-                       if (IsReadOnly)
-                               throw new NotSupportedException ("The collection is read-only.");
-                       return list.Remove (address);
-               }
-
-               IEnumerator IEnumerable.GetEnumerator ()
-               {
-                       return list.GetEnumerator ();
-               }
-
-               public virtual int Count {
-                       get { return list.Count; }
-               }
-
-               public virtual bool IsReadOnly {
-                       get { return true; }
-               }
-
-               public virtual UnicastIPAddressInformation this [int index] {
-                       get { return list [index]; }
-               }
-       }
-
-       class UnicastIPAddressInformationImplCollection : UnicastIPAddressInformationCollection
-       {
-               public static readonly UnicastIPAddressInformationImplCollection Empty = new UnicastIPAddressInformationImplCollection (true);
-
-               bool is_readonly;
-
-               // for static methods
-               UnicastIPAddressInformationImplCollection (bool isReadOnly)
-               {
-                       is_readonly = isReadOnly;
-               }
-
-               public override bool IsReadOnly {
-                       get { return is_readonly; }
-               }
-
-#if !MOBILE
-               public static UnicastIPAddressInformationCollection Win32FromUnicast (int ifIndex, IntPtr ptr)
-               {
-                       UnicastIPAddressInformationImplCollection c = new UnicastIPAddressInformationImplCollection (false);
-                       Win32_IP_ADAPTER_UNICAST_ADDRESS a;
-                       for (IntPtr p = ptr; p != IntPtr.Zero; p = a.Next) {
-                               a = (Win32_IP_ADAPTER_UNICAST_ADDRESS) Marshal.PtrToStructure (p, typeof (Win32_IP_ADAPTER_UNICAST_ADDRESS));
-                               c.Add (new Win32UnicastIPAddressInformation (ifIndex, a));
-                       }
-                       c.is_readonly = true;
-                       return c;
-               }
-#endif
-
-               public static UnicastIPAddressInformationCollection LinuxFromList (List<IPAddress> addresses)
-               {
-                       UnicastIPAddressInformationImplCollection c = new UnicastIPAddressInformationImplCollection (false);
-                       foreach (IPAddress address in addresses) {
-                               c.Add (new LinuxUnicastIPAddressInformation (address));
-                       }
-                       c.is_readonly = true;
-                       return c;
-               }
-       }
-}
-
index ba0986b2035ac00c61d527e4975edd6331287b77..8f3052f7997fef3dc48e589abff8941878685545 100644 (file)
@@ -339,52 +339,24 @@ System.Net/MacProxy.cs
 System.Net/MonoHttpDate.cs
 System.Net/NetConfig.cs
 System.Net/NetworkCredential.cs
-System.Net.NetworkInformation/DuplicateAddressDetectionState.cs
-System.Net.NetworkInformation/GatewayIPAddressInformationCollection.cs
-System.Net.NetworkInformation/GatewayIPAddressInformation.cs
 System.Net.NetworkInformation/IcmpV4Statistics.cs
 System.Net.NetworkInformation/IcmpV6Statistics.cs
 System.Net.NetworkInformation/IPAddressCollection.cs
-System.Net.NetworkInformation/IPAddressInformationCollection.cs
-System.Net.NetworkInformation/IPAddressInformation.cs
 System.Net.NetworkInformation/IPGlobalProperties.cs
 System.Net.NetworkInformation/IPGlobalStatistics.cs
 System.Net.NetworkInformation/IPInterfaceProperties.cs
-System.Net.NetworkInformation/IPStatus.cs
 System.Net.NetworkInformation/IPv4InterfaceProperties.cs
 System.Net.NetworkInformation/IPv4InterfaceStatistics.cs
 System.Net.NetworkInformation/IPv6InterfaceProperties.cs
 System.Net.NetworkInformation/LinuxNetworkInterfaceMarshal.cs
 System.Net.NetworkInformation/MacOsNetworkInterfaceMarshal.cs
-System.Net.NetworkInformation/MulticastIPAddressInformationCollection.cs
-System.Net.NetworkInformation/MulticastIPAddressInformation.cs
-System.Net.NetworkInformation/NetBiosNodeType.cs
-System.Net.NetworkInformation/NetworkAddressChangedEventHandler.cs
-System.Net.NetworkInformation/NetworkAvailabilityChangedEventHandler.cs
-System.Net.NetworkInformation/NetworkAvailabilityEventArgs.cs
 System.Net.NetworkInformation/NetworkChange.cs
-System.Net.NetworkInformation/NetworkInformationAccess.cs
-System.Net.NetworkInformation/NetworkInformationException.cs
-System.Net.NetworkInformation/NetworkInformationPermissionAttribute.cs
-System.Net.NetworkInformation/NetworkInformationPermission.cs
-System.Net.NetworkInformation/NetworkInterfaceComponent.cs
 System.Net.NetworkInformation/NetworkInterface.cs
-System.Net.NetworkInformation/NetworkInterfaceType.cs
-System.Net.NetworkInformation/OperationalStatus.cs
-System.Net.NetworkInformation/PhysicalAddress.cs
 System.Net.NetworkInformation/PingCompletedEventArgs.cs
 System.Net.NetworkInformation/PingCompletedEventHandler.cs
 System.Net.NetworkInformation/Ping.cs
-System.Net.NetworkInformation/PingException.cs
-System.Net.NetworkInformation/PingOptions.cs
-System.Net.NetworkInformation/PingReply.cs
-System.Net.NetworkInformation/PrefixOrigin.cs
-System.Net.NetworkInformation/SuffixOrigin.cs
-System.Net.NetworkInformation/TcpConnectionInformation.cs
-System.Net.NetworkInformation/TcpState.cs
 System.Net.NetworkInformation/TcpStatistics.cs
 System.Net.NetworkInformation/UdpStatistics.cs
-System.Net.NetworkInformation/UnicastIPAddressInformationCollection.cs
 System.Net.NetworkInformation/UnicastIPAddressInformation.cs
 System.Net.NetworkInformation/Win32NetworkInterfaceMarshal.cs
 System.Net/NtlmClient.cs
@@ -1051,9 +1023,49 @@ ReferenceSources/_SslStream.cs
 ../referencesource/System/net/System/Net/Sockets/IPProtectionLevel.cs
 ../referencesource/System/net/System/Net/Sockets/NetworkStream.cs
 
+../referencesource/System/net/System/Net/NetworkInformation/DuplicateAddressDetectionState.cs
+../referencesource/System/net/System/Net/NetworkInformation/GatewayIPAddressInformation.cs
+../referencesource/System/net/System/Net/NetworkInformation/GatewayIPAddressInformationCollection.cs
+../referencesource/System/net/System/Net/NetworkInformation/IPAddressCollection.cs
+../referencesource/System/net/System/Net/NetworkInformation/IPAddressInformation.cs
+../referencesource/System/net/System/Net/NetworkInformation/IPAddressInformationCollection.cs
+../referencesource/System/net/System/Net/NetworkInformation/IPGlobalProperties.cs
+../referencesource/System/net/System/Net/NetworkInformation/IPGlobalStatistics.cs
+../referencesource/System/net/System/Net/NetworkInformation/IPInterfaceProperties.cs
 ../referencesource/System/net/System/Net/NetworkInformation/IPInterfaceStatistics.cs
+../referencesource/System/net/System/Net/NetworkInformation/IPStatus.cs
+../referencesource/System/net/System/Net/NetworkInformation/IPv4InterfaceProperties.cs
+../referencesource/System/net/System/Net/NetworkInformation/IPv6InterfaceProperties.cs
+../referencesource/System/net/System/Net/NetworkInformation/IcmpV4Statistics.cs
+../referencesource/System/net/System/Net/NetworkInformation/IcmpV6Statistics.cs
+../referencesource/System/net/System/Net/NetworkInformation/MulticastIPAddressInformation.cs
+../referencesource/System/net/System/Net/NetworkInformation/MulticastIPAddressInformationCollection.cs
+../referencesource/System/net/System/Net/NetworkInformation/NetworkAddressChange.cs
+../referencesource/System/net/System/Net/NetworkInformation/NetworkInformationException.cs
+../referencesource/System/net/System/Net/NetworkInformation/NetworkInformationPermission.cs
+../referencesource/System/net/System/Net/NetworkInformation/NetworkInterface.cs
+../referencesource/System/net/System/Net/NetworkInformation/NetworkInterfaceComponent.cs
+../referencesource/System/net/System/Net/NetworkInformation/OperationalStatus.cs
+../referencesource/System/net/System/Net/NetworkInformation/PhysicalAddress.cs
+../referencesource/System/net/System/Net/NetworkInformation/PingOptions.cs
+../referencesource/System/net/System/Net/NetworkInformation/PingReply.cs
+../referencesource/System/net/System/Net/NetworkInformation/PrefixOrigin.cs
 ../referencesource/System/net/System/Net/NetworkInformation/ScopeLevel.cs
+../referencesource/System/net/System/Net/NetworkInformation/SuffixOrigin.cs
+../referencesource/System/net/System/Net/NetworkInformation/SystemGatewayIPAddressInformation.cs
+../referencesource/System/net/System/Net/NetworkInformation/SystemIPAddressInformation.cs
+../referencesource/System/net/System/Net/NetworkInformation/SystemMulticastIPAddressInformation.cs
+../referencesource/System/net/System/Net/NetworkInformation/SystemUnicastIPAddressInformation.cs
+../referencesource/System/net/System/Net/NetworkInformation/SystemTcpConnection.cs
+../referencesource/System/net/System/Net/NetworkInformation/TcpConnection.cs
+../referencesource/System/net/System/Net/NetworkInformation/TcpState.cs
+../referencesource/System/net/System/Net/NetworkInformation/TcpStatistics.cs
+../referencesource/System/net/System/Net/NetworkInformation/UdpStatistics.cs
 ../referencesource/System/net/System/Net/NetworkInformation/UnicastIPAddressInformation.cs
+../referencesource/System/net/System/Net/NetworkInformation/UnicastIPAddressInformationCollection.cs
+../referencesource/System/net/System/Net/NetworkInformation/interfacetype.cs
+../referencesource/System/net/System/Net/NetworkInformation/nodetype.cs
+../referencesource/System/net/System/Net/NetworkInformation/pingexception.cs
 
 ../referencesource/System/sys/system/runtime/interopservices/DefaultParameterValueAttribute.cs
 ../referencesource/System/sys/system/runtime/interopservices/handlecollector.cs
index 8a8c3f43f2d3918c4addfa6f8edde6cda4be7b5a..cbde29e55994832a5767622d48bc056b0d4984c1 100644 (file)
@@ -79,51 +79,26 @@ System.Net.Mail/SmtpStatusCode.cs
 ../referencesource/System/net/System/Net/mail/TransferEncoding.cs
 ../referencesource/System/net/System/Net/mail/WriteStateInfoBase.cs
 ../referencesource/System/net/System/Net/mail/mediatypenames.cs
-System.Net.NetworkInformation/DuplicateAddressDetectionState.cs
-System.Net.NetworkInformation/GatewayIPAddressInformation.cs
-System.Net.NetworkInformation/GatewayIPAddressInformationCollection.cs
+System.Net.NetworkInformation/IcmpV4Statistics.cs
+System.Net.NetworkInformation/IcmpV6Statistics.cs
 System.Net.NetworkInformation/IPAddressCollection.cs
-System.Net.NetworkInformation/IPAddressInformation.cs
-System.Net.NetworkInformation/IPAddressInformationCollection.cs
 System.Net.NetworkInformation/IPGlobalProperties.cs
 System.Net.NetworkInformation/IPGlobalStatistics.cs
 System.Net.NetworkInformation/IPInterfaceProperties.cs
-System.Net.NetworkInformation/IPStatus.cs
 System.Net.NetworkInformation/IPv4InterfaceProperties.cs
 System.Net.NetworkInformation/IPv4InterfaceStatistics.cs
 System.Net.NetworkInformation/IPv6InterfaceProperties.cs
-System.Net.NetworkInformation/IcmpV4Statistics.cs
-System.Net.NetworkInformation/IcmpV6Statistics.cs
 System.Net.NetworkInformation/LinuxNetworkInterfaceMarshal.cs
 System.Net.NetworkInformation/MacOsNetworkInterfaceMarshal.cs
-System.Net.NetworkInformation/MulticastIPAddressInformation.cs
-System.Net.NetworkInformation/MulticastIPAddressInformationCollection.cs
-System.Net.NetworkInformation/NetBiosNodeType.cs
-System.Net.NetworkInformation/NetworkAddressChangedEventHandler.cs
-System.Net.NetworkInformation/NetworkAvailabilityChangedEventHandler.cs
-System.Net.NetworkInformation/NetworkAvailabilityEventArgs.cs
 System.Net.NetworkInformation/NetworkChange.cs
-System.Net.NetworkInformation/NetworkInformationAccess.cs
-System.Net.NetworkInformation/NetworkInformationException.cs
 System.Net.NetworkInformation/NetworkInterface.cs
-System.Net.NetworkInformation/NetworkInterfaceComponent.cs
-System.Net.NetworkInformation/NetworkInterfaceType.cs
-System.Net.NetworkInformation/OperationalStatus.cs
-System.Net.NetworkInformation/PhysicalAddress.cs
 System.Net.NetworkInformation/Ping.cs
 System.Net.NetworkInformation/PingCompletedEventArgs.cs
 System.Net.NetworkInformation/PingCompletedEventHandler.cs
-System.Net.NetworkInformation/PingException.cs
-System.Net.NetworkInformation/PingOptions.cs
-System.Net.NetworkInformation/PingReply.cs
-System.Net.NetworkInformation/PrefixOrigin.cs
-System.Net.NetworkInformation/SuffixOrigin.cs
-System.Net.NetworkInformation/TcpConnectionInformation.cs
-System.Net.NetworkInformation/TcpState.cs
 System.Net.NetworkInformation/TcpStatistics.cs
 System.Net.NetworkInformation/UdpStatistics.cs
 System.Net.NetworkInformation/UnicastIPAddressInformation.cs
-System.Net.NetworkInformation/UnicastIPAddressInformationCollection.cs
+System.Net.NetworkInformation/Win32NetworkInterfaceMarshal.cs
 ../referencesource/System/net/System/Net/SecureProtocols/AuthenticatedStream.cs
 ../referencesource/System/net/System/Net/SecureProtocols/NegotiateEnumTypes.cs
 System.Net.Security/EncryptionPolicy.cs
@@ -762,9 +737,50 @@ ReferenceSources/Win32Exception.cs
 
 ../referencesource/System/net/System/Net/Sockets/IPProtectionLevel.cs
 ../referencesource/System/net/System/Net/Sockets/NetworkStream.cs
+
+../referencesource/System/net/System/Net/NetworkInformation/DuplicateAddressDetectionState.cs
+../referencesource/System/net/System/Net/NetworkInformation/GatewayIPAddressInformation.cs
+../referencesource/System/net/System/Net/NetworkInformation/GatewayIPAddressInformationCollection.cs
+../referencesource/System/net/System/Net/NetworkInformation/IPAddressCollection.cs
+../referencesource/System/net/System/Net/NetworkInformation/IPAddressInformation.cs
+../referencesource/System/net/System/Net/NetworkInformation/IPAddressInformationCollection.cs
+../referencesource/System/net/System/Net/NetworkInformation/IPGlobalProperties.cs
+../referencesource/System/net/System/Net/NetworkInformation/IPGlobalStatistics.cs
+../referencesource/System/net/System/Net/NetworkInformation/IPInterfaceProperties.cs
 ../referencesource/System/net/System/Net/NetworkInformation/IPInterfaceStatistics.cs
+../referencesource/System/net/System/Net/NetworkInformation/IPStatus.cs
+../referencesource/System/net/System/Net/NetworkInformation/IPv4InterfaceProperties.cs
+../referencesource/System/net/System/Net/NetworkInformation/IPv6InterfaceProperties.cs
+../referencesource/System/net/System/Net/NetworkInformation/IcmpV4Statistics.cs
+../referencesource/System/net/System/Net/NetworkInformation/IcmpV6Statistics.cs
+../referencesource/System/net/System/Net/NetworkInformation/MulticastIPAddressInformation.cs
+../referencesource/System/net/System/Net/NetworkInformation/MulticastIPAddressInformationCollection.cs
+../referencesource/System/net/System/Net/NetworkInformation/NetworkAddressChange.cs
+../referencesource/System/net/System/Net/NetworkInformation/NetworkInformationException.cs
+../referencesource/System/net/System/Net/NetworkInformation/NetworkInformationPermission.cs
+../referencesource/System/net/System/Net/NetworkInformation/NetworkInterface.cs
+../referencesource/System/net/System/Net/NetworkInformation/NetworkInterfaceComponent.cs
+../referencesource/System/net/System/Net/NetworkInformation/OperationalStatus.cs
+../referencesource/System/net/System/Net/NetworkInformation/PhysicalAddress.cs
+../referencesource/System/net/System/Net/NetworkInformation/PingOptions.cs
+../referencesource/System/net/System/Net/NetworkInformation/PingReply.cs
+../referencesource/System/net/System/Net/NetworkInformation/PrefixOrigin.cs
 ../referencesource/System/net/System/Net/NetworkInformation/ScopeLevel.cs
+../referencesource/System/net/System/Net/NetworkInformation/SuffixOrigin.cs
+../referencesource/System/net/System/Net/NetworkInformation/SystemGatewayIPAddressInformation.cs
+../referencesource/System/net/System/Net/NetworkInformation/SystemIPAddressInformation.cs
+../referencesource/System/net/System/Net/NetworkInformation/SystemMulticastIPAddressInformation.cs
+../referencesource/System/net/System/Net/NetworkInformation/SystemUnicastIPAddressInformation.cs
+../referencesource/System/net/System/Net/NetworkInformation/SystemTcpConnection.cs
+../referencesource/System/net/System/Net/NetworkInformation/TcpConnection.cs
+../referencesource/System/net/System/Net/NetworkInformation/TcpState.cs
+../referencesource/System/net/System/Net/NetworkInformation/TcpStatistics.cs
+../referencesource/System/net/System/Net/NetworkInformation/UdpStatistics.cs
 ../referencesource/System/net/System/Net/NetworkInformation/UnicastIPAddressInformation.cs
+../referencesource/System/net/System/Net/NetworkInformation/UnicastIPAddressInformationCollection.cs
+../referencesource/System/net/System/Net/NetworkInformation/interfacetype.cs
+../referencesource/System/net/System/Net/NetworkInformation/nodetype.cs
+../referencesource/System/net/System/Net/NetworkInformation/pingexception.cs
 
 ../referencesource/System/sys/system/runtime/interopservices/DefaultParameterValueAttribute.cs
 ../referencesource/System/sys/system/runtime/interopservices/handlecollector.cs
index 393e21431cf6288999396bb79297329a463a36c5..5a67f249f90222cdc22f11cc45662a82a6f2bfb0 100644 (file)
@@ -5,6 +5,7 @@ using System.Net;
 using System.Threading.Tasks;
 using System.Security.Permissions;
 using System.Diagnostics.CodeAnalysis;
+using System.IO;
 
 namespace System.Net.NetworkInformation
 {
@@ -13,13 +14,41 @@ namespace System.Net.NetworkInformation
     {
         public static IPGlobalProperties GetIPGlobalProperties()
         {
+#if MONODROID
+            return new AndroidIPGlobalProperties ();
+#elif MONOTOUCH || XAMMAC || MOBILE_STATIC
+            return new UnixIPGlobalProperties ();
+#elif MONO
+            switch (Environment.OSVersion.Platform) {
+            case PlatformID.Unix:
+                MibIPGlobalProperties impl = null;
+                if (Directory.Exists (MibIPGlobalProperties.ProcDir)) {
+                    impl = new MibIPGlobalProperties (MibIPGlobalProperties.ProcDir);
+                    if (File.Exists (impl.StatisticsFile))
+                        return impl;
+                }
+                if (Directory.Exists (MibIPGlobalProperties.CompatProcDir)) {
+                    impl = new MibIPGlobalProperties (MibIPGlobalProperties.CompatProcDir);
+                    if (File.Exists (impl.StatisticsFile))
+                        return impl;
+                }
+                return new UnixIPGlobalProperties ();
+            default:
+                return new Win32IPGlobalProperties ();
+            }
+#else          
             (new NetworkInformationPermission(NetworkInformationAccess.Read)).Demand();
             return new SystemIPGlobalProperties();
+#endif
         }
 
         internal static IPGlobalProperties InternalGetIPGlobalProperties()
         {
+#if MONO
+            return GetIPGlobalProperties();
+#else
             return new SystemIPGlobalProperties();
+#endif
         }
 
         /// Gets the Active Udp Listeners on this machine
index 716afeffce1e7f3b55e8de441c9d0b9714aee7c3..73db45503897c1c398cdc660dbf75de83510e38d 100644 (file)
@@ -26,7 +26,7 @@ namespace System.Net.NetworkInformation {
             }
         }
     }
-
+#if !MONO
     [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1053:StaticHolderTypesShouldNotHaveConstructors")]
     public class NetworkChange{
     #region designer support for System.Windows.dll
@@ -332,7 +332,7 @@ namespace System.Net.NetworkInformation {
             } //ends ignoreaddresschanges
         }
     }
-
+#endif
     public delegate void NetworkAddressChangedEventHandler(object sender, EventArgs e);
     public delegate void NetworkAvailabilityChangedEventHandler(object sender, NetworkAvailabilityEventArgs e);
 }
index a0152e921111ba647f43fddae98bbf4efdd1cbfc..76f2803c39fa4dd7d9127be2734fb18e4b20d117 100644 (file)
@@ -9,12 +9,12 @@ namespace System.Net.NetworkInformation
         const int DontFragmentFlag = 2;
         int ttl = 128;
         bool dontFragment;
-
+#if !MONO
         internal PingOptions (IPOptions options) {
             this.ttl = options.ttl;
             this.dontFragment = ((options.flags & DontFragmentFlag) > 0 ? true : false);
         }
-
+#endif
         public PingOptions (int ttl, bool dontFragment) {
             if (ttl <= 0) {
                 throw new ArgumentOutOfRangeException("ttl");
index 873f40c8564fd3d2ff69c4f99da7b0af64f5776a..d3b010fedb7472444f4b4eb8c341b1f130265847 100644 (file)
@@ -37,7 +37,16 @@ namespace System.Net.NetworkInformation
                 buffer = new byte[0];
         }
 
-
+#if MONO
+        internal PingReply (IPAddress address, byte [] buffer, PingOptions options, long roundtripTime, IPStatus status)
+        {
+            this.address = address;
+            this.buffer = buffer;
+            this.options = options;
+            this.rtt = roundtripTime;
+            this.ipStatus = status;
+        }
+#else
         // the main constructor for the icmpsendecho apis
         internal PingReply (IcmpEchoReply reply) {
             address = new IPAddress (reply.address);
@@ -72,7 +81,7 @@ namespace System.Net.NetworkInformation
                 buffer = new byte[0];
 
         }
-
+#endif
 
  
         //translates the relevant icmpsendecho codes to a ipstatus code
index 1c02c328d155cc93349bc298fa300fdef21d0b6b..1402c02247d973549208fc34c08ead61d06918b9 100644 (file)
@@ -9,7 +9,7 @@ namespace System.Net.NetworkInformation
     {
         IPAddress address;
 
-        private SystemGatewayIPAddressInformation(IPAddress address){
+        internal SystemGatewayIPAddressInformation(IPAddress address){
             this.address = address;
         }
 
index 5e51f77955856516645bade5bd68a5bef1be13e9..feea9b74586dbb24c20acd80be6d77d1b1aaadb0 100644 (file)
@@ -24,11 +24,20 @@ namespace System.Net.NetworkInformation {
         internal bool transient = false;
         internal bool dnsEligible = true;
 
+#if MONO
+        public SystemIPAddressInformation(IPAddress address, bool isDnsEligible, bool isTransient)
+        {
+            this.address = address;
+            this.dnsEligible = isDnsEligible;
+            this.transient = isTransient;
+        }
+#else
         internal SystemIPAddressInformation(IPAddress address, AdapterAddressFlags flags) {
             this.address = address;
             transient = (flags & AdapterAddressFlags.Transient) > 0;
             dnsEligible = (flags & AdapterAddressFlags.DnsEligible) > 0;
         }
+#endif
 
         public override IPAddress Address{get {return address;}}
 
index 194627463c0c063b09d085fdbdd429c7560afb08..fa774cf4f341f1435283a0d6eeea5017b7e7d8af 100644 (file)
@@ -9,6 +9,7 @@ namespace System.Net.NetworkInformation {
     using System.Threading;
     using System.Collections.Generic;
 
+#if !MONO
     internal class SystemIPGlobalProperties:IPGlobalProperties {
         private FixedInfo fixedInfo;
         private bool fixedInfoInitialized = false;
@@ -456,7 +457,7 @@ namespace System.Net.NetworkInformation {
 
     }   //ends networkinformation class
 
-   
+#endif   
 
     internal struct FixedInfo{
         internal FIXED_INFO info;
index 1ff5a5598e00c33b59a168cd71dc1d02ae7fb3c4..ade419befaaa8eb4a51ca56d002da6005947e7c5 100644 (file)
@@ -20,7 +20,14 @@ namespace System.Net.NetworkInformation {
         IPEndPoint localEndPoint;
         IPEndPoint remoteEndPoint;
         TcpState state;
-
+#if MONO
+        public SystemTcpConnectionInformation (IPEndPoint local, IPEndPoint remote, TcpState state)
+        {
+            localEndPoint = local;
+            remoteEndPoint = remote;
+            this.state = state;
+        }
+#else
         internal SystemTcpConnectionInformation(MibTcpRow row) {
             state = row.state;
 
@@ -47,7 +54,7 @@ namespace System.Net.NetworkInformation {
             localEndPoint = new IPEndPoint(new IPAddress(row.localAddr, row.localScopeId), (int)localPort);
             remoteEndPoint = new IPEndPoint(new IPAddress(row.remoteAddr, row.remoteScopeId), (int)remotePort);
         }
-
+#endif
 
         public override TcpState State{get {return state;}}
         public override IPEndPoint LocalEndPoint{get {return localEndPoint;}}
index 430bd12676a5218e393645e1190b81acea6f617f..66e1e660a1ed0d88e990c12eb606d2200abd59be 100644 (file)
@@ -24,6 +24,7 @@ namespace System.Net.NetworkInformation {
         private uint preferredLifetime;
         private byte prefixLength;
 
+#if !MONO
         internal SystemUnicastIPAddressInformation(IpAdapterUnicastAddress adapterAddress) {
             IPAddress ipAddress = adapterAddress.address.MarshalIPAddress();
             this.innerInfo = new SystemIPAddressInformation(ipAddress, adapterAddress.flags);
@@ -41,6 +42,7 @@ namespace System.Net.NetworkInformation {
                 ipv4Mask = PrefixLengthToSubnetMask(prefixLength, ipAddress.AddressFamily);
             }
         }
+#endif
 
        /// <include file='doc\NetworkInterface.uex' path='docs/doc[@for="IPAddressInformation.Address"]/*' />
         public override IPAddress Address{get {return innerInfo.Address;}}
@@ -128,7 +130,7 @@ namespace System.Net.NetworkInformation {
                 return dhcpLeaseLifetime;
                 }
             }
-        
+#if !MONO
         // Helper method that marshals the addressinformation into the classes
         internal static UnicastIPAddressInformationCollection MarshalUnicastIpAddressInformationCollection(IntPtr ptr) {
             UnicastIPAddressInformationCollection addressList = new UnicastIPAddressInformationCollection();
@@ -167,5 +169,6 @@ namespace System.Net.NetworkInformation {
 
             return new IPAddress(addressBytes);
         }
+#endif
     }
 }
index 2a7463906e8f5a8ec570515929a22de261a7fd8e..4d283be687438ddb28876853ee476efde265f512 100644 (file)
@@ -315,6 +315,8 @@ namespace System.Net {
 #endif // !FEATURE_PAL
 
     }
+
+#if !MONO
     //
     // This class is a wrapper for Http.sys V2 request queue handle.
     //
@@ -389,7 +391,7 @@ namespace System.Net {
             return true;
         }
     }
-
+#endif
     //
     // SafeHandle to wrap handles created by IcmpCreateFile or Icmp6CreateFile
     // from either icmp.dll or iphlpapi.dll. These handles must be closed by
@@ -412,6 +414,7 @@ namespace System.Net {
         }
     }
 
+#if !MONO
     //
     // Used when working with WinHTTP APIs, like WinHttpOpen(). Holds the HINTERNET handle.
     //
@@ -447,6 +450,7 @@ namespace System.Net {
             return UnsafeNclNativeMethods.SspiHelper.SspiFreeAuthIdentity(handle) == SecurityStatus.OK;
         }
     }
+#endif
     
 #if !FEATURE_PAL
 
@@ -676,6 +680,7 @@ namespace System.Net {
         }
     }
 
+#if !MONO
     ///////////////////////////////////////////////////////////////
     //
     // A few Win32 APIs return pointers to blobs that need GlobalFree().
@@ -754,6 +759,7 @@ namespace System.Net {
             return UnsafeNclNativeMethods.SafeNetHandles.LocalFree(handle) == IntPtr.Zero;
         }
     }
+#endif
 
 #if !FEATURE_PAL
     [SuppressUnmanagedCodeSecurity]
@@ -2136,6 +2142,7 @@ namespace System.Net {
 
 #endif // !FEATURE_PAL
 
+#if !MONO
     internal class SafeNativeOverlapped : SafeHandle
     {
         internal static readonly SafeNativeOverlapped Zero = new SafeNativeOverlapped();
@@ -2740,6 +2747,7 @@ namespace System.Net {
         }
 
     }
+#endif
 
 #if !FEATURE_PAL