@@ -445,6 +445,50 @@ pub fn get_ipv6_multicast_loop<Fd: AsFd>(fd: Fd) -> io::Result<bool> {
445
445
backend:: net:: syscalls:: sockopt:: get_ipv6_multicast_loop ( fd. as_fd ( ) )
446
446
}
447
447
448
+ /// `setsockopt(fd, IPPROTO_IP, IPV6_MULTICAST_HOPS, multicast_hops)`
449
+ ///
450
+ /// # References
451
+ /// - [POSIX `setsockopt`]
452
+ /// - [POSIX `netinet/in.h`]
453
+ /// - [Linux `setsockopt`]
454
+ /// - [Linux `ipv6`]
455
+ /// - [Winsock2 `setsockopt`]
456
+ /// - [Winsock2 `IPPROTO_IPV6` options]
457
+ ///
458
+ /// [POSIX `setsockopt`]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/setsockopt.html
459
+ /// [POSIX `netinet/in.h`]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/netinet_in.h.html
460
+ /// [Linux `setsockopt`]: https://man7.org/linux/man-pages/man2/setsockopt.2.html
461
+ /// [Linux `ipv6`]: https://man7.org/linux/man-pages/man7/ipv6.7.html
462
+ /// [Winsock2 `setsockopt`]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-setsockopt
463
+ /// [Winsock2 `IPPROTO_IPV6` options]: https://docs.microsoft.com/en-us/windows/win32/winsock/ipproto-ipv6-socket-options
464
+ #[ inline]
465
+ #[ doc( alias = "IP_MULTICAST_TTL" ) ]
466
+ pub fn set_ipv6_multicast_hops < Fd : AsFd > ( fd : Fd , multicast_hops : u32 ) -> io:: Result < ( ) > {
467
+ backend:: net:: syscalls:: sockopt:: set_ipv6_multicast_hops ( fd. as_fd ( ) , multicast_hops)
468
+ }
469
+
470
+ /// `getsockopt(fd, IPPROTO_IP, IPV6_MULTICAST_HOPS)`
471
+ ///
472
+ /// # References
473
+ /// - [POSIX `getsockopt`]
474
+ /// - [POSIX `netinet/in.h`]
475
+ /// - [Linux `getsockopt`]
476
+ /// - [Linux `ipv6`]
477
+ /// - [Winsock2 `getsockopt`]
478
+ /// - [Winsock2 `IPPROTO_IPV6` options]
479
+ ///
480
+ /// [POSIX `getsockopt`]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/getsockopt.html
481
+ /// [POSIX `netinet/in.h`]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/netinet_in.h.html
482
+ /// [Linux `getsockopt`]: https://man7.org/linux/man-pages/man2/getsockopt.2.html
483
+ /// [Linux `ipv6`]: https://man7.org/linux/man-pages/man7/ipv6.7.html
484
+ /// [Winsock2 `getsockopt`]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-getsockopt
485
+ /// [Winsock2 `IPPROTO_IPV6` options]: https://docs.microsoft.com/en-us/windows/win32/winsock/ipproto-ipv6-socket-options
486
+ #[ inline]
487
+ #[ doc( alias = "IP_MULTICAST_TTL" ) ]
488
+ pub fn get_ipv6_multicast_hops < Fd : AsFd > ( fd : Fd ) -> io:: Result < u32 > {
489
+ backend:: net:: syscalls:: sockopt:: get_ipv6_multicast_hops ( fd. as_fd ( ) )
490
+ }
491
+
448
492
/// `setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, multiaddr, interface)`
449
493
///
450
494
/// # References
0 commit comments