32df50c8fa
New headers: - include/sys/ioccom.h: Linux UAPI ioctl encoding macros (_IO/_IOR/_IOW/_IOWR) - include/byteswap.h: bswap_16/32/64 inline functions - src/header/sys_statfs/: struct statfs + statfs()/fstatfs() functions (delegates to fstatvfs, converts to Linux struct statfs format) New constants: - sys_socket: MSG_NOSIGNAL, MSG_PROBE, MSG_CONFIRM, MSG_MORE, MSG_FASTOPEN - sys_mman: MAP_GROWSDOWN, MAP_DENYWRITE, MAP_EXECUTABLE, MAP_LOCKED, MAP_NONBLOCK - elf/cbindgen.toml: ELFMAG and SELFMAG #defines in after_includes These headers eliminate the need for shim patches in libwayland (MSG_NOSIGNAL), mesa (sys/ioccom.h), qtbase (sys/statfs.h, ELFMAG), pipewire/wireplumber (byteswap.h, MAP_* flags).
86 lines
2.5 KiB
Rust
86 lines
2.5 KiB
Rust
use crate::platform::types::c_int;
|
|
|
|
pub const SOCK_STREAM: c_int = 1;
|
|
pub const SOCK_DGRAM: c_int = 2;
|
|
pub const SOCK_RAW: c_int = 3;
|
|
pub const SOCK_NONBLOCK: c_int = 0o4_000;
|
|
pub const SOCK_CLOEXEC: c_int = 0o2_000_000;
|
|
|
|
// Other constants
|
|
pub const SOCK_RDM: c_int = 4;
|
|
pub const SOCK_SEQPACKET: c_int = 5;
|
|
|
|
pub const SOL_SOCKET: c_int = 1;
|
|
|
|
pub const SO_DEBUG: c_int = 1;
|
|
pub const SO_REUSEADDR: c_int = 2;
|
|
pub const SO_TYPE: c_int = 3;
|
|
pub const SO_ERROR: c_int = 4;
|
|
pub const SO_DONTROUTE: c_int = 5;
|
|
pub const SO_BROADCAST: c_int = 6;
|
|
pub const SO_SNDBUF: c_int = 7;
|
|
pub const SO_RCVBUF: c_int = 8;
|
|
pub const SO_KEEPALIVE: c_int = 9;
|
|
pub const SO_OOBINLINE: c_int = 10;
|
|
pub const SO_NO_CHECK: c_int = 11;
|
|
pub const SO_PRIORITY: c_int = 12;
|
|
pub const SO_LINGER: c_int = 13;
|
|
pub const SO_BSDCOMPAT: c_int = 14;
|
|
pub const SO_REUSEPORT: c_int = 15;
|
|
pub const SO_PASSCRED: c_int = 16;
|
|
pub const SO_PEERCRED: c_int = 17;
|
|
pub const SO_RCVLOWAT: c_int = 18;
|
|
pub const SO_SNDLOWAT: c_int = 19;
|
|
pub const SO_RCVTIMEO: c_int = 20;
|
|
pub const SO_SNDTIMEO: c_int = 21;
|
|
pub const SO_ACCEPTCONN: c_int = 30;
|
|
pub const SO_PEERSEC: c_int = 31;
|
|
pub const SO_SNDBUFFORCE: c_int = 32;
|
|
pub const SO_RCVBUFFORCE: c_int = 33;
|
|
pub const SO_PROTOCOL: c_int = 38;
|
|
pub const SO_DOMAIN: c_int = 39;
|
|
|
|
pub const SOMAXCONN: c_int = 128;
|
|
|
|
pub const MSG_CTRUNC: c_int = 8;
|
|
pub const MSG_DONTROUTE: c_int = 4;
|
|
pub const MSG_EOR: c_int = 128;
|
|
pub const MSG_OOB: c_int = 1;
|
|
pub const MSG_PEEK: c_int = 2;
|
|
pub const MSG_TRUNC: c_int = 32;
|
|
pub const MSG_DONTWAIT: c_int = 64;
|
|
pub const MSG_WAITALL: c_int = 256;
|
|
pub const MSG_CMSG_CLOEXEC: c_int = 0x40000000;
|
|
pub const MSG_NOSIGNAL: c_int = 0x4000;
|
|
pub const MSG_PROBE: c_int = 0x10;
|
|
pub const MSG_CONFIRM: c_int = 0x800;
|
|
pub const MSG_MORE: c_int = 0x8000;
|
|
pub const MSG_FASTOPEN: c_int = 0x20000000;
|
|
|
|
pub const IP_ADD_SOURCE_MEMBERSHIP: c_int = 70;
|
|
pub const IP_DROP_SOURCE_MEMBERSHIP: c_int = 71;
|
|
pub const MCAST_JOIN_SOURCE_GROUP: c_int = 46;
|
|
pub const MCAST_LEAVE_SOURCE_GROUP: c_int = 47;
|
|
|
|
pub const AF_INET: c_int = 2;
|
|
pub const AF_INET6: c_int = 10;
|
|
pub const AF_LOCAL: c_int = AF_UNIX;
|
|
pub const AF_UNIX: c_int = 1;
|
|
pub const AF_UNSPEC: c_int = 0;
|
|
|
|
pub const PF_INET: c_int = 2;
|
|
pub const PF_INET6: c_int = 10;
|
|
pub const PF_LOCAL: c_int = PF_UNIX;
|
|
pub const PF_UNIX: c_int = 1;
|
|
pub const PF_UNSPEC: c_int = 0;
|
|
|
|
pub const SHUT_RD: c_int = 0;
|
|
pub const SHUT_RDWR: c_int = 2;
|
|
pub const SHUT_WR: c_int = 1;
|
|
|
|
pub const SCM_RIGHTS: c_int = 1;
|
|
pub const SCM_CREDENTIALS: c_int = 2;
|
|
|
|
pub const IPPROTO_TCP: c_int = 6;
|
|
pub const TCP_NODELAY: c_int = 1;
|