You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@@ -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); }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user