Debian Codegraph @

contrib/ovmrtg/ovsysnms

raw
1 #!/usr/local/bin/perl5
2 # -*- mode: Perl -*-
3 ##################################################################
4 # Config file creator
5 ##################################################################
6 # Created by Laurie Gellatly <[email protected]>
7 # this produces an array of ip address and system names for each
8 # ip address passed to it, by pulling info
9 # off the device via snmp
10 #################################################################
11 #
12 # Distributed under the GNU copyleft
13 #
14 # $Id: ovsysnms,v 1.1.1.1 2002/02/26 10:16:36 oetiker Exp $
15 #
16 use Socket;
17 use strict;
18 use ovmrtg;
19 use vars '$DEBUG';
20 my $DEBUG = 0;
21
22
23 my($router,@res,$cnt);
24
25 sub main {
26
27 $router = $ARGV[0];
28 die <<USAGE unless $router;
29
30 USAGE: ovsysnms 'router IP ADDRESS/S or HPOV selection Names'
31
32 EXAMPLE: ovsysnms 193.21.1.2 >> resolved
33
34
35 USAGE
36 @res = ovsysnms(@ARGV);
37 for($cnt = 0 ; $cnt < @res; ++$cnt){
38 print "$res[$cnt]\n";
39 }
40 }
41 main;
42 exit(0);
43