Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: smoltcp-rs/smoltcp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7d54157e77b2
Choose a base ref
...
head repository: smoltcp-rs/smoltcp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 97499ac280cd
Choose a head ref
  • 3 commits
  • 13 files changed
  • 1 contributor

Commits on Jul 23, 2017

  1. Move macros into their own module.

    This allows us to use `enum_with_unknown` in `phy`.
    whitequark committed Jul 23, 2017
    Copy the full SHA
    f5a3785 View commit details
  2. Inject the current timestamp into Device::{transmit,receive}.

    Various parts of smoltcp require an arrow of time; a monotonically
    increasing timestamp. Most obviously this is TCP sockets, but
    the tracer and the pcap writer devices also benefit from having
    timestamps. There are a few ways this could be implemented:
      1. using a static Cell, global for the entire smoltcp crate;
      2. using a static method on Device;
      3. using an instance method on Device;
      4. passing the current timestamp into *Interface::poll.
    
    The first two options are undesirable because they create a notion
    of global clock, and interfere e.g. with mocking.
    The third option is undesirable because not all devices are
    inherently tied to a particular clock, e.g. a loopback device isn't.
    
    Therefore, the timestamp is injected into both sockets and devices
    through the *Interface::poll method.
    whitequark committed Jul 23, 2017
    Copy the full SHA
    3a656c1 View commit details
  3. Copy the full SHA
    97499ac View commit details
Loading