whitequark
fb11c4a84d
Convert the stress.rs example into a simple benchmark.
...
There are no more bugs exposed by stress.rs as far as I can tell,
so let's make it do something more useful.
2017-12-22 20:59:30 +00:00
whitequark
ee6c1f34b3
Build release testsuite binaries with complete debug information.
2017-12-22 19:38:17 +00:00
whitequark
f1a7fbe973
Split `poll_at`/`poll_delay` out of `poll`.
...
The previous model was flawed. Consider the following case:
* The main loop looks as follows (pseudocode):
loop {
let _ = (tcp:1234).read_all()
wait(iface.poll())
}
* The remote end is continuously transmitting data and at some
point fills the window of (tcp:1234), stopping the transmission
afterwards.
* The local end processes the packets and, as a part of egress
routine, emits an ACK. That also updates the window, and
the socket's poll_at() routine returns None, since there is
nothing to transmit or retransmit.
* The local end now waits indefinitely even though it can start
processing the data in the socket buffers right now.
2017-12-22 12:59:52 +00:00
whitequark
5ea177e6ab
Add a stress test.
...
Run it without the `log` feature and in release mode:
$ cargo run --release \
--no-default-features \
--features std,phy-tap_interface,socket-tcp \
--example stress tap0 \
[reader|writer]
There are currently two bugs exposed by it:
* a crash in the reader mode,
* slow-down in the writer mode.
2017-12-22 09:43:00 +00:00
whitequark
6d6635a4a9
Oops, don't make examples depend on a nonexistent feature.
...
It's a Cargo bug that this is not an error (and thus went unnoticed).
2017-12-22 09:29:56 +00:00
whitequark
8b6050f711
Clean up our feature story and more aggressively test features.
2017-12-22 08:54:58 +00:00
whitequark
df65c0e6ae
Unbreak `cargo test --no-default-features --features default`.
...
I'm not sure why is this needed, but it broke CI.
2017-12-18 15:10:50 +00:00
whitequark
8863eb8db1
Add an HTTP client example.
2017-12-18 14:53:09 +00:00
Dan Robertson
b97c592671
Add IPv6 address and cidr to wire
...
- Add the ipv6 feature
- Ensure a travis build with the ipv6 feature enabled.
- Add the necessary infrastructure to wire for ipv6 support.
- Ipv6Address
- Ipv6Cidr
- Add Ipv6 Address and Cidr parsing to parsers
- Add basic tests.
2017-11-29 12:57:22 +00:00
whitequark
eaa50d0003
Rewrite the ARP cache to allow for flood protection and expiration.
2017-11-21 10:53:55 +00:00
Dan Robertson
adb5014780
Add ICMP sockets
...
- Add support for ICMP sockets
- Add tests for ICMP sockets
- Rename proto-<type> features to socket-<type>
- Update documentation
2017-11-09 00:08:24 +00:00
whitequark
d9fa7f6bc6
Rename proto-* features back to socket-*.
...
A proto-* feature does not make sense for ICMP, where the protocol
is always enabled, but sockets, not.
2017-11-06 09:51:03 +00:00
whitequark
a9a00baa49
Rename Cargo features: socket-* → proto-*.
2017-10-25 00:20:40 +00:00
whitequark
4826d37c45
Allow disabling any of: raw, TCP or UDP sockets.
2017-09-25 00:20:22 +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
73462b9503
Bump version.
2017-09-22 20:01:44 +00:00
whitequark
94e3109ab0
Update features to reflect merge of alloc and collections crates.
2017-09-22 19:54:47 +00:00
whitequark
75ddbe9776
Add a bare-metal usage example.
2017-07-14 03:18:11 +00:00
Egor Karavaev
8d7fa94a6d
Add the `ping` example.
2017-06-21 03:51:02 +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
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
ad91787c47
Bump version.
2017-03-05 06:16:18 +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
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
c0074eda11
Add the log crate to dev-dependencies.
2017-01-31 11:32:53 +00:00
whitequark
1bf16b1f52
Bump version.
2017-01-25 06:55:53 +00:00
whitequark
368b954a3c
Bump to 0.2.0.
2017-01-23 17:28:17 +00:00
whitequark
9a911ab0e8
Update dev-dependencies.
2017-01-23 17:27:53 +00:00
whitequark
34d32f67a2
Gate the really verbose log messages behind a feature.
...
Otherwise, trying to use the socket buffers instead of BufReader/
BufWriter is doomed to overwhelm the application logic.
2017-01-19 12:23:32 +00:00
whitequark
234e5ef29e
Implement socket sets.
2017-01-11 04:05:41 +00:00
whitequark
37afb84d74
Add the use_collections feature.
2017-01-10 12:09:26 +00:00
whitequark
0e006383f2
Use Managed/ManagedSlice for EthernetInterface.
2017-01-10 11:37:12 +00:00
whitequark
67430aa589
Use the managed crate.
2017-01-10 11:04:00 +00:00
whitequark
cd23653f12
Don't pull in std through the log crate.
2016-12-31 13:50:20 +00:00
whitequark
e1e0c2e838
Impement fault injection.
2016-12-31 01:05:29 +00:00
whitequark
f233d713e8
byteorder: 0.5 → 1.0
2016-12-30 22:28:11 +00:00
whitequark
2404647163
Update Cargo metadata.
2016-12-28 00:21:01 +00:00
whitequark
151b3ba07b
Get rid of the #![feature(associated_consts)].
2016-12-28 00:12:15 +00:00
whitequark
bba505bc90
Add a use_alloc feature.
2016-12-27 23:49:37 +00:00
whitequark
de24d635fa
Rename features: std→use_std, logging→use_log.
2016-12-27 23:45:24 +00:00
whitequark
3c05139204
Add logging capability.
2016-12-23 07:59:38 +00:00
whitequark
666b615171
Fix a Cargo warning.
2016-12-17 06:39:18 +00:00
whitequark
a1401b2861
I was going to license this under 0-clause BSD.
2016-12-17 05:14:47 +00:00
whitequark
b1149e746c
Implement raw socket interface and tcpdump.
2016-12-10 16:58:30 +00:00
whitequark
c638f45373
Implement Ethernet II frame support.
2016-12-10 09:55:45 +00:00