whitequark
83cf86f1d0
Unbreak parsing of ICMP unreachable messages.
...
Fixes #16 .
2017-06-21 04:08:33 +00:00
whitequark
adc51fab7f
Actually export socket::SocketSetItem publicly.
...
It was unintentionally left unnameable. Fixes #14 .
2017-06-21 03:57:13 +00:00
Egor Karavaev
8d7fa94a6d
Add the `ping` example.
2017-06-21 03:51:02 +00:00
Egor Karavaev
ca56baca65
Add `RawSocket`.
2017-06-21 03:29:31 +00:00
Egor Karavaev
e927b09ba8
`IpRepr::lower` replaces unspecified src_addr in Ipv4Repr as well.
2017-06-21 03:01:15 +00:00
Egor Karavaev
c1c4ed68c5
Factor out the `RingBuffer` container.
2017-06-21 02:50:10 +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
f29b610801
Remove accidentally committed change.
2017-05-29 17:15:35 +00:00
whitequark
53be7a7747
Add a sinkhole to the server example.
2017-05-29 16:54:51 +00:00
whitequark
5bac3e5a02
Fix no-std build.
2017-05-29 11:04:49 +00:00
whitequark
91ef5c60c3
Add packet shaping to the fault injector.
2017-05-29 10:53:30 +00:00
whitequark
73bb4b8593
Implement TCP TIME-WAIT timeouts.
2017-04-21 16:01:49 +00:00
whitequark
8087bf3755
Fix a typo in documentation.
2017-04-21 15:59:55 +00:00
whitequark
555825e49e
Clamp TCP receive window to MSS multiplied by maximum burst size.
...
This is a conservative bound; if we don't have enough buffers
to receive more than four segments, clearly we shouldn't advertise
our ability to.
It however will only work reliably with exactly one TCP connection
continuously receiving; for two, another window adjustment mechanism
will be needed for reliable reception.
2017-03-07 11:21:49 +00:00
whitequark
1d46ccf432
fn Device::mtu() -> usize → Device::limits() -> DeviceLimits
2017-03-07 11:10:26 +00:00
whitequark
6ad8872e15
Bump version.
...
Really, this should be done immediately after release and not
immediately before, like I've been doing it.
2017-03-07 10:33:28 +00:00
whitequark
c73298f01e
Improve handling of TCP ACK packets in FIN-* states.
...
Previously, sockets could get stuck in the CLOSING state, after
the sequence described in the new test_mutual_close_with_data_2.
The root cause was that some state machine transitions got
folded into ACK handling.
Now, all transitions are handled in the same match statement,
and ACK handling is broken up around it.
2017-03-07 10:17:30 +00:00
whitequark
393ebbe682
Don't put non-unicast (IP or Ethernet) addresses into ARP cache.
...
Thanks @little-dude for pointing this out--it's probably a DoS bug.
2017-03-07 06:32:18 +00:00
whitequark
b305797cb4
Trace eviction and fill in SliceArpCache.
2017-03-07 06:25:47 +00:00
Corentin Henry
0f2b05ede7
arp: increment lru when inserting a new entry
2017-03-07 06:04:40 +00:00
Corentin Henry
40d3a3ada8
arp: use valid unicast ip addresses for tests
2017-03-07 05:20:28 +00:00
whitequark
06a019becf
Update README to mention lack of multicast support.
2017-03-06 04:01:06 +00:00
whitequark
5137608aed
Follow-up to b9e79d19; always process broadcast frames.
2017-03-06 04:00:13 +00:00
whitequark
d25eebc0ef
Ignore Ethernet frames for which we aren't a destination.
2017-03-06 03:58:19 +00:00
whitequark
c9a2ac7a40
Update README.
2017-03-05 06:18:50 +00:00
whitequark
ad91787c47
Bump version.
2017-03-05 06:16:18 +00:00
whitequark
ae89abe0a4
Update README to explain how the client example works.
2017-03-05 06:15:15 +00:00
whitequark
9ce66375c4
Add the "embedded" crate category.
2017-03-05 05:49:53 +00:00
whitequark
493a319132
Remove the `use_` prefix from feature names.
...
I haven't realized that a feature `log` with an optional crate
dependency `log` activates that dependency, and added the prefix
to avoid a "clash". This is unnecessary.
2017-03-05 05:49:38 +00:00
whitequark
a070429e2c
Travis: don't build tests without the std feature.
...
Neither tests nor examples work without the library being built
with std.
2017-03-05 05:34:24 +00:00
whitequark
0836bc949a
Fix condition for acceptable RST|ACK in TCP SYN-SENT state.
2017-03-05 05:31:12 +00:00
whitequark
cc67e1f753
Don't block forever in TapInterface.
...
Ideally Devices should be non-blocking, but that would be really
annoying to implement, so for now, to get the examples working,
I'm using this hack.
2017-03-05 05:30:03 +00:00
whitequark
0d32fcee5b
Send an ARP request when the destination is not in cache.
2017-03-05 04:59:51 +00:00
whitequark
78d3d53a06
Use trait FromStr for the parsing code.
2017-03-05 04:48:13 +00:00
whitequark
f49723bbf9
Add a TCP client example.
2017-03-05 04:47:45 +00:00
whitequark
d20c98f870
Factor out common code from examples.
2017-03-05 04:19:19 +00:00
whitequark
cd894460f5
Implement the TCP SYN-SENT state.
2017-03-05 03:53:04 +00:00
whitequark
e36e05905c
Fix an incorrect tracing message.
2017-03-05 03:16:15 +00:00
whitequark
9905b3de86
Pull in macros from the log crate in tests.
2017-01-31 11:46:07 +00:00
whitequark
255d69d63b
Fix the TCP MSS calculation.
2017-01-31 11:39:33 +00:00
whitequark
c0074eda11
Add the log crate to dev-dependencies.
2017-01-31 11:32:53 +00:00
whitequark
4ef94b4e61
Travis: run tests, not just build.
2017-01-31 11:13:28 +00:00
whitequark
da4900a02b
Fix an incorrect payload length when sending TCP MSS option.
2017-01-27 03:35:22 +00:00
whitequark
be9699e814
Update TCP implementation status in README.
2017-01-27 03:09:26 +00:00
whitequark
d6b7623c37
Receive the TCP MSS option and act on it.
2017-01-27 03:06:52 +00:00
whitequark
bc1d65ea89
Send the TCP MSS option.
2017-01-27 02:56:27 +00:00
whitequark
077513fda6
Add support for TCP MSS option in TCP representation.
2017-01-27 02:56:27 +00:00
whitequark
4c3f454902
Add support for TCP option parsing and emission.
2017-01-27 00:33:30 +00:00
whitequark
4267ad2635
Fix an inaccurate comment.
2017-01-26 22:04:05 +00:00
whitequark
ca1146995f
Remove TcpControl::len().
2017-01-26 21:20:48 +00:00