diff --git a/src/unix/linux_like/android/mod.rs b/src/unix/linux_like/android/mod.rs index 67e5eb52b4e60..947136d036625 100644 --- a/src/unix/linux_like/android/mod.rs +++ b/src/unix/linux_like/android/mod.rs @@ -2483,6 +2483,25 @@ pub const MPOL_F_STATIC_NODES: ::c_int = 1 << 15; pub const SEEK_DATA: ::c_int = 3; pub const SEEK_HOLE: ::c_int = 4; +pub const MSG_OOB: ::c_int = 1; +pub const MSG_PEEK: ::c_int = 2; +pub const MSG_DONTROUTE: ::c_int = 4; +pub const MSG_CTRUNC: ::c_int = 8; +pub const MSG_TRUNC: ::c_int = 0x20; +pub const MSG_DONTWAIT: ::c_int = 0x40; +pub const MSG_EOR: ::c_int = 0x80; +pub const MSG_WAITALL: ::c_int = 0x100; +pub const MSG_FIN: ::c_int = 0x200; +pub const MSG_SYN: ::c_int = 0x400; +pub const MSG_CONFIRM: ::c_int = 0x800; +pub const MSG_RST: ::c_int = 0x1000; +pub const MSG_ERRQUEUE: ::c_int = 0x2000; +pub const MSG_NOSIGNAL: ::c_int = 0x4000; +pub const MSG_MORE: ::c_int = 0x8000; +pub const MSG_WAITFORONE: ::c_int = 0x10000; +pub const MSG_FASTOPEN: ::c_int = 0x20000000; +pub const MSG_CMSG_CLOEXEC: ::c_int = 0x40000000; + // sys/socket.h pub const AF_NFC: ::c_int = 39; pub const AF_VSOCK: ::c_int = 40; diff --git a/src/unix/linux_like/emscripten/mod.rs b/src/unix/linux_like/emscripten/mod.rs index 11fbb31c3830d..7855f6531730f 100644 --- a/src/unix/linux_like/emscripten/mod.rs +++ b/src/unix/linux_like/emscripten/mod.rs @@ -934,6 +934,25 @@ pub const PF_MPLS: ::c_int = AF_MPLS; pub const PF_NFC: ::c_int = AF_NFC; pub const PF_VSOCK: ::c_int = AF_VSOCK; +pub const MSG_OOB: ::c_uint = 1; +pub const MSG_PEEK: ::c_uint = 2; +pub const MSG_DONTROUTE: ::c_uint = 4; +pub const MSG_CTRUNC: ::c_uint = 8; +pub const MSG_TRUNC: ::c_uint = 0x20; +pub const MSG_DONTWAIT: ::c_uint = 0x40; +pub const MSG_EOR: ::c_uint = 0x80; +pub const MSG_WAITALL: ::c_uint = 0x100; +pub const MSG_FIN: ::c_uint = 0x200; +pub const MSG_SYN: ::c_uint = 0x400; +pub const MSG_CONFIRM: ::c_uint = 0x800; +pub const MSG_RST: ::c_uint = 0x1000; +pub const MSG_ERRQUEUE: ::c_uint = 0x2000; +pub const MSG_NOSIGNAL: ::c_uint = 0x4000; +pub const MSG_MORE: ::c_uint = 0x8000; +pub const MSG_WAITFORONE: ::c_uint = 0x10000; +pub const MSG_FASTOPEN: ::c_uint = 0x20000000; +pub const MSG_CMSG_CLOEXEC: ::c_uint = 0x40000000; + // System V IPC pub const IPC_PRIVATE: ::key_t = 0; diff --git a/src/unix/linux_like/linux/gnu/mod.rs b/src/unix/linux_like/linux/gnu/mod.rs index 3506d922ddf74..d6d368494f132 100644 --- a/src/unix/linux_like/linux/gnu/mod.rs +++ b/src/unix/linux_like/linux/gnu/mod.rs @@ -729,6 +729,25 @@ pub const PF_NFC: ::c_int = AF_NFC; pub const PF_VSOCK: ::c_int = AF_VSOCK; pub const PF_XDP: ::c_int = AF_XDP; +pub const MSG_OOB: ::c_int = 1; +pub const MSG_PEEK: ::c_int = 2; +pub const MSG_DONTROUTE: ::c_int = 4; +pub const MSG_CTRUNC: ::c_int = 8; +pub const MSG_TRUNC: ::c_int = 0x20; +pub const MSG_DONTWAIT: ::c_int = 0x40; +pub const MSG_EOR: ::c_int = 0x80; +pub const MSG_WAITALL: ::c_int = 0x100; +pub const MSG_FIN: ::c_int = 0x200; +pub const MSG_SYN: ::c_int = 0x400; +pub const MSG_CONFIRM: ::c_int = 0x800; +pub const MSG_RST: ::c_int = 0x1000; +pub const MSG_ERRQUEUE: ::c_int = 0x2000; +pub const MSG_NOSIGNAL: ::c_int = 0x4000; +pub const MSG_MORE: ::c_int = 0x8000; +pub const MSG_WAITFORONE: ::c_int = 0x10000; +pub const MSG_FASTOPEN: ::c_int = 0x20000000; +pub const MSG_CMSG_CLOEXEC: ::c_int = 0x40000000; + /* DCCP socket options */ pub const DCCP_SOCKOPT_PACKET_SIZE: ::c_int = 1; pub const DCCP_SOCKOPT_SERVICE: ::c_int = 2; diff --git a/src/unix/linux_like/linux/musl/mod.rs b/src/unix/linux_like/linux/musl/mod.rs index 32d35782187f8..dcab8a65c2bf0 100644 --- a/src/unix/linux_like/linux/musl/mod.rs +++ b/src/unix/linux_like/linux/musl/mod.rs @@ -586,6 +586,25 @@ pub const PF_NFC: ::c_int = AF_NFC; pub const PF_VSOCK: ::c_int = AF_VSOCK; pub const PF_XDP: ::c_int = AF_XDP; +pub const MSG_OOB: ::c_uint = 1; +pub const MSG_PEEK: ::c_uint = 2; +pub const MSG_DONTROUTE: ::c_uint = 4; +pub const MSG_CTRUNC: ::c_uint = 8; +pub const MSG_TRUNC: ::c_uint = 0x20; +pub const MSG_DONTWAIT: ::c_uint = 0x40; +pub const MSG_EOR: ::c_uint = 0x80; +pub const MSG_WAITALL: ::c_uint = 0x100; +pub const MSG_FIN: ::c_uint = 0x200; +pub const MSG_SYN: ::c_uint = 0x400; +pub const MSG_CONFIRM: ::c_uint = 0x800; +pub const MSG_RST: ::c_uint = 0x1000; +pub const MSG_ERRQUEUE: ::c_uint = 0x2000; +pub const MSG_NOSIGNAL: ::c_uint = 0x4000; +pub const MSG_MORE: ::c_uint = 0x8000; +pub const MSG_WAITFORONE: ::c_uint = 0x10000; +pub const MSG_FASTOPEN: ::c_uint = 0x20000000; +pub const MSG_CMSG_CLOEXEC: ::c_uint = 0x40000000; + pub const EFD_NONBLOCK: ::c_int = ::O_NONBLOCK; pub const SFD_NONBLOCK: ::c_int = ::O_NONBLOCK; diff --git a/src/unix/linux_like/linux/uclibc/mod.rs b/src/unix/linux_like/linux/uclibc/mod.rs index 4a01e0cd81c85..822c29e2b77de 100644 --- a/src/unix/linux_like/linux/uclibc/mod.rs +++ b/src/unix/linux_like/linux/uclibc/mod.rs @@ -294,6 +294,25 @@ pub const UDP_GRO: ::c_int = 104; pub const UDP_SEGMENT: ::c_int = 103; pub const YESEXPR: ::c_int = ((5) << 8) | (0); +pub const MSG_OOB: ::c_int = 1; +pub const MSG_PEEK: ::c_int = 2; +pub const MSG_DONTROUTE: ::c_int = 4; +pub const MSG_CTRUNC: ::c_int = 8; +pub const MSG_TRUNC: ::c_int = 0x20; +pub const MSG_DONTWAIT: ::c_int = 0x40; +pub const MSG_EOR: ::c_int = 0x80; +pub const MSG_WAITALL: ::c_int = 0x100; +pub const MSG_FIN: ::c_int = 0x200; +pub const MSG_SYN: ::c_int = 0x400; +pub const MSG_CONFIRM: ::c_int = 0x800; +pub const MSG_RST: ::c_int = 0x1000; +pub const MSG_ERRQUEUE: ::c_int = 0x2000; +pub const MSG_NOSIGNAL: ::c_int = 0x4000; +pub const MSG_MORE: ::c_int = 0x8000; +pub const MSG_WAITFORONE: ::c_int = 0x10000; +pub const MSG_FASTOPEN: ::c_int = 0x20000000; +pub const MSG_CMSG_CLOEXEC: ::c_int = 0x40000000; + extern "C" { pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int; pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int; diff --git a/src/unix/linux_like/mod.rs b/src/unix/linux_like/mod.rs index 46964cc1736ab..7450aa277475f 100644 --- a/src/unix/linux_like/mod.rs +++ b/src/unix/linux_like/mod.rs @@ -759,25 +759,6 @@ pub const PF_IEEE802154: ::c_int = AF_IEEE802154; pub const PF_CAIF: ::c_int = AF_CAIF; pub const PF_ALG: ::c_int = AF_ALG; -pub const MSG_OOB: ::c_int = 1; -pub const MSG_PEEK: ::c_int = 2; -pub const MSG_DONTROUTE: ::c_int = 4; -pub const MSG_CTRUNC: ::c_int = 8; -pub const MSG_TRUNC: ::c_int = 0x20; -pub const MSG_DONTWAIT: ::c_int = 0x40; -pub const MSG_EOR: ::c_int = 0x80; -pub const MSG_WAITALL: ::c_int = 0x100; -pub const MSG_FIN: ::c_int = 0x200; -pub const MSG_SYN: ::c_int = 0x400; -pub const MSG_CONFIRM: ::c_int = 0x800; -pub const MSG_RST: ::c_int = 0x1000; -pub const MSG_ERRQUEUE: ::c_int = 0x2000; -pub const MSG_NOSIGNAL: ::c_int = 0x4000; -pub const MSG_MORE: ::c_int = 0x8000; -pub const MSG_WAITFORONE: ::c_int = 0x10000; -pub const MSG_FASTOPEN: ::c_int = 0x20000000; -pub const MSG_CMSG_CLOEXEC: ::c_int = 0x40000000; - pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP; pub const SOCK_RAW: ::c_int = 3; @@ -787,6 +768,7 @@ pub const IP_TTL: ::c_int = 2; pub const IP_HDRINCL: ::c_int = 3; pub const IP_OPTIONS: ::c_int = 4; pub const IP_ROUTER_ALERT: ::c_int = 5; + pub const IP_RECVOPTS: ::c_int = 6; pub const IP_RETOPTS: ::c_int = 7; pub const IP_PKTINFO: ::c_int = 8;