#!/usr/local/bin/perl 
#
# snmpget
#
# Author: Wayne Marquette - 12/14/96
#
# Command line interface for PERL snmp->get funcion
#

use SNMP::Util;
$ENV{'MAX_LOG_LEVEL'} = 'status';


if (@ARGV < 1){
   print "Usage: \n";
   print "       snmpset <IP> <community string> <oid_list>\n";
   print "\n";
   print "       IP = IP address or Switch name\n";
   print "       comm = defaults to hostname\n";
   print "       oid_list = list of oids or names and values to set\n";
   print "       example: snmpset <IP> <public> ifAdminStatus.1 up ifAdminStatus.2 up\n";
   exit;
}

#Look for command line arguements
$IP = $ARGV[0];
$Comm_string = $ARGV[1];
for ($i = 2; $i <= $#ARGV; $i ++){
       push @oid_list,$ARGV[$i];
}

$snmp = new SNMP::Util(-device     => $IP,
                 -community => $Comm_string);

$snmp->set(@oid_list);
