18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 28c2ecf20Sopenharmony_ci#ifndef _UAPI_ASM_SOCKET_H 38c2ecf20Sopenharmony_ci#define _UAPI_ASM_SOCKET_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <linux/posix_types.h> 68c2ecf20Sopenharmony_ci#include <asm/sockios.h> 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci/* For setsockopt(2) */ 98c2ecf20Sopenharmony_ci/* 108c2ecf20Sopenharmony_ci * Note: we only bother about making the SOL_SOCKET options 118c2ecf20Sopenharmony_ci * same as OSF/1, as that's all that "normal" programs are 128c2ecf20Sopenharmony_ci * likely to set. We don't necessarily want to be binary 138c2ecf20Sopenharmony_ci * compatible with _everything_. 148c2ecf20Sopenharmony_ci */ 158c2ecf20Sopenharmony_ci#define SOL_SOCKET 0xffff 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#define SO_DEBUG 0x0001 188c2ecf20Sopenharmony_ci#define SO_REUSEADDR 0x0004 198c2ecf20Sopenharmony_ci#define SO_KEEPALIVE 0x0008 208c2ecf20Sopenharmony_ci#define SO_DONTROUTE 0x0010 218c2ecf20Sopenharmony_ci#define SO_BROADCAST 0x0020 228c2ecf20Sopenharmony_ci#define SO_LINGER 0x0080 238c2ecf20Sopenharmony_ci#define SO_OOBINLINE 0x0100 248c2ecf20Sopenharmony_ci#define SO_REUSEPORT 0x0200 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#define SO_TYPE 0x1008 278c2ecf20Sopenharmony_ci#define SO_ERROR 0x1007 288c2ecf20Sopenharmony_ci#define SO_SNDBUF 0x1001 298c2ecf20Sopenharmony_ci#define SO_RCVBUF 0x1002 308c2ecf20Sopenharmony_ci#define SO_SNDBUFFORCE 0x100a 318c2ecf20Sopenharmony_ci#define SO_RCVBUFFORCE 0x100b 328c2ecf20Sopenharmony_ci#define SO_RCVLOWAT 0x1010 338c2ecf20Sopenharmony_ci#define SO_SNDLOWAT 0x1011 348c2ecf20Sopenharmony_ci#define SO_RCVTIMEO_OLD 0x1012 358c2ecf20Sopenharmony_ci#define SO_SNDTIMEO_OLD 0x1013 368c2ecf20Sopenharmony_ci#define SO_ACCEPTCONN 0x1014 378c2ecf20Sopenharmony_ci#define SO_PROTOCOL 0x1028 388c2ecf20Sopenharmony_ci#define SO_DOMAIN 0x1029 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci/* linux-specific, might as well be the same as on i386 */ 418c2ecf20Sopenharmony_ci#define SO_NO_CHECK 11 428c2ecf20Sopenharmony_ci#define SO_PRIORITY 12 438c2ecf20Sopenharmony_ci#define SO_BSDCOMPAT 14 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci#define SO_PASSCRED 17 468c2ecf20Sopenharmony_ci#define SO_PEERCRED 18 478c2ecf20Sopenharmony_ci#define SO_BINDTODEVICE 25 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci/* Socket filtering */ 508c2ecf20Sopenharmony_ci#define SO_ATTACH_FILTER 26 518c2ecf20Sopenharmony_ci#define SO_DETACH_FILTER 27 528c2ecf20Sopenharmony_ci#define SO_GET_FILTER SO_ATTACH_FILTER 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_ci#define SO_PEERNAME 28 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci#define SO_PEERSEC 30 578c2ecf20Sopenharmony_ci#define SO_PASSSEC 34 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci/* Security levels - as per NRL IPv6 - don't actually do anything */ 608c2ecf20Sopenharmony_ci#define SO_SECURITY_AUTHENTICATION 19 618c2ecf20Sopenharmony_ci#define SO_SECURITY_ENCRYPTION_TRANSPORT 20 628c2ecf20Sopenharmony_ci#define SO_SECURITY_ENCRYPTION_NETWORK 21 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ci#define SO_MARK 36 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci#define SO_RXQ_OVFL 40 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ci#define SO_WIFI_STATUS 41 698c2ecf20Sopenharmony_ci#define SCM_WIFI_STATUS SO_WIFI_STATUS 708c2ecf20Sopenharmony_ci#define SO_PEEK_OFF 42 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_ci/* Instruct lower device to use last 4-bytes of skb data as FCS */ 738c2ecf20Sopenharmony_ci#define SO_NOFCS 43 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_ci#define SO_LOCK_FILTER 44 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_ci#define SO_SELECT_ERR_QUEUE 45 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_ci#define SO_BUSY_POLL 46 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci#define SO_MAX_PACING_RATE 47 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ci#define SO_BPF_EXTENSIONS 48 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ci#define SO_INCOMING_CPU 49 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_ci#define SO_ATTACH_BPF 50 888c2ecf20Sopenharmony_ci#define SO_DETACH_BPF SO_DETACH_FILTER 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_ci#define SO_ATTACH_REUSEPORT_CBPF 51 918c2ecf20Sopenharmony_ci#define SO_ATTACH_REUSEPORT_EBPF 52 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_ci#define SO_CNX_ADVICE 53 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_ci#define SCM_TIMESTAMPING_OPT_STATS 54 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_ci#define SO_MEMINFO 55 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ci#define SO_INCOMING_NAPI_ID 56 1008c2ecf20Sopenharmony_ci 1018c2ecf20Sopenharmony_ci#define SO_COOKIE 57 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_ci#define SCM_TIMESTAMPING_PKTINFO 58 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_ci#define SO_PEERGROUPS 59 1068c2ecf20Sopenharmony_ci 1078c2ecf20Sopenharmony_ci#define SO_ZEROCOPY 60 1088c2ecf20Sopenharmony_ci 1098c2ecf20Sopenharmony_ci#define SO_TXTIME 61 1108c2ecf20Sopenharmony_ci#define SCM_TXTIME SO_TXTIME 1118c2ecf20Sopenharmony_ci 1128c2ecf20Sopenharmony_ci#define SO_BINDTOIFINDEX 62 1138c2ecf20Sopenharmony_ci 1148c2ecf20Sopenharmony_ci#define SO_TIMESTAMP_OLD 29 1158c2ecf20Sopenharmony_ci#define SO_TIMESTAMPNS_OLD 35 1168c2ecf20Sopenharmony_ci#define SO_TIMESTAMPING_OLD 37 1178c2ecf20Sopenharmony_ci 1188c2ecf20Sopenharmony_ci#define SO_TIMESTAMP_NEW 63 1198c2ecf20Sopenharmony_ci#define SO_TIMESTAMPNS_NEW 64 1208c2ecf20Sopenharmony_ci#define SO_TIMESTAMPING_NEW 65 1218c2ecf20Sopenharmony_ci 1228c2ecf20Sopenharmony_ci#define SO_RCVTIMEO_NEW 66 1238c2ecf20Sopenharmony_ci#define SO_SNDTIMEO_NEW 67 1248c2ecf20Sopenharmony_ci 1258c2ecf20Sopenharmony_ci#define SO_DETACH_REUSEPORT_BPF 68 1268c2ecf20Sopenharmony_ci 1278c2ecf20Sopenharmony_ci#if !defined(__KERNEL__) 1288c2ecf20Sopenharmony_ci 1298c2ecf20Sopenharmony_ci#if __BITS_PER_LONG == 64 1308c2ecf20Sopenharmony_ci#define SO_TIMESTAMP SO_TIMESTAMP_OLD 1318c2ecf20Sopenharmony_ci#define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD 1328c2ecf20Sopenharmony_ci#define SO_TIMESTAMPING SO_TIMESTAMPING_OLD 1338c2ecf20Sopenharmony_ci 1348c2ecf20Sopenharmony_ci#define SO_RCVTIMEO SO_RCVTIMEO_OLD 1358c2ecf20Sopenharmony_ci#define SO_SNDTIMEO SO_SNDTIMEO_OLD 1368c2ecf20Sopenharmony_ci#else 1378c2ecf20Sopenharmony_ci#define SO_TIMESTAMP (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMP_OLD : SO_TIMESTAMP_NEW) 1388c2ecf20Sopenharmony_ci#define SO_TIMESTAMPNS (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPNS_OLD : SO_TIMESTAMPNS_NEW) 1398c2ecf20Sopenharmony_ci#define SO_TIMESTAMPING (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPING_OLD : SO_TIMESTAMPING_NEW) 1408c2ecf20Sopenharmony_ci 1418c2ecf20Sopenharmony_ci#define SO_RCVTIMEO (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_RCVTIMEO_OLD : SO_RCVTIMEO_NEW) 1428c2ecf20Sopenharmony_ci#define SO_SNDTIMEO (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_SNDTIMEO_OLD : SO_SNDTIMEO_NEW) 1438c2ecf20Sopenharmony_ci#endif 1448c2ecf20Sopenharmony_ci 1458c2ecf20Sopenharmony_ci#define SCM_TIMESTAMP SO_TIMESTAMP 1468c2ecf20Sopenharmony_ci#define SCM_TIMESTAMPNS SO_TIMESTAMPNS 1478c2ecf20Sopenharmony_ci#define SCM_TIMESTAMPING SO_TIMESTAMPING 1488c2ecf20Sopenharmony_ci 1498c2ecf20Sopenharmony_ci#endif 1508c2ecf20Sopenharmony_ci 1518c2ecf20Sopenharmony_ci#endif /* _UAPI_ASM_SOCKET_H */ 152