Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
socket_ncs.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021 Nordic Semiconductor
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_NET_SOCKET_NCS_H_
8#define ZEPHYR_INCLUDE_NET_SOCKET_NCS_H_
9
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19/* When CONFIG_NET_SOCKETS_OFFLOAD is enabled, offloaded sockets take precedence
20 * when creating a new socket. Combine this flag with a socket type when
21 * creating a socket, to enforce native socket creation (e. g. SOCK_STREAM | SOCK_NATIVE).
22 * If it's desired to create a native TLS socket, but still offload the
23 * underlying TCP/UDP socket, use e. g. SOCK_STREAM | SOCK_NATIVE_TLS.
24 */
25#define SOCK_NATIVE 0x80000000
26#define SOCK_NATIVE_TLS 0x40000000
27
28/* NCS specific TLS level socket options */
29
35#define TLS_DTLS_HANDSHAKE_TIMEO 18
36
39#define TLS_DTLS_CONN_SAVE 19
40
43#define TLS_DTLS_CONN_LOAD 20
44
50#define TLS_DTLS_HANDSHAKE_STATUS 21
51
52/* Valid values for TLS_SESSION_CACHE option */
53#define TLS_SESSION_CACHE_DISABLED 0
54#define TLS_SESSION_CACHE_ENABLED 1
56/* Valid values for TLS_DTLS_HANDSHAKE_TIMEO option */
57#define TLS_DTLS_HANDSHAKE_TIMEO_NONE 0
58#define TLS_DTLS_HANDSHAKE_TIMEO_1S 1
59#define TLS_DTLS_HANDSHAKE_TIMEO_3S 3
60#define TLS_DTLS_HANDSHAKE_TIMEO_7S 7
61#define TLS_DTLS_HANDSHAKE_TIMEO_15S 15
62#define TLS_DTLS_HANDSHAKE_TIMEO_31S 31
63#define TLS_DTLS_HANDSHAKE_TIMEO_63S 63
64#define TLS_DTLS_HANDSHAKE_TIMEO_123S 123
66/* Valid values for TLS_DTLS_HANDSHAKE_STATUS option */
67#define TLS_DTLS_HANDSHAKE_STATUS_FULL 0
68#define TLS_DTLS_HANDSHAKE_STATUS_CACHED 1
69
70/* NCS specific socket options */
71
73#define SO_EXCEPTIONAL_DATA 33
77#define SO_KEEPOPEN 34
79#define SO_BINDTOPDN 40
87#define SO_RAI_NO_DATA 50
93#define SO_RAI_LAST 51
100#define SO_RAI_ONE_RESP 52
107#define SO_RAI_ONGOING 53
114#define SO_RAI_WAIT_MORE 54
115
121#define SO_RAI 61
122
130#define RAI_NO_DATA 1
136#define RAI_LAST 2
142#define RAI_ONE_RESP 3
147#define RAI_ONGOING 4
152#define RAI_WAIT_MORE 5
153
154/* NCS specific IPPROTO_ALL level socket options */
155
157#define IPPROTO_ALL 512
159#define SO_SILENCE_ALL 30
160
161/* NCS specific IPPROTO_IP level socket options */
162
164#define SO_IP_ECHO_REPLY 31
165
166/* NCS specific IPPROTO_IPV6 level socket options */
167
169#define SO_IPV6_ECHO_REPLY 32
170
171/* NCS specific TCP level socket options */
172
176#define SO_TCP_SRV_SESSTIMEO 55
177
178/* NCS specific gettaddrinfo() flags */
179
187#define AI_PDNSERV 0x1000
188
189/* NCS specific send() and sendto() flags */
190
196#define MSG_WAITACK 0x200
197
198#ifdef __cplusplus
199}
200#endif
201
202#endif /* ZEPHYR_INCLUDE_NET_SOCKET_NCS_H_ */