pub fn send_tcp_ack_0(&mut self, dst: SocketAddrV4, src: SocketAddrV4) -> io::Result<()> {
        // TCP
        let state = self
            .get_state(dst, src)
            .ok_or(io::Error::from(io::ErrorKind::NotFound))?;
        let tcp = Tcp::new_ack(
            dst.port(),
            src.port(),
            state.sequence(),
            state.acknowledgement(),
            self.get_tcp_window(dst, src),
            state.sacks().clone(),
            None,
        );

        // Send
        self.send_ipv4(dst.ip().clone(), src.ip().clone(), Layers::Tcp(tcp), None)?;

        // Clear TCP delayed ACK
        let state = self
            .get_state_mut(dst, src)
            .ok_or(io::Error::from(io::ErrorKind::NotFound))?;
        state.clear_delayed_ack();

        Ok(())
    }
/// Sends an TCP ACK packet without payload.
Sends an TCP ACK packet without payload.
Sends an TCP ACK packet without payload .
pub fn send_tcp_ack_0(&mut self, dst: SocketAddrV4, src: SocketAddrV4) -> io::Result<()> {
        // TCP
        let state = self
            .get_state(dst, src)
            .ok_or(io::Error::from(io::ErrorKind::NotFound))?;
        let tcp = Tcp::new_ack(
            dst.port(),
            src.port(),
            state.sequence(),
            state.acknowledgement(),
            self.get_tcp_window(dst, src),
            state.sacks().clone(),
            None,
        );
        // Send
        self.send_ipv4(dst.ip().clone(), src.ip().clone(), Layers::Tcp(tcp), None)?;
        // Clear TCP delayed ACK
        let state = self
            .get_state_mut(dst, src)
            .ok_or(io::Error::from(io::ErrorKind::NotFound))?;
        state.clear_delayed_ack();
        Ok(())
    }
pub fn send_tcp_ack_0 ( & mut self , dst : SocketAddrV4 , src : SocketAddrV4 ) -> io :: Result < ( ) > { // TCP let state = self . get_state ( dst , src ) . ok_or ( io :: Error :: from ( io :: ErrorKind :: NotFound ) ) ? ; let tcp = Tcp :: new_ack ( dst . port ( ) , src . port ( ) , state . sequence ( ) , state . acknowledgement ( ) , self . get_tcp_window ( dst , src ) , state . sacks ( ) . clone ( ) , None , ) ; // Send self . send_ipv4 ( dst . ip ( ) . clone ( ) , src . ip ( ) . clone ( ) , Layers :: Tcp ( tcp ) , None ) ? ; // Clear TCP delayed ACK let state = self . get_state_mut ( dst , src ) . ok_or ( io :: Error :: from ( io :: ErrorKind :: NotFound ) ) ? ; state . clear_delayed_ack ( ) ; Ok ( ( ) ) }
Sends an TCP ACK packet without payload.
Sends an TCP ACK packet without payload .
&mut self
dst
SocketAddrV4
src
SocketAddrV4
&mut self
dst
SocketAddrV4
src
SocketAddrV4