Commit Graph

18 Commits (88256dbdcfc3b284f5533e5aa2969bf5061db22a)

Author SHA1 Message Date
Dario Nieuwenhuis 88256dbdcf Update to Rust 2018. Fixes #271 2020-12-27 17:54:56 +01:00
Thales Fragoso 561708c34f Merge lookup and lookup_pure methods 2020-08-17 04:44:58 +00:00
Thales Fragoso 1e5de8d42c Only limit the neighbor cache rate after sending a request packet
Prior to this change, the neighbor cache would get limited even when the
device failed to process our arp packet, which could put the socket in
the waiting state in the next poll.

This change only limits the cache rate if the device successfully
consumed our packet.
2020-08-17 04:44:58 +00:00
Dario Nieuwenhuis 386f50dbd2 Assign map instead of using mem::replace.
This fixes build on latest nightly. The cause of the breakage
is this commit:

7c4ca59f4b

which added a #[must_use = "if you don't need the old value, you
can just assign the new value directly"] hint to mem::replace.
2020-05-02 05:46:18 +00:00
Derk Bell 4bb0e5f21a fix indentation
Closes: #274
Approved by: dlrobertson
2019-02-01 23:13:35 +08:00
Derk Bell a1d3b94f7b make fill method public #273
Closes: #274
Approved by: dlrobertson
2019-02-01 23:13:35 +08:00
Sidharth Shanker c7e35d143c Add GC & threshold to the ARP cache.
Closes: #234
Approved by: whitequark
2018-06-25 02:55:53 +08:00
Dan Robertson e0b48caca3 Update phy mod to use new time types
Update everything but the socket types to use the new time types instead
of a basic u64

Closes: #141
Approved by: whitequark
2018-02-16 10:44:03 +08:00
Dan Robertson 4a78b02fcf Add process_ipv6 to EthernetInterface
- Add `process_ipv6` to `EthernetInterface`
 - Add basic test for `process_ipv6`
 - Add `deny(unused)` if either proto-ipv4 or proto-ipv6 is enabled
 - Add `cfg`s where needed to avoid compile time errors due to the above
2018-01-15 11:54:26 +00:00
Dan Robertson b653a6e421 Fix documentation warnings.
- There are several warnings that are thrown when running `cargo doc`. Fix
  these warnings.
- Convert all module documentation to use /*! for consistency.
2018-01-05 19:38:23 +00:00
Dan Robertson 439e0a2cc1 Add the proto-ipv4 feature. 2017-12-24 13:28:59 +00:00
whitequark 8dd9bdeaad Trace neighbor discovery status on a per-socket basis.
This avoids delaying the first packets for new neighbors by
(at least) the ARP cache silence time, or potentially even
indefinitely.
2017-12-18 11:06:24 +00:00
Dan Robertson 308afc5a25 Remove debug println in test_evict
The println's surrounding the final cache fill in test_evict that causes
PADDR_B to be evicted are not needed.
2017-11-22 08:03:39 +00:00
whitequark 98a3ec8c3a Limit the rate at which sockets will request neighbor discovery.
The rate of emission of neighbor discovery packets is already
limited at the level of the entire neighbor cache, but poll()
would uselessly spin until the answer arrives (if ever).
2017-11-22 07:20:31 +00:00
whitequark 715aa4b217 Add a missing feature check. 2017-11-21 12:02:25 +00:00
whitequark 52a6e27206 Implement eviction in neighbor cache for fixed storage size. 2017-11-21 11:53:26 +00:00
whitequark 29a338228d Fix a broken macro invocation. 2017-11-21 11:06:53 +00:00
whitequark eaa50d0003 Rewrite the ARP cache to allow for flood protection and expiration. 2017-11-21 10:53:55 +00:00