Implement LAMP server module with basic configuration. Refactor and remove commented out Dhcpd struct and associated tests in opnsense/xml_utils. Ensure codebase adheres to best practices and maintainability standards.
38 lines
1.1 KiB
Rust
38 lines
1.1 KiB
Rust
use yaserde_derive::{YaDeserialize, YaSerialize};
|
|
|
|
use yaserde::MaybeString;
|
|
|
|
use super::opnsense::{NumberOption, Range, StaticMap};
|
|
|
|
#[derive(Default, PartialEq, Debug, YaSerialize, YaDeserialize)]
|
|
pub struct DhcpInterface {
|
|
pub enable: Option<MaybeString>,
|
|
pub gateway: Option<MaybeString>,
|
|
pub domain: Option<MaybeString>,
|
|
pub tftp: Option<String>,
|
|
pub bootfilename: Option<String>,
|
|
pub netboot: Option<u32>,
|
|
pub nextserver: Option<String>,
|
|
pub filename64: Option<String>,
|
|
#[yaserde(rename = "ddnsdomainalgorithm")]
|
|
pub ddns_domain_algorithm: Option<MaybeString>,
|
|
#[yaserde(rename = "numberoptions")]
|
|
pub number_options: Vec<NumberOption>,
|
|
#[yaserde(rename = "range")]
|
|
pub range: Range,
|
|
pub winsserver: Option<MaybeString>,
|
|
pub dnsserver: Option<MaybeString>,
|
|
pub ntpserver: Option<MaybeString>,
|
|
#[yaserde(rename = "staticmap")]
|
|
pub staticmaps: Vec<StaticMap>,
|
|
pub pool: Option<MaybeString>,
|
|
}
|
|
|
|
#[derive(Default, PartialEq, Debug, YaSerialize, YaDeserialize)]
|
|
pub struct DhcpRange {
|
|
#[yaserde(rename = "from")]
|
|
pub from: String,
|
|
#[yaserde(rename = "to")]
|
|
pub to: String,
|
|
}
|