Previously, when the creation of the TUN/TAP interface failed in one of
the `start_network.sh` scripts, the script will fail with a cryptic
error like
> dist/tools/ethos/start_network.sh: 68: [: -eq: unexpected operator
This fix ensures, that the value of this variable checked is always set
such that in the error case, `ethos`/`sliptty` won't start.
Add a specific case of EOF on stdin to avoid situations where the
message `error reading from stdio. res=0` is repeated forever if stdin
is not a terminal. When ethos is started as a background process with
stdin redirected to /dev/null, e.g. `ethos ... < /dev/null &`, then
reading stdin will always result in a 0 length read (EOF).
If stdin is a tty we close the program on EOF (CTRL+D in the terminal),
otherwise, we stop reading from stdin after EOF was reached, but
continue tunneling traffic as usual.
Significantly improves throughput and latency on FRDM-KW41Z.
Ping with a packet of size 100 yields a 30 ms roundtrip with this
patch, 177 ms without. Size 1000 ping before: 1160 ms, after: 188 ms
Add ethos support to use a tcp socket instead of a TTY.
Use 'tcp:host' as serial argument.
Port can be given in place of the baudrate argument.
Default port is 20000 which is used in on IoT-LAB.