Add module traffic_management protobufs

This commit is contained in:
Clive Blackledge 2026-01-19 13:39:55 -08:00
parent bc63a57f9e
commit e2daf8d914
4 changed files with 86 additions and 0 deletions

View file

@ -157,6 +157,11 @@ message AdminMessage {
* TODO: REPLACE
*/
STATUSMESSAGE_CONFIG = 13;
/*
* Traffic management module config
*/
TRAFFICMANAGEMENT_CONFIG = 14;
}
enum BackupLocation {

View file

@ -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

View file

@ -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;
}
}

View file

@ -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;
}
}