pub struct SocketAddrXdp { /* private fields */ }
Expand description
A XDP socket address.
Used to bind to XDP socket.
Not ABI compatible with struct sockaddr_xdp
.
To add a shared UMEM file descriptor, use
SocketAddrXdpWithSharedUmem
.
Implementations§
Source§impl SocketAddrXdp
impl SocketAddrXdp
Sourcepub const fn new(
flags: SocketAddrXdpFlags,
interface_index: u32,
queue_id: u32,
) -> Self
pub const fn new( flags: SocketAddrXdpFlags, interface_index: u32, queue_id: u32, ) -> Self
Construct a new XDP address.
Sourcepub fn flags(&self) -> SocketAddrXdpFlags
pub fn flags(&self) -> SocketAddrXdpFlags
Return flags.
Sourcepub fn set_flags(&mut self, flags: SocketAddrXdpFlags)
pub fn set_flags(&mut self, flags: SocketAddrXdpFlags)
Set flags.
Sourcepub fn interface_index(&self) -> u32
pub fn interface_index(&self) -> u32
Return interface index.
Sourcepub fn set_interface_index(&mut self, interface_index: u32)
pub fn set_interface_index(&mut self, interface_index: u32)
Set interface index.
Sourcepub fn set_queue_id(&mut self, queue_id: u32)
pub fn set_queue_id(&mut self, queue_id: u32)
Set queue ID.
Trait Implementations§
Source§impl Clone for SocketAddrXdp
impl Clone for SocketAddrXdp
Source§fn clone(&self) -> SocketAddrXdp
fn clone(&self) -> SocketAddrXdp
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SocketAddrXdp
impl Debug for SocketAddrXdp
Source§impl From<SocketAddrXdp> for SocketAddrAny
impl From<SocketAddrXdp> for SocketAddrAny
Source§fn from(from: SocketAddrXdp) -> Self
fn from(from: SocketAddrXdp) -> Self
Converts to this type from the input type.
Source§impl Hash for SocketAddrXdp
impl Hash for SocketAddrXdp
Source§impl Ord for SocketAddrXdp
impl Ord for SocketAddrXdp
Source§fn cmp(&self, other: &SocketAddrXdp) -> Ordering
fn cmp(&self, other: &SocketAddrXdp) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SocketAddrXdp
impl PartialEq for SocketAddrXdp
Source§impl PartialOrd for SocketAddrXdp
impl PartialOrd for SocketAddrXdp
Source§impl SocketAddrArg for SocketAddrXdp
impl SocketAddrArg for SocketAddrXdp
Source§unsafe fn with_sockaddr<R>(
&self,
f: impl FnOnce(*const SocketAddrOpaque, SocketAddrLen) -> R,
) -> R
unsafe fn with_sockaddr<R>( &self, f: impl FnOnce(*const SocketAddrOpaque, SocketAddrLen) -> R, ) -> R
Call a closure with the pointer and length to the corresponding C type. Read more
Source§fn as_any(&self) -> SocketAddrAny
fn as_any(&self) -> SocketAddrAny
Convert to
SocketAddrAny
.Source§unsafe fn write_sockaddr(
&self,
storage: *mut SocketAddrStorage,
) -> SocketAddrLen
unsafe fn write_sockaddr( &self, storage: *mut SocketAddrStorage, ) -> SocketAddrLen
Encode an address into a
SocketAddrStorage
. Read moreSource§impl TryFrom<SocketAddrAny> for SocketAddrXdp
impl TryFrom<SocketAddrAny> for SocketAddrXdp
impl Eq for SocketAddrXdp
impl StructuralPartialEq for SocketAddrXdp
Auto Trait Implementations§
impl Freeze for SocketAddrXdp
impl RefUnwindSafe for SocketAddrXdp
impl Send for SocketAddrXdp
impl Sync for SocketAddrXdp
impl Unpin for SocketAddrXdp
impl UnwindSafe for SocketAddrXdp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more