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::Info
  • SNMP::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 override SNMP::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() β€” returns 1 or 0 depending 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() β€” returns 1 or 0 depending 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() β€” returns 1 or 0 depending 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() β€” returns 1 or 0 depending 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() β€” returns 1 or 0 depending 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() β€” unpacks H* 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