41 references to Sys
System.Net.NameResolution (41)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (3)
123
_error = Interop.
Sys
.ConvertErrorPlatformToPal(errno);
140
get { return _rawErrno == -1 ? (_rawErrno = Interop.
Sys
.ConvertErrorPalToPlatform(_error)) : _rawErrno; }
145
return Interop.
Sys
.StrError(RawErrno);
src\libraries\Common\src\System\Net\InteropIPAddressExtensions.Unix.cs (6)
11
public static unsafe Interop.
Sys
.IPAddress GetNativeIPAddress(this IPAddress ipAddress)
13
var nativeIPAddress = default(Interop.
Sys
.IPAddress);
15
ipAddress.TryWriteBytes(new Span<byte>(nativeIPAddress.Address, Interop.
Sys
.IPv6AddressBytes), out int bytesWritten);
16
Debug.Assert(bytesWritten == sizeof(uint) || bytesWritten == Interop.
Sys
.IPv6AddressBytes, $"Unexpected length: {bytesWritten}");
27
public static unsafe IPAddress GetIPAddress(this Interop.
Sys
.IPAddress nativeIPAddress)
37
new ReadOnlySpan<byte>(nativeIPAddress.Address, Interop.
Sys
.IPv6AddressBytes),
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (9)
26
Interop.Error err = Interop.
Sys
.GetSocketAddressSizes(&ipv4, &ipv6, &uds, &max);
66
err = Interop.
Sys
.GetAddressFamily(rawAddress, buffer.Length, (int*)&family);
81
err = Interop.
Sys
.SetAddressFamily(rawAddress, buffer.Length, (int)family);
94
err = Interop.
Sys
.GetPort(rawAddress, buffer.Length, &port);
106
err = Interop.
Sys
.SetPort(rawAddress, buffer.Length, port);
118
err = Interop.
Sys
.GetIPv4Address(rawAddress, buffer.Length, &ipAddress);
132
err = Interop.
Sys
.GetIPv6Address(rawAddress, buffer.Length, ipAddress, address.Length, &localScope);
144
err = Interop.
Sys
.SetIPv4Address(rawAddress, buffer.Length, address);
170
err = Interop.
Sys
.SetIPv6Address(rawAddress, buffer.Length, address, addressLength, scope);
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.Unix.cs (2)
25
Interop.Error result = Interop.
Sys
.Socket((int)af, DgramSocketType, 0, &socket);
33
Interop.
Sys
.Close(socket);
System\Net\NameResolutionPal.Unix.cs (21)
33
case (int)Interop.
Sys
.GetAddrInfoErrorFlags.EAI_AGAIN:
35
case (int)Interop.
Sys
.GetAddrInfoErrorFlags.EAI_BADFLAGS:
36
case (int)Interop.
Sys
.GetAddrInfoErrorFlags.EAI_BADARG:
38
case (int)Interop.
Sys
.GetAddrInfoErrorFlags.EAI_FAIL:
40
case (int)Interop.
Sys
.GetAddrInfoErrorFlags.EAI_FAMILY:
42
case (int)Interop.
Sys
.GetAddrInfoErrorFlags.EAI_NONAME:
44
case (int)Interop.
Sys
.GetAddrInfoErrorFlags.EAI_MEMORY:
46
case (int)Interop.
Sys
.GetAddrInfoErrorFlags.EAI_SYSTEM:
47
Debug.Fail($"Unexpected error: {error} errno: {Interop.
Sys
.GetErrNo()}");
55
private static unsafe void ParseHostEntry(Interop.
Sys
.HostEntry hostEntry, bool justAddresses, out string? hostName, out string[] aliases, out IPAddress[] addresses)
81
var nativeAddresses = new Interop.
Sys
.IPAddress[hostEntry.IPAddressCount];
84
Interop.
Sys
.IPAddress* addressHandle = hostEntry.IPAddressList;
87
Interop.
Sys
.IPAddress nativeAddr = addressHandle[i];
126
Interop.
Sys
.FreeHostEntry(&hostEntry);
138
Interop.
Sys
.HostEntry entry;
139
int result = Interop.
Sys
.GetHostEntryForName(name, addressFamily, &entry);
158
byte* buffer = stackalloc byte[Interop.
Sys
.NI_MAXHOST + 1 /*for null*/];
177
int error = Interop.
Sys
.GetNameInfo(
182
Interop.
Sys
.NI_MAXHOST,
185
Interop.
Sys
.GetNameInfoFlags.NI_NAMEREQD);
192
public static string GetHostName() => Interop.
Sys
.GetHostName();