WINC1500 IoT Software APIs: Error Codes

WINC1500 IoT Software API

WINC1500 IoT Software APIs  19.5.2
WINC Software API Reference Manual
Error Codes

Macros

#define SOCK_ERR_NO_ERROR   0
 
#define SOCK_ERR_INVALID_ADDRESS   -1
 
#define SOCK_ERR_ADDR_ALREADY_IN_USE   -2
 
#define SOCK_ERR_MAX_TCP_SOCK   -3
 
#define SOCK_ERR_MAX_UDP_SOCK   -4
 
#define SOCK_ERR_INVALID_ARG   -6
 
#define SOCK_ERR_MAX_LISTEN_SOCK   -7
 
#define SOCK_ERR_INVALID   -9
 
#define SOCK_ERR_ADDR_IS_REQUIRED   -11
 
#define SOCK_ERR_CONN_ABORTED   -12
 
#define SOCK_ERR_TIMEOUT   -13
 
#define SOCK_ERR_BUFFER_FULL   -14
 
#define _htonl(m)   (uint32)(((uint32)(m << 24)) | ((uint32)((m & 0x0000FF00) << 8)) | ((uint32)((m & 0x00FF0000) >> 8)) | ((uint32)(m >> 24)))
 
#define _htons(A)   (uint16)((((uint16) (A)) << 8) | (((uint16) (A)) >> 8))
 
#define _ntohl   _htonl
 
#define _ntohs   _htons
 

Detailed Description

The following list of macros are used to define the possible error codes returned as a result of a call to a socket function. Errors are listed in numerical order with the error macro name.

Macro Definition Documentation

◆ SOCK_ERR_NO_ERROR

#define SOCK_ERR_NO_ERROR   0

Successful socket operation

◆ SOCK_ERR_INVALID_ADDRESS

#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

◆ SOCK_ERR_ADDR_ALREADY_IN_USE

#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.

◆ SOCK_ERR_MAX_TCP_SOCK

#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.

◆ SOCK_ERR_MAX_UDP_SOCK

#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

◆ SOCK_ERR_INVALID_ARG

#define SOCK_ERR_INVALID_ARG   -6

An invalid argument is passed to a function.

◆ SOCK_ERR_MAX_LISTEN_SOCK

#define SOCK_ERR_MAX_LISTEN_SOCK   -7

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

◆ SOCK_ERR_INVALID

#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.

◆ SOCK_ERR_ADDR_IS_REQUIRED

#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.

◆ SOCK_ERR_CONN_ABORTED

#define SOCK_ERR_CONN_ABORTED   -12

The socket is closed by the peer. The local socket is closed also.

◆ SOCK_ERR_TIMEOUT

#define SOCK_ERR_TIMEOUT   -13

The socket pending operation has Timedout.

◆ SOCK_ERR_BUFFER_FULL

#define SOCK_ERR_BUFFER_FULL   -14

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

◆ _htonl

#define _htonl (   m)    (uint32)(((uint32)(m << 24)) | ((uint32)((m & 0x0000FF00) << 8)) | ((uint32)((m & 0x00FF0000) >> 8)) | ((uint32)(m >> 24)))

Convert a 4-byte integer from the host representation to the Network byte order representation.

◆ _htons

#define _htons (   A)    (uint16)((((uint16) (A)) << 8) | (((uint16) (A)) >> 8))

Convert a 2-byte integer (short) from the host representation to the Network byte order representation.

◆ _ntohl

#define _ntohl   _htonl

Convert a 4-byte integer from the Network byte order representation to the host representation .

◆ _ntohs

#define _ntohs   _htons

Convert a 2-byte integer from the Network byte order representation to the host representation .

Generated on Thu Jan 26 2017 22:15:21 for WINC1500 IoT Software APIs by   doxygen 1.8.13