Skip to content

Commit f6d415d

Browse files
committed
Add IPV6_PKTINFO, Correct documentationn for IPV6_RECVPKTINFO
1 parent 0f53575 commit f6d415d

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

src/sys/socket/sockopt.rs

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -905,18 +905,39 @@ sockopt_impl!(
905905
libc::IP_PKTINFO,
906906
bool
907907
);
908-
#[cfg(any(linux_android, target_os = "freebsd", apple_targets, netbsdlike))]
908+
#[cfg(any(
909+
target_os = "android",
910+
target_os = "freebsd",
911+
target_os = "ios",
912+
target_os = "linux",
913+
target_os = "macos",
914+
target_os = "netbsd",
915+
target_os = "openbsd",
916+
))]
909917
#[cfg(feature = "net")]
910918
sockopt_impl!(
911919
#[cfg_attr(docsrs, doc(cfg(feature = "net")))]
912-
/// Set delivery of the `IPV6_PKTINFO` control message on incoming
920+
/// Set delivery of the `IPV6_RECVPKTINFO` control message on incoming
913921
/// datagrams.
914922
Ipv6RecvPacketInfo,
915923
Both,
916924
libc::IPPROTO_IPV6,
917925
libc::IPV6_RECVPKTINFO,
918926
bool
919927
);
928+
929+
#[cfg(any(linux_android, bsd))]
930+
#[cfg(feature = "net")]
931+
sockopt_impl!(
932+
#[cfg_attr(docsrs, doc(cfg(feature = "net")))]
933+
/// Set delivery of the `IPV6_PKTINFO` control message on incoming
934+
/// datagrams.
935+
Ipv6PacketInfo,
936+
Both,
937+
libc::IPPROTO_IPV6,
938+
libc::IPV6_PKTINFO,
939+
bool
940+
);
920941
#[cfg(bsd)]
921942
#[cfg(feature = "net")]
922943
sockopt_impl!(

0 commit comments

Comments
 (0)