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 413652d
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/sys/socket/sockopt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -905,18 +905,31 @@ sockopt_impl!(
libc::IP_PKTINFO,
bool
);
#[cfg(any(linux_android, target_os = "freebsd", apple_targets, netbsdlike))]
#[cfg(any(linux_android))]
#[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 413652d

Please sign in to comment.