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