/// Creates a new packet by allocating a new buffer
Creates a new packet by allocating a new buffer
Creates a new packet by allocating a new buffer
pub fn new() -> Result<Self> {
        unsafe {
            let mbuf = zcsi::mbuf_alloc();
            if mbuf.is_null() {
                Err(buffer::BufferError::FailAlloc.into())
            } else {
                Ok(RawPacket { mbuf })
            }
        }
    }
pub fn new ( ) -> Result < Self > { unsafe { let mbuf = zcsi :: mbuf_alloc ( ) ; if mbuf . is_null ( ) { Err ( buffer :: BufferError :: FailAlloc . into ( ) ) } else { Ok ( RawPacket { mbuf } ) } } }
Creates a new packet by allocating a new buffer
Creates a new packet by allocating a new buffer