pub fn parse(packet: &UdpPacket, src: Ipv4Addr, dst: Ipv4Addr) -> Udp {
        Udp {
            layer: udp::Udp {
                source: packet.get_source(),
                destination: packet.get_destination(),
                length: packet.get_length(),
                checksum: packet.get_checksum(),
                payload: vec![],
            },
            src,
            dst,
        }
    }
/// Creates an `Udp` according to the given UDP packet, source and destination.
Creates an `Udp` according to the given UDP packet, source and destination.
Creates an ` Udp ` according to the given UDP packet source and destination .
pub fn parse(packet: &UdpPacket, src: Ipv4Addr, dst: Ipv4Addr) -> Udp {
        Udp {
            layer: udp::Udp {
                source: packet.get_source(),
                destination: packet.get_destination(),
                length: packet.get_length(),
                checksum: packet.get_checksum(),
                payload: vec![],
            },
            src,
            dst,
        }
    }
pub fn parse ( packet : & UdpPacket , src : Ipv4Addr , dst : Ipv4Addr ) -> Udp { Udp { layer : udp :: Udp { source : packet . get_source ( ) , destination : packet . get_destination ( ) , length : packet . get_length ( ) , checksum : packet . get_checksum ( ) , payload : vec ! [ ] , } , src , dst , } }
Creates an `Udp` according to the given UDP packet, source and destination.
Creates an ` Udp ` according to the given UDP packet source and destination .
packet
&UdpPacket
src
Ipv4Addr
dst
Ipv4Addr