pub fn code(self) -> u8 {
        match self {
            Ipv4PacketType::ICMP => IP_PROTO_ICMP,
            Ipv4PacketType::TCP  => IP_PROTO_TCP,
            Ipv4PacketType::UDP  => IP_PROTO_UDP,
            _ => panic!("no protocol code for unknown IPv4 packet type")
        }
    }
/// Get protocol code of this packet type.
Get protocol code of this packet type.
Get protocol code of this packet type .
pub fn code(self) -> u8 {
        match self {
            Ipv4PacketType::ICMP => IP_PROTO_ICMP,
            Ipv4PacketType::TCP  => IP_PROTO_TCP,
            Ipv4PacketType::UDP  => IP_PROTO_UDP,
            _ => panic!("no protocol code for unknown IPv4 packet type")
        }
    }
pub fn code ( self ) -> u8 { match self { Ipv4PacketType :: ICMP => IP_PROTO_ICMP , Ipv4PacketType :: TCP => IP_PROTO_TCP , Ipv4PacketType :: UDP => IP_PROTO_UDP , _ => panic ! ( " " ) } }
Get protocol code of this packet type.
Get protocol code of this packet type .
self
self