Module ipv6_lowpan_test

Source
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§

LowpanTest

Enums§

DAC 🔒
SAC 🔒
TF 🔒

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

Statics§

ARRAY 🔒
DEFAULT_CTX_PREFIX 🔒
IP6_DG_OPT 🔒
RF233_BUF
RX_STATE_BUF 🔒
SUCCESS_COUNT 🔒
UDP_DGRAM 🔒

Functions§

initialize_all
ipv6_check_receive_packet 🔒
ipv6_prepare_packet 🔒

Type Aliases§

Ieee802154MacDevice 🔒
Rf233 🔒