feat: repeater VLAN-style region tagging for untagged flood packets

Repeaters with a home region configured now automatically tag untagged
flood packets (ROUTE_TYPE_FLOOD) with the home region's transport code,
converting them to ROUTE_TYPE_TRANSPORT_FLOOD. Also adds TRANSPORT_CODE_ALL
(0xFFFF) as a reserved code that bypasses region filtering, allowing
mesh-wide flooding when explicitly requested.
This commit is contained in:
Dale Ruane 2026-03-17 15:59:52 +00:00
parent a22c4b6270
commit 85a3b1d6db
2 changed files with 36 additions and 4 deletions

View file

@ -16,6 +16,8 @@ namespace mesh {
#define ROUTE_TYPE_DIRECT 0x02 // direct route, 'path' is supplied
#define ROUTE_TYPE_TRANSPORT_DIRECT 0x03 // direct route + transport codes
#define TRANSPORT_CODE_ALL 0xFFFF // special transport code: forward to all regions
#define PAYLOAD_TYPE_REQ 0x00 // request (prefixed with dest/src hashes, MAC) (enc data: timestamp, blob)
#define PAYLOAD_TYPE_RESPONSE 0x01 // response to REQ or ANON_REQ (prefixed with dest/src hashes, MAC) (enc data: timestamp, blob)
#define PAYLOAD_TYPE_TXT_MSG 0x02 // a plain text message (prefixed with dest/src hashes, MAC) (enc data: timestamp, text)