So I have been playing around with the snmp4j API and have been trying to get my own simulated agent set up. So far I’ve pretty much been working with the TestAgent.java example found in the snmp4j-agent library (using snmp-agent2.3.0) I’ve been able to trim down to the code to only include what I am needing.
Currently, I am to the point to where I am wanting to play with registering an entire .mib file rather than a single OID.I’ve been doing some reading and supposedly there’s a utility that allows you to generate a .java file from a .mib file. Once generated all you need to do is call the .registerMO() function.
However, most of the documentation I found refers me to SNMP4j Agent Pro. Unfortunately I do not believe I will have access to this tool as I only have access to the snmp4j.jar file and the snmp4j-agent.jar file. Upon further research I stumbled upon this article on the SNMP4j website, (https://doc.snmp.app/pages/viewpage.action?pageId=5799973). Here it appears that this is what I am wanting because it states, “Sample code to compile textual MIB specifications into the SNMP4J-SMI repository directory:” However, I still am not sure, mainly due to the top part of the article where it has a code snipped detailing a LicenseKey. I do not beleive I have a License Key.
I am just wondering if there is any existing api support to convert a .mib file into a .java file outside the AgentPro tool?