Chapter 4. Special Variables

The following variables are maintained by the system: errno and h_errno.

Variable errno

The variable errno is set after each RxSock call. It can have one of the following values or any other numeric value:

  • EWOULDBLOCK

  • EINPROGRESS

  • EALREADY

  • ENOTSOCK

  • EDESTADDRREQ

  • EMSGSIZE

  • EPROTOTYPE

  • ENOPROTOOPT

  • EPROTONOSUPPORT

  • ESOCKTNOSUPPORT

  • EOPNOTSUPP

  • EPFNOSUPPORT

  • EAFNOSUPPORT

  • EADDRINUSE

  • EADDRNOTAVAIL

  • ENETDOWN

  • ENETUNREACH

  • ENETRESET

  • ECONNABORTED

  • ECONNRESET

  • ENOBUFS

  • EISCONN

  • ENOTCONN

  • ESHUTDOWN

  • ETOOMANYREFS

  • ETIMEDOUT

  • ECONNREFUSED

  • ELOOP

  • ENAMETOOLONG

  • EHOSTDOWN

  • EHOSTUNREACH

  • ENOTEMPTY

Note: The value is set even if the function called does not set the variable, in which case the value has no meaning. A value of 0 indicates that no error occurred.

Variable h_errno

The variable h_errno is set after each RxSock call. It can have one of the following values or any other numeric value:

  • HOST_NOT_FOUND

  • TRY_AGAIN

  • NO_RECOVERY

  • NO_ADDRESS

Note: The value is set even if the function called does not set the variable, in which case the value has no meaning. A value of 0 indicates that no error occurred.