libluna: Add a few more network-related errno codes
This commit is contained in:
parent
be5903c0c8
commit
ec5b83ff01
@ -51,9 +51,12 @@
|
||||
#define EOPNOTSUPP 95 // Operation not supported
|
||||
#define EAFNOSUPPORT 97 // Address family not supported by protocol
|
||||
#define EADDRINUSE 98 // Address already in use
|
||||
#define EADDRNOTAVAIL 99 // Cannot assign requested address
|
||||
#define ENETRESET 102 // Network dropped connection on reset
|
||||
#define ECONNRESET 104 // Connection reset by peer
|
||||
#define EISCONN 106 // Transport endpoint is already connected
|
||||
#define ENOTCONN 107 // Transport endpoint is not connected
|
||||
#define ETIMEDOUT 110 // Connection timed out
|
||||
#define ECONNREFUSED 111 // Connection refused
|
||||
#define EALREADY 114 // Operation already in progress
|
||||
#define EINPROGRESS 115 // Operation now in progress
|
||||
|
@ -60,6 +60,9 @@ const char* error_string(int error)
|
||||
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";
|
||||
case EADDRNOTAVAIL: return "Cannot assign requested address";
|
||||
case ECONNREFUSED: return "Connection refused";
|
||||
case EINPROGRESS: return "Operation now in progress";
|
||||
default: return "Unknown error";
|
||||
}
|
||||
}
|
||||
@ -122,6 +125,13 @@ const char* error_name(int error)
|
||||
ERROR(EISCONN);
|
||||
ERROR(ETIMEDOUT);
|
||||
ERROR(EALREADY);
|
||||
ERROR(EDESTADDRREQ);
|
||||
ERROR(EPROTOTYPE);
|
||||
ERROR(EAFNOSUPPORT);
|
||||
ERROR(ENOTCONN);
|
||||
ERROR(EADDRNOTAVAIL);
|
||||
ERROR(ECONNREFUSED);
|
||||
ERROR(EINPROGRESS);
|
||||
default: return nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user