devices/virtio/net/
sys.rs1cfg_if::cfg_if! {
6 if #[cfg(any(target_os = "android", target_os = "linux"))] {
7 mod linux;
8 use linux as platform;
9 } else if #[cfg(windows)] {
10 pub mod windows;
11 use windows as platform;
12 }
13}
14
15pub struct PendingBuffer {
16 pub buffer: Box<[u8; 65562]>,
20 pub length: u32,
21}
22
23impl PendingBuffer {
24 pub fn new() -> Self {
25 PendingBuffer {
26 buffer: Box::new([0u8; 65562]),
27 length: 0,
28 }
29 }
30}
31
32pub(crate) use platform::process_mrg_rx;
33pub(crate) use platform::process_rx;
34pub(crate) use platform::process_tx;
35pub(crate) use platform::validate_and_configure_tap;
36pub(crate) use platform::virtio_features_to_tap_offload;