pub struct VethBridge {
pub name: String,
pub bridge_ip: u32,
pub subnet_mask: u32,
pub attached_interfaces: Vec<String>,
pub arp_proxy_entries: Vec<ArpProxyEntry>,
pub nat: NatTable,
}Expand description
Bridge configuration for container networking.
Fields§
§name: StringBridge name.
bridge_ip: u32Bridge IPv4 address (gateway).
subnet_mask: u32Bridge subnet mask.
attached_interfaces: Vec<String>Attached veth host-side endpoint names.
arp_proxy_entries: Vec<ArpProxyEntry>ARP proxy entries.
nat: NatTableNAT table.
Implementations§
Source§impl VethBridge
impl VethBridge
pub fn new(name: &str, bridge_ip: u32, subnet_mask: u32) -> Self
Sourcepub fn add_arp_proxy(&mut self, entry: ArpProxyEntry)
pub fn add_arp_proxy(&mut self, entry: ArpProxyEntry)
Add an ARP proxy entry.
Sourcepub fn arp_lookup(&self, ip: u32) -> Option<&ArpProxyEntry>
pub fn arp_lookup(&self, ip: u32) -> Option<&ArpProxyEntry>
Look up an ARP proxy entry by IP.
pub fn attached_count(&self) -> usize
Trait Implementations§
Source§impl Clone for VethBridge
impl Clone for VethBridge
Source§fn clone(&self) -> VethBridge
fn clone(&self) -> VethBridge
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 VethBridge
impl RefUnwindSafe for VethBridge
impl Send for VethBridge
impl Sync for VethBridge
impl Unpin for VethBridge
impl UnwindSafe for VethBridge
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)