Commit Graph

17 Commits

Author SHA1 Message Date
qiujiangkun 2a574fbca6 various clippy fix 2021-06-27 10:45:57 +02:00
Dario Nieuwenhuis 98fe17890a rustfmt 2021-06-27 09:31:59 +02:00
Dario Nieuwenhuis 32311b23dc Add Context struct. 2021-06-17 03:20:58 +02:00
Ryan Summers e27e3254f4 Fixing clippy 2021-05-31 17:58:20 +02:00
Ryan Summers 0bb9fc90f0 Simplifying loop logic 2021-05-31 17:42:01 +02:00
Ryan Summers 44add57e8e Removing unneeded changes 2021-05-31 17:39:30 +02:00
Ryan Summers f790f59088 Reverting phy changes 2021-05-31 17:36:26 +02:00
Ryan Summers 8474a1b1e4 cleaning up implementation 2021-05-31 17:33:52 +02:00
Ryan Summers 95829934db Fail-free ingress 2021-05-31 17:30:45 +02:00
Ryan Summers 8d4e255090 Adding prototype fix for fail-free ingress 2021-05-31 17:25:04 +02:00
Dario Nieuwenhuis 0d53163c55 dhcp: convert to socket 2021-04-07 19:00:36 +02:00
Dario Nieuwenhuis ab47db24e0 udp: do not include payload in UdpRepr
This makes UdpRepr work like IpRepr, where it only emits the header, and the user
must emit the payload.

This makes it easier to emit UDP packets with payloads that come from protocol-specific
reprs, like DHCP and in the future DNS.
2021-04-07 14:49:46 +02:00
Dario Nieuwenhuis c043897327 iface: check for ipv4 subnet broadcast addrs everywhere 2021-04-07 02:23:19 +02:00
Dario Nieuwenhuis d64c8593f0 Add defmt logging support 2021-04-01 01:30:47 +02:00
Dario Nieuwenhuis b6220a04c8 Do not use DeviceCapabilities in sockets.
DeviceCapabilities contains the `medium` field, so tests had to give it a value
even if it was unused. This is impossible to do with no `medium-*` enabled, because
it makes `Medium` uninhabited (empty enum).
2021-03-31 17:05:09 +02:00
Dario Nieuwenhuis af4a1e6436 Add medium-ip, medium-ethernet feature flags. 2021-03-31 17:05:09 +02:00
Dario Nieuwenhuis 9ac2cac075 Add support for IP mediums.
- Add `medium` in `DeviceCapabilities`.
- Rename EthernetInterface to Interface.
- Add support to Interface for both Ethernet and IP mediums. The medium to use is detected from `device.capabilities().medium`.
- Ethernet-only features are gated behind the "ethernet" feature, as before.
- IP features are always enabled for now.
2021-03-31 17:05:09 +02:00