tunslip6
========
tunslip6 can be used in host side to create a tun device that
is connected to a unix socket that qemu is providing. This
way it is possible to pass packets between host and target
system via slip protocol.
You need to connect tunslip6 to the second qemu serial line
through a UNIX socket (qemu option -serial unix:/tmp/slip-socket).
1) Start socat
$ socat PTY,link=/tmp/slip.dev UNIX-LISTEN:/tmp/slip.sock
2) Start qemu, use the listener demo app. Note that you need to
set CONFIG_NETWORKING_UART=y in your configuration.
You might need to set the platform and ARCH like this if simple_uart
driver is not found in your default platform.
$ make PLATFORM_CONFIG=basic_cortex_m3 ARCH=arm \
QEMU_EXTRA_FLAGS="-serial none -serial unix:/tmp/slip.sock" qemu
3) Start tunslip6
$ sudo ./tunslip6 -s `readlink /tmp/slip.dev` 2001:db8::1/64
4) Send data to listener
$ nc -u -6 2001:db8::2 4242 <<EOF
foobar
EOF
tunslip
=======
tunslip if for IPv4 networks and it can be used in host side
to create a tun device that is connected to a unix socket that
qemu is providing. This way it is possible to pass packets
between host and target system via slip protocol.
You need to connect tunslip to the second qemu serial line
through a UNIX socket (qemu option -serial unix:/tmp/slip-socket).
1) Start socat
$ socat PTY,link=/tmp/slip.dev UNIX-LISTEN:/tmp/slip.sock
2) Start qemu, use the listener demo app. Note that you need to
set CONFIG_NETWORKING_UART=y in your configuration.
You might need to set the platform and ARCH like this if simple_uart
driver is not found in your default platform.
$ make PLATFORM_CONFIG=basic_cortex_m3 ARCH=arm \
QEMU_EXTRA_FLAGS="-serial none -serial unix:/tmp/slip.sock" qemu
3) Start tunslip
$ sudo ./tunslip -s `readlink /tmp/slip.dev` 192.0.2.1 255.255.255.0
4) Send data to listener
$ nc -u 192.0.2.2 4242 <<EOF
foobar
EOF
echo-client
===========
echo-client is a tool that is run in Linux host side and
which sends pre-defined UDP data packets to echo-server
application that is running in qemu side. This client
process verifies that it is able to receive data correctly
from the echo-server and thus verify that the upper layer
networking components in Zephyr IP stack work properly.
You needs to setup the slip connection (see the steps 1 to 3)
in tunslip6 section of this document.
Example:
$ ./echo-client 2001:db8::2
In order to send multicast IPv6 packets, one needs to
give the network interface as a parameter.
$ ./echo-client -i tun0 ff84::2