Skip to main content

mxr_network_port_t

Struct mxr_network_port_t 

Source
#[repr(C)]
pub struct mxr_network_port_t {
Show 21 fields pub port: u16, pub name: [c_char; 32], pub link_speed: u8, pub link_full_duplex: bool, pub ip: [c_char; 16], pub querier: [c_char; 16], pub has_mac_address: bool, pub mac_address: [u8; 6], pub has_errors: bool, pub in_error: bool, pub in_fcs_error: bool, pub in_collision: bool, pub out_deferred: bool, pub out_excessive: bool, pub polarity_error: bool, pub skew_warning: bool, pub length_warning: bool, pub has_vct_status: bool, pub vct_warning: [bool; 4], pub cable_status_count: usize, pub cable_status: [mxr_cable_status_t; 4],
}
Expand description

The link state and diagnostics of one network port.

Fields§

§port: u16

Port number.

§name: [c_char; 32]

Port name.

§link_speed: u8

Negotiated link speed.

§link_full_duplex: bool

Whether the link negotiated full duplex.

§ip: [c_char; 16]

The port’s own address, empty when it has not reported one.

§querier: [c_char; 16]

The IGMP querier the port sees, empty when it sees none.

§has_mac_address: bool

Whether the port reported a hardware address.

§mac_address: [u8; 6]

The hardware address, meaningful only when has_mac_address is set.

§has_errors: bool

Whether the port reported link errors.

§in_error: bool

Input errors.

§in_fcs_error: bool

Input frame check errors.

§in_collision: bool

Input collisions.

§out_deferred: bool

Deferred transmissions.

§out_excessive: bool

Excessive transmissions.

§polarity_error: bool

Polarity errors.

§skew_warning: bool

Skew warning.

§length_warning: bool

Length warning.

§has_vct_status: bool

Whether the port reported a virtual cable test.

§vct_warning: [bool; 4]

Whether each pair raised a warning, meaningful only when has_vct_status is set.

§cable_status_count: usize

How many entries of cable_status the port filled in.

§cable_status: [mxr_cable_status_t; 4]

Cable diagnostics per pair.

Trait Implementations§

Source§

impl Clone for mxr_network_port_t

Source§

fn clone(&self) -> mxr_network_port_t

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for mxr_network_port_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.