pub struct FrameDesc { /* private fields */ }
Expand description
A Umem
frame descriptor.
Used to pass frame information between the kernel and
userspace. addr
is an offset in bytes from the start of the
Umem
and corresponds to the starting address of
the packet data segment of some frame. lengths
describes the
length (in bytes) of any data stored in the frame’s headroom or
data segments.
Implementations
sourceimpl FrameDesc
impl FrameDesc
sourcepub fn addr(&self) -> usize
pub fn addr(&self) -> usize
The starting address of the packet data segment of the frame pointed at by this descriptor.
sourcepub fn lengths(&self) -> &SegmentLengths
pub fn lengths(&self) -> &SegmentLengths
Current headroom and packet data lengths for the frame pointed at by this descriptor.
sourcepub fn set_options(&mut self, options: u32)
pub fn set_options(&mut self, options: u32)
Set the frame options.
Trait Implementations
sourceimpl Default for FrameDesc
impl Default for FrameDesc
sourcefn default() -> Self
fn default() -> Self
Creates an empty frame descriptor with an address of zero and segment lengths also set to zero.
Since the address of any descriptors created this way is
always zero, before using them to write to the Umem
they
should first be ‘initialised’ by passing them to either the
RxQueue
or the CompQueue
, so they can be populated
with the details of a free frame.
impl Copy for FrameDesc
Auto Trait Implementations
impl RefUnwindSafe for FrameDesc
impl Send for FrameDesc
impl Sync for FrameDesc
impl Unpin for FrameDesc
impl UnwindSafe for FrameDesc
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more