Renamed Network mod to Host, removed debugging function, communted out dormant portions of DHCP host config

This commit is contained in:
Jonah Dahlquist 2020-11-23 22:56:10 -08:00
commit dcfa65509e
11 changed files with 112 additions and 116 deletions

30
src/host/dhcp.rs Normal file
View file

@ -0,0 +1,30 @@
use crate::bus::ActiveBus;
use crate::host::Host;
use crate::MacAddress;
pub struct Dhcp {
// settings: HostConfig,
// current: HostConfig,
}
impl Dhcp {
pub fn new(_mac: MacAddress) -> Self {
// let settings = HostConfig {
// mac,
// ..HostConfig::default()
// };
Self {
// settings,
// current: HostConfig::default(),
}
}
}
impl Host for Dhcp {
/// Gets (if necessary) and sets the host settings on the chip
fn refresh<SpiBus: ActiveBus>(&mut self, _bus: &mut SpiBus) -> Result<(), SpiBus::Error> {
// TODO actually negotiate settings from DHCP
// TODO figure out how should receive socket for DHCP negotiations
Ok(())
}
}