pub struct InitConfig {
pub dhcp_timeout_ms: u64,
pub use_static_dma: bool,
pub image_base: Option<usize>,
pub image_end: Option<usize>,
pub ecam_base: Option<usize>,
pub retry_count: u8,
pub retry_delay_ms: u64,
}Expand description
Network initialization configuration.
Fields§
§dhcp_timeout_ms: u64Timeout for DHCP in milliseconds.
use_static_dma: boolUse static DMA pool (fallback if discovery fails).
image_base: Option<usize>Image base address for DMA cave discovery.
image_end: Option<usize>Image end address for DMA cave discovery.
ecam_base: Option<usize>ECAM base address for PCIe config access. If None, uses legacy I/O ports on x86.
retry_count: u8Retry count for transient failures.
retry_delay_ms: u64Delay between retries in milliseconds.
Implementations§
Source§impl InitConfig
impl InitConfig
Sourcepub fn with_image_bounds(image_base: usize, image_end: usize) -> Self
pub fn with_image_bounds(image_base: usize, image_end: usize) -> Self
Create config with PE image addresses for DMA cave discovery.
Sourcepub fn for_qemu() -> Self
pub fn for_qemu() -> Self
Create config for QEMU/VirtIO testing. Uses legacy I/O port access which works more reliably in QEMU.
Sourcepub fn dhcp_timeout(self, timeout_ms: u64) -> Self
pub fn dhcp_timeout(self, timeout_ms: u64) -> Self
Set DHCP timeout.
Trait Implementations§
Source§impl Clone for InitConfig
impl Clone for InitConfig
Source§fn clone(&self) -> InitConfig
fn clone(&self) -> InitConfig
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 InitConfig
impl Debug for InitConfig
Auto Trait Implementations§
impl Freeze for InitConfig
impl RefUnwindSafe for InitConfig
impl Send for InitConfig
impl Sync for InitConfig
impl Unpin for InitConfig
impl UnwindSafe for InitConfig
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