Struct rustix::net::xdp::SocketAddrXdp
source · pub struct SocketAddrXdp {
sxdp_flags: SockaddrXdpFlags,
sxdp_ifindex: u32,
sxdp_queue_id: u32,
sxdp_shared_umem_fd: u32,
}
Expand description
A XDP socket address.
Used to bind to XDP socket.
Not ABI compatible with struct sockaddr_xdp
Fields§
§sxdp_flags: SockaddrXdpFlags
Flags.
sxdp_ifindex: u32
Interface index.
sxdp_queue_id: u32
Queue ID.
Shared UMEM file descriptor.
Implementations§
source§impl SocketAddrXdp
impl SocketAddrXdp
sourcepub fn new(
flags: SockaddrXdpFlags,
interface_index: u32,
queue_id: u32,
share_umem_fd: u32,
) -> Self
pub fn new( flags: SockaddrXdpFlags, interface_index: u32, queue_id: u32, share_umem_fd: u32, ) -> Self
Construct a new XDP address.
sourcepub fn flags(&self) -> SockaddrXdpFlags
pub fn flags(&self) -> SockaddrXdpFlags
Return flags.
sourcepub fn set_flags(&mut self, flags: SockaddrXdpFlags)
pub fn set_flags(&mut self, flags: SockaddrXdpFlags)
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.
Return shared UMEM file descriptor.
Set shared UMEM file descriptor.
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 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
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)