SOCK_ERR_API_NOT_INITIALIZED,/**< Socket Interface not initialized */
SOCK_ERR_API_NOT_INITIALIZED,/**< Socket Interface not initialized */
SOCK_ERR_INVALID_SOCKET_ID,/**< The passed socket ID is invalid */
SOCK_ERR_INVALID_SOCKET_ID,/**< The passed socket ID is invalid */
SOCK_ERR_OUT_OF_SOCKETS,/**< No free socket available */
SOCK_ERR_OUT_OF_SOCKETS,/**< No free socket available */
SOCK_ERR_SOCKET_NOT_CREATED,/**< The specified socket has not been created.
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_OFFLINE,/**< The local port associated with the socket is not
SOCK_ERR_SOCKET_BUSY,/**< A send request is rejected because a previous send request on the specified socket is not completed */
open. Sending/Receiving of messages is not
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. */
possible. */
SOCK_ERR_SOCKET_CONNECTED,/**< The request is rejected because the specified TCP connection has established a connection before the filter was activated. */
SOCK_ERR_SOCKET_BUSY,/**< A send request is rejected because a previous send
SOCK_ERR_ADDR_IN_USE,/**< The passed local address is already in use by another socket. */
request on the specified socket is not completed */
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
SOCK_ERR_SOCKET_NOT_CONNECTED,/**< The request is rejected because the
on the socket configuration (e.g. socket type UDP or TCP) and the network settings adjusted by calling the function sock_init(). */
specified TCP connection or no TCP
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
connection has been established for the
on the socket configuration (e.g. socket type UDP or TCP) and the network settings adjusted by calling the function sock_init(). */
specified socket. */
SOCK_ERR_NO_DATA_RECEIVED,/**< No data has been received on the specfied socket or TCP connection. */
SOCK_ERR_SOCKET_CONNECTED,/**< The request is rejected because the specified
SOCK_ERR_NOT_SUPPORTED,/**< The requested action is not supported on the specified socket. */
TCP connection has established a connection
SOCK_ERR_TEMPORARY_NOT_EXECUTABLE,/**< The requested action is temporary not executable on the specified socket due a concurrent pending request. */
before the filter was activated. */
SOCK_ERR_FATAL_ERROR,/**< A fatal error is reported during execution of function. */
SOCK_ERR_ADDR_IN_USE,/**< The passed local address is already in use by
SOCK_ERR_LIBRARY_NOT_LOADED/**< Can not load socket library */
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 */
#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
#define SOCK_IP_ADDR_ANY \
multiple IP addresses) or if the local IP address is unknown. */
0x00000000uL /**< Can be used as local IP address when creating a socket to \
#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
bind the socket to all the IP addresses (If the system has \
dynamic client port range. */
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 dynamic client \
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
PN_U32
remote connection partner did not show activity within this timeout. The supervision of TCP connections can be enabled/disabled socket-specific when
Timeout;/**< Keep-Alive Timeout in milliseconds. The Keep-Alive Timeout
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
will be used for the supervision of TCP connections. The
and #SOCK_FLAG_ENABLE_KEEPALIVE is set when creating a socket, a default value for the Keep-Alive Timeout will be used. */
connection will be aborted if the remote connection partner
did not show activity within this timeout. The supervision of
}PACK_WORD_ALIGNMENT(T_PNAK_SOCK_CONFIG_OPTIONS);
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. */
#define SOCK_TCP_CONNECTION_STATUS_UNCONNECTED 0x00000001uL /**< TCP connection not established */
#define SOCK_TCP_CONNECTION_STATUS_UNCONNECTED \
#define SOCK_TCP_CONNECTION_STATUS_CONNECTING 0x00000002uL /**< A TCP connection establishment is in progress. This status is only possible for a TCP client socket. */
0x00000001uL /**< TCP connection not established */
#define SOCK_TCP_CONNECTION_STATUS_CONNECTED 0x00000003uL /**< TCP connection 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
/** \anchor ConnectionStatusCode @name TCP Connection Status Codes
* Error Codes of a TCP connection
* Error Codes of a TCP connection
* @{
* @{
*/
*/
#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. */
0x00000000uL /**< No error detected */
#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
0x00000001uL /**< An internal error occurred in the socket interface causing \
the remote partner has detected an error or temporarily crashed. */
the connection to abort. */
#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). */
0x00000002uL /**< The connection has been orderly closed by the remote \
#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,
connection partner (TCP FIN received). */
e.g. because the remote port is closed. This error only occurs for a TCP client socket. To retry connection
#define SOCK_LOCAL_STATUS_CLOSED 0x00000001uL /**< The local socket is closed */
#define SOCK_LOCAL_STATUS_CLOSED \
#define SOCK_LOCAL_STATUS_OFFLINE 0x00000002uL /**< The local port associated with the socket is not open. Sending/Receiving of messages is not possible. */
0x00000001uL /**< The local socket is closed \
#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_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
/** \anchor SocketStatusCode @name Socket Status Codes
* Error Codes of a socket
* Error Codes of a socket
* @{
* @{
*/
*/
#define SOCK_LOCAL_STATUS_CODE_NO_ERROR 0x00000000uL /**< No error detected */
#define SOCK_LOCAL_STATUS_CODE_NO_ERROR 0x00000000uL /**< No error detected */
#define SOCK_LOCAL_STATUS_CODE_ADDR_IN_USE 0x00000001uL /**< The local address passed with sock_create() is already in use by another socket. */
#define SOCK_LOCAL_STATUS_CODE_ADDR_IN_USE \
#define SOCK_LOCAL_STATUS_CODE_INTERNAL_ERROR 0x00000002uL /**< An internal error occurred in the socket interface causing the socket to close. */
0x00000001uL /**< The local address passed with sock_create() is already in \
use by another socket. */
#define SOCK_LOCAL_STATUS_CODE_INTERNAL_ERROR \
0x00000002uL /**< An internal error occurred in the socket interface causing \