SNMP::...herLike(3pm)

🌸 SNMP::Info::EtherLike β€” bestie edition πŸ’…

okay so this is a page from the User Contributed Perl Documentation, and the manual name up top is SNMP::...herLike(3pm) (yes it's truncated, the real one is SNMP::Info::EtherLike). Sit down, hydrate, we're learning ETHERLIKE-MIB together 🫢


✨ NAME ✨

SNMP::Info::EtherLike β€” an SNMP Interface to SNMP ETHERLIKE-MIB RFC 1398 πŸ¦‹


πŸ‘‘ AUTHOR πŸ‘‘

Max Baker β€” the icon, the legend, the moment. periodt.


πŸŽ€ SYNOPSIS πŸŽ€

here's the whole vibe, copy-paste ready, no cap:

my $el = new SNMP::Info (
                            AutoSpecify => 1,
                            Debug       => 1,
                            DestHost    => 'router',
                            Community   => 'public',
                            Version     => 2
                          );

my $class = $el->class();
print " Using device sub class : $class\n";

# Find the duplex setting for a port on a device that implements
# ETHERLIKE-MIB
my $interfaces = $el->interfaces();
my $el_index   = $el->el_index();
my $el_duplex  = $el->el_duplex();

foreach my $el_port (keys %$el_duplex){
   my $duplex = $el_duplex->{$el_port};
   my $iid    = $el_index->{$el_port};
   my $port   = $interfaces->{$iid};

   print "PORT:$port set to duplex:$duplex\n";
}

literally the entire flex in one snippet 😭πŸ”₯


πŸ’– DESCRIPTION πŸ’–

SNMP::Info::EtherLike is a subclass of SNMP::Info that supplies access to the ETHERLIKE-MIB used by some Layer 3 Devices such as Cisco routers. it's giving niche but essential.

See RFC 1398 for more details β€” go read it, it's right there, iykyk πŸ“–

⚠️ Important, bestie: use or create a subclass of SNMP::Info that inherits this one. Do not use directly. like, do not. it says so. πŸ™ˆ

🧬 Inherited Classes

None. she's independent, she's her own woman ✨

πŸ“š Required MIBs

ETHERLIKE-MIB β€” that's the one, that's the whole list πŸ’œ


🌈 GLOBALS 🌈

These are methods that return scalar values from SNMP.

None β€” nothing here, empty, a void, an aesthetic empty room πŸŽ€


🧚 TABLE METHODS 🧚

These are methods that return tables of information in the form of a reference to a hash.

πŸ’… ETHERLIKE STATS TABLE ("dot3StatsTable") πŸ’…

  • $el->el_index() β€” Returns reference to hash. Indexes Stats Table to the interface index (iid). πŸ¦‹
    • maps to ("dot3StatsIndex")
  • $el->el_duplex() β€” Returns reference to hash. Indexes Stats Table to Duplex Status of port. ✨
    • maps to ("dot3StatsDuplexStatus")
  • $el->el_chipset() β€” ("dot3StatsEtherChipSet")
  • $el->el_coll_excess() β€” ("dot3StatsExcessiveCollisions")
  • $el->el_coll_late() β€” ("dot3StatsLateCollisions")
  • $el->el_coll_mult() β€” ("dot3StatsMultipleCollisionFrames")
  • $el->el_coll_single() β€” ("dot3StatsSingleCollisionFrames")
  • $el->el_error_alignment() β€” ("dot3StatsAlignmentErrors")
  • $el->el_error_fcs() β€” ("dot3StatsFCSErrors")
  • $el->el_error_cs() β€” ("dot3StatsCarrierSenseErrors")
  • $el->el_error_frame() β€” ("dot3StatsFrameTooLongs")
  • $el->el_error_mac_rec() β€” ("dot3StatsInternalMacReceiveErrors")
  • $el->el_error_mac_xmit() β€” ("dot3StatsInternalMacTransmitErrors")
  • $el->el_error_sqe() β€” ("dot3StatsSQETestErrors")
  • $el->el_error_symbol() β€” ("dot3StatsSymbolErrors")
  • $el->el_xmit_defer() β€” ("dot3StatsDeferredTransmissions")
  • $el->el_coll_count() β€” ("dot3CollCount")
  • $el->el_coll_freq() β€” ("dot3CollFrequencies")

yes bestie that's 18 methods, i counted, all accounted for, no skips, no cuts πŸ‘‘

πŸͺ„ Data Munging Callback Subroutines πŸͺ„

  • $el->munge_el_duplex() β€” Removes 'Duplex' from the end of a string. teeny tiny little cleanup, so satisfying 🌸

and that's the whole page, we ate and left no crumbs πŸ’– the source is perl v5.40.1, dated 2026-02-28, and the manual name is SNMP::...herLike(3pm) β€” go forth and query your duplex settings, bestie πŸ¦‹βœ¨πŸŽ€

πŸ“¦ where this page comes from