fn tcp_checksum(tcp: &TcpPacket<'_>, src_addr: &IpAddr, dest_addr: &IpAddr) -> u16 {
    match (src_addr, dest_addr) {
        (IpAddr::V4(src), IpAddr::V4(dest)) => ipv4_checksum(tcp, src, dest),
        _ => unreachable!(),
    }
}
/// Calculate the TCP IPv4 checksum.
///
/// Currently this only supports Ipv4.
Calculate the TCP IPv4 checksum.
Currently this only supports Ipv4.
Calculate the TCP IPv4 checksum . Currently this only supports Ipv4 .
fn tcp_checksum(tcp: &TcpPacket<'_>, src_addr: &IpAddr, dest_addr: &IpAddr) -> u16 {
    match (src_addr, dest_addr) {
        (IpAddr::V4(src), IpAddr::V4(dest)) => ipv4_checksum(tcp, src, dest),
        _ => unreachable!(),
    }
}
fn tcp_checksum ( tcp : & TcpPacket < ' _ > , src_addr : & IpAddr , dest_addr : & IpAddr ) -> u16 { match ( src_addr , dest_addr ) { ( IpAddr :: V4 ( src ) , IpAddr :: V4 ( dest ) ) => ipv4_checksum ( tcp , src , dest ) , _ => unreachable ! ( ) , } }
Calculate the TCP IPv4 checksum.
Calculate the TCP IPv4 checksum .
tcp
&TcpPacket<'_>
src_addr
&IpAddr
dest_addr
&IpAddr