Skip to content

Commit

Permalink
Add IPV6_PKTINFO, Correct documentationn for IPV6_RECVPKTINFO
Browse files Browse the repository at this point in the history
  • Loading branch information
ishanjain28 committed Aug 28, 2023
1 parent 842142f commit ca40a90
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions src/sys/socket/sockopt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,11 @@ cfg_if! {
TcpMaxSeg, GetOnly, libc::IPPROTO_TCP, libc::TCP_MAXSEG, u32);
}
}
#[cfg(not(any(target_os = "openbsd", target_os = "haiku", target_os = "redox")))]
#[cfg(not(any(
target_os = "openbsd",
target_os = "haiku",
target_os = "redox"
)))]
#[cfg(feature = "net")]
sockopt_impl!(
#[cfg_attr(docsrs, doc(cfg(feature = "net")))]
Expand All @@ -572,7 +576,11 @@ sockopt_impl!(
libc::TCP_REPAIR,
u32
);
#[cfg(not(any(target_os = "openbsd", target_os = "haiku", target_os = "redox")))]
#[cfg(not(any(
target_os = "openbsd",
target_os = "haiku",
target_os = "redox"
)))]
#[cfg(feature = "net")]
sockopt_impl!(
#[cfg_attr(docsrs, doc(cfg(feature = "net")))]
Expand Down Expand Up @@ -858,14 +866,34 @@ sockopt_impl!(
#[cfg(feature = "net")]
sockopt_impl!(
#[cfg_attr(docsrs, doc(cfg(feature = "net")))]
/// Set delivery of the `IPV6_PKTINFO` control message on incoming
/// Set delivery of the `IPV6_RECVPKTINFO` control message on incoming
/// datagrams.
Ipv6RecvPacketInfo,
Both,
libc::IPPROTO_IPV6,
libc::IPV6_RECVPKTINFO,
bool
);
#[cfg(any(
target_os = "android",
target_os = "freebsd",
target_os = "ios",
target_os = "linux",
target_os = "macos",
target_os = "netbsd",
target_os = "openbsd",
))]
#[cfg(feature = "net")]
sockopt_impl!(
#[cfg_attr(docsrs, doc(cfg(feature = "net")))]
/// Set delivery of the `IPV6_PKTINFO` control message on incoming
/// datagrams.
Ipv6PacketInfo,
Both,
libc::IPPROTO_IPV6,
libc::IPV6_PKTINFO,
bool
);
#[cfg(any(
target_os = "freebsd",
target_os = "ios",
Expand Down

0 comments on commit ca40a90

Please sign in to comment.