forked from NationTech/harmony
feat(wip): Support opnsense 25.7 which defaults to dnsmasq instead of isc dhcp
This commit is contained in:
69
opnsense-config/src/modules/dnsmasq.rs
Normal file
69
opnsense-config/src/modules/dnsmasq.rs
Normal file
@@ -0,0 +1,69 @@
|
||||
use crate::modules::dhcp::DhcpError;
|
||||
use log::info;
|
||||
use opnsense_config_xml::MaybeString;
|
||||
use opnsense_config_xml::StaticMap;
|
||||
use std::net::Ipv4Addr;
|
||||
use std::sync::Arc;
|
||||
|
||||
use opnsense_config_xml::OPNsense;
|
||||
|
||||
use crate::config::OPNsenseShell;
|
||||
use crate::Error;
|
||||
|
||||
pub struct DhcpConfigDnsMasq<'a> {
|
||||
opnsense: &'a mut OPNsense,
|
||||
opnsense_shell: Arc<dyn OPNsenseShell>,
|
||||
}
|
||||
|
||||
impl<'a> DhcpConfigDnsMasq<'a> {
|
||||
pub fn new(opnsense: &'a mut OPNsense, opnsense_shell: Arc<dyn OPNsenseShell>) -> Self {
|
||||
Self {
|
||||
opnsense,
|
||||
opnsense_shell,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn remove_static_mapping(&mut self, mac: &str) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn get_lan_dhcpd(&mut self) -> &mut opnsense_config_xml::DhcpInterface {
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub fn add_static_mapping(
|
||||
&mut self,
|
||||
mac: &str,
|
||||
ipaddr: Ipv4Addr,
|
||||
hostname: &str,
|
||||
) -> Result<(), DhcpError> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub async fn get_static_mappings(&self) -> Result<Vec<StaticMap>, Error> {
|
||||
todo!()
|
||||
}
|
||||
pub fn enable_netboot(&mut self) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub fn set_next_server(&mut self, ip: Ipv4Addr) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub fn set_boot_filename(&mut self, boot_filename: &str) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub fn set_filename(&mut self, filename: &str) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub fn set_filename64(&mut self, filename64: &str) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub fn set_filenameipxe(&mut self, filenameipxe: &str) {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user