The situation:
I have myTable with 2 index: my Number and myName.
myTableEntry OBJECT-TYPE
SYNTAX MyTableEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"Information about a particular server farm served by
a particular local LBM entity."
INDEX {
myNumber,
myName
}
::= { myTable 1 }
where the 2 index types are: myNumber Unsigned32 myName myString where myString::= TEXTUAL-CONVENTION STATUS current DESCRIPTION "The configured name associated with an myobject." SYNTAX OCTET STRING (SIZE (1..15))
I have generated an agentX-subagent on a i64-bit using mib2c tool; after that I have implemented the init_myTable to support the double index:
void init_myTable(void)
{
myTable_context *ctx;
netsnmp_index index;
oid index_oid[2];
int i1;
initialize_table_myTable();
index.len = 2;
index_oid[0] = 1;
index_oid[1] = 1;
index.oids = index_oid;
ctx = NULL;
printf("%d\n",i1);
ctx = CONTAINER_FIND(cb.container, &index);
if (!ctx) {
ctx = myTable_create_row(&index);
CONTAINER_INSERT(cb.container, ctx);
} else {
printf("ctx non trovato\n");
}
}I start the snmpd master: I have no problem : I start the subagent that manage myTable: ….. ….. register_mib: registering "myTable" at MY-MIB::myTable agentx/subagent: registering: MY-MIB::myTable agentx/subagent: registered 1
printf after parse_oid_indexes err = -1, SNMP_ERR_NOERROR = 0 and it exit without creating row
Summary:
I have no problem if I implement only 1 index like:
index.len = 1;
index_oid[0] = 53 (for example);
I have a problem (failed creating row) implementig double index both if I comment myTable_IDX2 in the mib2c perl template and not.
Someone can help me please, because a I cant understand the reason of fault. ?
Thanks
Paolo
Gruppo Telecom Italia - Direzione e coordinamento di Telecom Italia S.p.A.
==================================================================== CONFIDENTIALITY NOTICE This message and its attachments are addressed solely to the persons above and may contain confidential information. If you have received the message in error, be informed that any use of the content hereof is prohibited. Please return it immediately to the sender and delete the message. Should you have any questions, please send an e_mail to [EMAIL PROTECTED] Thank you ====================================================================
------------------------------------------------------- This SF.Net email is sponsored by: InterSystems CACHE FREE OODBMS DOWNLOAD - A multidimensional database that combines robust object and relational technologies, making it a perfect match for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 _______________________________________________ Net-snmp-coders mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
