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 Jun 27, 2024
1 parent 0f53575 commit f6d415d
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions src/sys/socket/sockopt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -905,18 +905,39 @@ sockopt_impl!(
libc::IP_PKTINFO,
bool
);
#[cfg(any(linux_android, target_os = "freebsd", apple_targets, netbsdlike))]
#[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
/// Set delivery of the `IPV6_RECVPKTINFO` control message on incoming
/// datagrams.
Ipv6RecvPacketInfo,
Both,
libc::IPPROTO_IPV6,
libc::IPV6_RECVPKTINFO,
bool
);

#[cfg(any(linux_android, bsd))]
#[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(bsd)]
#[cfg(feature = "net")]
sockopt_impl!(
Expand Down

0 comments on commit f6d415d

Please sign in to comment.