[SNMP4J] Problems with the query of a DefaultMOTable
Alessio Gastaldo
alessio.gastaldo at gmail.com
Tue Jul 17 18:09:42 CEST 2012
Hello Frank,
I create a table with the following code:
private static DefaultMOTable createStaticIfTable() {
MOTableSubIndex[] subIndexes = new MOTableSubIndex[] { new
MOTableSubIndex(SMIConstants.SYNTAX_INTEGER) };
MOTableIndex indexDef = new MOTableIndex(subIndexes, false);
MOColumn[] columns = new MOColumn[1];
int c = 0;
columns[c++] = new MOColumn(c, SMIConstants.SYNTAX_INTEGER,
MOAccessImpl.ACCESS_WRITE_ONLY); // ifIndex
DefaultMOTable ifTable = new DefaultMOTable(new
OID("1.3.6.1.2.1.33.1.2"), indexDef, columns);
MOMutableTableModel model = (MOMutableTableModel)
ifTable.getModel();
Variable[] rowValues1 = new Variable[] { new Integer32(22) };
model.addRow(new DefaultMOMutableRow2PC(new OID("0"),
rowValues1));
ifTable.setVolatile(true);
return ifTable;
}
The table is inside a TestAgent. When I try to send a GET request (from a
SNMP manager) for the OID: 1.3.6.1.2.1.33.1.2.1.0, I've the following
error:
Error Status = 2
Error Index = 1
Error Status Text = No such name
Where am I doing wrong? In the OID?
Thanks in advance for your answer.
Best Regards
Alessio
More information about the SNMP4J
mailing list