Skip to content

Commit

Permalink
sys::socket adding GetOnly TCP_FUNCTION_ALIAS for freebsd.
Browse files Browse the repository at this point in the history
to complete `TCP_FUNCTION_BLK` as to get the alias name, if existent,
of the TCP stack.
  • Loading branch information
devnexen committed Dec 7, 2024
1 parent e7e9809 commit de91c5f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/sys/socket/sockopt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,19 @@ sockopt_impl!(
libc::TCP_FUNCTION_BLK,
libc::tcp_function_set
);
#[cfg(target_os = "freebsd")]
#[cfg(feature = "net")]
sockopt_impl!(
#[cfg_attr(docsrs, doc(cfg(feature = "net")))]
/// Query the alias name of the set of function of the socket's TCP stack.
/// Uses the same field for the main name when getting from TCP_FUNCTION_BLK.
/// Empty if no alias.
TcpFunctionAlias,
GetOnly,
libc::IPPROTO_TCP,
libc::TCP_FUNCTION_ALIAS,
libc::tcp_function_set
);
sockopt_impl!(
#[cfg_attr(docsrs, doc(cfg(feature = "net")))]
/// Used to disable Nagle's algorithm.
Expand Down

0 comments on commit de91c5f

Please sign in to comment.