#! /usr/bin/perl -w use strict; use api::Mtik; use api::printhash; sub getsnmp { my $hashref = shift or die; my $debug = shift || 0; print LOG "getsnmp: entry debug $debug\n" if $debug; %$hashref = (); my @command; push @command,'/snmp/print'; push @command,'.id'; my($retval,@results) = &Mtik::talk(\@command); if ($retval != 1) { return $results[0]{'message'}; } $hashref = $results[0]; if($debug) { printhash($hashref,"getsnmp: return value"); } return ""; } 1;