pub fn new_ack(
        src_ip_addr: Ipv4Addr,
        dst_ip_addr: Ipv4Addr,
        src: u16,
        dst: u16,
        sequence: u32,
        acknowledgement: u32,
        window: u16,
    ) -> Tcp {
        Tcp {
            layer: tcp::Tcp {
                source: src,
                destination: dst,
                sequence,
                acknowledgement,
                data_offset: 5,
                reserved: 0,
                flags: TcpFlags::ACK,
                window,
                checksum: 0,
                urgent_ptr: 0,
                options: vec![],
                payload: vec![],
            },
            src: src_ip_addr,
            dst: dst_ip_addr,
        }
    }
/// Creates a `Tcp` represents a TCP ACK.
Creates a `Tcp` represents a TCP ACK.
Creates a ` Tcp ` represents a TCP ACK .
pub fn new_ack(
        src_ip_addr: Ipv4Addr,
        dst_ip_addr: Ipv4Addr,
        src: u16,
        dst: u16,
        sequence: u32,
        acknowledgement: u32,
        window: u16,
    ) -> Tcp {
        Tcp {
            layer: tcp::Tcp {
                source: src,
                destination: dst,
                sequence,
                acknowledgement,
                data_offset: 5,
                reserved: 0,
                flags: TcpFlags::ACK,
                window,
                checksum: 0,
                urgent_ptr: 0,
                options: vec![],
                payload: vec![],
            },
            src: src_ip_addr,
            dst: dst_ip_addr,
        }
    }
pub fn new_ack ( src_ip_addr : Ipv4Addr , dst_ip_addr : Ipv4Addr , src : u16 , dst : u16 , sequence : u32 , acknowledgement : u32 , window : u16 , ) -> Tcp { Tcp { layer : tcp :: Tcp { source : src , destination : dst , sequence , acknowledgement , data_offset : 5 , reserved : 0 , flags : TcpFlags :: ACK , window , checksum : 0 , urgent_ptr : 0 , options : vec ! [ ] , payload : vec ! [ ] , } , src : src_ip_addr , dst : dst_ip_addr , } }
Creates a `Tcp` represents a TCP ACK.
Creates a ` Tcp ` represents a TCP ACK .
src_ip_addr
Ipv4Addr
dst_ip_addr
Ipv4Addr
src
u16
dst
u16
sequence
u32
acknowledgement
u32
window
u16