Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm] Support network status information #71941

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>browser</UnsupportedOSPlatforms>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

namespace System.Net.NetworkInformation
{
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public enum DuplicateAddressDetectionState
{
Invalid = 0,
Expand All @@ -14,11 +15,13 @@ public enum DuplicateAddressDetectionState
Deprecated = 3,
Preferred = 4,
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract partial class GatewayIPAddressInformation
{
protected GatewayIPAddressInformation() { }
public abstract System.Net.IPAddress Address { get; }
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public partial class GatewayIPAddressInformationCollection : System.Collections.Generic.ICollection<System.Net.NetworkInformation.GatewayIPAddressInformation>, System.Collections.Generic.IEnumerable<System.Net.NetworkInformation.GatewayIPAddressInformation>, System.Collections.IEnumerable
{
protected internal GatewayIPAddressInformationCollection() { }
Expand All @@ -33,6 +36,7 @@ public virtual void CopyTo(System.Net.NetworkInformation.GatewayIPAddressInforma
public virtual bool Remove(System.Net.NetworkInformation.GatewayIPAddressInformation address) { throw null; }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract partial class IcmpV4Statistics
{
protected IcmpV4Statistics() { }
Expand Down Expand Up @@ -63,6 +67,7 @@ protected IcmpV4Statistics() { }
public abstract long TimestampRequestsReceived { get; }
public abstract long TimestampRequestsSent { get; }
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract partial class IcmpV6Statistics
{
protected IcmpV6Statistics() { }
Expand Down Expand Up @@ -99,13 +104,15 @@ protected IcmpV6Statistics() { }
public abstract long TimeExceededMessagesReceived { get; }
public abstract long TimeExceededMessagesSent { get; }
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract partial class IPAddressInformation
{
protected IPAddressInformation() { }
public abstract System.Net.IPAddress Address { get; }
public abstract bool IsDnsEligible { get; }
public abstract bool IsTransient { get; }
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public partial class IPAddressInformationCollection : System.Collections.Generic.ICollection<System.Net.NetworkInformation.IPAddressInformation>, System.Collections.Generic.IEnumerable<System.Net.NetworkInformation.IPAddressInformation>, System.Collections.IEnumerable
{
internal IPAddressInformationCollection() { }
Expand All @@ -120,6 +127,7 @@ public virtual void CopyTo(System.Net.NetworkInformation.IPAddressInformation[]
public virtual bool Remove(System.Net.NetworkInformation.IPAddressInformation address) { throw null; }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract partial class IPGlobalProperties
{
protected IPGlobalProperties() { }
Expand Down Expand Up @@ -158,6 +166,7 @@ protected IPGlobalProperties() { }
public virtual System.Net.NetworkInformation.UnicastIPAddressInformationCollection GetUnicastAddresses() { throw null; }
public virtual System.Threading.Tasks.Task<System.Net.NetworkInformation.UnicastIPAddressInformationCollection> GetUnicastAddressesAsync() { throw null; }
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract partial class IPGlobalStatistics
{
protected IPGlobalStatistics() { }
Expand Down Expand Up @@ -204,6 +213,7 @@ protected IPGlobalStatistics() { }
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
public abstract long ReceivedPacketsWithUnknownProtocol { get; }
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract partial class IPInterfaceProperties
{
protected IPInterfaceProperties() { }
Expand All @@ -228,6 +238,7 @@ protected IPInterfaceProperties() { }
public abstract System.Net.NetworkInformation.IPv4InterfaceProperties GetIPv4Properties();
public abstract System.Net.NetworkInformation.IPv6InterfaceProperties GetIPv6Properties();
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract partial class IPInterfaceStatistics
{
protected IPInterfaceStatistics() { }
Expand All @@ -248,6 +259,7 @@ protected IPInterfaceStatistics() { }
public abstract long UnicastPacketsReceived { get; }
public abstract long UnicastPacketsSent { get; }
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract partial class IPv4InterfaceProperties
{
protected IPv4InterfaceProperties() { }
Expand All @@ -264,6 +276,7 @@ protected IPv4InterfaceProperties() { }
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
public abstract bool UsesWins { get; }
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract partial class IPv4InterfaceStatistics
{
protected IPv4InterfaceStatistics() { }
Expand All @@ -284,13 +297,15 @@ protected IPv4InterfaceStatistics() { }
public abstract long UnicastPacketsReceived { get; }
public abstract long UnicastPacketsSent { get; }
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract partial class IPv6InterfaceProperties
{
protected IPv6InterfaceProperties() { }
public abstract int Index { get; }
public abstract int Mtu { get; }
public virtual long GetScopeId(System.Net.NetworkInformation.ScopeLevel scopeLevel) { throw null; }
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract partial class MulticastIPAddressInformation : System.Net.NetworkInformation.IPAddressInformation
{
protected MulticastIPAddressInformation() { }
Expand All @@ -301,6 +316,7 @@ protected MulticastIPAddressInformation() { }
public abstract System.Net.NetworkInformation.PrefixOrigin PrefixOrigin { get; }
public abstract System.Net.NetworkInformation.SuffixOrigin SuffixOrigin { get; }
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public partial class MulticastIPAddressInformationCollection : System.Collections.Generic.ICollection<System.Net.NetworkInformation.MulticastIPAddressInformation>, System.Collections.Generic.IEnumerable<System.Net.NetworkInformation.MulticastIPAddressInformation>, System.Collections.IEnumerable
{
protected internal MulticastIPAddressInformationCollection() { }
Expand All @@ -315,6 +331,7 @@ public virtual void CopyTo(System.Net.NetworkInformation.MulticastIPAddressInfor
public virtual bool Remove(System.Net.NetworkInformation.MulticastIPAddressInformation address) { throw null; }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public enum NetBiosNodeType
{
Unknown = 0,
Expand All @@ -337,6 +354,7 @@ public partial class NetworkChange
public NetworkChange() { }
[System.Runtime.Versioning.UnsupportedOSPlatform("illumos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("solaris")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static event System.Net.NetworkInformation.NetworkAddressChangedEventHandler? NetworkAddressChanged { add { } remove { } }
[System.Runtime.Versioning.UnsupportedOSPlatform("illumos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("solaris")]
Expand All @@ -355,39 +373,57 @@ protected NetworkInformationException(System.Runtime.Serialization.Serialization
public abstract partial class NetworkInterface
{
protected NetworkInterface() { }
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public virtual string Description { get { throw null; } }
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public virtual string Id { get { throw null; } }
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("illumos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("solaris")]
public static int IPv6LoopbackInterfaceIndex { get { throw null; } }
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public virtual bool IsReceiveOnly { get { throw null; } }
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("illumos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("solaris")]
public static int LoopbackInterfaceIndex { get { throw null; } }
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public virtual string Name { get { throw null; } }
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public virtual System.Net.NetworkInformation.NetworkInterfaceType NetworkInterfaceType { get { throw null; } }
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public virtual System.Net.NetworkInformation.OperationalStatus OperationalStatus { get { throw null; } }
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public virtual long Speed { get { throw null; } }
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public virtual bool SupportsMulticast { get { throw null; } }
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("illumos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("solaris")]
public static System.Net.NetworkInformation.NetworkInterface[] GetAllNetworkInterfaces() { throw null; }
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public virtual System.Net.NetworkInformation.IPInterfaceProperties GetIPProperties() { throw null; }
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
public virtual System.Net.NetworkInformation.IPInterfaceStatistics GetIPStatistics() { throw null; }
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
public virtual System.Net.NetworkInformation.IPv4InterfaceStatistics GetIPv4Statistics() { throw null; }
[System.Runtime.Versioning.UnsupportedOSPlatform("illumos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("solaris")]
public static bool GetIsNetworkAvailable() { throw null; }
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public virtual System.Net.NetworkInformation.PhysicalAddress GetPhysicalAddress() { throw null; }
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public virtual bool Supports(System.Net.NetworkInformation.NetworkInterfaceComponent networkInterfaceComponent) { throw null; }
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public enum NetworkInterfaceComponent
{
IPv4 = 0,
IPv6 = 1,
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public enum NetworkInterfaceType
{
Unknown = 1,
Expand Down Expand Up @@ -419,6 +455,7 @@ public enum NetworkInterfaceType
Wwanpp = 243,
Wwanpp2 = 244,
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public enum OperationalStatus
{
Up = 1,
Expand All @@ -429,6 +466,7 @@ public enum OperationalStatus
NotPresent = 6,
LowerLayerDown = 7,
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public partial class PhysicalAddress
{
public static readonly System.Net.NetworkInformation.PhysicalAddress None;
Expand All @@ -442,6 +480,7 @@ public PhysicalAddress(byte[] address) { }
public static bool TryParse(ReadOnlySpan<char> address, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Net.NetworkInformation.PhysicalAddress? value) { throw null; }
public override string ToString() { throw null; }
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public enum PrefixOrigin
{
Other = 0,
Expand All @@ -450,6 +489,7 @@ public enum PrefixOrigin
Dhcp = 3,
RouterAdvertisement = 4,
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public enum ScopeLevel
{
None = 0,
Expand All @@ -461,6 +501,7 @@ public enum ScopeLevel
Organization = 8,
Global = 14,
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public enum SuffixOrigin
{
Other = 0,
Expand All @@ -470,13 +511,15 @@ public enum SuffixOrigin
LinkLayerAddress = 4,
Random = 5,
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract partial class TcpConnectionInformation
{
protected TcpConnectionInformation() { }
public abstract System.Net.IPEndPoint LocalEndPoint { get; }
public abstract System.Net.IPEndPoint RemoteEndPoint { get; }
public abstract System.Net.NetworkInformation.TcpState State { get; }
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public enum TcpState
{
Unknown = 0,
Expand All @@ -493,6 +536,7 @@ public enum TcpState
TimeWait = 11,
DeleteTcb = 12,
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract partial class TcpStatistics
{
protected TcpStatistics() { }
Expand All @@ -511,6 +555,7 @@ protected TcpStatistics() { }
public abstract long SegmentsResent { get; }
public abstract long SegmentsSent { get; }
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract partial class UdpStatistics
{
protected UdpStatistics() { }
Expand All @@ -520,6 +565,7 @@ protected UdpStatistics() { }
public abstract long IncomingDatagramsWithErrors { get; }
public abstract int UdpListeners { get; }
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract partial class UnicastIPAddressInformation : System.Net.NetworkInformation.IPAddressInformation
{
protected UnicastIPAddressInformation() { }
Expand All @@ -532,6 +578,7 @@ protected UnicastIPAddressInformation() { }
public abstract System.Net.NetworkInformation.PrefixOrigin PrefixOrigin { get; }
public abstract System.Net.NetworkInformation.SuffixOrigin SuffixOrigin { get; }
}
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public partial class UnicastIPAddressInformationCollection : System.Collections.Generic.ICollection<System.Net.NetworkInformation.UnicastIPAddressInformation>, System.Collections.Generic.IEnumerable<System.Net.NetworkInformation.UnicastIPAddressInformation>, System.Collections.IEnumerable
{
protected internal UnicastIPAddressInformationCollection() { }
Expand Down
Loading