GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MON::SNMP (3)

.ds Aq ’

NAME

Mon::SNMP - decode SNMP trap

CONTENTS

SYNOPSIS



    use Mon::SNMP;

    $trap = new Mon::SNMP;

    $trap->buffer($snmptrap);

    %traphash = $trap->decode;

    $error = $trap->error;



DESCRIPTION

Mon::SNMP provides methods to decode SNMP trap PDUs. It is based on Graham Barr’s Convert::BER module, and its purpose is to provide SNMP trap handling to mon.

METHODS

<B>newB> creates a new Mon::SNMP object.
<B>bufferB> ( buffer ) Assigns a raw SNMP trap message to the object.
<B>decodeB> Decodes a SNMP trap message, and returns a hash of the variable assignments for the SNMP header and trap protocol data unit of the associated message. The hash consists of the following members:



        version         =>      SNMP version (1)
        community       =>      community string
        ent_OID         =>      enterprise OID of originating agent
        agentaddr       =>      IP address of originating agent
        generic_trap    =>      /COLDSTART|WARMSTART|LINKDOWN|LINKUP|AUTHFAIL|EGPNEIGHBORLOSS|ENTERPRISESPECIFIC/
        specific_trap   =>      specific trap type (integer)
        timeticks       =>      timeticks (integer)
        varbindlist     =>      { oid1 => value, oid2 => value, ... }



ERRORS

All methods return a hash with no elements upon errors which they detect, and the detail of the error is available from the

EXAMPLES



    use Mon::SNMP;

    $trap = new Mon::SNMP;

    $trap->buffer($snmptrap);

    %traphash = $trap->decode;

    foreach $oid (keys $traphash{"varbindlist"}) {
        $val = $traphash{"varbindlist"}{$oid};
        print "oid($oid) = val($val)\n";
    }



ENVIRONMENT

None.

SEE ALSO

Graham Barr’s Convert::BER module.

NOTES

CAVEATS

Mon::SNMP depends upon Convert::BER to do the real work.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 MON::SNMP (3) 2001-01-11

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.