126 references to Error
System.Net.Ping (126)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (7)
118
private readonly
Error
_error;
127
internal ErrorInfo(
Error
error)
133
internal
Error
Error
156
internal static
Error
GetLastError()
197
internal static partial
Error
ConvertErrorPlatformToPal(int platformErrno);
201
internal static partial int ConvertErrorPalToPlatform(
Error
error);
219
public static Interop.ErrorInfo Info(this Interop.
Error
error)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Socket.cs (1)
14
internal static unsafe partial
Error
Socket(int addressFamily, int socketType, int protocolType, IntPtr* socket);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.SocketAddress.cs (9)
14
internal static unsafe partial
Error
GetSocketAddressSizes(int* ipv4SocketAddressSize, int* ipv6SocketAddressSize, int* udsSocketAddressSize, int* maxSocketAddressSize);
18
internal static unsafe partial
Error
GetAddressFamily(byte* socketAddress, int socketAddressLen, int* addressFamily);
22
internal static unsafe partial
Error
SetAddressFamily(byte* socketAddress, int socketAddressLen, int addressFamily);
26
internal static unsafe partial
Error
GetPort(byte* socketAddress, int socketAddressLen, ushort* port);
30
internal static unsafe partial
Error
SetPort(byte* socketAddress, int socketAddressLen, ushort port);
34
internal static unsafe partial
Error
GetIPv4Address(byte* socketAddress, int socketAddressLen, uint* address);
38
internal static unsafe partial
Error
SetIPv4Address(byte* socketAddress, int socketAddressLen, uint address);
41
internal static unsafe partial
Error
GetIPv6Address(byte* socketAddress, int socketAddressLen, byte* address, int addressLen, uint* scopeId);
44
internal static unsafe partial
Error
SetIPv6Address(byte* socketAddress, int socketAddressLen, byte* address, int addressLen, uint scopeId);
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (14)
26
Interop.
Error
err = Interop.Sys.GetSocketAddressSizes(&ipv4, &ipv6, &uds, &max);
27
Debug.Assert(err == Interop.
Error
.SUCCESS, $"Unexpected err: {err}");
39
private static void ThrowOnFailure(Interop.
Error
err)
43
case Interop.
Error
.SUCCESS:
46
case Interop.
Error
.EFAULT:
50
case Interop.
Error
.EAFNOSUPPORT:
63
Interop.
Error
err;
75
Interop.
Error
err;
91
Interop.
Error
err;
103
Interop.
Error
err;
115
Interop.
Error
err;
128
Interop.
Error
err;
141
Interop.
Error
err;
167
Interop.
Error
err;
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.Unix.cs (3)
25
Interop.
Error
result = Interop.Sys.Socket((int)af, DgramSocketType, 0, &socket);
27
return result != Interop.
Error
.EAFNOSUPPORT && result != Interop.
Error
.EPROTONOSUPPORT;
src\libraries\Common\src\System\Net\Sockets\SocketErrorPal.Unix.cs (92)
34
private static readonly Dictionary<Interop.
Error
, SocketError> s_nativeErrorToSocketError = new Dictionary<Interop.
Error
, SocketError>(NativeErrorToSocketErrorCount)
36
{ Interop.
Error
.EACCES, SocketError.AccessDenied },
37
{ Interop.
Error
.EADDRINUSE, SocketError.AddressAlreadyInUse },
38
{ Interop.
Error
.EADDRNOTAVAIL, SocketError.AddressNotAvailable },
39
{ Interop.
Error
.EAFNOSUPPORT, SocketError.AddressFamilyNotSupported },
40
{ Interop.
Error
.EAGAIN, SocketError.WouldBlock },
41
{ Interop.
Error
.EALREADY, SocketError.AlreadyInProgress },
42
{ Interop.
Error
.EBADF, SocketError.OperationAborted },
43
{ Interop.
Error
.ECANCELED, SocketError.OperationAborted },
44
{ Interop.
Error
.ECONNABORTED, SocketError.ConnectionAborted },
45
{ Interop.
Error
.ECONNREFUSED, SocketError.ConnectionRefused },
46
{ Interop.
Error
.ECONNRESET, SocketError.ConnectionReset },
47
{ Interop.
Error
.EDESTADDRREQ, SocketError.DestinationAddressRequired },
48
{ Interop.
Error
.EFAULT, SocketError.Fault },
49
{ Interop.
Error
.EHOSTDOWN, SocketError.HostDown },
50
{ Interop.
Error
.ENXIO, SocketError.HostNotFound }, // not perfect, but closest match available
51
{ Interop.
Error
.EHOSTUNREACH, SocketError.HostUnreachable },
52
{ Interop.
Error
.EINPROGRESS, SocketError.InProgress },
53
{ Interop.
Error
.EINTR, SocketError.Interrupted },
54
{ Interop.
Error
.EINVAL, SocketError.InvalidArgument },
55
{ Interop.
Error
.EISCONN, SocketError.IsConnected },
56
{ Interop.
Error
.EMFILE, SocketError.TooManyOpenSockets },
57
{ Interop.
Error
.EMSGSIZE, SocketError.MessageSize },
58
{ Interop.
Error
.ENETDOWN, SocketError.NetworkDown },
59
{ Interop.
Error
.ENETRESET, SocketError.NetworkReset },
60
{ Interop.
Error
.ENETUNREACH, SocketError.NetworkUnreachable },
61
{ Interop.
Error
.ENFILE, SocketError.TooManyOpenSockets },
62
{ Interop.
Error
.ENOBUFS, SocketError.NoBufferSpaceAvailable },
63
{ Interop.
Error
.ENODATA, SocketError.NoData },
64
{ Interop.
Error
.ENOENT, SocketError.AddressNotAvailable },
65
{ Interop.
Error
.ENOPROTOOPT, SocketError.ProtocolOption },
66
{ Interop.
Error
.ENOTCONN, SocketError.NotConnected },
67
{ Interop.
Error
.ENOTSOCK, SocketError.NotSocket },
68
{ Interop.
Error
.ENOTSUP, SocketError.OperationNotSupported },
69
{ Interop.
Error
.EPERM, SocketError.AccessDenied },
70
{ Interop.
Error
.EPIPE, SocketError.Shutdown },
71
{ Interop.
Error
.EPFNOSUPPORT, SocketError.ProtocolFamilyNotSupported },
72
{ Interop.
Error
.EPROTONOSUPPORT, SocketError.ProtocolNotSupported },
73
{ Interop.
Error
.EPROTOTYPE, SocketError.ProtocolType },
74
{ Interop.
Error
.ESOCKTNOSUPPORT, SocketError.SocketNotSupported },
75
{ Interop.
Error
.ESHUTDOWN, SocketError.Disconnecting },
76
{ Interop.
Error
.SUCCESS, SocketError.Success },
77
{ Interop.
Error
.ETIMEDOUT, SocketError.TimedOut },
80
private static readonly Dictionary<SocketError, Interop.
Error
> s_socketErrorToNativeError = new Dictionary<SocketError, Interop.
Error
>(SocketErrorToNativeErrorCount)
88
{ SocketError.AccessDenied, Interop.
Error
.EACCES}, // could also have been EPERM
89
{ SocketError.AddressAlreadyInUse, Interop.
Error
.EADDRINUSE },
90
{ SocketError.AddressNotAvailable, Interop.
Error
.EADDRNOTAVAIL },
91
{ SocketError.AddressFamilyNotSupported, Interop.
Error
.EAFNOSUPPORT },
92
{ SocketError.AlreadyInProgress, Interop.
Error
.EALREADY },
93
{ SocketError.ConnectionAborted, Interop.
Error
.ECONNABORTED },
94
{ SocketError.ConnectionRefused, Interop.
Error
.ECONNREFUSED },
95
{ SocketError.ConnectionReset, Interop.
Error
.ECONNRESET },
96
{ SocketError.DestinationAddressRequired, Interop.
Error
.EDESTADDRREQ },
97
{ SocketError.Disconnecting, Interop.
Error
.ESHUTDOWN },
98
{ SocketError.Fault, Interop.
Error
.EFAULT },
99
{ SocketError.HostDown, Interop.
Error
.EHOSTDOWN },
100
{ SocketError.HostNotFound, Interop.
Error
.EHOSTNOTFOUND },
101
{ SocketError.HostUnreachable, Interop.
Error
.EHOSTUNREACH },
102
{ SocketError.InProgress, Interop.
Error
.EINPROGRESS },
103
{ SocketError.Interrupted, Interop.
Error
.EINTR },
104
{ SocketError.InvalidArgument, Interop.
Error
.EINVAL },
105
{ SocketError.IOPending, Interop.
Error
.EINPROGRESS },
106
{ SocketError.IsConnected, Interop.
Error
.EISCONN },
107
{ SocketError.MessageSize, Interop.
Error
.EMSGSIZE },
108
{ SocketError.NetworkDown, Interop.
Error
.ENETDOWN },
109
{ SocketError.NetworkReset, Interop.
Error
.ENETRESET },
110
{ SocketError.NetworkUnreachable, Interop.
Error
.ENETUNREACH },
111
{ SocketError.NoBufferSpaceAvailable, Interop.
Error
.ENOBUFS },
112
{ SocketError.NoData, Interop.
Error
.ENODATA },
113
{ SocketError.NotConnected, Interop.
Error
.ENOTCONN },
114
{ SocketError.NotSocket, Interop.
Error
.ENOTSOCK },
115
{ SocketError.OperationAborted, Interop.
Error
.ECANCELED },
116
{ SocketError.OperationNotSupported, Interop.
Error
.ENOTSUP },
117
{ SocketError.ProtocolFamilyNotSupported, Interop.
Error
.EPFNOSUPPORT },
118
{ SocketError.ProtocolNotSupported, Interop.
Error
.EPROTONOSUPPORT },
119
{ SocketError.ProtocolOption, Interop.
Error
.ENOPROTOOPT },
120
{ SocketError.ProtocolType, Interop.
Error
.EPROTOTYPE },
121
{ SocketError.Shutdown, Interop.
Error
.EPIPE },
122
{ SocketError.SocketNotSupported, Interop.
Error
.ESOCKTNOSUPPORT },
123
{ SocketError.Success, Interop.
Error
.SUCCESS },
124
{ SocketError.TimedOut, Interop.
Error
.ETIMEDOUT },
125
{ SocketError.TooManyOpenSockets, Interop.
Error
.ENFILE }, // could also have been EMFILE
126
{ SocketError.TryAgain, Interop.
Error
.EAGAIN }, // not a perfect mapping, but better than nothing
127
{ SocketError.WouldBlock, Interop.
Error
.EAGAIN },
128
{ SocketError.SocketError, Interop.
Error
.ESOCKETERROR },
131
internal static SocketError GetSocketErrorForNativeError(Interop.
Error
errno)
139
internal static Interop.
Error
GetNativeErrorForSocketError(SocketError error)
141
Interop.
Error
errno;
145
errno = (Interop.
Error
)(int)error;
150
internal static bool TryGetNativeErrorForSocketError(SocketError error, out Interop.
Error
errno)