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")
- maps to (
$el->el_duplex()β Returns reference to hash. Indexes Stats Table to Duplex Status of port. β¨- maps to (
"dot3StatsDuplexStatus")
- maps to (
$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
- 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