@@ -1212,48 +1212,6 @@ impl Socket {
1212
1212
}
1213
1213
}
1214
1214
1215
- /// Get the value of the `IP_TRANSPARENT` option on this socket.
1216
- ///
1217
- /// For more information about this option, see [`set_ip_transparent`].
1218
- ///
1219
- /// [`set_ip_transparent`]: Socket::set_ip_transparent
1220
- #[ cfg( all( feature = "all" , target_os = "linux" ) ) ]
1221
- #[ cfg_attr( docsrs, doc( cfg( all( feature = "all" , target_os = "linux" ) ) ) ) ]
1222
- pub fn ip_transparent ( & self ) -> io:: Result < bool > {
1223
- unsafe {
1224
- getsockopt :: < c_int > ( self . as_raw ( ) , sys:: IPPROTO_IP , libc:: IP_TRANSPARENT )
1225
- . map ( |transparent| transparent != 0 )
1226
- }
1227
- }
1228
-
1229
- /// Set the value of the `IP_TRANSPARENT` option on this socket.
1230
- ///
1231
- /// Setting this boolean option enables transparent proxying
1232
- /// on this socket. This socket option allows the calling
1233
- /// application to bind to a nonlocal IP address and operate
1234
- /// both as a client and a server with the foreign address as
1235
- /// the local endpoint. NOTE: this requires that routing be
1236
- /// set up in a way that packets going to the foreign address
1237
- /// are routed through the TProxy box (i.e., the system
1238
- /// hosting the application that employs the IP_TRANSPARENT
1239
- /// socket option). Enabling this socket option requires
1240
- /// superuser privileges (the `CAP_NET_ADMIN` capability).
1241
- ///
1242
- /// TProxy redirection with the iptables TPROXY target also
1243
- /// requires that this option be set on the redirected socket.
1244
- #[ cfg( all( feature = "all" , target_os = "linux" ) ) ]
1245
- #[ cfg_attr( docsrs, doc( cfg( all( feature = "all" , target_os = "linux" ) ) ) ) ]
1246
- pub fn set_ip_transparent ( & self , transparent : bool ) -> io:: Result < ( ) > {
1247
- unsafe {
1248
- setsockopt (
1249
- self . as_raw ( ) ,
1250
- sys:: IPPROTO_IP ,
1251
- libc:: IP_TRANSPARENT ,
1252
- transparent as c_int ,
1253
- )
1254
- }
1255
- }
1256
-
1257
1215
/// Join a multicast group using `IP_ADD_MEMBERSHIP` option on this socket.
1258
1216
///
1259
1217
/// This function specifies a new multicast group for this socket to join.
0 commit comments