I am looking for an SNMP MIB reading/parsing API for Java. There
seems to be plenty of SNMP request/repsonse APIs out there but I am
having difficulty finding anything that will read a MIB and give me
some data structure, preferably with OIDs attached.
Suggestions appreciated. Free/open-source suggestions more greatly
appreciated.
Many thanks,
Jeff
> I am looking for an SNMP MIB reading/parsing API for Java. There
> seems to be plenty of SNMP request/repsonse APIs out there but I am
> having difficulty finding anything that will read a MIB and give me
> some data structure, preferably with OIDs attached.
Writing a good SMI parser from scratch is hard work and so the best
thing is to leverage work already been done. If I were to program
stuff in Java, I would either
(a) convert MIBs into XML format using smidump from the libsmi package
and use one of the many XML parsers to access the data, or
(b) write another backend for smidump to generate Java stubs so that I
almost never have to see any low level details in Java (smidump can
already do something like this for Java AgentX sub-agents).
/js
--
Juergen Schoenwaelder <http://www.informatik.uni-osnabrueck.de/schoenw/>
> I am looking for an SNMP MIB reading/parsing API for Java. There
> seems to be plenty of SNMP request/repsonse APIs out there but I am
> having difficulty finding anything that will read a MIB and give me
> some data structure, preferably with OIDs attached.
>
> Suggestions appreciated. Free/open-source suggestions more greatly
> appreciated.
The first few hits of
http://www.google.de/search?q=Java+MIB+Parser
indeed look dead. But since google finds 2300 hits, I think you will
find something. If it doesn't have to be Java, net-snmp is prety good.
I have a "less appreciated" one. You may check out the Java SMI parser
package coming with MIB Designer
JavaDoc:
http://www.mibdesigner.com/jasmi/index.html
Example:
http://www.mibdesigner.com/jasmi/DumpObjectNames.java
As Jürgen said, you may also use non Java tools to generate
Java program code at compile time. Beside libSMI, you could
also use AgenPro 2 which originally generates code for AGENT++,
but since it has an open source and fully customizable code
generation back-end, it can be used to generate code for virtually
any agent/manager API and programming language (in particular
C++ and Java). AgenPro 2 can be downloaded for evaluation
from http://www.agentpp.com
Regards,
Frank
AgentAPI:
http://nms.estig.ipb.pt/agent_api/mibparser.jsp#mib2text
HTH,
Ben
"Jeff Grabell" <onef...@yahoo.com> wrote in message
news:6491ccbf.02112...@posting.google.com...
Anthony
Ben Draper a écrit dans le message ...