pub struct IpStatusBlock {
pub mac_address: [u8; 6],
pub ip_address: [u8; 16],
pub gateway: [u8; 16],
pub netmask_prefix: u8,
/* private fields */
}Expand description
IPStatus block (Block ID 4058)
Ethernet IP address, gateway, MAC address, and netmask status.
Fields§
§mac_address: [u8; 6]MAC address (6 bytes)
ip_address: [u8; 16]IP address (16 bytes, supports IPv4/IPv6)
gateway: [u8; 16]Gateway address (16 bytes)
netmask_prefix: u8Network mask prefix length (e.g. 24 for /24)
Implementations§
Source§impl IpStatusBlock
impl IpStatusBlock
pub fn tow_seconds(&self) -> f64
pub fn tow_ms(&self) -> u32
pub fn wnc(&self) -> u16
Sourcepub fn mac_address_string(&self) -> String
pub fn mac_address_string(&self) -> String
Format MAC address as colon-separated hex (e.g. “AA:BB:CC:DD:EE:FF”)
Sourcepub fn ip_address_string(&self) -> String
pub fn ip_address_string(&self) -> String
Format IPv4 address if first 12 bytes are zero (IPv4-mapped)
Sourcepub fn gateway_string(&self) -> String
pub fn gateway_string(&self) -> String
Format gateway address (same logic as IP)
Trait Implementations§
Source§impl Clone for IpStatusBlock
impl Clone for IpStatusBlock
Source§fn clone(&self) -> IpStatusBlock
fn clone(&self) -> IpStatusBlock
Returns a duplicate 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 IpStatusBlock
impl Debug for IpStatusBlock
Auto Trait Implementations§
impl Freeze for IpStatusBlock
impl RefUnwindSafe for IpStatusBlock
impl Send for IpStatusBlock
impl Sync for IpStatusBlock
impl Unpin for IpStatusBlock
impl UnsafeUnpin for IpStatusBlock
impl UnwindSafe for IpStatusBlock
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