1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests/gnrc_ipv6_ext
2016-10-12 14:32:25 +02:00
..
tests tests: rework IPv6 extension header tests for changes 2016-04-22 10:11:45 +02:00
main.c tests: rework IPv6 extension header tests for changes 2016-04-22 10:11:45 +02:00
Makefile boards/nucleo-f030: initial support 2016-10-12 14:32:25 +02:00
README.md tests: add a test application for gnrc_ipv6_ext 2016-03-24 18:20:28 +09:00

gnrc_ipv6_ext test

This test sends a packet to itself with extension headers. This is based on gnrc_networking example.

Enable debug output of gnrc_ipv6.c before run. When the test is run, it should show the following debug output:

ipv6: Received (src = fd01::1, dst = fd01::2, next header = 0, length = 40)
ipv6: forward nh = 0 to other threads
ipv6: unable to forward packet as no one is interested in it
ipv6: handle extension header (nh = 0)
ipv6: forward nh = 43 to other threads
ipv6: unable to forward packet as no one is interested in it
ipv6: handle extension header (nh = 43)
ipv6: waiting for incoming message.
ipv6: GNRC_NETAPI_MSG_TYPE_RCV received
ipv6: Received (src = fd01::1, dst = fd01::3, next header = 0, length = 40)
ipv6: forward nh = 0 to other threads
ipv6: unable to forward packet as no one is interested in it
ipv6: handle extension header (nh = 0)
ipv6: forward nh = 43 to other threads
ipv6: unable to forward packet as no one is interested in it
ipv6: handle extension header (nh = 43)
ipv6: waiting for incoming message.
ipv6: GNRC_NETAPI_MSG_TYPE_RCV received
ipv6: Received (src = fd01::1, dst = fd01::2, next header = 0, length = 40)
ipv6: forward nh = 0 to other threads
ipv6: unable to forward packet as no one is interested in it
ipv6: handle extension header (nh = 0)
ipv6: forward nh = 43 to other threads
ipv6: unable to forward packet as no one is interested in it
ipv6: handle extension header (nh = 43)
ipv6: forward nh = 17 to other threads
ipv6: Send receive command for 0x1060b8 to 5
ipv6: waiting for incoming message.
pkt->users: 0

It configures the network interface with addresses fd01::02 and fd01::03. Then it sends a packet to fd01::02 with a routing extension header containing addresses fd01::03 and fd01::02. So the packet should be forwarded from fd01::02 to fd01::03, then to fd01::02 again.

The packet has a Hop-by-Hop extension header that should be ignored.

The test also asserts that the packet is released.