Commit Graph

203 Commits

Author SHA1 Message Date
whitequark 4c3f454902 Add support for TCP option parsing and emission. 2017-01-27 00:33:30 +00:00
whitequark ca1146995f Remove TcpControl::len(). 2017-01-26 21:20:48 +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 716a1cf7fe Fix silliness in docs. 2017-01-01 08:15:38 +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 818e98f47a TCP: retransmit ACK when receiving duplicate SEQ. 2016-12-31 01:33:46 +00:00
whitequark be68066152 #[inline(always)] → #[inline] 2016-12-30 16:55:31 +00:00
whitequark 287affb447 Implement the TCP TIME-WAIT state. 2016-12-28 05:33:12 +00:00
whitequark 94963faf12 Implement the TCP CLOSING state. 2016-12-28 04:56:49 +00:00
whitequark 151b3ba07b Get rid of the #![feature(associated_consts)]. 2016-12-28 00:12:15 +00:00
whitequark 71268ace88 Get rid of the #![feature(const_fn)]. 2016-12-28 00:08:51 +00:00
whitequark e043e7c496 Get rid of the #![feature(step_by)]. 2016-12-28 00:08:51 +00:00
whitequark e6357ee79c Correctly propagate carries in the IP checksum. 2016-12-27 18:43:49 +00:00
whitequark 6b592742fd Use the correct wrapping operations on TCP sequence numbers. 2016-12-27 18:34:13 +00:00
whitequark ea78053dc1 Factor out IpRepr into the wire module. 2016-12-26 11:20:20 +00:00
whitequark 0ae27678a0 Implement TCP data reception. 2016-12-25 11:09:50 +00:00
whitequark fa1a51b90a Add tests for TCP state machine. 2016-12-24 23:06:42 +00:00
whitequark 6d8d3cb29d Use correct sequence numbers in TCP RST packets. 2016-12-23 07:34:10 +00:00
whitequark 3bd715e1bc Use signed integers to represent TCP sequence numbers. 2016-12-23 07:34:07 +00:00
whitequark bddb5f9127 Implement TCP server sockets. 2016-12-20 19:51:52 +00:00
whitequark 5a64a87dbe Reply with ICMP dest. unreachable or TCP RST from unused ports. 2016-12-20 19:18:35 +00:00
whitequark 0d9a8a417d Add some sanity into enumeration names (avoid "*Type"). 2016-12-20 13:54:11 +00:00
whitequark c562ea784d Fix TcpRepr field visibility. 2016-12-20 13:44:41 +00:00
whitequark 3d5f47b89f Implement TCP representation printing. 2016-12-20 13:16:29 +00:00
whitequark 513923725e Implement TCP representation parsing and emission. 2016-12-20 12:52:33 +00:00
whitequark 31040bf0fc In Repr::emit, do not assume that the packet is pre-zeroed. 2016-12-20 09:41:08 +00:00
whitequark 6d2c11fb61 Fix IP checksum calculation for odd-length packets. 2016-12-20 00:17:29 +00:00
whitequark f86fac2223 Sort out buffer lengths. 2016-12-19 23:50:04 +00:00
whitequark 9c922d0306 Implement TCP packet support. 2016-12-18 21:42:44 +00:00
whitequark 31e44445f5 Working UDP loopback. 2016-12-17 05:12:45 +00:00
whitequark d1d910b46d Significantly simplify buffering. 2016-12-15 17:27:17 +00:00
whitequark fb172ed1ed Implement UDP sockets. 2016-12-14 17:39:44 +00:00
whitequark 2b01a3dace Implement UDP representation parsing and emission. 2016-12-14 02:11:50 +00:00
whitequark 5a721a7b11 Implement UDP packet support. 2016-12-14 00:11:45 +00:00
whitequark 57e544cc8c Return interior pointers more uniformly. 2016-12-13 22:37:05 +00:00
whitequark 53309f8271 Simplify checksum computation. 2016-12-13 17:31:08 +00:00
whitequark 1c616218a1 Respond with ICMP echo request data in echo reply. 2016-12-13 17:02:50 +00:00
whitequark d587981ef5 Implement ICMPv4 echo replies. 2016-12-12 23:22:59 +00:00
whitequark 2482117682 Implement ICMPv4 echo request/reply representation parsing and emission. 2016-12-12 22:38:13 +00:00
whitequark 9fa0bffb7a Implement ICMPv4 echo request/reply packet support. 2016-12-12 22:11:59 +00:00
whitequark c5bdf30458 Implement IPv4 representation parsing and emission. 2016-12-12 20:09:37 +00:00
whitequark 921ca353b4 Implement IPv4 packet support. 2016-12-12 17:26:06 +00:00
whitequark 7f1b88ef45 Implement ARP snooping. 2016-12-12 12:30:35 +00:00
whitequark 4421b2fe27 Implement ARP replies. 2016-12-12 07:19:53 +00:00
whitequark d862512582 Implement an ARP LRU cache. 2016-12-12 02:39:46 +00:00
whitequark 2e80d69384 Naming consistency. 2016-12-11 00:50:34 +00:00
whitequark 2a438b6e8d Factor out pretty-printing of packets. 2016-12-11 00:48:44 +00:00
whitequark 77225b77a9 Fix tests. 2016-12-11 00:30:40 +00:00
whitequark b1149e746c Implement raw socket interface and tcpdump. 2016-12-10 16:58:30 +00:00
whitequark 32ff49a795 Move protocol-related data structures to smoltcp::wire. 2016-12-10 13:13:13 +00:00