From 86909ae2361f554cc0adeca1ba8691dde9be61f7 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Thu, 12 Apr 2012 09:26:34 +0100 Subject: [PATCH] [3085413] SNMP OIDs for Netgear Serial and OS Ver (phishphreek) --- ChangeLog | 1 + Info/Layer2/Netgear.pm | 27 ++++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index da1e4107..ae7d4be7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ version 2.07 () * [2993691] Support for SonicWALL devices in new class L3::SonicWALL (phishphreek) * [2996795] Support for Kentrox devices in new class L2::Kentrox (phishphreek) * [3085411] Activate L3 properties for Netgear GSM7224v2 (phishphreek) + * [3085413] SNMP OIDs for Netgear Serial and OS Ver (phishphreek) [BUG FIXES] diff --git a/Info/Layer2/Netgear.pm b/Info/Layer2/Netgear.pm index 636416ce..10d33ffd 100644 --- a/Info/Layer2/Netgear.pm +++ b/Info/Layer2/Netgear.pm @@ -43,7 +43,10 @@ $VERSION = '2.06'; %MIBS = ( %SNMP::Info::Layer2::MIBS, ); -%GLOBALS = ( %SNMP::Info::Layer2::GLOBALS, ); +%GLOBALS = ( %SNMP::Info::Layer2::GLOBALS, + ng_serial => '.1.3.6.1.4.1.4526.10.1.1.1.4.0', + ng_osver => '.1.3.6.1.4.1.4526.10.1.1.1.13.0', +); %FUNCS = ( %SNMP::Info::Layer2::FUNCS, ); @@ -86,6 +89,20 @@ sub fw_port { return $ret; } +# these seem to work for GSM models but not GS +# https://sourceforge.net/tracker/?func=detail&aid=3085413&group_id=70362&atid=527529 +sub os_ver { + my $self = shift; + return if $self->model and $self->model =~ m/GS\d/i; + return $self->ng_osver(); +} + +sub serial { + my $self = shift; + return if $self->model and $self->model =~ m/GS\d/i; + return $self->ng_serial(); +} + 1; __END__ @@ -158,6 +175,14 @@ Returns 'netgear' Returns description() +=item $netgear->os_ver() + +Returns OS Version. + +=item $netgear->serial() + +Returns Serial Number. + =back =head2 Global Methods imported from SNMP::Info::Layer2