SOCK_ERR_API_NOT_INITIALIZED,/**< Socket Interface not initialized */
SOCK_ERR_INVALID_SOCKET_ID,/**< The passed socket ID is invalid */
SOCK_ERR_OUT_OF_SOCKETS,/**< No free socket available */
SOCK_ERR_SOCKET_NOT_CREATED,/**< The specified socket has not been created.
*/
SOCK_ERR_SOCKET_OFFLINE,/**< The local port associated with the socket is not
open. Sending/Receiving of messages is not
possible. */
SOCK_ERR_SOCKET_BUSY,/**< A send request is rejected because a previous send
request on the specified socket is not completed */
SOCK_ERR_SOCKET_NOT_CONNECTED,/**< The request is rejected because the
specified TCP connection or no TCP
connection has been established for the
specified socket. */
SOCK_ERR_SOCKET_CONNECTED,/**< The request is rejected because the specified
TCP connection has established a connection
before the filter was activated. */
SOCK_ERR_ADDR_IN_USE,/**< The passed local address is already in use by
another socket. */
SOCK_ERR_INVALID_LOCAL_ADDR,/**< The passed local IP address is invalid. It
is not possible to bind the socket to this
address. Which IP addresses are allowed
depends
on the socket configuration (e.g. socket
type UDP or TCP) and the network settings
adjusted by calling the function sock_init().
*/
SOCK_ERR_INVALID_REMOTE_ADDR,/**< The passed remote IP address is invalid. It
is not possible to send or connect to this
address. Which IP addresses are allowed
depends
on the socket configuration (e.g. socket
type UDP or TCP) and the network settings
adjusted by calling the function sock_init().
*/
SOCK_ERR_NO_DATA_RECEIVED,/**< No data has been received on the specfied
socket or TCP connection. */
SOCK_ERR_NOT_SUPPORTED,/**< The requested action is not supported on the
specified socket. */
SOCK_ERR_TEMPORARY_NOT_EXECUTABLE,/**< The requested action is temporary not
executable on the specified socket due a
concurrent pending request. */
SOCK_ERR_FATAL_ERROR,/**< A fatal error is reported during execution of
function. */
SOCK_ERR_SOCKET_NOT_CREATED,/**< The specified socket has not been created. */
SOCK_ERR_SOCKET_OFFLINE,/**< The local port associated with the socket is not open. Sending/Receiving of messages is not possible. */
SOCK_ERR_SOCKET_BUSY,/**< A send request is rejected because a previous send request on the specified socket is not completed */
SOCK_ERR_SOCKET_NOT_CONNECTED,/**< The request is rejected because the specified TCP connection or no TCP connection has been established for the specified socket. */
SOCK_ERR_SOCKET_CONNECTED,/**< The request is rejected because the specified TCP connection has established a connection before the filter was activated. */
SOCK_ERR_ADDR_IN_USE,/**< The passed local address is already in use by another socket. */
SOCK_ERR_INVALID_LOCAL_ADDR,/**< The passed local IP address is invalid. It is not possible to bind the socket to this address. Which IP addresses are allowed depends
on the socket configuration (e.g. socket type UDP or TCP) and the network settings adjusted by calling the function sock_init(). */
SOCK_ERR_INVALID_REMOTE_ADDR,/**< The passed remote IP address is invalid. It is not possible to send or connect to this address. Which IP addresses are allowed depends
on the socket configuration (e.g. socket type UDP or TCP) and the network settings adjusted by calling the function sock_init(). */
SOCK_ERR_NO_DATA_RECEIVED,/**< No data has been received on the specfied socket or TCP connection. */
SOCK_ERR_NOT_SUPPORTED,/**< The requested action is not supported on the specified socket. */
SOCK_ERR_TEMPORARY_NOT_EXECUTABLE,/**< The requested action is temporary not executable on the specified socket due a concurrent pending request. */
SOCK_ERR_FATAL_ERROR,/**< A fatal error is reported during execution of function. */
SOCK_ERR_LIBRARY_NOT_LOADED/**< Can not load socket library */
0x00000000uL /**< Can be used as local IP address when creating a socket to \
bind the socket to all the IP addresses (If the system has \
multiple IP addresses) or if the local IP address is \
unknown. */
#define SOCK_PORT_ANY \
0u /**< Can be used as local port when creating a TCP Client socket to let \
the TCP/IP stack select a unique local port from the \
#define SOCK_IP_ADDR_ANY 0x00000000uL /**< Can be used as local IP address when creating a socket to bind the socket to all the IP addresses (If the system has
multiple IP addresses) or if the local IP address is unknown. */
#define SOCK_PORT_ANY 0u /**< Can be used as local port when creating a TCP Client socket to let the TCP/IP stack select a unique local port from the
* \brief Configurable Options for the socket interface
*/
typedefstruct_T_PNAK_SOCK_CONFIG_OPTIONS{
PN_U32
Timeout;/**< Keep-Alive Timeout in milliseconds. The Keep-Alive Timeout
will be used for the supervision of TCP connections. The
connection will be aborted if the
remote connection partner did not show activity within this
timeout. The supervision of TCP connections can be
enabled/disabled socket-specific when
creating the socket by calling sock_create(). For UDP
sockets the application needs to perform a supervision if
necessary. If the timeout value is set to 0
and #SOCK_FLAG_ENABLE_KEEPALIVE is set when creating a
socket, a default value for the Keep-Alive Timeout will be
used. */
}PACK_WORD_ALIGNMENT(T_PNAK_SOCK_CONFIG_OPTIONS);
typedefstruct_T_PNAK_SOCK_CONFIG_OPTIONS
{
PN_U32Timeout;/**< Keep-Alive Timeout in milliseconds. The Keep-Alive Timeout will be used for the supervision of TCP connections. The connection will be aborted if the
remote connection partner did not show activity within this timeout. The supervision of TCP connections can be enabled/disabled socket-specific when
creating the socket by calling sock_create(). For UDP sockets the application needs to perform a supervision if necessary. If the timeout value is set to 0
and #SOCK_FLAG_ENABLE_KEEPALIVE is set when creating a socket, a default value for the Keep-Alive Timeout will be used. */
0x00000001uL /**< TCP connection not established */
#define SOCK_TCP_CONNECTION_STATUS_CONNECTING \
0x00000002uL /**< A TCP connection establishment is in progress. This status \
is only possible for a TCP client socket. */
#define SOCK_TCP_CONNECTION_STATUS_CONNECTED \
0x00000003uL /**< TCP connection established */
#define SOCK_TCP_CONNECTION_STATUS_UNCONNECTED 0x00000001uL /**< TCP connection not established */
#define SOCK_TCP_CONNECTION_STATUS_CONNECTING 0x00000002uL /**< A TCP connection establishment is in progress. This status is only possible for a TCP client socket. */
#define SOCK_TCP_CONNECTION_STATUS_CONNECTED 0x00000003uL /**< TCP connection established */
/** @} */
/** \anchor ConnectionStatusCode @name TCP Connection Status Codes
0x00000005uL /**< It was not possible to establish a connection because the \
destination host rejected the connect request, \
e.g. because the remote port is closed. This error only \
occurs for a TCP client socket. To retry connection \
establishment the application has to close the socket and \
re-create the socket again. */
#define SOCK_TCP_CONNECTION_STATUS_CODE_NO_ERROR 0x00000000uL /**< No error detected */
#define SOCK_TCP_CONNECTION_STATUS_CODE_INTERNAL_ERROR 0x00000001uL /**< An internal error occurred in the socket interface causing the connection to abort. */
#define SOCK_TCP_CONNECTION_STATUS_CODE_CLOSED_REMOTELY 0x00000002uL /**< The connection has been orderly closed by the remote connection partner (TCP FIN received). */
#define SOCK_TCP_CONNECTION_STATUS_CODE_ABORTED_REMOTELY 0x00000003uL /**< The connection has been aborted by the remote connection partner (TCP RST received), e.g. because
the remote partner has detected an error or temporarily crashed. */
#define SOCK_TCP_CONNECTION_STATUS_CODE_TIMEOUT 0x00000004uL /**< The connection has been aborted because of a network failure or because the remote connection partner failed
to respond within the configured supervision timeout (see also T_PNAK_SOCK_CONFIG_OPTIONS). */
#define SOCK_TCP_CONNECTION_STATUS_CODE_CONNECT_REJECTED 0x00000005uL /**< It was not possible to establish a connection because the destination host rejected the connect request,
e.g. because the remote port is closed. This error only occurs for a TCP client socket. To retry connection
establishment the application has to close the socket and re-create the socket again. */
0x00000002uL /**< The local port associated with the socket is not open. \
Sending/Receiving of messages is not possible. */
#define SOCK_LOCAL_STATUS_ONLINE \
0x00000003uL /**< The local port associated with the socket is open. \
Sending/Receiving of messages is possible. */
#define SOCK_LOCAL_STATUS_CLOSED 0x00000001uL /**< The local socket is closed */
#define SOCK_LOCAL_STATUS_OFFLINE 0x00000002uL /**< The local port associated with the socket is not open. Sending/Receiving of messages is not possible. */
#define SOCK_LOCAL_STATUS_ONLINE 0x00000003uL /**< The local port associated with the socket is open. Sending/Receiving of messages is possible. */
/** @} */
/** \anchor SocketStatusCode @name Socket Status Codes