[AGENT++] table index with multiple components problem

john.edmonds at bt.com john.edmonds at bt.com
Wed Jan 16 16:36:55 CET 2008


Hello,
 
I need some help with a table index with multiple components.  I am seeing the error AGENTX_ERR_INDEX_NONE_AVAILABLE (260) returned to my AgentX++ sub-agent from net-snmp when I try to call allocate_index() to create a table row.  The index OID I am trying to register is "1.0.0".  
 
20080115.16:41:11: 426: (1)DEBUG  : SubAgentXMib: index (de)allocate response (oid)(err)(errind)(values..): (260), (0), (1.3.6.1.2.1
.87.1.7.1), (1.3.6.1.2.1.87.1.7.1), (1), (1.3.6.1.2.1.87.1.7.1), (0), (1.3.6.1.2.1.87.1.7.1), (0)
 
Index OID "1.2.3", however, registers OK.  It looks as though all the Index components need to be different for the allocate_index() to succeed. 
 
I am compiling the RTP MIB with AgenPro v2.6
 
rtpRcvrEntry OBJECT-TYPE
    SYNTAX          RtpRcvrEntry
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION
      ""
    INDEX { rtpSessionIndex, rtpRcvrSRCSSRC, rtpRcvrSSRC }
    ::= { rtpRcvrTable 1 }

Where each of the 3 index components is an integer.
 
The .cpp output file from AgenPro v2.6 shows
 
rtpRcvrEntry* rtpRcvrEntry::instance = 0;
 
const index_info indRtpRcvrEntry[3] = {
{ sNMP_SYNTAX_INT, FALSE, 1, 1 },
{ sNMP_SYNTAX_INT, FALSE, 1, 1 },
{ sNMP_SYNTAX_INT, FALSE, 1, 1 }};
 
const Oidx indOidsRtpRcvrEntry[3] = {
"1.3.6.1.2.1.87.1.7.1",
"1.3.6.1.2.1.87.1.7.1",
"1.3.6.1.2.1.87.1.7.1"};
 
Should all the index OIDs in indOidsRtpRcvrEntry be the same, the OID of the rtpRcvrEntry, and not the OIDs of the actual index components?  These appear to be the OID values sent to the Master Agent during allocate_index().
 
If I modify indOidsRtpRcvrEntry[3] to contain the OIDs of the index components
 
const Oidx indOidsRtpRcvrEntry[3] = {
"1.3.6.1.2.1.87.1.3.1.1",
"1.3.6.1.2.1.87.1.7.1.1",
"1.3.6.1.2.1.87.1.7.1.2"};
 
The allocate_index() with index "1.0.0" is now successfull.
 
20080116.14:42:29: 437: (1)DEBUG  : SubAgentXMib: index (de)allocate response (oid)(err)(errind)(values..): (0), (0), (1.3.6.1.2.1.8
7.1.7.1), (1.3.6.1.2.1.87.1.3.1.1), (1), (1.3.6.1.2.1.87.1.7.1.1), (0), (1.3.6.1.2.1.87.1.7.1.2), (0)

My feeling is that the net-snmp code will fail the table index allocation if the index used for the index allocation has multiple components with the same OID.  
 
Is there a problem with my understanding of table indexes with multiple components, a problem in net-snmp with index allocation for tables with multi component indexes or a problem with the output from AgenPro when compiling MIBs with tables with multi component indexes?
 
John Edmonds
BT Trading Systems
 



More information about the AGENTPP mailing list