[AGENT++] index values and dynamic MibTables

Frank Fock fock at agentpp.com
Wed Jul 4 19:08:27 CEST 2007


Hello Razvan,

I have too few information to fully understand
your problem, but I guess that you added a
"not-accessible" index column to your table
which you should not - because it is not
accessible and therefore it should not be
implemented as MibLeaf.

Hope this helps.

Best regards,
Frank

Razvan Cojocaru wrote:
> Hello.
> 
> My MIB looks like this:
> 
> -- SNIP --
> 
> MyTableType ::= SEQUENCE {
>     tableIndex Integer32,
>     MyTablePriority Unsigned32,
>     MyTableSenders OCTET STRING,
>     MyTableRecipients OCTET STRING
> }
> 
> -- SNIP --
> 
> My C++ code looks like this:
> 
> -- SNIP --
> 
> MyTable::MyTable()
>     : MibTable(OID)
> {
>     add_col(new MibLeaf("1", READWRITE, new SnmpUInt32(0), true));
>     add_col(new MibLeaf("2", READWRITE, new OctetStr(""), true));
>     add_col(new MibLeaf("3", READWRITE, new OctetStr(""), true));
> }
> 
> -- SNIP --
> 
> When walking my table, I get errors if I register the MIB file, on
> account of the index. Apparently this tells the master agent that the .1
> OID should be the index, not my "1" MibLeaf.
> 
> So far I've added these critters to the mix:
> 
> const index_info indMyTable[1] = {
>   { sNMP_SYNTAX_INT, FALSE, 1, 1 }
> };
> 
> and I'm passing them along to the MibTable constructor, but I'm not sure
> that's the right thing to do under the circumstances. Should I manually
> add an index column from "1" and start the others from "2"? What would
> you recommend for me to do so that the MIB file will correspond to my code?
> 
> Thanks for your time!
> 
> 

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




More information about the AGENTPP mailing list