Commit Graph

188 Commits

Author SHA1 Message Date
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
whitequark a3c997f007 Also parse Ethernet addresses separated by dashes (-).
This is handy because we print them separated by dashes.
2017-01-26 17:28:07 +00:00
TÖRÖK Attila 4d8b4c09e9 examples/server: fix outdated/misleading variable name. 2017-01-26 16:59:12 +00:00
whitequark 22e5462936 Add Internet and Ethernet address parsing (from strings). 2017-01-25 19:41:02 +00:00
whitequark 87cfcf0b91 README: clarify status of 802.3 support. 2017-01-25 12:29:52 +00:00
whitequark 1bf16b1f52 Bump version. 2017-01-25 06:55:53 +00:00
whitequark 9b8671ce15 Fix the TCP FIN emission with queued data rolling over TX buffer. 2017-01-25 06:20:57 +00:00
whitequark 9fbb5cfff1 Fix the TCP ACK handling in FIN-WAIT-1 state with queued data. 2017-01-25 06:01:58 +00:00
whitequark 68064c3725 Refactor the TCP ACK handling in ESTABLISHED/CLOSE-WAIT states. 2017-01-25 05:50:14 +00:00
whitequark 8b292c6dd8 Don't switch TCP state from FIN-WAIT-1 to FIN-WAIT-2 with queued data. 2017-01-25 05:36:42 +00:00
whitequark bef01740a7 If a TCP FIN|ACK also ACKs our FIN, transition to TIME-WAIT. 2017-01-25 03:58:03 +00:00
whitequark f6d542b739 Actually close TCP sockets with 0 references during pruning. 2017-01-25 02:45:17 +00:00
whitequark 5cb4e6f760 Trace pruning of sockets from a set. 2017-01-25 02:23:10 +00:00
whitequark 497aa5919a Correctly treat TCP ACKs that acknowledge both data and a FIN. 2017-01-23 22:17:04 +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 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