pub struct FirecrackerNetwork {
pub nft_path: Option<String>,
pub ip_stack: FirecrackerIpStack,
pub iface_name: String,
pub tap_name: String,
pub tap_ip: IpInet,
pub guest_ip: IpInet,
pub network_type: FirecrackerNetworkType,
}Expand description
A configuration for a Firecracker microVM network.
Fields§
§nft_path: Option<String>The optional explicit path to “nft” to use when invoking it.
ip_stack: FirecrackerIpStackThe IP stack to use.
iface_name: StringThe name of the host network interface that handles real connectivity (i.e. via Ethernet or Wi-Fi).
tap_name: StringThe name of the tap device to direct Firecracker to use.
tap_ip: IpInetThe IP of the tap device to direct Firecracker to use.
guest_ip: IpInetThe IP of the guest.
network_type: FirecrackerNetworkTypeThe type of network to create, the available options depend on the feature flags enabled.
Implementations§
Source§impl FirecrackerNetwork
impl FirecrackerNetwork
Sourcepub fn guest_ip_boot_arg(&self, guest_iface_name: impl AsRef<str>) -> String
pub fn guest_ip_boot_arg(&self, guest_iface_name: impl AsRef<str>) -> String
Format a kernel boot argument that can be added so that all routing setup in the guest is performed by the kernel automatically with iproute2 not needed in the guest.
Trait Implementations§
Source§impl Clone for FirecrackerNetwork
impl Clone for FirecrackerNetwork
Source§fn clone(&self) -> FirecrackerNetwork
fn clone(&self) -> FirecrackerNetwork
Returns a copy 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 FirecrackerNetwork
impl Debug for FirecrackerNetwork
Source§impl Hash for FirecrackerNetwork
impl Hash for FirecrackerNetwork
Source§impl Ord for FirecrackerNetwork
impl Ord for FirecrackerNetwork
Source§fn cmp(&self, other: &FirecrackerNetwork) -> Ordering
fn cmp(&self, other: &FirecrackerNetwork) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for FirecrackerNetwork
impl PartialEq for FirecrackerNetwork
Source§impl PartialOrd for FirecrackerNetwork
impl PartialOrd for FirecrackerNetwork
impl Eq for FirecrackerNetwork
impl StructuralPartialEq for FirecrackerNetwork
Auto Trait Implementations§
impl Freeze for FirecrackerNetwork
impl RefUnwindSafe for FirecrackerNetwork
impl Send for FirecrackerNetwork
impl Sync for FirecrackerNetwork
impl Unpin for FirecrackerNetwork
impl UnwindSafe for FirecrackerNetwork
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)