The following list of macros are used to define constants used throughout the socket layer.
#define AF_INET 2 |
The AF_INET is the address family used for IPv4. An IPv4 transport address is specified with the sockaddr_in structure. (It is the only supported type for the current implementation.)
Referenced by AppServerCb(), connect_cmd_handler(), connect_to_server(), ConnectNetwork(), demo_start(), handle_start_connect(), http_client_send_request(), http_client_socket_resolve_handler(), iot_tls_connect(), IperfSocketEventHandler(), IperfStart(), IperfTCP_ClientStart(), IperfTCP_ServerStart(), IperfUDP_ClientStart(), IperfUDP_ServerStart(), m2m_ip_cb(), main(), NMI_GrowlSendNotification(), run_udp_client(), run_udp_server(), setup_android_sockets(), smtpConnect(), socket(), sslConnect(), test_init(), and wifi_ap_provision().
#define AF_INET 2 |
The AF_INET is the address family used for IPv4. An IPv4 transport address is specified with the sockaddr_in structure. (It is the only supported type for the current implementation.)
#define HOSTNAME_MAX_SIZE 100 |
Maximum allowed size for a host domain name passed to the function gethostbyname. command value. Used with the setsockopt function.
Referenced by gethostbyname(), and sslSetSockOpt().
#define HOSTNAME_MAX_SIZE 64 |
Maximum allowed size for a host domain name passed to the function gethostbyname gethostbyname. command value. Used with the setsockopt function.
#define IP_ADD_MEMBERSHIP 0x01 |
Set Socket Option Add Membership command value (to join a multicast group). Used with the setsockopt function.
#define IP_ADD_MEMBERSHIP 0x01 |
Set Socket Option Add Membership command value. Used with the setsockopt function.
#define IP_DROP_MEMBERSHIP 0x02 |
Set Socket Option Drop Membership command value (to leave a multicast group). Used with the setsockopt function.
#define IP_DROP_MEMBERSHIP 0x02 |
Set Socket Option Drop Membership command value. Used with the setsockopt function.
#define MAX_SOCKET (TCP_SOCK_MAX + UDP_SOCK_MAX) |
Maximum number of simultaneous sockets.
#define MAX_SOCKET (TCP_SOCK_MAX + UDP_SOCK_MAX + RAW_SOCK_MAX) |
Maximum number of simultaneous sockets.
Referenced by accept(), bind(), close(), connect(), IperfSocketClose(), IperfSocketEventHandler(), IperfStart(), IperfStop(), IperfUpdate(), listen(), m2m_ip_cb(), recv(), recvfrom(), secure(), send(), sendto(), setsockopt(), socketDeinit(), and socketInit().
#define RAW_SOCK_ID (TCP_SOCK_MAX + UDP_SOCK_MAX) |
Socket number to be used for RAW socket.
Referenced by rawSetSockOpt(), sendto(), and socket().
#define RAW_SOCK_MAX 1 |
Maximum number of simultaneous RAW sockets.
#define SO_ICMP_FILTER 0x01 |
Socket option to set the ICMP filter for raw sockets when receiving.
Current implementation allows for a filter none (0) or filter all (anything else). Filter none means that all ICMP frames will be delivered to the host via raw socket. Filter all means that all ICMP frames will NOT be delivered to host and handled internally by the WINC (please note that fragmentation is not supported by the WINC). Used with the setsockopt function.
The option value should be cast to int type.
Default setting is 0 (filter none).
#define SO_SET_UDP_SEND_CALLBACK 0x00 |
Socket option used by the application to enable/disable the use of UDP send callbacks.
Used with the setsockopt function.
The option value should be cast to int type.
0: disable UDP send callbacks.
1: enable UDP send callbacks.
Default setting is enable.
#define SO_SET_UDP_SEND_CALLBACK 0x00 |
Socket option used by the application to enable/disable the use of UDP send callbacks.
Used with the setsockopt function.
The option value should be cast to int type.
0: disable UDP send callbacks.
1: enable UDP send callbacks.
Default setting is enable.
Referenced by demo_start().
#define SO_TCP_KEEPALIVE 0x04 |
Socket option to enable or disable TCP keep-alive.
Used with the setsockopt function.
The option value should be cast to int type.
0: disable TCP keep-alive.
1: enable TCP keep-alive.
Default setting is disable.
#define SO_TCP_KEEPALIVE 0x04 |
Socket option to enable or disable TCP keep-alive.
Used with the setsockopt function.
The option value should be cast to int type.
0: disable TCP keep-alive.
1: enable TCP keep-alive.
Default setting is disable.
#define SO_TCP_KEEPCNT 0x07 |
Socket option to set the number of keep-alive retransmissions to be carried out before declaring that the remote end is not available.
Used with the setsockopt function.
The option value should be cast to int type.
Maximum 255. Default setting is 20.
#define SO_TCP_KEEPCNT 0x07 |
Socket option to set the number of keep-alive retransmissions to be carried out before declaring that the remote end is not available.
Used with the setsockopt function.
The option value should be cast to int type.
Maximum 255. Default setting is 20.
#define SO_TCP_KEEPIDLE 0x05 |
Socket option to set the time period after which the socket will trigger keep-alive transmissions.
Used with the setsockopt function.
The option value should be cast to int type.
Option value is the time period in units of 500ms. Maximum 2^32 - 1. Default setting is 120 (60 seconds).
#define SO_TCP_KEEPIDLE 0x05 |
Socket option to set the time period after which the socket will trigger keep-alive transmissions.
Used with the setsockopt function.
The option value should be cast to int type.
Option value is the time period in units of 500ms. Maximum 2^32 - 1. Default setting is 120 (60 seconds).
#define SO_TCP_KEEPINTVL 0x06 |
Socket option to set the time period between keep-alive retransmissions.
Used with the setsockopt function.
The option value should be cast to int type.
Option value is the time period in units of 500ms. Maximum 255. Default setting is 1 (0.5 seconds).
#define SO_TCP_KEEPINTVL 0x06 |
Socket option to set the time period between keep-alive retransmissions.
Used with the setsockopt function.
The option value should be cast to int type.
Option value is the time period in units of 500ms. Maximum 255. Default setting is 1 (0.5 seconds).
#define SOCK_DGRAM 2 |
One of the IPv4 supported socket types for unreliable connectionless datagram connection. Passed to the socket function for the socket creation operation.
Referenced by demo_start(), IperfUDP_ClientStart(), IperfUDP_ServerStart(), main(), run_udp_client(), run_udp_server(), setup_android_sockets(), and socket().
#define SOCK_DGRAM 2 |
One of the IPv4 supported socket types for unreliable connectionless datagram connection. Passed to the socket function for the socket creation operation.
#define SOCK_RAW 3 |
Socket type used for sending and receiving raw frames. Raw socket expects and returns IP header. Please note that SO_BROADCAST socket option is not currently supported when using RAW socket. Similarly to SOCK_DGRAM it is oriented towards unreliable connectionless communication. Passed to the socket function for the socket creation operation.
Referenced by socket().
#define SOCK_STREAM 1 |
One of the IPv4 supported socket types for reliable connection-oriented stream connection. Passed to the socket function for the socket creation operation.
Referenced by connect_cmd_handler(), connect_to_server(), ConnectNetwork(), handle_start_connect(), http_client_send_request(), iot_tls_connect(), IperfTCP_ClientStart(), IperfTCP_ServerStart(), main(), NMI_GrowlSendNotification(), smtpConnect(), socket(), sslConnect(), and wifi_ap_provision().
#define SOCK_STREAM 1 |
One of the IPv4 supported socket types for reliable connection-oriented stream connection. Passed to the socket function for the socket creation operation.
#define SOCKET_BUFFER_MAX_LENGTH 1400 |
Maximum allowed size for a socket data buffer. Used with send socket function to ensure that the buffer sent is within the allowed range.
Referenced by html_handler(), send(), and sendto().
#define SOCKET_BUFFER_MAX_LENGTH 1400 |
Maximum allowed size for a socket data buffer. Used with send socket function to ensure that the buffer sent is within the allowed range.
#define SOCKET_CONFIG_DEFAULT 0 |
This value may be passed in the u8Config parameter of socket to create a socket with default configuration.
#define SOCKET_CONFIG_IPPROTO_RAW 2 |
This value may be passed in the u8Config parameter of socket (when the u8Type parameter is SOCK_RAW), to allow the Application to use a socket of type raw to send/receive frames. This assumes that the application will fill the IP and protocol (UDP, TCP, ICMP) headers. Typically, when sending ICMP frames via RAW socket, there are two options that can be used:
Referenced by socket().
#define SOCKET_CONFIG_SSL_DELAY 2 |
#define SOCKET_CONFIG_SSL_DELAY 2 |
This value may be passed in the u8Config parameter of socket (when the u8Type parameter is SOCK_STREAM), to create a TCP socket which has the potential to upgrade to a TLS socket later (by calling secure).
Note that the total number of TLS sockets and potential TLS sockets is limited to 2.
Referenced by socket().
#define SOCKET_CONFIG_SSL_OFF 0 |
This value may be passed in the u8Config parameter of socket, to create a socket not capable of TLS.
#define SOCKET_CONFIG_SSL_OFF 0 |
This value may be passed in the u8Config parameter of socket (when the u8Type parameter is SOCK_STREAM), to create a socket not capable of TLS.
Referenced by socket().
#define SOCKET_CONFIG_SSL_ON 1 |
This value may be passed in the u8Config parameter of socket, to create a TLS socket.
Note that the number of TLS sockets is limited to 4.
#define SOCKET_CONFIG_SSL_ON 1 |
This value may be passed in the u8Config parameter of socket (when the u8Type parameter is SOCK_STREAM), to create a TLS socket.
Note that the number of TLS sockets is limited to 2.
#define SOCKET_FLAGS_IPPROTO_RAW 0x02 |
This flag may be set in the u8Config parameter of socket (when the u8Type parameter is SOCK_RAW), to allow the Application to use a socket of type raw to send/receive frames.
This flag is kept for legacy purposes. It is recommended that applications use SOCKET_CONFIG_IPPROTO_RAW instead.
#define SOCKET_FLAGS_SSL 0x01 |
This flag may be set in the u8Config parameter of socket, to create a TLS socket.
Note that the number of TLS sockets is limited to 4.
This flag is kept for legacy purposes. It is recommended that applications use SOCKET_CONFIG_SSL_ON instead.
#define SOCKET_FLAGS_SSL 0x01 |
This flag may be set in the u8Config parameter of socket (when the u8Type parameter is SOCK_STREAM), to create a TLS socket.
Note that the number of TLS sockets is limited to 2.
This flag is kept for legacy purposes. It is recommended that applications use SOCKET_CONFIG_SSL_ON instead.
Referenced by connect_to_server(), http_client_send_request(), iot_tls_connect(), IperfTCP_ClientStart(), NMI_GrowlSendNotification(), smtpConnect(), sslConnect(), and wifi_ap_provision().
#define SOL_RAW 255 |
Raw Socket option level. Used with the setsockopt function
Referenced by setsockopt().
#define SOL_SOCKET 1 |
Socket option. Used with the setsockopt function
#define SOL_SOCKET 1 |
Socket option. Used with the setsockopt function
Referenced by demo_start(), and setsockopt().
#define SOL_SSL_SOCKET 2 |
SSL Socket option level. Used with the setsockopt function
#define SOL_SSL_SOCKET 2 |
SSL Socket option level. Used with the setsockopt function
Referenced by set_alpn_list(), setsockopt(), and sslConnect().
#define TCP_SOCK_MAX (7) |
Maximum number of simultaneous TCP sockets.
#define TCP_SOCK_MAX (7) |
Maximum number of simultaneous TCP sockets.
Referenced by get_alpn_index(), get_error_detail(), http_client_socket_resolve_handler(), IperfSocketClose(), IperfTCP_ServerStart(), IperfUpdate(), send(), set_alpn_list(), socket(), and sslSetSockOpt().
#define UDP_SOCK_MAX 4 |
Maximum number of simultaneous UDP sockets.
#define UDP_SOCK_MAX 4 |
Maximum number of simultaneous UDP sockets.
Referenced by socket().