Struct af_packet::Ring
[−]
[src]
pub struct Ring { pub if_name: String, pub fd: c_int, // some fields omitted }
References a single mmaped ring buffer. Normally one per thread.
Fields
if_name: String
Interface Name
fd: c_int
File descriptor
Methods
impl Ring
[src]
pub fn from_if_name(if_name: &str) -> Result<Ring>
[src]
Creates a new ring buffer on the specified interface name and puts the interface into promiscuous mode
pub fn new(settings: RingSettings) -> Result<Ring>
[src]
Creates a new ring buffer from the supplied RingSettings struct
pub fn get_block(&mut self) -> Block
[src]
Waits for a block to be added to the ring buffer and returns it
Trait Implementations
impl Clone for Ring
[src]
fn clone(&self) -> Ring
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more