#[repr(C, packed)]
#[derive(Debug)]
pub struct InternetProtocolVersion4Packet
{
pub header: InternetProtocolVersion4PacketHeader,
pub options: PhantomData<u8>,
pub payload: Layer4Packet,
}
impl Display for InternetProtocolVersion4Packet
{
#[inline(always)]
fn fmt(&self, f: &mut Formatter) -> fmt::Result
{
Debug::fmt(self, f)
}
}
impl InternetProtocolVersion4Packet
{
#[inline(always)]
pub fn is_packet_length_too_short(layer_3_length: u16) -> bool
{
layer_3_length < InternetProtocolVersion4PacketHeader::HeaderSizeU16
}
}