net: socket: Define a few well-known socket options
Values based on Linux values, which are in turn likely based on well-known BSD values. Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit is contained in:
parent
4e36a05c89
commit
9c86dbfd8e
1 changed files with 12 additions and 0 deletions
|
@ -433,6 +433,18 @@ static inline char *inet_ntop(sa_family_t family, const void *src, char *dst,
|
||||||
#define EAI_SERVICE DNS_EAI_SERVICE
|
#define EAI_SERVICE DNS_EAI_SERVICE
|
||||||
#endif /* defined(CONFIG_NET_SOCKETS_POSIX_NAMES) */
|
#endif /* defined(CONFIG_NET_SOCKETS_POSIX_NAMES) */
|
||||||
|
|
||||||
|
#define SOL_SOCKET 1
|
||||||
|
|
||||||
|
/* Socket options for SOL_SOCKET level */
|
||||||
|
#define SO_REUSEADDR 2
|
||||||
|
#define SO_ERROR 4
|
||||||
|
|
||||||
|
/* Socket options for IPPROTO_TCP level */
|
||||||
|
#define TCP_NODELAY 1
|
||||||
|
|
||||||
|
/* Socket options for IPPROTO_IPV6 level */
|
||||||
|
#define IPV6_V6ONLY 26
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue