[AGENT++] AgenPro2 bug?

fock at agentpp.com fock at agentpp.com
Wed Nov 5 20:59:59 CET 2008


Hi Michael,

Thank for the snippets. The code generated by
2.7.2 is correct and 2.6 is not. As long as
you did not implement shared AgentX tables with
the 2.6 code, the bug would be of no harm
(I think). I will investigate that further
and will report you my findings on Monday
(I will not have the time to check it before)

Best regards,
Frank


Hi Frank,

As requested, the test MIB specification snippet:

testTable OBJECT-TYPE
	SYNTAX  SEQUENCE OF TestEntry
	MAX-ACCESS not-accessible
	STATUS  current
	DESCRIPTION
		""
	-- 1.3.6.1.4.1.1.4
	::= { testRegMIB 4 }


testEntry OBJECT-TYPE
	SYNTAX  TestEntry
	MAX-ACCESS not-accessible
	STATUS  current
	DESCRIPTION
		""
	INDEX {
		testEntryCol1,
		testEntryCol2 }
	-- 1.3.6.1.4.1.1.4.1
	::= { testTable 1 }


TestEntry ::= SEQUENCE {

	testEntryCol1 Unsigned32,
	testEntryCol2 OCTET STRING,
	testEntryCol3 OCTET STRING }


testEntryCol1 OBJECT-TYPE
	SYNTAX  Unsigned32
	MAX-ACCESS read-only
	STATUS  current
	DESCRIPTION
		""
	-- 1.3.6.1.4.1.1.4.1.1
	::= { testEntry 1 }


testEntryCol2 OBJECT-TYPE
	SYNTAX  OCTET STRING
	MAX-ACCESS read-only
	STATUS  current
	DESCRIPTION
		""
	-- 1.3.6.1.4.1.1.4.1.2
	::= { testEntry 2 }


testEntryCol3 OBJECT-TYPE
	SYNTAX  OCTET STRING
	MAX-ACCESS read-only
	STATUS  current
	DESCRIPTION
		""
	-- 1.3.6.1.4.1.1.4.1.3
	::= { testEntry 3 }


The questionable code as generated by version 2.6: 

const Oidx indOidsTestEntry[2] = {
	"1.3.6.1.4.1.1.4.1",
	"1.3.6.1.4.1.1.4.1"};


The same code as generated by version 2.7.2: 

const Oidx indOidsTestEntry[2] = {
	"1.3.6.1.4.1.1.4.1.1",
	"1.3.6.1.4.1.1.4.1.2"};


Hopefully that's enough for you to work with.  Let me know what you
find.

Thanks,
Mike

-----Original Message-----
From: fock at agentpp.com [mailto:fock at agentpp.com] 
Sent: Wednesday, November 05, 2008 9:45 AM
To: Carr,M,Michael,JGFTX C; agentpp at agentpp.org
Subject: RE: [AGENT++] AgenPro2 bug?

Hi Michael,

Can you send me the code snippets of the questionable code from 2.6 and
2.7.2?
The corresponding MIB specification snippet would be also helpful. 

I am not aware of any changes in this area.

Best regards,
Frank


Hi all,

I've had to update one of our MIBs recently and so downloaded the latest
version (2.7.2) of AgenPro2, having used version 2.6 before.  On
generating the code I noticed that there is a difference to the array of
index OIDs created for my table (which is passed into
AgentXSharedTable).

I'm only using a single index in my table and with version 2.6 of
AgenPro2 it generated the array containing the OID of the 'entry' but
with the latest version of AgenPro2 it now generates the array
containing the OID of the index.  Looking at the comments in the
agentx_subagent.h file for this parameter it says:

	 * @param indexOIDs
	 *    an array of size "size" with the OIDs of the index 
	 *    objects.

which would appear to make sense, the code generated by version 2.7.2.
of AgenPro is correct but that generated by version 2.6 of AgenPro was
incorrect.

I've tried a test MIB containing a table with a couple of indexes and
version 2.7 generates an array of OIDs with those of the two different
indexes, using 2.6 it generates an array with two of the same OID, that
of the 'entry'.

Is the code generated by version 2.7 correct and there was a bug in
version 2.6?  What are the effects of the incorrect code generated by
version 2.6?

Thanks,
Mike

_______________________________________________
AGENTPP mailing list
AGENTPP at agentpp.org
http://lists.agentpp.org/mailman/listinfo/agentpp
_______________________________________________
AGENTPP mailing list
AGENTPP at agentpp.org
http://lists.agentpp.org/mailman/listinfo/agentpp



More information about the AGENTPP mailing list