feat(harmony): add TFTP server functionality (#10)
Introduce a new module and interface for serving files via TFTP in the HAClusterTopology structure. This includes adding the necessary dependencies, creating the `TftpServer` trait, implementing it where appropriate, and integrating its usage within the topology struct. Reviewed-on: #10 Co-authored-by: Jean-Gabriel Gill-Couture <jg@nationtech.io> Co-committed-by: Jean-Gabriel Gill-Couture <jg@nationtech.io>
This commit is contained in:
@@ -453,57 +453,57 @@ pub struct OPNsenseXmlSection {
|
||||
|
||||
#[derive(Debug, YaSerialize, YaDeserialize, PartialEq)]
|
||||
pub struct Tftp {
|
||||
general: TftpGeneral,
|
||||
pub general: TftpGeneral,
|
||||
}
|
||||
|
||||
#[derive(Debug, YaSerialize, YaDeserialize, PartialEq)]
|
||||
pub struct TftpGeneral {
|
||||
#[yaserde(attribute)]
|
||||
version: String,
|
||||
enabled: u8,
|
||||
listen: String,
|
||||
pub version: String,
|
||||
pub enabled: u8,
|
||||
pub listen: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, YaSerialize, YaDeserialize, PartialEq)]
|
||||
#[yaserde(rename = "IDS")]
|
||||
pub struct IDS {
|
||||
#[yaserde(attribute)]
|
||||
version: String,
|
||||
rules: MaybeString,
|
||||
policies: MaybeString,
|
||||
pub version: String,
|
||||
pub rules: MaybeString,
|
||||
pub policies: MaybeString,
|
||||
#[yaserde(rename = "userDefinedRules")]
|
||||
user_defined_rules: MaybeString,
|
||||
files: MaybeString,
|
||||
pub user_defined_rules: MaybeString,
|
||||
pub files: MaybeString,
|
||||
#[yaserde(rename = "fileTags")]
|
||||
file_tags: MaybeString,
|
||||
general: IDSGeneral,
|
||||
pub file_tags: MaybeString,
|
||||
pub general: IDSGeneral,
|
||||
}
|
||||
|
||||
#[derive(Debug, YaSerialize, YaDeserialize, PartialEq)]
|
||||
pub struct IDSGeneral {
|
||||
enabled: Option<u8>,
|
||||
ips: Option<u8>,
|
||||
promisc: Option<u8>,
|
||||
interfaces: String,
|
||||
homenet: String,
|
||||
pub enabled: Option<u8>,
|
||||
pub ips: Option<u8>,
|
||||
pub promisc: Option<u8>,
|
||||
pub interfaces: String,
|
||||
pub homenet: String,
|
||||
#[yaserde(rename = "defaultPacketSize")]
|
||||
default_packet_size: MaybeString,
|
||||
pub default_packet_size: MaybeString,
|
||||
#[yaserde(rename = "UpdateCron")]
|
||||
update_cron: MaybeString,
|
||||
pub update_cron: MaybeString,
|
||||
#[yaserde(rename = "AlertLogrotate")]
|
||||
alert_logrotate: String,
|
||||
pub alert_logrotate: String,
|
||||
#[yaserde(rename = "AlertSaveLogs")]
|
||||
alert_save_logs: u8,
|
||||
pub alert_save_logs: u8,
|
||||
#[yaserde(rename = "MPMAlgo")]
|
||||
mpm_algo: MaybeString,
|
||||
detect: Detect,
|
||||
syslog: Option<u8>,
|
||||
syslog_eve: Option<u8>,
|
||||
pub mpm_algo: MaybeString,
|
||||
pub detect: Detect,
|
||||
pub syslog: Option<u8>,
|
||||
pub syslog_eve: Option<u8>,
|
||||
#[yaserde(rename = "LogPayload")]
|
||||
log_payload: Option<u8>,
|
||||
verbosity: MaybeString,
|
||||
pub log_payload: Option<u8>,
|
||||
pub verbosity: MaybeString,
|
||||
#[yaserde(rename = "eveLog")]
|
||||
eve_log: Option<RawXml>,
|
||||
pub eve_log: Option<RawXml>,
|
||||
}
|
||||
|
||||
#[derive(Debug, YaSerialize, YaDeserialize, PartialEq)]
|
||||
|
||||
Reference in New Issue
Block a user