[AGENT++] table index with multiple components problem

Frank Fock fock at agentpp.com
Thu Jan 17 23:51:29 CET 2008


Hello John,

This seems to be a bug in the current AgenPro code
generation template for AGENT++. You can fix it
by replacing line 208 of cpp_code.vm with

	"$subindex.printableOid"#end

(it was: "$table.printableOid"#end)

Hope this helps.

Best regards,
Frank

john.edmonds at bt.com wrote:
> 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
>  
> _______________________________________________
> AGENTPP mailing list
> AGENTPP at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/agentpp

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the AGENTPP mailing list