Failing to get INDEX object values from a subagent's table
Fahad Karim <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <CAJ55jBPxtB+uRk+wyP7U_skvsCwaBars9uYfFfpoWzK7v_udbw@mail.gmail.com> |
Hi everyone, Is there something special about objects that are registered as table indices? Can you not retrieve their values using snmpget? Using a subagent (agentx), and following http://www.net-snmp.org/dev/agent/data__set_8c-example.html as a guideline, I tried to add a very simple table indexed by a variable 'testIndex' (INTEGER). Running snmptable.exe gives me the following output: * testIndex testVariable* * ? 10* * ? 10* * ? 10* * ? 10* * ? 10* * ? 10* * ? 10* * ? 10* * ? 10* * ? 10* Running snmpget on one of the testIndex objects gives me the error: *MYTEST-MIB::testIndex.1 = No Such Object available on this agent at this OID* My code to set up the values (in a for loop) is something like: int index = i int status = 10; netsnmp_table_row_add_index(row, ASN_INTEGER, &index, sizeof(index)); netsnmp_set_row_column(row, 2, ASN_INTEGER, &status, sizeof(status)); I'm following the example I linked almost exactly. I'm using net-snmp-5.7.2 on Windows. I've built the snmp and snmpagent libraries for win32 release mode. Do I have to add additional logic to handle retrieval of index objects? Thank you! Fahad ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users