Expand description
ipv6_lowpan_test.rs
: 6LoWPAN Fragmentation Test Suite
This implements a simple testing framework for 6LoWPAN fragmentation and
compression. Two Imix boards run this code, one for receiving and one for
transmitting. The transmitting board must call the start
function in
the main.rs
file. The transmitting Imix then sends a variety of packets
to the receiving Imix, relying on the 6LoWPAN fragmentation and reassembly
layer. Note that this layer also performs 6LoWPAN compression (invisible
to the upper layers), so this test suite is also dependent on the
correctness of the compression/decompression implementation; for this
reason, tests solely for compression/decompression have been left in a
different file.
This test suite will print out whether a receive packet is different than the expected packet. For this test to work correctly, and for both sides to remain in sync, they must both be started at the same time. Any dropped frames will prevent the test from completing successfully.
To use this test, the initialize_all
is called on both boards; and start()
is called on the transmitting board. Simply call these
functions in boards/imix/src/main.rs
as follows:
let lowpan_frag_test = test::ipv6_lowpan_test::initialize_all(
mux_mac,
mux_alarm,
);
lowpan_frag_test.start(); // If flashing the transmitting Imix
Structs§
Enums§
Constants§
- DEFAULT_
CTX_ 🔒PREFIX_ LEN - DST_
ADDR - DST_
MAC_ ADDR - IP6_
HDR_ SIZE - MLP
- PAYLOAD_
LEN - SRC_
ADDR - SRC_
MAC_ ADDR - TEST_
DELAY_ MS - TEST_
LOOP - UDP_
HDR_ SIZE