pub struct BondInterface {
pub name: String,
pub mode: BondMode,
pub slaves: Vec<BondSlave>,
pub mac_address: [u8; 6],
pub active_slave_index: usize,
pub rr_counter: usize,
pub arp_monitor: ArpMonitor,
}Expand description
A bond (link aggregation) interface
Fields§
§name: StringBond interface name (e.g., “bond0”)
mode: BondModeOperating mode
slaves: Vec<BondSlave>Member interfaces
mac_address: [u8; 6]Bond-level MAC address (set from first slave added)
active_slave_index: usizeIndex of the currently active slave (ActiveBackup mode)
rr_counter: usizeRound-robin counter for TX distribution
arp_monitor: ArpMonitorARP health monitor
Implementations§
Source§impl BondInterface
impl BondInterface
Sourcepub fn add_slave(
&mut self,
slave_name: &str,
mac: [u8; 6],
) -> Result<(), BondError>
pub fn add_slave( &mut self, slave_name: &str, mac: [u8; 6], ) -> Result<(), BondError>
Add a slave interface to this bond
Sourcepub fn remove_slave(&mut self, slave_name: &str) -> Result<(), BondError>
pub fn remove_slave(&mut self, slave_name: &str) -> Result<(), BondError>
Remove a slave interface from this bond
Sourcepub fn select_tx_slave(&mut self) -> Option<usize>
pub fn select_tx_slave(&mut self) -> Option<usize>
Select the slave index to use for the next TX packet
Sourcepub fn handle_link_change(&mut self, slave_name: &str, link_up: bool)
pub fn handle_link_change(&mut self, slave_name: &str, link_up: bool)
Handle a link state change on a slave interface
Sourcepub fn link_up_count(&self) -> usize
pub fn link_up_count(&self) -> usize
Return the number of slaves with link up
Trait Implementations§
Source§impl Clone for BondInterface
impl Clone for BondInterface
Source§fn clone(&self) -> BondInterface
fn clone(&self) -> BondInterface
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BondInterface
impl RefUnwindSafe for BondInterface
impl Send for BondInterface
impl Sync for BondInterface
impl Unpin for BondInterface
impl UnwindSafe for BondInterface
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)