Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Error Codes

The following list of macros are used to define the possible error codes.

Errors are listed in numerical order with the error macro name.

Macros

#define SOCK_ERR_ADDR_ALREADY_IN_USE   -2
 
#define SOCK_ERR_ADDR_ALREADY_IN_USE   -2
 
#define SOCK_ERR_ADDR_IS_REQUIRED   -11
 
#define SOCK_ERR_ADDR_IS_REQUIRED   -11
 
#define SOCK_ERR_BUFFER_FULL   -14
 
#define SOCK_ERR_BUFFER_FULL   -14
 
#define SOCK_ERR_CONN_ABORTED   -12
 
#define SOCK_ERR_CONN_ABORTED   -12
 
#define SOCK_ERR_INVALID   -9
 
#define SOCK_ERR_INVALID   -9
 
#define SOCK_ERR_INVALID_ADDRESS   -1
 
#define SOCK_ERR_INVALID_ADDRESS   -1
 
#define SOCK_ERR_INVALID_ARG   -6
 
#define SOCK_ERR_INVALID_ARG   -6
 
#define SOCK_ERR_MAX_LISTEN_SOCK   -7
 
#define SOCK_ERR_MAX_LISTEN_SOCK   -7
 
#define SOCK_ERR_MAX_TCP_SOCK   -3
 
#define SOCK_ERR_MAX_TCP_SOCK   -3
 
#define SOCK_ERR_MAX_UDP_SOCK   -4
 
#define SOCK_ERR_MAX_UDP_SOCK   -4
 
#define SOCK_ERR_NO_ERROR   0
 
#define SOCK_ERR_NO_ERROR   0
 
#define SOCK_ERR_TIMEOUT   -13
 
#define SOCK_ERR_TIMEOUT   -13
 

#define SOCK_ERR_ADDR_ALREADY_IN_USE   -2

Socket operation cannot bind on the given address. With socket operations, only one IP address per socket is permitted. Any attempt for a new socket to bind with an IP address already bound to another open socket, will return the following error code. States that bind operation failed.

#define SOCK_ERR_ADDR_ALREADY_IN_USE   -2

Socket operation cannot bind on the given address. Only one IP address per socket, and one socket per IP address is permitted - any attempt for a new socket to bind with an IP address already bound to another open socket will return the following error code.

Referenced by _hwerr_to_stderr().

#define SOCK_ERR_ADDR_IS_REQUIRED   -11

Destination address is required. Failure to provide the socket address required for the socket operation to be completed. It is generated as an error to the sendto function when the address required to send the data to is not known.

#define SOCK_ERR_ADDR_IS_REQUIRED   -11

Destination address is required. Failure to provide the socket address required for the socket operation to be completed. The sendto function requires a destination address to send data.

Referenced by _hwerr_to_stderr().

#define SOCK_ERR_BUFFER_FULL   -14

No buffer space available to be used for the requested socket operation.

#define SOCK_ERR_BUFFER_FULL   -14

No buffer space available to be used for the requested socket operation.

Referenced by _hwerr_to_stderr(), IperfSocketEventHandler(), IperfTCP_SendTestPacket(), IperfUDP_SendTestPacket(), recv(), recvfrom(), send(), and sendto().

#define SOCK_ERR_CONN_ABORTED   -12

The socket is closed (reset) by the peer. If this error is received, the application should call close().

#define SOCK_ERR_CONN_ABORTED   -12

The socket is closed (reset) by the peer. If this error is received, the application should call close().

Referenced by _hwerr_to_stderr(), and http_client_socket_event_handler().

#define SOCK_ERR_INVALID   -9

The requested socket operation is not valid in the current socket state. For example: accept is called on a TCP socket before bind or listen.

#define SOCK_ERR_INVALID   -9

The requested socket operation is not valid in the current socket state. For example: accept is called on a TCP socket before bind or listen.

Referenced by _hwerr_to_stderr(), bind(), close(), connect(), connect_to_server(), ConnectNetwork(), gethostbyname(), listen(), rawSetSockOpt(), secure(), setsockopt(), smtpConnect(), and sslConnect().

#define SOCK_ERR_INVALID_ADDRESS   -1

Socket address is invalid. The socket operation cannot be completed successfully without specifying a specific address For example: bind is called without specifying a port number

#define SOCK_ERR_INVALID_ADDRESS   -1

Socket address is invalid. The socket operation cannot be completed successfully without specifying a valid address For example: bind is called without specifying a port number

Referenced by _hwerr_to_stderr().

#define SOCK_ERR_INVALID_ARG   -6

An invalid argument is passed to a socket function. Identifies that socket operation failed

#define SOCK_ERR_INVALID_ARG   -6
#define SOCK_ERR_MAX_LISTEN_SOCK   -7

Exceeded the maximum number of TCP passive listening sockets. Identifies that listen operation failed.

#define SOCK_ERR_MAX_LISTEN_SOCK   -7

Exceeded the maximum number of TCP passive listening sockets. Identifies that listen operation failed.

Referenced by _hwerr_to_stderr().

#define SOCK_ERR_MAX_TCP_SOCK   -3

Exceeded the maximum number of TCP sockets. A maximum number of TCP sockets opened simultaneously is defined through TCP_SOCK_MAX. It is not permitted to exceed that number at socket creation. Identifies that socket operation failed.

#define SOCK_ERR_MAX_TCP_SOCK   -3

Exceeded the maximum number of TCP sockets. A maximum number of TCP sockets opened simultaneously is defined through TCP_SOCK_MAX. It is not permitted to exceed that number at socket creation. Identifies that socket operation failed.

Referenced by _hwerr_to_stderr().

#define SOCK_ERR_MAX_UDP_SOCK   -4

Exceeded the maximum number of UDP sockets. A maximum number of UDP sockets opened simultaneously is defined through UDP_SOCK_MAX. It is not permitted to exceed that number at socket creation. Identifies that socket operation failed

#define SOCK_ERR_MAX_UDP_SOCK   -4

Exceeded the maximum number of UDP sockets. A maximum number of UDP sockets opened simultaneously is defined through UDP_SOCK_MAX. It is not permitted to exceed that number at socket creation. Identifies that socket operation failed

Referenced by _hwerr_to_stderr().

#define SOCK_ERR_NO_ERROR   0

Successful socket operation. This code is also used with event SOCKET_MSG_RECV if a socket connection is closed. In that case, the application should call close().

#define SOCK_ERR_NO_ERROR   0
#define SOCK_ERR_TIMEOUT   -13

The socket pending operation has timed out. The socket remains open.

#define SOCK_ERR_TIMEOUT   -13

The socket pending operation has timed out. The socket remains open.

Referenced by _hwerr_to_stderr(), demo_wifi_socket_handler(), handle_udp_serv_socket_cb(), m2m_wifi_socket_handler(), socket_cb(), and tcpClientSocketEventHandler().