diag_device: accept rayhunter::Device arg

Move daemon's config::Device to lib and toggle the extra tplink ioctl
based on Device::Tplink rather than passing a boolean.
This commit is contained in:
oopsbagel
2025-07-17 15:41:20 -07:00
committed by Will Greenberg
parent e239653a44
commit 29c944af45
4 changed files with 38 additions and 36 deletions

View File

@@ -1,6 +1,7 @@
use log::warn;
use serde::{Deserialize, Serialize};
use rayhunter::Device;
use rayhunter::analysis::analyzer::AnalyzerConfig;
use crate::error::RayhunterError;
@@ -18,15 +19,6 @@ pub struct Config {
pub analyzers: AnalyzerConfig,
}
#[derive(PartialEq, Debug, Clone, Deserialize, Serialize)]
#[serde(rename_all = "lowercase")]
pub enum Device {
Orbic,
Tplink,
Tmobile,
Wingtech,
}
impl Default for Config {
fn default() -> Self {
Config {