blob: d24c09efc115c6bca4053a4a0f9a53bf44626872 [file] [log] [blame]
Elliott Hughesabd62612013-11-08 11:45:48 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_ASM_SOCKET_H
20#define _UAPI_ASM_SOCKET_H
Christopher Ferris24f97eb2019-05-20 12:58:13 -070021#include <linux/posix_types.h>
Elliott Hughesabd62612013-11-08 11:45:48 -080022#include <asm/sockios.h>
23#define SOL_SOCKET 0xffff
Elliott Hughesabd62612013-11-08 11:45:48 -080024#define SO_DEBUG 0x0001
25#define SO_REUSEADDR 0x0004
26#define SO_KEEPALIVE 0x0008
27#define SO_DONTROUTE 0x0010
Elliott Hughesabd62612013-11-08 11:45:48 -080028#define SO_BROADCAST 0x0020
29#define SO_LINGER 0x0080
30#define SO_OOBINLINE 0x0100
31#define SO_REUSEPORT 0x0200
Elliott Hughesabd62612013-11-08 11:45:48 -080032#define SO_TYPE 0x1008
33#define SO_STYLE SO_TYPE
34#define SO_ERROR 0x1007
35#define SO_SNDBUF 0x1001
Elliott Hughesabd62612013-11-08 11:45:48 -080036#define SO_RCVBUF 0x1002
37#define SO_SNDLOWAT 0x1003
38#define SO_RCVLOWAT 0x1004
Christopher Ferris24f97eb2019-05-20 12:58:13 -070039#define SO_SNDTIMEO_OLD 0x1005
40#define SO_RCVTIMEO_OLD 0x1006
Elliott Hughesabd62612013-11-08 11:45:48 -080041#define SO_ACCEPTCONN 0x1009
42#define SO_PROTOCOL 0x1028
43#define SO_DOMAIN 0x1029
Elliott Hughesabd62612013-11-08 11:45:48 -080044#define SO_NO_CHECK 11
45#define SO_PRIORITY 12
46#define SO_BSDCOMPAT 14
47#define SO_PASSCRED 17
Elliott Hughesabd62612013-11-08 11:45:48 -080048#define SO_PEERCRED 18
49#define SO_SECURITY_AUTHENTICATION 22
50#define SO_SECURITY_ENCRYPTION_TRANSPORT 23
51#define SO_SECURITY_ENCRYPTION_NETWORK 24
Elliott Hughesabd62612013-11-08 11:45:48 -080052#define SO_BINDTODEVICE 25
53#define SO_ATTACH_FILTER 26
54#define SO_DETACH_FILTER 27
55#define SO_GET_FILTER SO_ATTACH_FILTER
Elliott Hughesabd62612013-11-08 11:45:48 -080056#define SO_PEERNAME 28
Elliott Hughesabd62612013-11-08 11:45:48 -080057#define SO_PEERSEC 30
Elliott Hughesabd62612013-11-08 11:45:48 -080058#define SO_SNDBUFFORCE 31
59#define SO_RCVBUFFORCE 33
60#define SO_PASSSEC 34
Elliott Hughesabd62612013-11-08 11:45:48 -080061#define SO_MARK 36
Elliott Hughesabd62612013-11-08 11:45:48 -080062#define SO_RXQ_OVFL 40
63#define SO_WIFI_STATUS 41
64#define SCM_WIFI_STATUS SO_WIFI_STATUS
65#define SO_PEEK_OFF 42
Elliott Hughesabd62612013-11-08 11:45:48 -080066#define SO_NOFCS 43
67#define SO_LOCK_FILTER 44
68#define SO_SELECT_ERR_QUEUE 45
Christopher Ferris38062f92014-07-09 15:33:25 -070069#define SO_BUSY_POLL 46
Christopher Ferris38062f92014-07-09 15:33:25 -070070#define SO_MAX_PACING_RATE 47
71#define SO_BPF_EXTENSIONS 48
Christopher Ferris05d08e92016-02-04 13:16:38 -080072#define SO_INCOMING_CPU 49
73#define SO_ATTACH_BPF 50
Christopher Ferris05d08e92016-02-04 13:16:38 -080074#define SO_DETACH_BPF SO_DETACH_FILTER
Christopher Ferris106b3a82016-08-24 12:15:38 -070075#define SO_ATTACH_REUSEPORT_CBPF 51
76#define SO_ATTACH_REUSEPORT_EBPF 52
77#define SO_CNX_ADVICE 53
Christopher Ferris48af7cb2017-02-21 12:35:09 -080078#define SCM_TIMESTAMPING_OPT_STATS 54
Christopher Ferris525ce912017-07-26 13:12:53 -070079#define SO_MEMINFO 55
80#define SO_INCOMING_NAPI_ID 56
81#define SO_COOKIE 57
Christopher Ferris1308ad32017-11-14 17:32:13 -080082#define SCM_TIMESTAMPING_PKTINFO 58
83#define SO_PEERGROUPS 59
84#define SO_ZEROCOPY 60
Christopher Ferris9ce28842018-10-25 12:11:39 -070085#define SO_TXTIME 61
86#define SCM_TXTIME SO_TXTIME
Christopher Ferris24f97eb2019-05-20 12:58:13 -070087#define SO_BINDTOIFINDEX 62
88#define SO_TIMESTAMP_OLD 29
89#define SO_TIMESTAMPNS_OLD 35
90#define SO_TIMESTAMPING_OLD 37
91#define SO_TIMESTAMP_NEW 63
92#define SO_TIMESTAMPNS_NEW 64
93#define SO_TIMESTAMPING_NEW 65
94#define SO_RCVTIMEO_NEW 66
95#define SO_SNDTIMEO_NEW 67
Christopher Ferrisb8a95e22019-10-02 18:29:20 -070096#define SO_DETACH_REUSEPORT_BPF 68
Christopher Ferris24f97eb2019-05-20 12:58:13 -070097#if __BITS_PER_LONG == 64
98#define SO_TIMESTAMP SO_TIMESTAMP_OLD
99#define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
100#define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
101#define SO_RCVTIMEO SO_RCVTIMEO_OLD
102#define SO_SNDTIMEO SO_SNDTIMEO_OLD
103#else
104#define SO_TIMESTAMP (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMP_OLD : SO_TIMESTAMP_NEW)
105#define SO_TIMESTAMPNS (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPNS_OLD : SO_TIMESTAMPNS_NEW)
106#define SO_TIMESTAMPING (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPING_OLD : SO_TIMESTAMPING_NEW)
107#define SO_RCVTIMEO (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_RCVTIMEO_OLD : SO_RCVTIMEO_NEW)
108#define SO_SNDTIMEO (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_SNDTIMEO_OLD : SO_SNDTIMEO_NEW)
109#endif
110#define SCM_TIMESTAMP SO_TIMESTAMP
111#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
112#define SCM_TIMESTAMPING SO_TIMESTAMPING
Christopher Ferris38062f92014-07-09 15:33:25 -0700113#endif