Skip to content

Commit 5e001f5

Browse files
committed
Auto merge of #2849 - devnexen:socket_linux_update, r=JohnTitor
Few socket updates related for Linux.
2 parents 4238054 + 2b05c86 commit 5e001f5

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

libc-test/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2820,6 +2820,7 @@ fn test_linux(target: &str) {
28202820
"linux/sched.h",
28212821
"linux/seccomp.h",
28222822
"linux/sched.h",
2823+
"linux/sock_diag.h",
28232824
"linux/sockios.h",
28242825
"linux/uinput.h",
28252826
"linux/vm_sockets.h",

libc-test/semver/linux.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,6 +1181,7 @@ MSG_RST
11811181
MSG_STAT
11821182
MSG_SYN
11831183
MSG_WAITFORONE
1184+
MSG_ZEROCOPY
11841185
MS_ACTIVE
11851186
MS_BIND
11861187
MS_DIRSYNC

src/unix/linux_like/linux/mod.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1565,6 +1565,7 @@ pub const MSG_INFO: ::c_int = 12;
15651565

15661566
pub const MSG_NOERROR: ::c_int = 0o10000;
15671567
pub const MSG_EXCEPT: ::c_int = 0o20000;
1568+
pub const MSG_ZEROCOPY: ::c_int = 0x4000000;
15681569

15691570
pub const SHM_R: ::c_int = 0o400;
15701571
pub const SHM_W: ::c_int = 0o200;
@@ -1841,6 +1842,17 @@ pub const IPV6_FLOWINFO_PRIORITY: ::c_int = 0x0ff00000;
18411842
pub const IPV6_RTHDR_LOOSE: ::c_int = 0;
18421843
pub const IPV6_RTHDR_STRICT: ::c_int = 1;
18431844

1845+
// SO_MEMINFO offsets
1846+
pub const SK_MEMINFO_RMEM_ALLOC: ::c_int = 0;
1847+
pub const SK_MEMINFO_RCVBUF: ::c_int = 1;
1848+
pub const SK_MEMINFO_WMEM_ALLOC: ::c_int = 2;
1849+
pub const SK_MEMINFO_SNDBUF: ::c_int = 3;
1850+
pub const SK_MEMINFO_FWD_ALLOC: ::c_int = 4;
1851+
pub const SK_MEMINFO_WMEM_QUEUED: ::c_int = 5;
1852+
pub const SK_MEMINFO_OPTMEM: ::c_int = 6;
1853+
pub const SK_MEMINFO_BACKLOG: ::c_int = 7;
1854+
pub const SK_MEMINFO_DROPS: ::c_int = 8;
1855+
18441856
pub const IUTF8: ::tcflag_t = 0x00004000;
18451857
#[cfg(not(all(target_env = "uclibc", target_arch = "mips")))]
18461858
pub const CMSPAR: ::tcflag_t = 0o10000000000;

0 commit comments

Comments
 (0)