add CVS revision number to debugging output to aid future email dumps
This commit is contained in:
18
Info.pm
18
Info.pm
@@ -1,8 +1,8 @@
|
||||
# SNMP::Info - Max Baker
|
||||
# $Id$
|
||||
# SNMP::Info
|
||||
#
|
||||
# Copyright (c) 2003-2008 Max Baker
|
||||
# Copyright (c) 2003-2009 Max Baker
|
||||
# All rights reserved.
|
||||
#
|
||||
# Portions Copyright (c) 2002-2003, Regents of the University of California
|
||||
# All rights reserved.
|
||||
#
|
||||
@@ -20,10 +20,11 @@ use Math::BigInt;
|
||||
@SNMP::Info::EXPORT_OK = qw//;
|
||||
|
||||
use vars
|
||||
qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG %SPEED_MAP
|
||||
qw/$VERSION $VERSION_CVS %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG %SPEED_MAP
|
||||
$NOSUCH $BIGINT $REPEATERS/;
|
||||
|
||||
$VERSION = '2.00';
|
||||
$VERSION_CVS = '$Id$';
|
||||
|
||||
=head1 NAME
|
||||
|
||||
@@ -1179,10 +1180,6 @@ sub device_type {
|
||||
$desc =~ s/[\r\n\l]+/ /g;
|
||||
my $id = $info->id() || 'undef';
|
||||
|
||||
$info->debug()
|
||||
and print
|
||||
"SNMP::Info::device_type() layers:$layers id:$id sysDescr:\"$desc\"\n";
|
||||
|
||||
# Hash for generic fallback to a device class if unable to determine using
|
||||
# the sysDescr regex.
|
||||
my %l3sysoidmap = (
|
||||
@@ -1226,6 +1223,11 @@ sub device_type {
|
||||
# Get just the enterprise number for generic mapping
|
||||
$id = $1 if ( defined($id) && $id =~ /^\.1\.3\.6\.1\.4\.1\.(\d+)/ );
|
||||
|
||||
if ($info->debug()) {
|
||||
print "SNMP::Info $VERSION ($VERSION_CVS)\n";
|
||||
print "SNMP::Info::device_type() layers:$layers id:$id sysDescr:\"$desc\"\n";
|
||||
}
|
||||
|
||||
# Layer 3 Supported
|
||||
# (usually has layer2 as well, so we check for 3 first)
|
||||
if ( $info->has_layer(3) ) {
|
||||
|
||||
Reference in New Issue
Block a user