Title: Perl module parsing MIB structure -- barking up the wrong tree?

Hi all:
I'm trying to write a Perl module (for my own use) based on the SNMP module distributed with Net-SNMP.

What I'd like to do is based on a trap number and OID, look up a TRAP-TYPE (v1) definition, and determine what OIDs, data-types, and values that the trap requires.

I'd then be able to build up a call to SNMP::TrapSession::trap() that would get all the required information directly from the MIB file, rather than hard-coding information already in the MIB into my code.

My interface to the module would look something like:
sendTrap($$@)
        $ = enterprise OID of the trap to send
        $ = specific trap to send
        @ = array of parameters that are attached to the trap

I haven't found examples of getting information out of the SNMP::MIB tied hash; is what I'm thinking of feasible at all?

Opinions welcome!
Tom.

Reply via email to