1#![allow(dead_code)]
12#![allow(non_camel_case_types)]
13#![allow(non_upper_case_globals)]
14
15use super::user_address::UserAddress;
16use linux_uapi as uapi;
17pub use uapi::*;
18use zerocopy::{FromBytes, Immutable, IntoBytes, KnownLayout};
19
20pub type tid_t = pid_t;
21
22pub use uapi::__SIGRTMIN as SIGRTMIN;
23
24pub const SIG_DFL: uaddr = uaddr { addr: 0 };
25pub const SIG_IGN: uaddr = uaddr { addr: 1 };
26pub const SIG_ERR: uaddr = uaddr { addr: u64::MAX };
27
28pub const AF_UNSPEC: uapi::__kernel_sa_family_t = 0;
32pub const AF_UNIX: uapi::__kernel_sa_family_t = 1;
33pub const AF_INET: uapi::__kernel_sa_family_t = 2;
34pub const AF_NETLINK: uapi::__kernel_sa_family_t = 16;
35pub const AF_PACKET: uapi::__kernel_sa_family_t = 17;
36pub const AF_INET6: uapi::__kernel_sa_family_t = 10;
37pub const AF_VSOCK: uapi::__kernel_sa_family_t = 40;
38pub const AF_QIPCRTR: uapi::__kernel_sa_family_t = 42;
39
40pub const SOL_IP: u32 = 0;
41pub const SOL_IPV6: u32 = 41;
42
43pub const SOCK_CLOEXEC: u32 = O_CLOEXEC;
44pub const SOCK_NONBLOCK: u32 = O_NONBLOCK;
45
46pub const SOCK_STREAM: u32 = 1;
47pub const SOCK_DGRAM: u32 = 2;
48pub const SOCK_RAW: u32 = 3;
49pub const SOCK_RDM: u32 = 4;
50pub const SOCK_SEQPACKET: u32 = 5;
51pub const SOCK_DCCP: u32 = 6;
52pub const SOCK_PACKET: u32 = 10;
53
54pub const SHUT_RD: u32 = 0;
55pub const SHUT_WR: u32 = 1;
56pub const SHUT_RDWR: u32 = 2;
57
58pub const SCM_RIGHTS: u32 = 1;
59pub const SCM_CREDENTIALS: u32 = 2;
60pub const SCM_SECURITY: u32 = 3;
61pub const SCM_MAX_FD: usize = 253;
63
64pub const MSG_PEEK: u32 = 2;
65pub const MSG_DONTROUTE: u32 = 4;
66pub const MSG_TRYHARD: u32 = 4;
67pub const MSG_CTRUNC: u32 = 8;
68pub const MSG_PROXY: u32 = 0x10;
69pub const MSG_TRUNC: u32 = 0x20;
70pub const MSG_DONTWAIT: u32 = 0x40;
71pub const MSG_EOR: u32 = 0x80;
72pub const MSG_WAITALL: u32 = 0x100;
73pub const MSG_FIN: u32 = 0x200;
74pub const MSG_SYN: u32 = 0x400;
75pub const MSG_CONFIRM: u32 = 0x800;
76pub const MSG_RST: u32 = 0x1000;
77pub const MSG_ERRQUEUE: u32 = 0x2000;
78pub const MSG_NOSIGNAL: u32 = 0x4000;
79pub const MSG_MORE: u32 = 0x8000;
80pub const MSG_WAITFORONE: u32 = 0x10000;
81pub const MSG_BATCH: u32 = 0x40000;
82pub const MSG_FASTOPEN: u32 = 0x20000000;
83pub const MSG_CMSG_CLOEXEC: u32 = 0x40000000;
84pub const MSG_EOF: u32 = MSG_FIN;
85pub const MSG_CMSG_COMPAT: u32 = 0;
86
87pub const MNT_FORCE: u32 = 1;
88pub const MNT_DETACH: u32 = 2;
89pub const MNT_EXPIRE: u32 = 4;
90pub const UMOUNT_NOFOLLOW: u32 = 8;
91
92pub const EFD_CLOEXEC: u32 = O_CLOEXEC;
93pub const EFD_NONBLOCK: u32 = O_NONBLOCK;
94pub const EFD_SEMAPHORE: u32 = 1;
95
96#[derive(Debug, Default, Copy, Clone, IntoBytes, KnownLayout, FromBytes, Immutable)]
97#[repr(C)]
98pub struct pselect6_sigmask {
99 pub ss: UserAddress,
100 pub ss_len: usize,
101}