Crates.io | e1000-driver |
lib.rs | e1000-driver |
version | 0.1.0 |
source | src |
created_at | 2023-02-24 14:55:10.239548 |
updated_at | 2023-02-24 14:55:10.239548 |
description | E1000 driver in Rust for the Intel 82540EP/EM Gigabit Ethernet. |
homepage | |
repository | https://github.com/elliott10/e1000-driver.git |
max_upload_size | |
id | 793675 |
size | 44,998 |
E1000 driver in Rust for the Intel 82540EP/EM Gigabit Ethernet.
Initialize PCI and E1000 driver
pub struct Kernfn;
impl e1000_driver::e1000::KernelFunc for Kernfn { ... }
e1000_driver::pci::pci_init();
let mut e1000_device = e1000_driver::e1000::E1000Device::<Kernfn>::new(e1000_driver::pci::E1000_REGS as usize).unwrap();
Sending network packets
e1000_device.e1000_transmit(&frame);
Receiving network packets
let rx_buf = e1000_device.e1000_recv();
cd src/linux
make ARCH=arch KDIR=/path/to/linux
# e.g. make ARCH=riscv KDIR=/home/rust/linux