sixlowpan: (GSoC26) Add pluggable mesh-under forwarding strategy framework

Refactors the mesh-under forwarding path in SixLowPanNetDevice into a pluggable strategy framework. Pure refactor — behavior is identical to current master when no strategy is selected. The framework is the foundation for follow-up work that will add an RFC 6206 Trickle-based suppression strategy and adaptive forwarding jitter.

Changes

  • New abstract SixLowPanMeshUnderRouting (ns3::Object). Owns the per-originator duplicate cache previously held by SixLowPanNetDevice::m_seenPkts. Defines IsDuplicate, RecordPacket, virtual OnDuplicateReceived, and pure-virtual OnPacketForward / AssignStreams.
  • New SixLowPanSimpleFlooding default strategy. Reproduces the historical unconditional-rebroadcast behavior with the same Uniform[0, 10ms] jitter. Auto-created by the device on first mesh-under packet if no strategy is set, so existing user code is unaffected.
  • SixLowPanNetDevice::ReceiveFromDevice now delegates the forwarding decision to the strategy via a ForwardCallback (defined in the base class). Header parsing, hop-count handling, and final-destination checks remain in the device.
  • New sixlowpan-mesh-under unit test suite covering cache FIFO eviction, per-originator partitioning, default-strategy forward dispatch, and jitter range.

Backward compatibility

Default behavior is preserved when no strategy is explicitly configured. The existing UseMeshUnder, MeshUnderRadius, MeshCacheLength, and MeshUnderJitter attributes continue to work. RFC 4944 wire format (MESH + BC0 headers) is unchanged.

Tests

All 9 sixlowpan-* test suites pass (sixlowpan-mesh-under plus the existing fragmentation, hc1, iphc, iphc-stateful, and four nd-* suites).

GSoC 2026

First in a series of merge requests for the 6LoWPAN Mesh-Under Forwarding Enhancements project (mentors: Tommaso Pecorella, Adnan Rashid). The architectural choice to move the duplicate cache into the base class before coding. A SixLowPanHelper::SetMeshUnderRouting(...) factory will arrive with the next merge request alongside the first non-default strategy that motivates it.

AI Disclosure

Claude Code (Opus 4.7) assisted with the implementation.

Edited by Usham Roy

Merge request reports

Loading