IO::Lambda::SNMP - snmp requests lambda style


IO-Lambda documentation  | view source Contained in the IO-Lambda distribution.

Index


NAME

Top

IO::Lambda::SNMP - snmp requests lambda style

DESCRIPTION

Top

The module exports a set of conditions: snmpget, snmpfget, snmpgetnext, snmpfgetnext, snmpset, and snmpbulkwalk, that behave like the corresponding SNMP:: non-blocking counterpart functions. See SNMP for descriptions of their parameters and results.

SYNOPSIS

Top

   use strict;
   use SNMP;
   use IO::Lambda::SNMP qw(:all);
   use IO::Lambda qw(:all);

   my $sess = SNMP::Session-> new(
      DestHost => 'localhost',
      Community => 'public',
      Version   => '2c',
   );

   this lambda {
      context $sess, new SNMP::Varbind;
      snmpgetnext {
         my $vb = shift;
         print @{$vb->[0]}, "\n" ; 
         context $sess, $vb;
         again unless $sess-> {ErrorNum};
      }
   };
   this-> wait;

SEE ALSO

Top

IO::Lambda, SNMP.

AUTHOR

Top

Dmitry Karasik, <dmitry@karasik.eu.org>.


IO-Lambda documentation  | view source Contained in the IO-Lambda distribution.