53 references to Interop
System.Net.NetworkInformation (53)
LibraryImports.g.cs (15)
7
internal static extern partial global::
Interop
.Error ConvertErrorPlatformToPal(int platformErrno);
15
internal static extern partial int ConvertErrorPalToPlatform(global::
Interop
.Error error);
31
internal static unsafe extern partial global::
Interop
.Error GetSocketAddressSizes(int* ipv4SocketAddressSize, int* ipv6SocketAddressSize, int* udsSocketAddressSize, int* maxSocketAddressSize);
39
internal static unsafe extern partial global::
Interop
.Error GetAddressFamily(byte* socketAddress, int socketAddressLen, int* addressFamily);
47
internal static unsafe extern partial global::
Interop
.Error SetAddressFamily(byte* socketAddress, int socketAddressLen, int addressFamily);
55
internal static unsafe extern partial global::
Interop
.Error GetPort(byte* socketAddress, int socketAddressLen, ushort* port);
63
internal static unsafe extern partial global::
Interop
.Error SetPort(byte* socketAddress, int socketAddressLen, ushort port);
71
internal static unsafe extern partial global::
Interop
.Error GetIPv4Address(byte* socketAddress, int socketAddressLen, uint* address);
79
internal static unsafe extern partial global::
Interop
.Error SetIPv4Address(byte* socketAddress, int socketAddressLen, uint address);
87
internal static unsafe extern partial global::
Interop
.Error GetIPv6Address(byte* socketAddress, int socketAddressLen, byte* address, int addressLen, uint* scopeId);
95
internal static unsafe extern partial global::
Interop
.Error SetIPv6Address(byte* socketAddress, int socketAddressLen, byte* address, int addressLen, uint scopeId);
134
internal static unsafe extern partial int GetNameInfo(byte* address, uint addressLength, byte isIpv6, byte* host, uint hostLength, byte* service, uint serviceLength, global::
Interop
.Sys.GetNameInfoFlags flags);
142
internal static unsafe partial int GetHostEntryForName(string address, global::System.Net.Sockets.AddressFamily family, global::
Interop
.Sys.HostEntry* entry)
167
static extern unsafe int __PInvoke(byte* __address_native, global::System.Net.Sockets.AddressFamily __family_native, global::
Interop
.Sys.HostEntry* __entry_native);
176
internal static unsafe extern partial void FreeHostEntry(global::
Interop
.Sys.HostEntry* entry);
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\libraries\Common\src\System\Net\NetworkInformation\HostInformationPal.Unix.cs (2)
10
return
Interop
.Sys.GetHostName();
15
return
Interop
.Sys.GetDomainName();
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)
158
Interop
.Error result =
Interop
.Sys.CreateNetworkChangeListenerSocket(&newSocket);
159
if (result !=
Interop
.Error.SUCCESS)
161
string message =
Interop
.Sys.GetLastErrorInfo().GetErrorMessage();
193
Interop
.Error result = ReadEvents(socket);
195
if (result !=
Interop
.Error.SUCCESS &&
196
result !=
Interop
.Error.EAGAIN)
217
static unsafe
Interop
.Error ReadEvents(Socket socket)
218
=>
Interop
.Sys.ReadEvents(socket.SafeHandle, &ProcessEvent);
222
private static void ProcessEvent(IntPtr socket,
Interop
.Sys.NetworkChangeKind kind)
224
if (kind !=
Interop
.Sys.NetworkChangeKind.None)
238
private static void OnSocketEvent(
Interop
.Sys.NetworkChangeKind kind)
242
case
Interop
.Sys.NetworkChangeKind.AddressAdded:
243
case
Interop
.Sys.NetworkChangeKind.AddressRemoved:
246
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)
71
private static unsafe void ProcessIpv4Address(void* pContext, byte* ifaceName,
Interop
.Sys.IpAddressInfo* ipAddr)
89
private static unsafe void ProcessIpv6Address(void* pContext, byte* ifaceName,
Interop
.Sys.IpAddressInfo* ipAddr, uint* scopeId)
113
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)