diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index d622e0e..ed373a5 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -157,6 +157,11 @@ message AdminMessage { * TODO: REPLACE */ STATUSMESSAGE_CONFIG = 13; + + /* + * Traffic management module config + */ + TRAFFICMANAGEMENT_CONFIG = 14; } enum BackupLocation { diff --git a/meshtastic/localonly.proto b/meshtastic/localonly.proto index 6da79a3..50b74f7 100644 --- a/meshtastic/localonly.proto +++ b/meshtastic/localonly.proto @@ -136,6 +136,11 @@ message LocalModuleConfig { */ ModuleConfig.StatusMessageConfig statusmessage = 15; + /* + * The part of the config that is specific to the Traffic Management module + */ + ModuleConfig.TrafficManagementConfig traffic_management = 16; + /* * A version integer used to invalidate old save files when we make * incompatible changes This integer is set at build time and is private to diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index ac13a56..80a2b44 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -295,6 +295,58 @@ message ModuleConfig { int32 ble_threshold = 4; } + /* + * Config for the Traffic Management module + */ + message TrafficManagementConfig { + /* + * Master enable for traffic management + */ + bool enabled = 1; + + /* + * Dry-run mode: log actions but don't drop/modify packets + */ + bool dry_run = 2; + + /* + * Position deduplication settings + */ + bool position_dedup_enabled = 3; + uint32 position_precision_bits = 4; + uint32 position_min_interval_secs = 5; + + /* + * NodeInfo direct response settings + */ + bool nodeinfo_direct_response = 6; + uint32 nodeinfo_direct_response_min_hops = 7; + + /* + * Rate limiting settings + */ + bool rate_limit_enabled = 8; + uint32 rate_limit_window_secs = 9; + uint32 rate_limit_max_packets = 10; + + /* + * Unknown/undecryptable packet handling + */ + bool drop_unknown_enabled = 11; + uint32 unknown_packet_threshold = 12; + + /* + * Hop exhaustion for local telemetry/position + */ + bool local_only_telemetry = 13; + bool local_only_position = 14; + + /* + * Router hop preservation + */ + bool router_preserve_hops = 15; + } + /* * Serial Config */ @@ -852,6 +904,11 @@ message ModuleConfig { * TODO: REPLACE */ StatusMessageConfig statusmessage = 14; + + /* + * TODO: REPLACE + */ + TrafficManagementConfig traffic_management = 15; } } diff --git a/meshtastic/telemetry.proto b/meshtastic/telemetry.proto index 8b70ade..efcc4a4 100644 --- a/meshtastic/telemetry.proto +++ b/meshtastic/telemetry.proto @@ -450,6 +450,20 @@ message LocalStats { int32 noise_floor = 15; } +/* + * Traffic management statistics + */ +message TrafficManagementStats { + uint32 packets_inspected = 1; + uint32 position_dedup_drops = 2; + uint32 nodeinfo_cache_hits = 3; + uint32 rate_limit_drops = 4; + uint32 unknown_packet_drops = 5; + uint32 hop_exhausted_packets = 6; + uint32 dry_run_would_drop = 7; + uint32 router_hops_preserved = 8; +} + /* * Health telemetry metrics */ @@ -565,6 +579,11 @@ message Telemetry { * Linux host metrics */ HostMetrics host_metrics = 8; + + /* + * Traffic management statistics + */ + TrafficManagementStats traffic_management_stats = 9; } }