Struct nix::sys::socket::LinkAddr
pub struct LinkAddr(pub libc::sockaddr_ll);
Documentation
Hardware Address
Fields
pub 0: libc::sockaddr_ll
Implementations
impl LinkAddr
pub fn family(&Self) -> AddressFamily
Always AF_PACKET
pub fn protocol(&Self) -> u16
Physical-layer protocol
pub fn ifindex(&Self) -> usize
Interface number
pub fn hatype(&Self) -> u16
ARP hardware type
pub fn pkttype(&Self) -> u8
Packet type
pub fn halen(&Self) -> usize
Length of MAC address
pub fn addr(&Self) -> [u8; 6]
Physical-layer address (MAC)
Trait Implementations
impl Debug for LinkAddr
fn fmt(&Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl Display for LinkAddr
fn fmt(&Self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Hash for LinkAddr
fn hash<__H: $crate::hash::Hasher>(&Self, state: &mut __H) -> ()
impl StructuralEq for LinkAddr
impl StructuralPartialEq for LinkAddr
Auto Trait Implementations
impl RefUnwindSafe for LinkAddr
impl UnwindSafe for LinkAddr
Blanket Implementations
impl<T> BorrowMut<T> for T
where
T: ?Sized,
where
T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T