SNMP::...nsions(3pm)
π NAME π
SNMP::Info::CiscoStpExtensions β it's the SNMP interface to CISCO-STP-EXTENSIONS-MIB, bestie
(this one lives in the User Contributed Perl Documentation, filed under <cyan>SNMP::...nsions(3pm)</cyan>, iykyk)
β¨ AUTHOR β¨
Carlos Vicente wrote this. iconic of him honestly π«Ά
π SYNOPSIS π
okay so here's the vibe:
my $stpx = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
or die "Can't connect to DestHost.\n";
my $class = $stpx->class();
print " Using device sub class : $class\n";
no cap, that's the whole thing πΈ
π¦ DESCRIPTION π¦
So the move here is: you create (or use) a subclass of SNMP::Info that inherits this class. Do not use it directly. fr fr, it's not that kind of module.
But if you're debugging and you truly need to, you can call new() directly, same as you would in SNMP::Info:
my $stpx = new SNMP::Info::CiscoStpExtensions(...);
π Inherited Classes
SNMP::InfoSNMP::Info::Bridge
π Required MIBs
CISCO-STP-EXTENSIONS-MIB
π GLOBALS π
These are methods that hand you back scalar values from SNMP. Little single-value treats. π
$stpx->stp_ver()β gives you the particular STP version running on this device. It exists specifically to overrideSNMP::Info::Brigde::stp_ver()(yes that typo is in the original, we love her anyway π).
Values: "pvstPlus", "mistp", "mistpPvstPlus", "mst", "rapidPvstPlus"
("stpxSpanningTreeType")
π₯ TABLE METHODS π₯
These ones return tables of info, in the form of a reference to a hash. So much data, so much slay. β¨
$stpx->mst_config_digest()β returns the Multiple Spanning Tree (MST) configuration digest
("stpxSMSTConfigDigest")
$stpx->mst_region_name()β returns the Multiple Spanning Tree (MST) region name
("stpxMSTRegionName")
$stpx->mst_region_rev()β returns the Multiple Spanning Tree (MST) region name
("stpxSMSTRegionRevision")
$stpx->mst_vlan2instance()β returns the mapping of vlan to MST instance, as a hash reference where key = VLAN id and value = STP instance$stpx->i_rootguard_enabled()β returns1or0depending on whether"RootGuard"is enabled on a given port. Format is a hash reference with key ="ifIndex", value =[1|0]
("stpxRootGuardConfigEnabled")
$stpx->i_loopguard_enabled()β returns1or0depending on whether"LoopGuard"is enabled on a given port. Format is a hash reference with key ="ifIndex", value =[1|0]
("stpxLoopGuardConfigEnabled")
$stpx->i_bpduguard_enabled()β returns1or0depending on whether"BpduGuard"is enabled on a given port. Format is a hash reference with key ="ifIndex", value =[1|0]
("stpxFastStartPortBpduGuardMode")
$stpx->i_bpdufilter_enabled()β returns1or0depending on whether"BpduFilter"is enabled on a given port. Format is a hash reference with key ="ifIndex", value =[1|0]
("stpxFastStartBpduFilterEnable")
$stpx->i_faststart_enabled()β returns1or0depending on whether FastStart (aka PortFast) is enabled on a given port. Format is a hash reference with key ="ifIndex", value =[1|0]
("stpxFastStartPortEnable" and "stpxFastStartPortMode")
π§ MUNGES π§
oct2str()β unpacksH*into a string
and that's the whole page, bestie!! πΈπ¦π
This one's perl v5.40.1, dated 2026-02-28 β mwah, go forth and poll your switches responsibly πβ¨
π¦ where this page comes from
- ubuntu stonking: libsnmp-info-perl 3.975000-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms