Skip to content

Commit a6b676b

Browse files
linux: Add definitions for Multipath TCP
1 parent 51af18d commit a6b676b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

libc-test/build.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2645,6 +2645,10 @@ fn test_linux(target: &str) {
26452645
// Require Linux kernel 5.6:
26462646
"VMADDR_CID_LOCAL" => true,
26472647

2648+
// IPPROTO_MAX was increased in 5.6 for IPPROTO_MPTCP:
2649+
| "IPPROTO_MAX"
2650+
| "IPPROTO_MPTCP" => true,
2651+
26482652
// Defined in kernel headers but musl removes it; need musl 1.2 for definition in musl
26492653
// headers.
26502654
"P_PIDFD" => true,

src/unix/linux_like/linux/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1228,6 +1228,7 @@ pub const RTLD_NOW: ::c_int = 0x2;
12281228
pub const AT_EACCESS: ::c_int = 0x200;
12291229

12301230
pub const TCP_MD5SIG: ::c_int = 14;
1231+
pub const TCP_ULP: ::c_int = 31;
12311232

12321233
align_const! {
12331234
pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
@@ -1316,7 +1317,9 @@ pub const IPPROTO_UDPLITE: ::c_int = 136;
13161317
pub const IPPROTO_MPLS: ::c_int = 137;
13171318
/// raw IP packet
13181319
pub const IPPROTO_RAW: ::c_int = 255;
1319-
pub const IPPROTO_MAX: ::c_int = 256;
1320+
/// Multipath TCP
1321+
pub const IPPROTO_MPTCP: ::c_int = 262;
1322+
pub const IPPROTO_MAX: ::c_int = 263;
13201323

13211324
pub const IP_MSFILTER: ::c_int = 41;
13221325
pub const MCAST_JOIN_GROUP: ::c_int = 42;

0 commit comments

Comments
 (0)