From e9f07eea61d78dd1b4555e0e7814ab1078cb10d9 Mon Sep 17 00:00:00 2001 From: Jonathan de Jong Date: Mon, 14 Nov 2022 09:56:02 +0000 Subject: add IpMtu sockopt --- src/sys/socket/sockopt.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/sys/socket/sockopt.rs b/src/sys/socket/sockopt.rs index 08b73aaa..7489858e 100644 --- a/src/sys/socket/sockopt.rs +++ b/src/sys/socket/sockopt.rs @@ -925,6 +925,15 @@ sockopt_impl!( libc::IPV6_RECVERR, bool ); +#[cfg(any(target_os = "android", target_os = "linux"))] +sockopt_impl!( + /// Fetch the current system-estimated Path MTU. + IpMtu, + GetOnly, + libc::IPPROTO_IP, + libc::IP_MTU, + libc::c_int +); #[cfg(any(target_os = "android", target_os = "freebsd", target_os = "linux"))] sockopt_impl!( /// Set or retrieve the current time-to-live field that is used in every -- cgit v1.2.3