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
5bee008464
Examples for the wire layer!
2016-12-31 11:44:51 +00:00
whitequark
be68066152
#[inline(always)] → #[inline]
2016-12-30 16:55:31 +00:00
whitequark
151b3ba07b
Get rid of the #![feature(associated_consts)].
2016-12-28 00:12:15 +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
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
f86fac2223
Sort out buffer lengths.
2016-12-19 23:50:04 +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
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
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
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