/// Get IPv4 packet type from a given code.
Get IPv4 packet type from a given code.
Get IPv4 packet type from a given code .
fn from(code: u8) -> Ipv4PacketType {
        match code {
            IP_PROTO_ICMP => Ipv4PacketType::ICMP,
            IP_PROTO_TCP  => Ipv4PacketType::TCP,
            IP_PROTO_UDP  => Ipv4PacketType::UDP,
            _ => Ipv4PacketType::UNKNOWN
        }
    }
fn from ( code : u8 ) -> Ipv4PacketType { match code { IP_PROTO_ICMP => Ipv4PacketType :: ICMP , IP_PROTO_TCP => Ipv4PacketType :: TCP , IP_PROTO_UDP => Ipv4PacketType :: UDP , _ => Ipv4PacketType :: UNKNOWN } }
Get IPv4 packet type from a given code.
Get IPv4 packet type from a given code .
code
u8