File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ Added ` Ipv6MulticastHops ` as socket option to set and read.
Original file line number Diff line number Diff line change @@ -355,6 +355,17 @@ sockopt_impl!(
355
355
u8
356
356
) ;
357
357
#[ cfg( feature = "net" ) ]
358
+ sockopt_impl ! (
359
+ #[ cfg_attr( docsrs, doc( cfg( feature = "net" ) ) ) ]
360
+ /// Set or read the hop limit value of outgoing IPv6 multicast packets for
361
+ /// this socket.
362
+ Ipv6MulticastHops ,
363
+ Both ,
364
+ libc:: IPPROTO_IPV6 ,
365
+ libc:: IPV6_MULTICAST_HOPS ,
366
+ libc:: c_int
367
+ ) ;
368
+ #[ cfg( feature = "net" ) ]
358
369
sockopt_impl ! (
359
370
#[ cfg_attr( docsrs, doc( cfg( feature = "net" ) ) ) ]
360
371
/// Set or read a boolean integer argument that determines whether sent
Original file line number Diff line number Diff line change @@ -325,6 +325,19 @@ fn test_ttl_opts() {
325
325
. expect ( "setting ipv6ttl on an inet6 socket should succeed" ) ;
326
326
}
327
327
328
+ #[ test]
329
+ fn test_ipv6_multicast_hops ( ) {
330
+ let fd6 = socket (
331
+ AddressFamily :: Inet6 ,
332
+ SockType :: Datagram ,
333
+ SockFlag :: empty ( ) ,
334
+ None ,
335
+ )
336
+ . unwrap ( ) ;
337
+ setsockopt ( & fd6, sockopt:: Ipv6MulticastHops , & 7 )
338
+ . expect ( "setting ipv6multicasthops on an inet6 socket should succeed" ) ;
339
+ }
340
+
328
341
#[ test]
329
342
#[ cfg( apple_targets) ]
330
343
fn test_dontfrag_opts ( ) {
You can’t perform that action at this time.
0 commit comments