|
@@ -307,129 +307,3 @@ bitflags! {
|
|
|
const ESPINTCP = 7; // Yikes, this is really xfrm encap types.
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-// fn sock_set_option(
|
|
|
-// &self,
|
|
|
-// _socket: &mut udp::Socket,
|
|
|
-// _level: SocketOptionsLevel,
|
|
|
-// optname: PosixSocketOption,
|
|
|
-// _optval: &[u8],
|
|
|
-// ) -> Result<(), SystemError> {
|
|
|
-// use PosixSocketOption::*;
|
|
|
-// use SystemError::*;
|
|
|
-
|
|
|
-// if optname == SO_BINDTODEVICE {
|
|
|
-// todo!("SO_BINDTODEVICE");
|
|
|
-// }
|
|
|
-
|
|
|
-// match optname {
|
|
|
-// SO_TYPE => {}
|
|
|
-// SO_PROTOCOL => {}
|
|
|
-// SO_DOMAIN => {}
|
|
|
-// SO_ERROR => {
|
|
|
-// return Err(ENOPROTOOPT);
|
|
|
-// }
|
|
|
-// SO_TIMESTAMP_OLD => {}
|
|
|
-// SO_TIMESTAMP_NEW => {}
|
|
|
-// SO_TIMESTAMPNS_OLD => {}
|
|
|
-
|
|
|
-// SO_TIMESTAMPING_OLD => {}
|
|
|
-
|
|
|
-// SO_RCVTIMEO_OLD => {}
|
|
|
-
|
|
|
-// SO_SNDTIMEO_OLD => {}
|
|
|
-
|
|
|
-// // if define CONFIG_NET_RX_BUSY_POLL
|
|
|
-// SO_BUSY_POLL | SO_PREFER_BUSY_POLL | SO_BUSY_POLL_BUDGET => {
|
|
|
-// debug!("Unsupported socket option: {:?}", optname);
|
|
|
-// return Err(ENOPROTOOPT);
|
|
|
-// }
|
|
|
-// // end if
|
|
|
-// optname => {
|
|
|
-// debug!("Unsupported socket option: {:?}", optname);
|
|
|
-// return Err(ENOPROTOOPT);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// return Ok(());
|
|
|
-// }
|
|
|
-
|
|
|
-// fn udp_set_option(
|
|
|
-// &self,
|
|
|
-// level: SocketOptionsLevel,
|
|
|
-// optname: usize,
|
|
|
-// optval: &[u8],
|
|
|
-// ) -> Result<(), SystemError> {
|
|
|
-// use PosixSocketOption::*;
|
|
|
-
|
|
|
-// let so_opt_name =
|
|
|
-// PosixSocketOption::try_from(optname as i32)
|
|
|
-// .map_err(|_| SystemError::ENOPROTOOPT)?;
|
|
|
-
|
|
|
-// if level == SocketOptionsLevel::SOL_SOCKET {
|
|
|
-// self.with_mut_socket(f)
|
|
|
-// self.sock_set_option(self., level, so_opt_name, optval)?;
|
|
|
-// if so_opt_name == SO_RCVBUF || so_opt_name == SO_RCVBUFFORCE {
|
|
|
-// todo!("SO_RCVBUF");
|
|
|
-// }
|
|
|
-// }
|
|
|
-
|
|
|
-// match UdpSocketOptions::from_bits_truncate(optname as u32) {
|
|
|
-// UdpSocketOptions::UDP_CORK => {
|
|
|
-// todo!("UDP_CORK");
|
|
|
-// }
|
|
|
-// UdpSocketOptions::UDP_ENCAP => {
|
|
|
-// match UdpEncapTypes::from_bits_truncate(optval[0]) {
|
|
|
-// UdpEncapTypes::ESPINUDP_NON_IKE => {
|
|
|
-// todo!("ESPINUDP_NON_IKE");
|
|
|
-// }
|
|
|
-// UdpEncapTypes::ESPINUDP => {
|
|
|
-// todo!("ESPINUDP");
|
|
|
-// }
|
|
|
-// UdpEncapTypes::L2TPINUDP => {
|
|
|
-// todo!("L2TPINUDP");
|
|
|
-// }
|
|
|
-// UdpEncapTypes::GTP0 => {
|
|
|
-// todo!("GTP0");
|
|
|
-// }
|
|
|
-// UdpEncapTypes::GTP1U => {
|
|
|
-// todo!("GTP1U");
|
|
|
-// }
|
|
|
-// UdpEncapTypes::RXRPC => {
|
|
|
-// todo!("RXRPC");
|
|
|
-// }
|
|
|
-// UdpEncapTypes::ESPINTCP => {
|
|
|
-// todo!("ESPINTCP");
|
|
|
-// }
|
|
|
-// UdpEncapTypes::ZERO => {}
|
|
|
-// _ => {
|
|
|
-// return Err(SystemError::ENOPROTOOPT);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// UdpSocketOptions::UDP_NO_CHECK6_TX => {
|
|
|
-// todo!("UDP_NO_CHECK6_TX");
|
|
|
-// }
|
|
|
-// UdpSocketOptions::UDP_NO_CHECK6_RX => {
|
|
|
-// todo!("UDP_NO_CHECK6_RX");
|
|
|
-// }
|
|
|
-// UdpSocketOptions::UDP_SEGMENT => {
|
|
|
-// todo!("UDP_SEGMENT");
|
|
|
-// }
|
|
|
-// UdpSocketOptions::UDP_GRO => {
|
|
|
-// todo!("UDP_GRO");
|
|
|
-// }
|
|
|
-
|
|
|
-// UdpSocketOptions::UDPLITE_RECV_CSCOV => {
|
|
|
-// todo!("UDPLITE_RECV_CSCOV");
|
|
|
-// }
|
|
|
-// UdpSocketOptions::UDPLITE_SEND_CSCOV => {
|
|
|
-// todo!("UDPLITE_SEND_CSCOV");
|
|
|
-// }
|
|
|
-
|
|
|
-// UdpSocketOptions::ZERO => {}
|
|
|
-// _ => {
|
|
|
-// return Err(SystemError::ENOPROTOOPT);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// return Ok(());
|
|
|
-// }
|