[riot-notifications] [RIOT-OS/RIOT] sliptty: introduce a new SLIP to TUN tool (#10477)

Martine Lenders notifications at github.com
Tue Apr 2 15:17:13 CEST 2019


> Code-wise it should be able to. I don't have the ability to test at the moment...

@gebart I compiled `examples/gnrc_border_router` with [this patch](https://gist.github.com/miri64/1d595b5c3ccee1904a0f20bc67a369e1) and started `dist/tools/sliptty/sliptty` (after compiling it) with the according port `/dev/ttyUSB1` in my case. The then initialized TUN interface I configured as follows (taken from `dist/tools/sliptty/start_network`):

```sh
sudo ip link set up dev sl0
sudo ip address add fe80::1/64 dev sl0
sudo ip neigh add fe80::2 dev sl0
```

I then tried to ping the node which worked:

```
ping6 -c 3 fe80::2%sl0
PING fe80::2%sl0(fe80::2) 56 data bytes
64 bytes from fe80::2: icmp_seq=1 ttl=64 time=93.5 ms
64 bytes from fe80::2: icmp_seq=2 ttl=64 time=93.5 ms
64 bytes from fe80::2: icmp_seq=3 ttl=64 time=93.5 ms

--- fe80::2%sl0 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 93.536/93.538/93.541/0.249 ms
```

I then terminated `slipdev` and used `xxd` to inject empty SLIP frames and too short IPv6 packets:

```sh
echo "c0c0" | xxd -r -p > /dev/ttyUSB0
echo "c060c0" | xxd -r -p > /dev/ttyUSB0
echo "c06000c0" | xxd -r -p > /dev/ttyUSB0
```

I see nothing wrong with the output:

```
2019-04-02 15:14:01,700 - INFO # gnrc_netif: GNRC_NETDEV_MSG_TYPE_EVENT received
2019-04-02 15:14:01,703 - INFO # gnrc_netif: event triggered -> 2
2019-04-02 15:14:01,707 - INFO # gnrc_netif: waiting for incoming messages
2019-04-02 15:14:01,712 - INFO # gnrc_netif: GNRC_NETDEV_MSG_TYPE_EVENT received
2019-04-02 15:14:01,714 - INFO # gnrc_netif: event triggered -> 2
2019-04-02 15:14:01,718 - INFO # gnrc_netif: waiting for incoming messages
[…]
2019-04-02 15:15:15,942 - INFO # gnrc_netif: GNRC_NETDEV_MSG_TYPE_EVENT received
2019-04-02 15:15:15,945 - INFO # gnrc_netif: event triggered -> 2
2019-04-02 15:15:15,948 - INFO # gnrc_netif: waiting for incoming messages
2019-04-02 15:15:15,953 - INFO # gnrc_netif: GNRC_NETDEV_MSG_TYPE_EVENT received
2019-04-02 15:15:15,956 - INFO # gnrc_netif: event triggered -> 2
2019-04-02 15:15:15,959 - INFO # gnrc_netif: waiting for incoming messages
[…]
2019-04-02 15:15:53,590 - INFO # gnrc_netif: GNRC_NETDEV_MSG_TYPE_EVENT received
2019-04-02 15:15:53,593 - INFO # gnrc_netif: event triggered -> 2
2019-04-02 15:15:53,597 - INFO # gnrc_netif: waiting for incoming messages
2019-04-02 15:15:53,601 - INFO # gnrc_netif: GNRC_NETDEV_MSG_TYPE_EVENT received
2019-04-02 15:15:53,604 - INFO # gnrc_netif: event triggered -> 2
2019-04-02 15:15:53,608 - INFO # gnrc_netif: waiting for incoming messages
2019-04-02 15:15:53,612 - INFO # ipv6: GNRC_NETAPI_MSG_TYPE_RCV received
2019-04-02 15:15:53,616 - INFO # ipv6: error marking IPv6 header, dropping packet
2019-04-02 15:15:53,619 - INFO # ipv6: waiting for incoming message.
```

So in conclusion: The RIOT side is able to handle empty SLIP frames ;-)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/10477#issuecomment-478990903
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190402/8b51bc74/attachment.html>


More information about the notifications mailing list