From 48b7815d7ca7611d8a6f1ab14d7d80eb2933d006 Mon Sep 17 00:00:00 2001 From: fliqqs Date: Mon, 29 Dec 2025 20:42:45 -0500 Subject: [PATCH] isis: spb adj report --- src/internal_commands.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/internal_commands.rs b/src/internal_commands.rs index ac1593c..866477b 100644 --- a/src/internal_commands.rs +++ b/src/internal_commands.rs @@ -784,6 +784,26 @@ pub fn cmd_show_isis_adjacency( .column_leaf("Level", "usage") .column_leaf("State", "state") .column_leaf("Holdtime", "hold-timer") + .column_from_fn( + "SPB", + Box::new(|dnode| { + // Check if neighbor advertises NLPID 0xC1 (193) for SPB + const NLPID_SPB: u8 = 0xC1; + let has_spb = dnode + .children() + .filter(|child| { + child.schema().name() == "protocol-supported" + }) + .filter_map(|child| child.value_canonical()) + .filter_map(|val| val.parse::().ok()) + .any(|nlpid| nlpid == NLPID_SPB); + if has_spb { + "yes".to_string() + } else { + "no".to_string() + } + }), + ) .show()?; Ok(false)