mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-27 16:09:58 -07:00
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:
committed by
Will Greenberg
parent
e239653a44
commit
29c944af45
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user