Commit Graph

11 Commits (88256dbdcfc3b284f5533e5aa2969bf5061db22a)

Author SHA1 Message Date
Dario Nieuwenhuis 88256dbdcf Update to Rust 2018. Fixes #271 2020-12-27 17:54:56 +01:00
YOUNGSUK KIM f6a55fa3c7 replace deprecated item 'mem::uninitialized'
This commit replaces the use of deprecated item 'mem::uninitialized'
with 'mem::MaybeUninit'.

Thank you for reviewing :)
2020-06-22 14:46:56 +00:00
ficapy d01e23e396 Support different types of ioctl request argument 2019-12-15 06:25:43 +00:00
Luka Atanasovski 04c9518dd2 Implement raw sockets via BPF on macOS. 2018-12-28 11:46:43 +00:00
Dan Robertson 1f9e14de71 Update iface and phy_wait to use new time types
Update the EthernetInterface poll functions to use Instant and Duration
instead of a simple u64 value.

Closes: #141
Approved by: whitequark
2018-02-16 10:44:02 +08:00
寧靜 1e5acf0799 Gate Linux-specific platform dependencies behind a #[cfg]. 2018-01-27 12:38:47 +00:00
whitequark dd0f4b706a Enforce some lints. 2017-09-25 00:46:53 +00:00
whitequark 0a8a962e94 Reorganize features using namespaces, to match module hierarchy.
I'm about to add a whole lot more features, and it's going to get
quite confusing otherwise.
2017-09-24 23:51:19 +00:00
whitequark 996389d653 Compute soft deadline in poll() and use nonblocking sockets.
Before this commit, anything that touched RawSocket or TapInterface
worked partly by accident and partly because of a horrible crutch
that resulted in massive latencies as well as inevitable packet loss
every time an ARP request had to be issued. Also, there was no way
to use poll() other than by continuously calling it in a busy loop.

After this commit, poll() indicates when the earliest timer expires,
and so the caller can sleep until that moment (or until packets
arrive).

Note that there is a subtle problem remaining: every time poll()
is called, every socket with a pending outbound packet whose
IP address doesn't correspond to a MAC address will send a new
ARP request, resulting in potentially a whole lot of such requests.
ARP rate limiting is a separate topic though.
2017-08-29 19:47:11 +00:00
Egor Karavaev 59fc0c0358 Factor out the "raw_socket" and "tap_interface" features
This makes it possible to build smoltcp with the "std" feature on platforms
without libc, such as redox.
2017-06-15 10:12:11 +00:00
whitequark e7d6237279 Implement TAP interface support. 2016-12-11 00:30:40 +00:00