/// Get system code of this packet type.
Get system code of this packet type.
Get system code of this packet type .
pub fn code(self) -> u16 {
        match self {
            EtherPacketType::ARP  => ETYPE_ARP,
            EtherPacketType::IPv4 => ETYPE_IPV4,
            _ => panic!("no etype code for unknown packet type")
        }
    }
pub fn code ( self ) -> u16 { match self { EtherPacketType :: ARP => ETYPE_ARP , EtherPacketType :: IPv4 => ETYPE_IPV4 , _ => panic ! ( " " ) } }
Get system code of this packet type.
Get system code of this packet type .
self