Skip to content

Commit

Permalink
Merge pull request #689 from mrmonday/ecn-unix-only
Browse files Browse the repository at this point in the history
Expose set_ecn on unix only
  • Loading branch information
mrmonday committed May 30, 2024
2 parents 053e508 + 01eee25 commit 28e9de4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pnet_transport/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ impl TransportSender {
}

/// Sets an ECN marking on the socket, which then applies for all packets sent.
#[cfg(unix)]
pub fn set_ecn(&mut self, tos: Ecn) -> io::Result<()> {
let (level, name) = match self.channel_type {
Layer4(Ipv4(_)) | Layer3(_) => (pnet_sys::IPPROTO_IP, pnet_sys::IP_TOS),
Expand Down

0 comments on commit 28e9de4

Please sign in to comment.