pub fn send_tcp_rst(&mut self, dst: SocketAddrV4, src_port: u16) -> io::Result<()> {
        let key = (src_port, dst);

        // TCP
        let tcp = Tcp::new_rst(
            dst.ip().clone(),
            self.src_ip_addr,
            dst.port(),
            src_port,
            *self.tcp_sequence_map.get(&key).unwrap_or(&0),
            0,
            *self.tcp_window_map.get(&key).unwrap_or(&65535),
        );

        // Send
        self.send_ipv4_with_transport(Layers::Tcp(tcp), None)
    }
/// Sends an TCP RST packet.
Sends an TCP RST packet.
Sends an TCP RST packet .
pub fn send_tcp_rst(&mut self, dst: SocketAddrV4, src_port: u16) -> io::Result<()> {
        let key = (src_port, dst);
        // TCP
        let tcp = Tcp::new_rst(
            dst.ip().clone(),
            self.src_ip_addr,
            dst.port(),
            src_port,
            *self.tcp_sequence_map.get(&key).unwrap_or(&0),
            0,
            *self.tcp_window_map.get(&key).unwrap_or(&65535),
        );
        // Send
        self.send_ipv4_with_transport(Layers::Tcp(tcp), None)
    }
pub fn send_tcp_rst ( & mut self , dst : SocketAddrV4 , src_port : u16 ) -> io :: Result < ( ) > { let key = ( src_port , dst ) ; // TCP let tcp = Tcp :: new_rst ( dst . ip ( ) . clone ( ) , self . src_ip_addr , dst . port ( ) , src_port , * self . tcp_sequence_map . get ( & key ) . unwrap_or ( & 0 ) , 0 , * self . tcp_window_map . get ( & key ) . unwrap_or ( & 65535 ) , ) ; // Send self . send_ipv4_with_transport ( Layers :: Tcp ( tcp ) , None ) }
Sends an TCP RST packet.
Sends an TCP RST packet .
&mut self
dst
SocketAddrV4
src_port
u16