Renamed Network mod to Host, removed debugging function, communted out dormant portions of DHCP host config
This commit is contained in:
parent
1cac758d5a
commit
dcfa65509e
11 changed files with 112 additions and 116 deletions
30
src/host/dhcp.rs
Normal file
30
src/host/dhcp.rs
Normal 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(())
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue