[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Mibble-users] retrieving names of fields in NOTIFICATION-TYPE(traps
From: |
Hall, Matthew |
Subject: |
RE: [Mibble-users] retrieving names of fields in NOTIFICATION-TYPE(traps) |
Date: |
Mon, 24 Jul 2006 09:30:50 -0700 |
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden
> On Behalf Of Per Cederberg
> Sent: Saturday, July 22, 2006 12:51 AM
> To: Announcements, support, and forum for Mibble users
> Subject: Re: [Mibble-users] retrieving names of fields in
> NOTIFICATION-TYPE(traps)
>
> Hi Matthew,
>
> Doing what you want to do is unfortunately a little bit
> tricky with the current Mibble API. But luckily it has been
> done before, so there is code to look at. Check out
> MibWriter.printType(SnmpNotificationType, String) and
> MibWriter.printReferenceEntry(Object).
Well I'm glad to hear that there was not some totally obvious way to do this
that I failed to notice!
> Basically what you need to do is to iterate over all the Mib
> value symbols, finding the ones with a type of
> SnmpNotificationType, and then processing the list returned
> from SnmpNotificationType.getObjects(). Each entry in that
> list should be an ObjectIdentifierValue (depends on your MIB
> actually), from which you get the actual symbol name with
> oidValue.getSymbol().getName().
I'll work on this paragraph this morning and see how it all turns out.
> Hope this helps!
Thank you very much for your prompt response. I'll release a copy of this
application once I get it working right, if anybody else is interested in using
it. For me, it will save a lot of time in my work supporting SNMP traps from
different devices.
> /Per
Matthew