Skip to content

Few socket updates related for Linux. #2849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1181,6 +1181,7 @@ MSG_RST
MSG_STAT
MSG_SYN
MSG_WAITFORONE
MSG_ZEROCOPY
MS_ACTIVE
MS_BIND
MS_DIRSYNC
Expand Down
12 changes: 12 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down