Commit Graph

1011 Commits

Author SHA1 Message Date
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 92fde3d18b Don't send TCP FIN flag yet if next segment will also have data. 2017-01-23 12:07:07 +00:00
whitequark 507af2b0c3 Reset the TCP retransmit timer on valid ACK if transmit half is open. 2017-01-23 11:34:36 +00:00
whitequark 62f094d276 Fix build with no alloc or collections. 2017-01-22 20:29:45 +00:00
whitequark 20e7ba7cf3 Test various combinations of features. 2017-01-22 20:11:36 +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 15a344f1d3 Don't respond with RST to ACKs in TCP LISTEN state.
These packets may have been destined for a different socket.
2017-01-17 04:43:51 +00:00
whitequark 591993014e Reject, not accept, TCP RST packets in LISTEN state.
These packets may have been destined for a different socket.
2017-01-17 04:33:37 +00:00
whitequark ac38ddd936 Add reference counting to SocketSet. 2017-01-17 02:47:14 +00:00
whitequark 74d1eb86b6 Add TcpSocket::abort(). 2017-01-17 01:24:51 +00:00
whitequark a75f7d4bf0 Reject all TCP packets in the CLOSED state. 2017-01-17 00:24:47 +00:00
whitequark 4da2598ea7 Properly document TCP state machine query methods. 2017-01-17 00:21:07 +00:00
whitequark f126eab193 Distinguish sockets by debug identifiers (socket set indexes). 2017-01-16 23:35:21 +00:00
whitequark 40716a348d Do not send RST in response to invalid SEQ or ACK. 2017-01-16 16:58:45 +00:00
whitequark bd01cdef78 Always display meaningful endpoint in trace messages. 2017-01-16 16:34:24 +00:00
Taylor Cramer c489c6b16f Fix mislabeled features in README.md 2017-01-16 11:36:37 +00:00
whitequark 51d8afe579 Fix inverted meaning of TcpSocketBuffer::empty(). 2017-01-15 11:00:04 +00:00
whitequark c0697cf37d Add lots of sanity checking to TCP test helpers. 2017-01-14 12:56:58 +00:00
whitequark a864157feb Do not try to retransmit SYN as if it was in data stream. 2017-01-14 12:18:00 +00:00
whitequark 62883a6e0b Don't display IP packet error twice when pretty-printing. 2017-01-14 12:09:30 +00:00
whitequark 578d7bce5f Calculate IP payload length from the total length field.
Before this commit, IP payload length was calculated by subtracting
the IP header length from the total underlying buffer length, which
fails if the underlying buffer has padding, e.g. like Ethernet
does.
2017-01-14 11:07:06 +00:00
whitequark 9b24627d69 Pretty-print TCP and UDP representations, and verify checksums. 2017-01-14 10:08:08 +00:00
whitequark 8b04d8bebe Try to get TCP state query methods into a saner state. 2017-01-14 09:13:25 +00:00
whitequark f7bc7fe364 Do not use UTF-8 in net_trace!().
This may interact badly with other tooling.
2017-01-14 07:10:20 +00:00
whitequark dc8809288f Fix a bug that caused .send();.close(); to result in a lost FIN. 2017-01-14 06:59:58 +00:00
whitequark cca835a45a Update TcpSocket::{can,may}_{send,recv} APIs. 2017-01-14 06:59:58 +00:00
whitequark 9fb6d6f4b2 impl Debug for SocketSet. 2017-01-12 05:42:54 +00:00
whitequark 4b92c25fa3 Rework the user-facing error handling in UDP sockets. 2017-01-12 04:18:18 +00:00
whitequark 6ccc48d647 Allow copying socket set handles.
Trying to keep them unique was kind of a losing battle anyway.
2017-01-12 04:10:24 +00:00
whitequark 7f095f6429 Return the amount of bytes sent from UdpSocket::send_slice. 2017-01-11 06:39:27 +00:00
whitequark f01ce30466 Add functions to check if the UDP socket buffers are empty or not. 2017-01-11 06:34:12 +00:00
whitequark 3b18727032 Swap the data and endpoint in UdpSocket methods.
This is to match libstd.
2017-01-11 06:23:17 +00:00
whitequark 362c954624 Make interfaces not own the sockets. 2017-01-11 05:25:54 +00:00
whitequark 83b70b12af Make binding the UDP socket an explicit operation. 2017-01-11 04:44:42 +00:00
whitequark 234e5ef29e Implement socket sets. 2017-01-11 04:05:41 +00:00
whitequark 83bb8c6ae8 Update docs. 2017-01-10 12:29:24 +00:00
whitequark 37afb84d74 Add the use_collections feature. 2017-01-10 12:09:26 +00:00
whitequark 1ea9a5125b Use ManagedSlice in SliceArpCache. 2017-01-10 11:57:14 +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 08ac98e4bc Reorder type parameters of Interface. 2017-01-01 08:18:25 +00:00
whitequark 716a1cf7fe Fix silliness in docs. 2017-01-01 08:15:38 +00:00
whitequark c29d3c2804 Allow Managed to accept a Box<[T]>. 2016-12-31 18:12:45 +00:00
whitequark cd23653f12 Don't pull in std through the log crate. 2016-12-31 13:50:20 +00:00
whitequark bf3b62bb25 Examples for the phy layer! 2016-12-31 12:28:59 +00:00
whitequark 5bee008464 Examples for the wire layer! 2016-12-31 11:44:51 +00:00
whitequark 345670f618 Documentation! 2016-12-31 10:26:59 +00:00
whitequark 27ccfc1bb0 Implement TCP retransmission. 2016-12-31 08:35:46 +00:00
whitequark 818e98f47a TCP: retransmit ACK when receiving duplicate SEQ. 2016-12-31 01:33:46 +00:00