libluna: Add new socket-related errno codes

This commit is contained in:
apio 2023-07-27 16:31:57 +02:00
parent 28cc4b2306
commit 27fcdab85f
Signed by: apio
GPG Key ID: B8A7D06E42258954
2 changed files with 8 additions and 0 deletions

View File

@ -45,11 +45,15 @@
#define EOVERFLOW 75 // Value too large for defined data type #define EOVERFLOW 75 // Value too large for defined data type
#define EILSEQ 84 // Invalid or incomplete multibyte or wide character #define EILSEQ 84 // Invalid or incomplete multibyte or wide character
#define ENOTSOCK 88 // Socket operation on non-socket #define ENOTSOCK 88 // Socket operation on non-socket
#define EDESTADDRREQ 89 // Destination address required
#define EPROTOTYPE 91 // Protocol wrong type for socket
#define ENOTSUP 95 // Operation not supported #define ENOTSUP 95 // Operation not supported
#define EOPNOTSUPP 95 // Operation not supported #define EOPNOTSUPP 95 // Operation not supported
#define EAFNOSUPPORT 97 // Address family not supported by protocol
#define EADDRINUSE 98 // Address already in use #define EADDRINUSE 98 // Address already in use
#define ENETRESET 102 // Network dropped connection on reset #define ENETRESET 102 // Network dropped connection on reset
#define ECONNRESET 104 // Connection reset by peer #define ECONNRESET 104 // Connection reset by peer
#define EISCONN 106 // Transport endpoint is already connected #define EISCONN 106 // Transport endpoint is already connected
#define ENOTCONN 107 // Transport endpoint is not connected
#define ETIMEDOUT 110 // Connection timed out #define ETIMEDOUT 110 // Connection timed out
#define EALREADY 114 // Operation already in progress #define EALREADY 114 // Operation already in progress

View File

@ -56,6 +56,10 @@ const char* error_string(int error)
case EISCONN: return "Transport endpoint is already connected"; case EISCONN: return "Transport endpoint is already connected";
case ETIMEDOUT: return "Connection timed out"; case ETIMEDOUT: return "Connection timed out";
case EALREADY: return "Operation already in progress"; case EALREADY: return "Operation already in progress";
case EDESTADDRREQ: return "Destination address required";
case EPROTOTYPE: return "Protocol wrong type for socket";
case EAFNOSUPPORT: return "Address family not supported by protocol";
case ENOTCONN: return "Transport endpoint is not connected";
default: return "Unknown error"; default: return "Unknown error";
} }
} }