fn frame_bytes_from_buf(buf: &[u8]) -> Result<&[u8]> {
    if buf.len() < vnet_hdr_len() {
        Err(Error::VnetHeaderMissing)
    } else {
        Ok(&buf[vnet_hdr_len()..])
    }
}
// Frames being sent/received through the network device model have a VNET header. This
// function returns a slice which holds the L2 frame bytes without this header.
Frames being sent/received through the network device model have a VNET header. This
function returns a slice which holds the L2 frame bytes without this header.
Frames being sent / received through the network device model have a VNET header . This function returns a slice which holds the L2 frame bytes without this header .
fn frame_bytes_from_buf(buf: &[u8]) -> Result<&[u8]> {
    if buf.len() < vnet_hdr_len() {
        Err(Error::VnetHeaderMissing)
    } else {
        Ok(&buf[vnet_hdr_len()..])
    }
}
fn frame_bytes_from_buf ( buf : & [ u8 ] ) -> Result < & [ u8 ] > { if buf . len ( ) < vnet_hdr_len ( ) { Err ( Error :: VnetHeaderMissing ) } else { Ok ( & buf [ vnet_hdr_len ( ) .. ] ) } }
Frames being sent/received through the network device model have a VNET header.
Frames being sent / received through the network device model have a VNET header .
buf
&[u8]
buf
&[u8]