You've already forked linux-packaging-mono
Imported Upstream version 5.2.0.175
Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
parent
4bdbaf4a88
commit
966bba02bb
@@ -42,8 +42,15 @@ namespace System.Net.NetworkInformation {
|
||||
[DllImport ("libc")]
|
||||
static extern int gethostname ([MarshalAs (UnmanagedType.LPArray, SizeParamIndex = 1)] byte [] name, int len);
|
||||
|
||||
#if !ORBIS
|
||||
[DllImport ("libc")]
|
||||
static extern int getdomainname ([MarshalAs (UnmanagedType.LPArray, SizeParamIndex = 1)] byte [] name, int len);
|
||||
#else
|
||||
static int getdomainname ([MarshalAs (UnmanagedType.LPArray, SizeParamIndex = 1)] byte [] name, int len)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
#endif
|
||||
|
||||
public override string DhcpScopeName {
|
||||
get { return String.Empty; }
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace System.Net.NetworkInformation {
|
||||
|
||||
static void MaybeCreate ()
|
||||
{
|
||||
#if MONOTOUCH_WATCH
|
||||
#if MONOTOUCH_WATCH || ORBIS
|
||||
throw new PlatformNotSupportedException ("NetworkInformation.NetworkChange is not supported on the current platform.");
|
||||
#else
|
||||
if (networkChange != null)
|
||||
@@ -126,7 +126,7 @@ namespace System.Net.NetworkInformation {
|
||||
}
|
||||
}
|
||||
|
||||
#if !MONOTOUCH_WATCH
|
||||
#if !MONOTOUCH_WATCH && !ORBIS
|
||||
internal sealed class MacNetworkChange : INetworkChange
|
||||
{
|
||||
const string DL_LIB = "/usr/lib/libSystem.dylib";
|
||||
@@ -322,7 +322,7 @@ namespace System.Net.NetworkInformation {
|
||||
}
|
||||
#endif // !MONOTOUCH_WATCH
|
||||
|
||||
#if !NETWORK_CHANGE_STANDALONE && !MONOTOUCH
|
||||
#if !NETWORK_CHANGE_STANDALONE && !MONOTOUCH && !ORBIS
|
||||
|
||||
internal sealed class LinuxNetworkChange : INetworkChange {
|
||||
[Flags]
|
||||
|
||||
@@ -82,6 +82,22 @@ namespace System.Net.NetworkInformation {
|
||||
{
|
||||
internal abstract class UnixNetworkInterfaceAPI : NetworkInterfaceFactory
|
||||
{
|
||||
#if ORBIS
|
||||
public static int if_nametoindex(string ifname)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
protected static int getifaddrs (out IntPtr ifap)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
protected static void freeifaddrs (IntPtr ifap)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
#else
|
||||
[DllImport("libc")]
|
||||
public static extern int if_nametoindex(string ifname);
|
||||
|
||||
@@ -90,6 +106,7 @@ namespace System.Net.NetworkInformation {
|
||||
|
||||
[DllImport ("libc")]
|
||||
protected static extern void freeifaddrs (IntPtr ifap);
|
||||
#endif
|
||||
}
|
||||
|
||||
class MacOsNetworkInterfaceAPI : UnixNetworkInterfaceAPI
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace System.Net.NetworkInformation {
|
||||
|
||||
public event PingCompletedEventHandler PingCompleted;
|
||||
|
||||
#if !MONOTOUCH
|
||||
#if !MONOTOUCH && !ORBIS
|
||||
static Ping ()
|
||||
{
|
||||
if (Environment.OSVersion.Platform == PlatformID.Unix) {
|
||||
@@ -122,7 +122,7 @@ namespace System.Net.NetworkInformation {
|
||||
identifier = (ushort)(randomIdentifier [0] + (randomIdentifier [1] << 8));
|
||||
}
|
||||
|
||||
#if !MONOTOUCH
|
||||
#if !MONOTOUCH && !ORBIS
|
||||
[DllImport ("libc", EntryPoint="capget")]
|
||||
static extern int capget (ref cap_user_header_t header, ref cap_user_data_t data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user