Struct nix::sys::socket::LinkAddr
pub struct LinkAddr(pub libc::sockaddr_ll);Documentation
Hardware Address
Fields
pub 0: libc::sockaddr_llImplementations
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::Resultimpl Display for LinkAddr
fn fmt(&Self, f: &mut fmt::Formatter<'_>) -> fmt::Resultimpl Hash for LinkAddr
fn hash<__H: $crate::hash::Hasher>(&Self, state: &mut __H) -> ()impl StructuralEq for LinkAddrimpl StructuralPartialEq for LinkAddrAuto Trait Implementations
impl RefUnwindSafe for LinkAddrimpl UnwindSafe for LinkAddrBlanket Implementations
impl<T> BorrowMut<T> for T
where
T: ?Sized,
where
T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T