104 references to Interop
System.Net.NetworkInformation (104)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LibraryImports.g.cs (28)
7
public static unsafe extern partial int EnumerateInterfaceAddresses(void* context, delegate* unmanaged<void*, byte*, global::
Interop
.Sys.IpAddressInfo*, void> ipv4Found, delegate* unmanaged<void*, byte*, global::
Interop
.Sys.IpAddressInfo*, uint*, void> ipv6Found, delegate* unmanaged<void*, byte*, global::
Interop
.Sys.LinkLayerAddressInfo*, void> linkLayerFound);
15
public static unsafe extern partial int EnumerateGatewayAddressesForInterface(void* context, uint interfaceIndex, delegate* unmanaged<void*, global::
Interop
.Sys.IpAddressInfo*, void> onGatewayFound);
23
public static unsafe partial int GetNetworkInterfaces(int* count, global::
Interop
.Sys.NetworkInterfaceInfo** addrs, int* addressCount, global::
Interop
.Sys.IpAddressInfo** aa)
38
static extern unsafe int __PInvoke(int* __count_native, global::
Interop
.Sys.NetworkInterfaceInfo** __addrs_native, int* __addressCount_native, global::
Interop
.Sys.IpAddressInfo** __aa_native);
89
internal static extern partial global::
Interop
.Error ConvertErrorPlatformToPal(int platformErrno);
97
internal static extern partial int ConvertErrorPalToPlatform(global::
Interop
.Error error);
113
public static unsafe partial global::
Interop
.Error CreateNetworkChangeListenerSocket(nint* socket)
118
global::
Interop
.Error __retVal;
128
static extern unsafe global::
Interop
.Error __PInvoke(nint* __socket_native);
138
public static unsafe partial global::
Interop
.Error ReadEvents(global::System.Runtime.InteropServices.SafeHandle socket, delegate* unmanaged<nint, global::
Interop
.Sys.NetworkChangeKind, void> onNetworkChange)
143
global::
Interop
.Error __retVal = default;
164
static extern unsafe global::
Interop
.Error __PInvoke(nint __socket_native, delegate* unmanaged<nint, global::
Interop
.Sys.NetworkChangeKind, void> __onNetworkChange_native);
174
public static unsafe extern partial int GetTcpGlobalStatistics(global::
Interop
.Sys.TcpGlobalStatistics* statistics);
182
public static unsafe extern partial int GetIPv4GlobalStatistics(global::
Interop
.Sys.IPv4GlobalStatistics* statistics);
190
public static unsafe extern partial int GetUdpGlobalStatistics(global::
Interop
.Sys.UdpGlobalStatistics* statistics);
198
public static unsafe extern partial int GetIcmpv4GlobalStatistics(global::
Interop
.Sys.Icmpv4GlobalStatistics* statistics);
206
public static unsafe extern partial int GetIcmpv6GlobalStatistics(global::
Interop
.Sys.Icmpv6GlobalStatistics* statistics);
214
public static partial int GetNativeIPInterfaceStatistics(string name, out global::
Interop
.Sys.NativeIPInterfaceStatistics stats)
228
fixed (global::
Interop
.Sys.NativeIPInterfaceStatistics* __stats_native = &stats)
243
static extern unsafe int __PInvoke(byte* __name_native, global::
Interop
.Sys.NativeIPInterfaceStatistics* __stats_native);
269
public static unsafe extern partial int GetActiveTcpConnectionInfos(global::
Interop
.Sys.NativeTcpConnectionInformation* infos, int* infoCount);
285
public static unsafe extern partial int GetActiveUdpListeners(global::
Interop
.Sys.IPEndPointInfo* infos, int* infoCount);
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (6)
124
_error =
Interop
.Sys.ConvertErrorPlatformToPal(errno);
141
get { return _rawErrno == -1 ? (_rawErrno =
Interop
.Sys.ConvertErrorPalToPlatform(_error)) : _rawErrno; }
146
return
Interop
.Sys.StrError(RawErrno);
220
public static
Interop
.ErrorInfo Info(this
Interop
.Error error)
222
return new
Interop
.ErrorInfo(error);
src\runtime\src\libraries\Common\src\System\Net\NetworkInformation\HostInformationPal.Unix.cs (2)
10
return
Interop
.Sys.GetHostName();
15
return
Interop
.Sys.GetDomainName();
System\Net\NetworkInformation\BsdIcmpV4Statistics.cs (2)
35
Interop
.Sys.Icmpv4GlobalStatistics statistics;
36
if (
Interop
.Sys.GetIcmpv4GlobalStatistics(&statistics) != 0)
System\Net\NetworkInformation\BsdIcmpV6Statistics.cs (2)
41
Interop
.Sys.Icmpv6GlobalStatistics statistics;
42
if (
Interop
.Sys.GetIcmpv6GlobalStatistics(&statistics) != 0)
System\Net\NetworkInformation\BsdIPGlobalProperties.cs (12)
12
int realCount =
Interop
.Sys.GetEstimatedTcpConnectionCount();
20
Interop
.Sys.NativeTcpConnectionInformation[] infos = new
Interop
.Sys.NativeTcpConnectionInformation[infoCount];
21
fixed (
Interop
.Sys.NativeTcpConnectionInformation* infosPtr = infos)
23
if (
Interop
.Sys.GetActiveTcpConnectionInfos(infosPtr, &infoCount) == -1)
33
Interop
.Sys.NativeTcpConnectionInformation nativeInfo = infos[i];
78
int realCount =
Interop
.Sys.GetEstimatedUdpListenerCount();
86
Interop
.Sys.IPEndPointInfo[] infos = new
Interop
.Sys.IPEndPointInfo[infoCount];
87
fixed (
Interop
.Sys.IPEndPointInfo* infosPtr = infos)
89
if (
Interop
.Sys.GetActiveUdpListeners(infosPtr, &infoCount) == -1)
98
Interop
.Sys.IPEndPointInfo endPointInfo = infos[i];
System\Net\NetworkInformation\BsdIpInterfaceProperties.cs (2)
77
if (
Interop
.Sys.EnumerateGatewayAddressesForInterface(&context, (uint)interfaceIndex, &OnGatewayFound) == -1)
92
private static unsafe void OnGatewayFound(void* pContext,
Interop
.Sys.IpAddressInfo* gatewayAddressInfo)
System\Net\NetworkInformation\BsdIpInterfaceStatistics.cs (2)
24
Interop
.Sys.NativeIPInterfaceStatistics nativeStats;
25
if (
Interop
.Sys.GetNativeIPInterfaceStatistics(name, out nativeStats) == -1)
System\Net\NetworkInformation\BsdIPv4GlobalStatistics.cs (5)
39
private static unsafe void ProcessIpv4Address(void* pContext, byte* ifaceName,
Interop
.Sys.IpAddressInfo* ipAddr)
49
Interop
.Sys.IPv4GlobalStatistics statistics;
50
if (
Interop
.Sys.GetIPv4GlobalStatistics(&statistics) == -1)
74
Interop
.Sys.EnumerateInterfaceAddresses(
83
_numRoutes =
Interop
.Sys.GetNumRoutes();
System\Net\NetworkInformation\BsdNetworkInterface.cs (9)
21
Interop
.Sys.NativeIPInterfaceStatistics nativeStats;
22
if (
Interop
.Sys.GetNativeIPInterfaceStatistics(name, out nativeStats) == -1)
27
if ((nativeStats.Flags & (ulong)
Interop
.Sys.InterfaceFlags.InterfaceError) != 0)
33
_operationalStatus = (nativeStats.Flags & (ulong)
Interop
.Sys.InterfaceFlags.InterfaceHasLink) != 0 ? OperationalStatus.Up : OperationalStatus.Down;
36
_supportsMulticast = (nativeStats.Flags & (ulong)
Interop
.Sys.InterfaceFlags.InterfaceSupportsMulticast) != 0;
74
private static unsafe void ProcessIpv4Address(void* pContext, byte* ifaceName,
Interop
.Sys.IpAddressInfo* ipAddr)
88
private static unsafe void ProcessIpv6Address(void* pContext, byte* ifaceName,
Interop
.Sys.IpAddressInfo* ipAddr, uint* scopeId)
102
private static unsafe void ProcessLinkLayerAddress(void* pContext, byte* ifaceName,
Interop
.Sys.LinkLayerAddressInfo* llAddr)
127
int result =
Interop
.Sys.EnumerateInterfaceAddresses(&context, &ProcessIpv4Address, &ProcessIpv6Address, &ProcessLinkLayerAddress);
System\Net\NetworkInformation\BsdTcpStatistics.cs (2)
22
Interop
.Sys.TcpGlobalStatistics statistics;
23
if (
Interop
.Sys.GetTcpGlobalStatistics(&statistics) != 0)
System\Net\NetworkInformation\BsdUdpStatistics.cs (2)
18
Interop
.Sys.UdpGlobalStatistics statistics;
19
if (
Interop
.Sys.GetUdpGlobalStatistics(&statistics) == -1)
System\Net\NetworkInformation\IPAddressUtil.cs (1)
35
public static unsafe IPAddress GetIPAddressFromNativeInfo(
Interop
.Sys.IpAddressInfo* addressInfo)
System\Net\NetworkInformation\LinuxIPGlobalStatistics.cs (3)
94
private static unsafe void ProcessIpv4Address(void* pContext, byte* ifaceName,
Interop
.Sys.IpAddressInfo* ipAddr)
100
private static unsafe void ProcessIpv6Address(void* pContext, byte* ifaceName,
Interop
.Sys.IpAddressInfo* ipAddr, uint* scopeId)
108
Interop
.Sys.EnumerateInterfaceAddresses(&count,
System\Net\NetworkInformation\LinuxNetworkInterface.cs (4)
80
Interop
.Sys.NetworkInterfaceInfo* nii = null;
81
Interop
.Sys.IpAddressInfo* ai = null;
84
if (
Interop
.Sys.GetNetworkInterfaces(&interfaceCount, &nii, &addressCount, &ai) != 0)
86
string message =
Interop
.Sys.GetLastErrorInfo().GetErrorMessage();
System\Net\NetworkInformation\NetworkAddressChange.Unix.cs (15)
182
Interop
.Error result =
Interop
.Sys.CreateNetworkChangeListenerSocket(&newSocket);
183
if (result !=
Interop
.Error.SUCCESS)
185
string message =
Interop
.Sys.GetLastErrorInfo().GetErrorMessage();
217
Interop
.Error result = ReadEvents(socket);
219
if (result !=
Interop
.Error.SUCCESS &&
220
result !=
Interop
.Error.EAGAIN)
241
static unsafe
Interop
.Error ReadEvents(Socket socket)
242
=>
Interop
.Sys.ReadEvents(socket.SafeHandle, &ProcessEvent);
246
private static void ProcessEvent(IntPtr socket,
Interop
.Sys.NetworkChangeKind kind)
248
if (kind !=
Interop
.Sys.NetworkChangeKind.None)
262
private static void OnSocketEvent(
Interop
.Sys.NetworkChangeKind kind)
266
case
Interop
.Sys.NetworkChangeKind.AddressAdded:
267
case
Interop
.Sys.NetworkChangeKind.AddressRemoved:
270
case
Interop
.Sys.NetworkChangeKind.AvailabilityChanged:
System\Net\NetworkInformation\StringParsingHelpers.Connections.cs (1)
316
return
Interop
.Sys.MapTcpState((int)state);
System\Net\NetworkInformation\UnixIPGlobalProperties.cs (3)
73
private static unsafe void ProcessIpv4Address(void* pContext, byte* ifaceName,
Interop
.Sys.IpAddressInfo* ipAddr)
91
private static unsafe void ProcessIpv6Address(void* pContext, byte* ifaceName,
Interop
.Sys.IpAddressInfo* ipAddr, uint* scopeId)
115
Interop
.Sys.EnumerateInterfaceAddresses(&context, &ProcessIpv4Address, &ProcessIpv6Address, null);
System\Net\NetworkInformation\UnixNetworkInterface.cs (3)
83
protected unsafe void ProcessIpv4Address(
Interop
.Sys.IpAddressInfo* addressInfo)
90
protected unsafe void ProcessIpv6Address(
Interop
.Sys.IpAddressInfo* addressInfo, uint scopeId)
99
protected unsafe void ProcessLinkLayerAddress(
Interop
.Sys.LinkLayerAddressInfo* llAddr)