e1000-driver 0.1.0

E1000 driver in Rust for the Intel 82540EP/EM Gigabit Ethernet.
Documentation
  • Coverage
  • 50%
    8 out of 16 items documented0 out of 3 items with examples
  • Size
  • Source code size: 44.95 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.14 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • elliott10/e1000-driver
    18 6 2
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • elliott10

E1000 Driver

E1000 driver in Rust for the Intel 82540EP/EM Gigabit Ethernet.

Support features

  • E1000 driver for RISCV on Qemu is supported
  • Initialize simple PCI-Express for e1000 device
  • Implement the e1000 driver as a linux driver module
  • Todo: networking protocol support: IP, ARP, UDP

Quick start on bare metal OS

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();

Kernel module on Linux

cd src/linux
make ARCH=arch KDIR=/path/to/linux
# e.g. make ARCH=riscv KDIR=/home/rust/linux

Reference