diff --git a/src/args.rs b/src/args.rs index d6b51a6..bd1e277 100644 --- a/src/args.rs +++ b/src/args.rs @@ -85,6 +85,10 @@ pub enum GetCommands { Sms, /// Fetch NV ARFCN. NvArfcn, + /// Fetch primary SSID. + PrimarySsid, + /// Fetch secondary SSID. + SecondarySsid, } #[derive(Subcommand, Debug)] diff --git a/src/main.rs b/src/main.rs index 79cd56c..89c49bf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -35,6 +35,8 @@ async fn main() -> EyreResult<()> { GetCommands::LocalDomain => router.show::().await?, GetCommands::DhcpStart => router.show::().await?, GetCommands::DhcpEnd => router.show::().await?, + GetCommands::PrimarySsid => router.show::().await?, + GetCommands::SecondarySsid => router.show::().await?, }, TopLevelCommands::Post { command } => match command { PostCommands::Reboot => router.reboot().await.print_table(), diff --git a/src/proc_get.rs b/src/proc_get.rs index 12241b1..bf42c7b 100644 --- a/src/proc_get.rs +++ b/src/proc_get.rs @@ -583,3 +583,37 @@ impl ProcGet for NvArfcn { println!("{table}"); } } + +#[derive(Debug, Deserialize)] +pub struct PrimarySsid { + #[serde(rename = "SSID1")] + pub ssid1: BoxStr, +} + +impl ProcGet for PrimarySsid { + const CMD: &str = "SSID1"; + type Params = (); + + fn print_table(&self) { + let mut table = create_table(); + table.set_header(["Primary SSID"]).add_row([&self.ssid1]); + println!("{table}"); + } +} + +#[derive(Debug, Deserialize)] +pub struct SecondarySsid { + #[serde(rename = "m_SSID")] + pub m_ssid: BoxStr, +} + +impl ProcGet for SecondarySsid { + const CMD: &str = "m_SSID"; + type Params = (); + + fn print_table(&self) { + let mut table = create_table(); + table.set_header(["Secondary SSID"]).add_row([&self.m_ssid]); + println!("{table}"); + } +}