disabled
     ˆÀ�þ\Vl¥l®8Fdmà?ÈƒoÇÅÄ .    #!/usr/bin/perl -w

require 5.003;

use strict;

use BER;
use SNMP_Session;

my $host = shift @ARGV || die;
my $community = shift @ARGV || die;

my $ciscoMemoryPoolName = [1,3,6,1,4,1,9,9,48,1,1,1,2];
my $ciscoMemoryPoolAlternate = [1,3,6,1,4,1,9,9,48,1,1,1,3];
my $ciscoMemoryPoolValid = [1,3,6,1,4,1,9,9,48,1,1,1,4];
my $ciscoMemoryPoolUsed = [1,3,6,1,4,1,9,9,48,1,1,1,5];
my $ciscoMemoryPoolFree = [1,3,6,1,4,1,9,9,48,1,1,1,6];
my $ciscoMemoryPoolLargestFree = [1,3,6,1,4,1,9,9,48,1,1,1,7];

my %CiscoMemoryPoolTypes = (
			    1 => "processor memory",
			    2 => "i/o memory",
			    3 => "pci memory",
			    4 => "fast memory",
			    5 => "multibus memory");

sub out_memory_pool_entry {
  my ($index, $name, $alt, $valid, $used, $free, $largest) = @_;

  grep (defined $_ && ($_=pretty_print $_),
	($name, $alt, $valid, $used, $free, $largest));
  my $type = $CiscoMemoryPoolTypes{$index} || $index;
  printf STDOUT ("%-13s %6d %3s %10d %10d %10d %10d\n",
		 $name, $alt,
		 $valid ? 'yes' : 'no',
		 $used+$free, $used, $free, $largest);
}

my $session = SNMP_Session->open ($host, $community, 161)
  || die "Opening SNMP_Session";
printf STDOUT ("%-13s %6s %3s %10s %10s %10s %10s\n",
	       "Name", "Alt", "Vld", "Total", "Used", "Free", "Largest");
print STDOUT "-" x (13+7+4+11+11+11+11),"\n";
$session->map_table ([
		      $ciscoMemoryPoolName,
		      $ciscoMemoryPoolAlternate,
		      $ciscoMemoryPoolValid,
		      $ciscoMemoryPoolUsed,
		      $ciscoMemoryPoolFree,
		      $ciscoMemoryPoolLargestFree],
		     \&out_memory_pool_entry);
$session->close ();
1;
  6   ˆÀ�þ]‹6R¶W#26ð?ŸÈƒÀoÇ¿a–Ãa¾”J_)â€rãO\ªbÑ¿Å     #!/usr/bin/perl -w
# Minimal useful application of the SNMP package.
# Author: Simon Leinen  <simon@lia.di.epfl.ch>
# RCS $Header: /home/leinen/CVS/SNMP_Session/test/d.pl,v 1.1.1.1 2003-09-02 20:12:36 leinen Exp $
######################################################################
# This application sends a get request for three fixed MIB-2 variable
# instances (sysDescr.0, sysContact.0 and ipForwarding.0) to a given
# host.  The hostname and community string can be given as
# command-line arguments.
######################################################################

require 5;

use SNMP_SessionD;
use BERD;

$hostname = shift @ARGV || &usage;
$community = shift @ARGV || 'public';
&usage if $#ARGV >= 0;

%ugly_oids = qw(sysDescr.0	1.3.6.1.2.1.1.1.0
		sysContact.0	1.3.6.1.2.1.1.4.0
		ipForwarding.0	1.3.6.1.2.1.4.1.0
		);
foreach (keys %ugly_oids) {
    $ugly_oids{$_} = encode_oid (split (/\./, $ugly_oids{$_}));
    $pretty_oids{$ugly_oids{$_}} = $_;
}

srand();
die "Couldn't open SNMP session to $hostname"
    unless ($session = SNMP_SessionD->open ($hostname, $community, 161));
snmp_get ($session, qw(sysDescr.0 sysContact.0 ipForwarding.0));
$session->close ();
1;

sub snmp_get
{
    my($session, @oids) = @_;
    my($response, $bindings, $binding, $value, $oid);

    grep ($_ = $ugly_oids{$_}, @oids);

    if ($session->get_request_response (@oids)) {
	$response = $session->pdu_buffer;
	($bindings) = $session->decode_get_response ($response);

	while ($bindings ne '') {
	    ($binding,$bindings) = decode_sequence ($bindings);
	    ($oid,$value) = decode_by_template ($binding, "%O%@");
	    print $pretty_oids{$oid}," => ",
	    pretty_print ($value), "\n";
	}
    } else {
	warn "Response not received.\n";
    }
}

sub usage
{
    die "usage: $0 hostname [community]";
}
  6   ˆl–Ãa¾”J_)â€rãB¸ØTÅ£�þB g	®6Ü®7üÿÊƒh¹É¿Æ      auto
  7   ˆl–Ãa¾”J_)â€rãO\ªbÑ¿‘äÇò 8àHûBe–_uÏçËƒh¹ÊÀÇ      auto
     ˆÃ�þ\}Å›)[+Ž™xÏËƒ�9ÊÂÀÇ –    #!/usr/bin/perl -w
######################################################################
### Name:	  hex-test.pl
### Date Created: Mon Sep 22 21:15:06 1997
### Author:	  Simon Leinen  <simon@switch.ch>
### RCS $Id: hex-test.pl,v 1.1 1997-09-22 19:25:19 simon Exp $
######################################################################
### Test the new `hex_string' subroutin