|
| 1 | +// include/uapi/asm-generic/socket.h |
| 2 | +// arch/alpha/include/uapi/asm/socket.h |
| 3 | +// tools/include/uapi/asm-generic/socket.h |
| 4 | +// arch/mips/include/uapi/asm/socket.h |
| 5 | +pub const SOL_SOCKET: ::c_int = 1; |
| 6 | + |
| 7 | +// Defined in unix/linux_like/mod.rs |
| 8 | +// pub const SO_DEBUG: ::c_int = 1; |
| 9 | +pub const SO_REUSEADDR: ::c_int = 2; |
| 10 | +pub const SO_TYPE: ::c_int = 3; |
| 11 | +pub const SO_ERROR: ::c_int = 4; |
| 12 | +pub const SO_DONTROUTE: ::c_int = 5; |
| 13 | +pub const SO_BROADCAST: ::c_int = 6; |
| 14 | +pub const SO_SNDBUF: ::c_int = 7; |
| 15 | +pub const SO_RCVBUF: ::c_int = 8; |
| 16 | +pub const SO_KEEPALIVE: ::c_int = 9; |
| 17 | +pub const SO_OOBINLINE: ::c_int = 10; |
| 18 | +pub const SO_NO_CHECK: ::c_int = 11; |
| 19 | +pub const SO_PRIORITY: ::c_int = 12; |
| 20 | +pub const SO_LINGER: ::c_int = 13; |
| 21 | +pub const SO_BSDCOMPAT: ::c_int = 14; |
| 22 | +pub const SO_REUSEPORT: ::c_int = 15; |
| 23 | +pub const SO_PASSCRED: ::c_int = 16; |
| 24 | +pub const SO_PEERCRED: ::c_int = 17; |
| 25 | +pub const SO_RCVLOWAT: ::c_int = 18; |
| 26 | +pub const SO_SNDLOWAT: ::c_int = 19; |
| 27 | +pub const SO_RCVTIMEO: ::c_int = 20; |
| 28 | +pub const SO_SNDTIMEO: ::c_int = 21; |
| 29 | +// pub const SO_RCVTIMEO_OLD: ::c_int = 20; |
| 30 | +// pub const SO_SNDTIMEO_OLD: ::c_int = 21; |
| 31 | +pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22; |
| 32 | +pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23; |
| 33 | +pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24; |
| 34 | +pub const SO_BINDTODEVICE: ::c_int = 25; |
| 35 | +pub const SO_ATTACH_FILTER: ::c_int = 26; |
| 36 | +pub const SO_DETACH_FILTER: ::c_int = 27; |
| 37 | +pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER; |
| 38 | +pub const SO_PEERNAME: ::c_int = 28; |
| 39 | +pub const SO_TIMESTAMP: ::c_int = 29; |
| 40 | +// pub const SO_TIMESTAMP_OLD: ::c_int = 29; |
| 41 | +pub const SO_ACCEPTCONN: ::c_int = 30; |
| 42 | +pub const SO_PEERSEC: ::c_int = 31; |
| 43 | +pub const SO_SNDBUFFORCE: ::c_int = 32; |
| 44 | +pub const SO_RCVBUFFORCE: ::c_int = 33; |
| 45 | +pub const SO_PASSSEC: ::c_int = 34; |
| 46 | +pub const SO_TIMESTAMPNS: ::c_int = 35; |
| 47 | +// pub const SO_TIMESTAMPNS_OLD: ::c_int = 35; |
| 48 | +pub const SO_MARK: ::c_int = 36; |
| 49 | +pub const SO_TIMESTAMPING: ::c_int = 37; |
| 50 | +// pub const SO_TIMESTAMPING_OLD: ::c_int = 37; |
| 51 | +pub const SO_PROTOCOL: ::c_int = 38; |
| 52 | +pub const SO_DOMAIN: ::c_int = 39; |
| 53 | +pub const SO_RXQ_OVFL: ::c_int = 40; |
| 54 | +pub const SO_WIFI_STATUS: ::c_int = 41; |
| 55 | +pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS; |
| 56 | +pub const SO_PEEK_OFF: ::c_int = 42; |
| 57 | +pub const SO_NOFCS: ::c_int = 43; |
| 58 | +pub const SO_LOCK_FILTER: ::c_int = 44; |
| 59 | +pub const SO_SELECT_ERR_QUEUE: ::c_int = 45; |
| 60 | +pub const SO_BUSY_POLL: ::c_int = 46; |
| 61 | +pub const SO_MAX_PACING_RATE: ::c_int = 47; |
| 62 | +pub const SO_BPF_EXTENSIONS: ::c_int = 48; |
| 63 | +pub const SO_INCOMING_CPU: ::c_int = 49; |
| 64 | +pub const SO_ATTACH_BPF: ::c_int = 50; |
| 65 | +pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER; |
| 66 | +pub const SO_ATTACH_REUSEPORT_CBPF: ::c_int = 51; |
| 67 | +pub const SO_ATTACH_REUSEPORT_EBPF: ::c_int = 52; |
| 68 | +pub const SO_CNX_ADVICE: ::c_int = 53; |
| 69 | +pub const SCM_TIMESTAMPING_OPT_STATS: ::c_int = 54; |
| 70 | +pub const SO_MEMINFO: ::c_int = 55; |
| 71 | +pub const SO_INCOMING_NAPI_ID: ::c_int = 56; |
| 72 | +pub const SO_COOKIE: ::c_int = 57; |
| 73 | +pub const SCM_TIMESTAMPING_PKTINFO: ::c_int = 58; |
| 74 | +pub const SO_PEERGROUPS: ::c_int = 59; |
| 75 | +pub const SO_ZEROCOPY: ::c_int = 60; |
| 76 | +pub const SO_TXTIME: ::c_int = 61; |
| 77 | +pub const SCM_TXTIME: ::c_int = SO_TXTIME; |
| 78 | +pub const SO_BINDTOIFINDEX: ::c_int = 62; |
| 79 | +cfg_if! { |
| 80 | + // Some of these platforms in CI already have these constants. |
| 81 | + // But they may still not have those _OLD ones. |
| 82 | + if #[cfg(all(any(target_arch = "x86", |
| 83 | + target_arch = "x86_64", |
| 84 | + target_arch = "aarch64"), |
| 85 | + not(target_env = "musl")))] { |
| 86 | + pub const SO_TIMESTAMP_NEW: ::c_int = 63; |
| 87 | + pub const SO_TIMESTAMPNS_NEW: ::c_int = 64; |
| 88 | + pub const SO_TIMESTAMPING_NEW: ::c_int = 65; |
| 89 | + pub const SO_RCVTIMEO_NEW: ::c_int = 66; |
| 90 | + pub const SO_SNDTIMEO_NEW: ::c_int = 67; |
| 91 | + pub const SO_DETACH_REUSEPORT_BPF: ::c_int = 68; |
| 92 | + } |
| 93 | +} |
| 94 | +// pub const SO_PREFER_BUSY_POLL: ::c_int = 69; |
| 95 | +// pub const SO_BUSY_POLL_BUDGET: ::c_int = 70; |
| 96 | + |
| 97 | +// Defined in unix/linux_like/mod.rs |
| 98 | +// pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP; |
| 99 | +pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS; |
| 100 | +pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING; |
0 commit comments