pub struct GuestNetworkConfig {
pub guest_ip: Ipv4Addr,
pub gateway_ip: Ipv4Addr,
pub prefix_len: u8,
pub guest_mac: [u8; 6],
pub gateway_mac: [u8; 6],
pub dns_server: Ipv4Addr,
}Expand description
Static guest network configuration for the virtio-net MVP.
This struct describes the two endpoints of the single virtual Ethernet link:
- the guest NIC (
guest_*) - the host-side gateway implemented by smolvm (
gateway_*)
Fields§
§guest_ip: Ipv4AddrGuest IPv4 address.
gateway_ip: Ipv4AddrGateway IPv4 address.
prefix_len: u8Prefix length.
guest_mac: [u8; 6]Guest MAC address.
gateway_mac: [u8; 6]Gateway MAC address.
dns_server: Ipv4AddrDNS server address presented to the guest.
Implementations§
Trait Implementations§
Source§impl Clone for GuestNetworkConfig
impl Clone for GuestNetworkConfig
Source§fn clone(&self) -> GuestNetworkConfig
fn clone(&self) -> GuestNetworkConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GuestNetworkConfig
Source§impl Debug for GuestNetworkConfig
impl Debug for GuestNetworkConfig
impl Eq for GuestNetworkConfig
Source§impl PartialEq for GuestNetworkConfig
impl PartialEq for GuestNetworkConfig
Source§fn eq(&self, other: &GuestNetworkConfig) -> bool
fn eq(&self, other: &GuestNetworkConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GuestNetworkConfig
Auto Trait Implementations§
impl Freeze for GuestNetworkConfig
impl RefUnwindSafe for GuestNetworkConfig
impl Send for GuestNetworkConfig
impl Sync for GuestNetworkConfig
impl Unpin for GuestNetworkConfig
impl UnsafeUnpin for GuestNetworkConfig
impl UnwindSafe for GuestNetworkConfig
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