Skip to content

Commit

Permalink
Merge #1503
Browse files Browse the repository at this point in the history
1503: Add TcpRepair to sockopt r=asomers a=tazz4843

This PR adds the `TCP_REPAIR` flag to `nix::sys::socket::sockopt` under the name `TcpRepair`.

Co-authored-by: 0/0 <zero@imaskeleton.me>
  • Loading branch information
bors[bot] and tazz4843 authored Aug 27, 2021
2 parents f9d508f + d5fdacb commit 253075a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
(#[1335](https://github.com/nix-rust/nix/pull/1335))
- Exposed `SockAddr::from_raw_sockaddr`
(#[1447](https://github.com/nix-rust/nix/pull/1447))
- Added `TcpRepair`
(#[1503](https://github.com/nix-rust/nix/pull/1503))

### Changed

Expand Down
4 changes: 4 additions & 0 deletions src/sys/socket/sockopt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@ sockopt_impl!(Both, TcpKeepAlive, libc::IPPROTO_TCP, libc::TCP_KEEPALIVE, u32);
sockopt_impl!(Both, TcpKeepIdle, libc::IPPROTO_TCP, libc::TCP_KEEPIDLE, u32);
#[cfg(not(target_os = "openbsd"))]
sockopt_impl!(Both, TcpKeepCount, libc::IPPROTO_TCP, libc::TCP_KEEPCNT, u32);
#[cfg(any(target_os = "android",
target_os = "fuchsia",
target_os = "linux"))]
sockopt_impl!(Both, TcpRepair, libc::IPPROTO_TCP, libc::TCP_REPAIR, u32);
#[cfg(not(target_os = "openbsd"))]
sockopt_impl!(Both, TcpKeepInterval, libc::IPPROTO_TCP, libc::TCP_KEEPINTVL, u32);
#[cfg(any(target_os = "fuchsia", target_os = "linux"))]
Expand Down

0 comments on commit 253075a

Please sign in to comment.