[AGENT++] Accessing entries in a static table

Subha Velayutham vsubha at gmail.com
Fri Aug 5 03:59:21 CEST 2005


For a scalar variable defined like this:

Oidx testOID("1.3.6.1.4.1.4976.6.1.2.0");
mib.add(new MibLeaf(testOID, READWRITE, new SnmpInt32(1)));

the GET request issued by the manager will be: SNMP4J.exe -c public -v 2c -p 
GET udp:localhost/4700 "1.3.6.1.4.1.4976.6.1.2.0"

Similarly What should be the OID I use in the GET request issued by a 
manager to access the values in a static table? Ex.

MibStaticTable* st = new MibStaticTable("1.3.6.1.4.1.4976.6.1.1");
st->add(MibStaticEntry("1.3.6.1.4.1.4976.6.1.1.2.224", 
SnmpInt32(1)));
st->add(MibStaticEntry("1.3.6.1.4.1.4976.6.1.1.3.224", 
OctetStr("a text")));
st->add(MibStaticEntry("1.3.6.1.4.1.4976.6.1.1.2.71", 
SnmpInt32(2)));
st->add(MibStaticEntry("1.3.6.1.4.1.4976.6.1.1.3.71", 
OctetStr("another text")));

If this is the definition, how do I access each of the 4 entries?

Thanks,
Subha



More information about the AGENTPP mailing list