File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1607,7 +1607,7 @@ impl Socket {
1607
1607
target_os = "espidf" ,
1608
1608
target_os = "vita" ,
1609
1609
) ) ) ]
1610
- pub fn set_recv_tos ( & self , recv_tos : bool ) -> io:: Result < ( ) > {
1610
+ pub fn set_recv_tos_v4 ( & self , recv_tos : bool ) -> io:: Result < ( ) > {
1611
1611
unsafe {
1612
1612
setsockopt (
1613
1613
self . as_raw ( ) ,
@@ -1620,9 +1620,9 @@ impl Socket {
1620
1620
1621
1621
/// Get the value of the `IP_RECVTOS` option for this socket.
1622
1622
///
1623
- /// For more information about this option, see [`set_recv_tos `].
1623
+ /// For more information about this option, see [`set_recv_tos_v4 `].
1624
1624
///
1625
- /// [`set_recv_tos `]: Socket::set_recv_tos
1625
+ /// [`set_recv_tos_v4 `]: Socket::set_recv_tos_v4
1626
1626
#[ cfg( not( any(
1627
1627
target_os = "aix" ,
1628
1628
target_os = "dragonfly" ,
@@ -1638,7 +1638,7 @@ impl Socket {
1638
1638
target_os = "espidf" ,
1639
1639
target_os = "vita" ,
1640
1640
) ) ) ]
1641
- pub fn recv_tos ( & self ) -> io:: Result < bool > {
1641
+ pub fn recv_tos_v4 ( & self ) -> io:: Result < bool > {
1642
1642
unsafe {
1643
1643
getsockopt :: < c_int > ( self . as_raw ( ) , sys:: IPPROTO_IP , sys:: IP_RECVTOS )
1644
1644
. map ( |recv_tos| recv_tos > 0 )
Original file line number Diff line number Diff line change @@ -1425,7 +1425,7 @@ test!(IPv4 tos_v4, set_tos_v4(96));
1425
1425
target_os = "vita" ,
1426
1426
target_os = "haiku" ,
1427
1427
) ) ) ]
1428
- test ! ( IPv4 recv_tos , set_recv_tos ( true ) ) ;
1428
+ test ! ( IPv4 recv_tos_v4 , set_recv_tos_v4 ( true ) ) ;
1429
1429
1430
1430
#[ cfg( not( windows) ) ] // TODO: returns `WSAENOPROTOOPT` (10042) on Windows.
1431
1431
test ! ( IPv4 broadcast, set_broadcast( true ) ) ;
You can’t perform that action at this time.
0 commit comments