diff options
author | bors <bors@rust-lang.org> | 2022-07-22 11:59:53 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2022-07-22 11:59:53 +0000 |
commit | 5e001f5dd17ff67c851cf25bc88df28f3ad6f605 (patch) | |
tree | 7aa66856c8b84c4a5cfbcbea7b0d3163a8326406 | |
parent | 4238054fb9df8705e6dc3b597d33f9aeb3363e25 (diff) | |
parent | 2b05c864d1b2f5c8e13b4f186216077ebe5c7db4 (diff) | |
download | rust-libc-5e001f5dd17ff67c851cf25bc88df28f3ad6f605.tar.gz |
Auto merge of #2849 - devnexen:socket_linux_update, r=JohnTitor
Few socket updates related for Linux.
-rw-r--r-- | libc-test/build.rs | 1 | ||||
-rw-r--r-- | libc-test/semver/linux.txt | 1 | ||||
-rw-r--r-- | src/unix/linux_like/linux/mod.rs | 12 |
3 files changed, 14 insertions, 0 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs index a0da6d7edf..7797ec6c66 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2820,6 +2820,7 @@ fn test_linux(target: &str) { "linux/sched.h", "linux/seccomp.h", "linux/sched.h", + "linux/sock_diag.h", "linux/sockios.h", "linux/uinput.h", "linux/vm_sockets.h", diff --git a/libc-test/semver/linux.txt b/libc-test/semver/linux.txt index bf6d90d20c..ca6557eb51 100644 --- a/libc-test/semver/linux.txt +++ b/libc-test/semver/linux.txt @@ -1181,6 +1181,7 @@ MSG_RST MSG_STAT MSG_SYN MSG_WAITFORONE +MSG_ZEROCOPY MS_ACTIVE MS_BIND MS_DIRSYNC diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index 2086f705a2..93082f941a 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -1565,6 +1565,7 @@ pub const MSG_INFO: ::c_int = 12; pub const MSG_NOERROR: ::c_int = 0o10000; pub const MSG_EXCEPT: ::c_int = 0o20000; +pub const MSG_ZEROCOPY: ::c_int = 0x4000000; pub const SHM_R: ::c_int = 0o400; pub const SHM_W: ::c_int = 0o200; @@ -1841,6 +1842,17 @@ pub const IPV6_FLOWINFO_PRIORITY: ::c_int = 0x0ff00000; pub const IPV6_RTHDR_LOOSE: ::c_int = 0; pub const IPV6_RTHDR_STRICT: ::c_int = 1; +// SO_MEMINFO offsets +pub const SK_MEMINFO_RMEM_ALLOC: ::c_int = 0; +pub const SK_MEMINFO_RCVBUF: ::c_int = 1; +pub const SK_MEMINFO_WMEM_ALLOC: ::c_int = 2; +pub const SK_MEMINFO_SNDBUF: ::c_int = 3; +pub const SK_MEMINFO_FWD_ALLOC: ::c_int = 4; +pub const SK_MEMINFO_WMEM_QUEUED: ::c_int = 5; +pub const SK_MEMINFO_OPTMEM: ::c_int = 6; +pub const SK_MEMINFO_BACKLOG: ::c_int = 7; +pub const SK_MEMINFO_DROPS: ::c_int = 8; + pub const IUTF8: ::tcflag_t = 0x00004000; #[cfg(not(all(target_env = "uclibc", target_arch = "mips")))] pub const CMSPAR: ::tcflag_t = 0o10000000000; |