Commit 2af8361
committed
feat: Add Selective Source Routing (SSR) support to c-mesh-api
Implement SSR (Selective Source Routing) integration for the Linux gateway,
enabling automatic source-routed packet transmission based on first-hop
information learned from mesh node registrations.
Key additions:
- First-Hop Table (FHT): Open-addressing hash table with linear probing,
tombstone deletion, and automatic growth. Maintains routes with
configurable validity windows and automatic expiry purging.
- SSR module: Integration layer that maintains the FHT, processes incoming
SSR registration indications from the sink, and provides route lookup
for the send path.
- DSAP extensions: New dsap_data_tx_ssr_request() function for sending
single-frame and fragmented packets with source-routing hop lists.
Refactored common TX logic into dsap_data_tx_request_internal().
- WPC integration: Automatic SSR route lookup in WPC_send_data_with_options().
Falls back to traditional routing if no SSR route is available.
SSR module initialized/deinitialized with WPC lifecycle.
- MSAP handler: New msap_ssr_registration_indication_handler() processes
incoming registration packets and updates the FHT.
- Platform integration: SSR purge called periodically from the dispatch
thread alongside reassembly garbage collection.
- Comprehensive unit tests covering FHT operations, SSR module lifecycle,
frame layout validation, and integration with WPC send path.1 parent b70b379 commit 2af8361
21 files changed
Lines changed: 3118 additions & 89 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
952 | 952 | | |
953 | 953 | | |
954 | 954 | | |
| 955 | + | |
| 956 | + | |
955 | 957 | | |
956 | 958 | | |
957 | 959 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| 116 | + | |
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
0 commit comments