Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: smoltcp-rs/smoltcp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3fff475c8faa
Choose a base ref
...
head repository: smoltcp-rs/smoltcp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 962180b71c92
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Sep 1, 2017

  1. Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    6ebcddd View commit details

Commits on Sep 3, 2017

  1. Copy the full SHA
    962180b View commit details
Showing with 22 additions and 14 deletions.
  1. +19 −12 README.md
  2. +3 −0 src/iface/ethernet.rs
  3. +0 −2 src/wire/ipv4.rs
31 changes: 19 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -31,39 +31,46 @@ The only supported medium is Ethernet.

The only supported internetworking protocol is IPv4.

* IPv4 header checksum is supported.
* IPv4 header checksum is generated and validated.
* IPv4 time-to-live value is fixed at 64.
* IPv4 fragmentation is **not** supported.
* IPv4 options are **not** supported.
* IPv4 options are **not** supported and are silently ignored.
* IPv4 routes or default gateways are **not** supported.
* ICMPv4 header checksum is supported.
* ICMPv4 echo requests and replies are supported.
* ICMPv4 destination unreachable message is supported.
* ICMPv4 parameter problem message is **not** supported.
* ICMPv4 protocol unreachable messages are **not** passed to higher layers when received.
* ICMPv4 time exceeded messages are **not** supported.
* ICMPv4 parameter problem messages are **not** supported.

### UDP layer

The UDP protocol is supported over IPv4.

* UDP header checksum is supported.
* UDP sockets are supported.
* UDP header checksum is always generated and validated.
* In response to a packet arriving at a port without a listening socket,
an ICMP destination unreachable message is generated.

### TCP layer

The TCP protocol is supported over IPv4. Server and client sockets are supported.

* TCP header checksum is supported.
* TCP header checksum is generated and validated.
* Maximum segment size is negotiated.
* Multiple packets will be transmitted without waiting for an acknowledgement.
* Lost packets will be retransmitted with exponential backoff, starting at
a fixed delay of 100 ms.
* After arriving at the TIME-WAIT state, sockets will close after a fixed delay of 10 s.
* TCP urgent pointer is **not** supported; any urgent octets will be received alongside
data octets.
* Reassembly of out-of-order segments is **not** supported.
* The status of TCP options or extensions is:
* Maximum segment size option is supported.
* Window scaling is **not** supported, and the maximum buffer size is 65536.
* Timestamping is **not** supported.
* Fast open is **not** supported when smoltcp initiates connection.
* Silly window syndrome avoidance is **not** supported for either transmission or reception.
* Congestion control is **not** implemented.
* Delayed acknowledgements are **not** implemented.
* Nagle's algorithm is **not** implemented.
* Window scaling is **not** supported, and the maximum buffer size is 65536.
* Timestamping (used in round-trip time measurement and protection against wrapped sequences)
is **not** supported.
* Fast open is **not** supported when smoltcp initiates connection.
* Keepalive is **not** supported.

## Installation
3 changes: 3 additions & 0 deletions src/iface/ethernet.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Heads up! Before working on this file you should read the parts
// of RFC 1122 that discuss Ethernet, ARP and IP.

use managed::{Managed, ManagedSlice};

use {Error, Result};
2 changes: 0 additions & 2 deletions src/wire/ipv4.rs
Original file line number Diff line number Diff line change
@@ -403,8 +403,6 @@ impl Repr {
if packet.version() != 4 { return Err(Error::Malformed) }
// Valid checksum is expected.
if !packet.verify_checksum() { return Err(Error::Checksum) }
// We do not support any IP options.
if packet.header_len() > 20 { return Err(Error::Unrecognized) }
// We do not support fragmentation.
if packet.more_frags() || packet.frag_offset() != 0 { return Err(Error::Fragmented) }
// Total length may not be less than header length.