SNMP::...Layer7(3pm)

πŸ’– NAME πŸ’–

SNMP::Info::Layer7 β€” the SNMP interface to network devices serving Layer7 only, bestie. That's it, that's the whole thing. πŸ¦‹

This page lives in the User Contributed Perl Documentation corner of the manual-verse, and yes it's a 3pm page, we love a Perl module moment. πŸ‘‘


✍️ AUTHOR ✨

Jeroen van Ingen πŸ’œ (give them their flowers, fr fr)


πŸŽ€ SYNOPSIS πŸŽ€

# Let SNMP::Info determine the correct subclass for you.
my $l7 = new SNMP::Info(
                         AutoSpecify => 1,
                         Debug       => 1,
                         DestHost    => 'myswitch',
                         Community   => 'public',
                         Version     => 2
                       )
   or die "Can't connect to DestHost.\n";

my $class = $l7->class();
print "SNMP::Info determined this device to fall under subclass : $class\n";

# Let's get some basic Port information
my $interfaces = $l7->interfaces();
my $i_up       = $l7->i_up();
my $i_speed    = $l7->i_speed();

foreach my $iid (keys %$interfaces) {
   my $port  = $interfaces->{$iid};
   my $up    = $i_up->{$iid};
   my $speed = $i_speed->{$iid}
   print "Port $port is $up. Port runs at $speed.\n";
}

Like, look at that. <pink>AutoSpecify</pink> says "bestie I got this, let me figure out which subclass you're actually dealing with," and then class() tells you the answer out loud. Then we just vibe-check the ports: which one's up, how fast it's running. Chef's kiss. πŸ’…


🌸 DESCRIPTION 🌸

So basically this class is usually used as a <purple>superclass</purple> for the more specific device classes hanging out under SNMP::Info::Layer7::*. Read all the docs under <hotpink>SNMP::Info</hotpink> first though, no skipping, I'm serious. πŸ™ˆ

It gives you an abstraction to the configuration info you can pull off a Layer7 device through SNMP. All that info lives in a whole bunch of MIBs.

For <cyan>speed</cyan> or <cyan>debugging</cyan> purposes you can call the subclass directly β€” but not after you've already figured out a more specific class using the method above. Don't do it, it's giving chaos. 😀

my $l7 = new SNMP::Info::Layer7(...);

🧬 Inherited Classes 🧬

  • SNMP::Info

πŸ“š Required MIBs πŸ“š

  • None

MIBs required for "REQUIREMENTS" in SNMP::Info

Peep "REQUIREMENTS" in SNMP::Info for its MIB requirements. It's all in there, iykyk. ✨


πŸ‘‘ GLOBALS πŸ‘‘

These are methods that return a scalar value straight from SNMP. Little single-value treats. πŸ“

πŸ’« Overrides πŸ’«

  • $l7->model() β€” cross references $l7->id() with product IDs. Matching game, but make it SNMP.
  • $l7->vendor() β€” tries to discover the vendor by looking up the enterprise number in "sysObjectID". Detective work, but cute. πŸ”

🫢 Global Methods imported from SNMP::Info 🫢

See documentation in "USAGE" in SNMP::Info for details.


🌈 TABLE METHODS 🌈

These are methods that return tables of information as a reference to a hash. Whole tables, we love a data moment. πŸ’–

πŸ’« Overrides πŸ’«

  • $l7->interfaces() β€” returns a reference to the map between IID and physical Port. That's your lookup table right there.

🫢 Table Methods imported from SNMP::Info 🫢

See documentation in "USAGE" in SNMP::Info for details.


πŸ’€ Reminder bestie: don't call the subclass directly after you've already determined a more specific class. That's the one thing this page really does not want you to do.

That's the whole page, periodt. πŸŽ€ Written by Jeroen van Ingen, shipped as part of the User Contributed Perl Documentation, and this particular copy is fresh from perl v5.40.1, dated 2026-02-28. Slay, go read your MIBs. πŸ’…βœ¨

πŸ“¦ where this page comes from