linux/include/uapi/asm-generic/socket.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef __ASM_GENERIC_SOCKET_H
#define __ASM_GENERIC_SOCKET_H

#include <linux/posix_types.h>
#include <asm/sockios.h>

/* For setsockopt(2) */
#define SOL_SOCKET

#define SO_DEBUG
#define SO_REUSEADDR
#define SO_TYPE
#define SO_ERROR
#define SO_DONTROUTE
#define SO_BROADCAST
#define SO_SNDBUF
#define SO_RCVBUF
#define SO_SNDBUFFORCE
#define SO_RCVBUFFORCE
#define SO_KEEPALIVE
#define SO_OOBINLINE
#define SO_NO_CHECK
#define SO_PRIORITY
#define SO_LINGER
#define SO_BSDCOMPAT
#define SO_REUSEPORT
#ifndef SO_PASSCRED /* powerpc only differs in these */
#define SO_PASSCRED
#define SO_PEERCRED
#define SO_RCVLOWAT
#define SO_SNDLOWAT
#define SO_RCVTIMEO_OLD
#define SO_SNDTIMEO_OLD
#endif

/* Security levels - as per NRL IPv6 - don't actually do anything */
#define SO_SECURITY_AUTHENTICATION
#define SO_SECURITY_ENCRYPTION_TRANSPORT
#define SO_SECURITY_ENCRYPTION_NETWORK

#define SO_BINDTODEVICE

/* Socket filtering */
#define SO_ATTACH_FILTER
#define SO_DETACH_FILTER
#define SO_GET_FILTER

#define SO_PEERNAME

#define SO_ACCEPTCONN

#define SO_PEERSEC
#define SO_PASSSEC

#define SO_MARK

#define SO_PROTOCOL
#define SO_DOMAIN

#define SO_RXQ_OVFL

#define SO_WIFI_STATUS
#define SCM_WIFI_STATUS
#define SO_PEEK_OFF

/* Instruct lower device to use last 4-bytes of skb data as FCS */
#define SO_NOFCS

#define SO_LOCK_FILTER

#define SO_SELECT_ERR_QUEUE

#define SO_BUSY_POLL

#define SO_MAX_PACING_RATE

#define SO_BPF_EXTENSIONS

#define SO_INCOMING_CPU

#define SO_ATTACH_BPF
#define SO_DETACH_BPF

#define SO_ATTACH_REUSEPORT_CBPF
#define SO_ATTACH_REUSEPORT_EBPF

#define SO_CNX_ADVICE

#define SCM_TIMESTAMPING_OPT_STATS

#define SO_MEMINFO

#define SO_INCOMING_NAPI_ID

#define SO_COOKIE

#define SCM_TIMESTAMPING_PKTINFO

#define SO_PEERGROUPS

#define SO_ZEROCOPY

#define SO_TXTIME
#define SCM_TXTIME

#define SO_BINDTOIFINDEX

#define SO_TIMESTAMP_OLD
#define SO_TIMESTAMPNS_OLD
#define SO_TIMESTAMPING_OLD

#define SO_TIMESTAMP_NEW
#define SO_TIMESTAMPNS_NEW
#define SO_TIMESTAMPING_NEW

#define SO_RCVTIMEO_NEW
#define SO_SNDTIMEO_NEW

#define SO_DETACH_REUSEPORT_BPF

#define SO_PREFER_BUSY_POLL
#define SO_BUSY_POLL_BUDGET

#define SO_NETNS_COOKIE

#define SO_BUF_LOCK

#define SO_RESERVE_MEM

#define SO_TXREHASH

#define SO_RCVMARK

#define SO_PASSPIDFD
#define SO_PEERPIDFD

#if !defined(__KERNEL__)

#if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__))
/* on 64-bit and x32, avoid the ?: operator */
#define SO_TIMESTAMP
#define SO_TIMESTAMPNS
#define SO_TIMESTAMPING

#define SO_RCVTIMEO
#define SO_SNDTIMEO
#else
#define SO_TIMESTAMP
#define SO_TIMESTAMPNS
#define SO_TIMESTAMPING

#define SO_RCVTIMEO
#define SO_SNDTIMEO
#endif

#define SCM_TIMESTAMP
#define SCM_TIMESTAMPNS
#define SCM_TIMESTAMPING

#endif

#endif /* __ASM_GENERIC_SOCKET_H */