[SNMP4J] Agent development
Frank Fock
fock at agentpp.com
Tue Nov 13 23:05:44 CET 2007
Hi Jeff,
You can find the class
org.snmp4j.agent.mo.ext.StaticMOGroup
in the nightly build of SNMP4J-Agent at:
http://oosnmp.com/~katz/snapshot/
Also included is the
org.snmp4j.agent.test.SnapshotAgent
class which reads a SNMP4J snapshot
file (see the -cs option of
http://www.snmp4j.org/snmp4j_usage.txt)
to run a simulation agent from it.
It is not well documented and tested yet,
however it might be a starting point for
your first question.
For the second question (creating a trap
PDU from a TRAP-TYPE or NOTIFICATON-TYPE
construct) I have to refer you to my
previous posting (regarding SNMP4J).
However, with MIB Explorer, you can create
such a PDU by drag&drop the trap node on
a newly created empty PDU in the PDU panel.
You can edit it and then send it to a
previously configured target.
Hope this helps.
Best regards,
Frank
Jeff Garrett wrote:
> Hi.
> I am developing an SNMP agent. I think this is a really neat library and
> its been very helpful.
>
> I would like to know a couple of things though, I haven't come across any
> answers to them yet:
> - 2 parts here.
> 1) What I did was a SNMP walk of all OID-value pairs for a real network
> element, the one I want to simulate. I want to store these with my agent.
> I know I can use a SortedMap or LinkedList, but if there is already
> something in place I would like to use it. I've seen lots of references to
> a MOServer. Is this what I want to look into?
> 2) When a request comes in, I want to go to the Map/List/MOServer and get
> the value, or the next value, or bulk value for the request OID. I know I
> can get the OIDs from the PDU. Is there already a method implemented that
> will perform the Get, GetNext, GetBulk, Set operation for m?
>
> I would like to know if there is a way to do these 2 parts.
>
>
> - Also, does the Agent support getting the traps/notifications from a MIB
> file? That is one of the main functions I want to do, send a
> trap/notification on demand. I am pretty sure I know how to send the trap,
> but is there a dynamic way to pass in a MIB file and get all the
> traps/notifications from it?
>
> Thanks.
> Jeff
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j
--
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com
More information about the SNMP4J
mailing list