fn from(code: u16) -> EtherPacketType {
        match code {
            ETYPE_ARP  => EtherPacketType::ARP,
            ETYPE_IPV4 => EtherPacketType::IPv4,
            _ => EtherPacketType::UNKNOWN
        }
    }
/// Get ethernet packet type from a given code.
Get ethernet packet type from a given code.
Get ethernet packet type from a given code .
fn from(code: u16) -> EtherPacketType {
        match code {
            ETYPE_ARP  => EtherPacketType::ARP,
            ETYPE_IPV4 => EtherPacketType::IPv4,
            _ => EtherPacketType::UNKNOWN
        }
    }
fn from ( code : u16 ) -> EtherPacketType { match code { ETYPE_ARP => EtherPacketType :: ARP , ETYPE_IPV4 => EtherPacketType :: IPv4 , _ => EtherPacketType :: UNKNOWN } }
Get ethernet packet type from a given code.
Get ethernet packet type from a given code .
code
u16
code
u16