|Lucio Crusca||Feb 10, 2011 9:03 am|
|Daniel Fuchs||Feb 10, 2011 9:22 am|
|Lucio Crusca||Feb 11, 2011 6:49 am|
|Daniel Fuchs||Feb 11, 2011 7:04 am|
|Lucio Crusca||Feb 11, 2011 8:20 am|
|Lucio Crusca||Feb 15, 2011 8:48 am|
|Daniel Fuchs||Feb 20, 2011 6:10 am|
|Lucio Crusca||Feb 21, 2011 8:17 am|
|Daniel Fuchs||Feb 21, 2011 9:28 am|
|Lucio Crusca||Feb 22, 2011 7:02 am|
|Daniel Fuchs||Feb 22, 2011 9:07 am|
|Lucio Crusca||Mar 31, 2011 9:17 am|
|Daniel Fuchs||Mar 31, 2011 9:39 am|
|Daniel Fuchs||Mar 31, 2011 9:53 am|
|Subject:||Re: starting a standalone snmp agent|
|From:||Lucio Crusca (luc...@sulweb.org)|
|Date:||Mar 31, 2011 9:17:43 am|
Sorry to resume an old thread, but I'm going on only now with my work from where I left off more than a month ago...
In data lunedì 21 febbraio 2011 18:28:44, Daniel Fuchs ha scritto:
On 2/21/11 5:18 PM, Lucio Crusca wrote:
in order to programmatically populate my mib
you may have to subclass the MIB bean, and possibly any other intermediate group beans in order to get hold of the table bean in which you will add your entries.
The relevant section is '16.4 Standalone SNMP Agents' page 283.
In that code the IfTable (TableIfTable.java) is populated in the the constructor of the Interfaces group (subclassed in InterfaceImpl.java) which contains it.
So if you have a Mib MX containing a group GX containing a table XTable, I think you will need to create a subclass of Mib MX (MX_Impl) in order to instantiate a subclass of group GX (GX_Impl) in order to either populate directly the table TableXTable from GX_Impl, or create a subclass of TableXTable (TableXTable_Impl).
I think this procedure is like the one explained here:
but, besides the fact mibgen did not generate any *myMibName*Info.java in my case, and besides the fact I don't know what a SNMP group even is (but here RTFM is the obvious answer), I wonder if I can solve the problem in a faster way. In my case I just need to simulate a real snmp agent, using static values read from a file. The file is the output of snmpwalk run against the real agent. So I wonder if I could just use snmpset to inject the values in my java agent simulator, leaving it as it is now (only the mibgen generated classes).
I obviously already tried that, but it succeeds only for a subset of all the OIDs. Some OIDs are r/o and that's fine, but for the most part the snmpset reply is like:
.126.96.36.199.4.1.8698.1000.1.4.1.188.8.131.52.184.108.40.206 s "mcm" Error in packet. Reason: noAccess Failed object: iso.220.127.116.11.1.8698.1000.1.4.1.18.104.22.168.22.214.171.124
Does that suggest anything to you, snmp expterts?