[AGENT++] Beginners MibTable Question

Arjan Knepper arjan.knepper at hacousto.com
Tue Aug 2 11:40:28 CEST 2005


Hello all,

First of all I have to say: "Thank you for these libs! Saved me a lot of 
time already!"

I'm implemeting a MibTable with only one column (Snmp_pp :: IpAddress) 
which should also be the INDEX. see code snipped below.

Q1. What does the struct index_info do/describe?
index_info :: type    : ?? sorting/indexing of table-entries ??
index_info :: implied : ??
index_info :: min     : ??
index_info :: max     : ??


Q2. The code below seems to allows duplicate value's. How do I avoid 
that? Should I not use the snmpRowStatus mechanism?

const index_info  TBL_INDEX [ 1 ] = {  { sNMP_SYNTAX_IPADDR, FALSE, 1, 1 
} };

DestinationTable :: DestinationTable ()
   : MibTable ( oidDestinationEntry, TBL_INDEX, 1 )         // NOT the 
oidDestinationTable but the Entry!
{
   add_col ( new  MibLeaf       ( "1", READCREATE, new  IpAddress ( 
"0.0.0.0" ) ) );
   add_col ( new  snmpRowStatus ( "2", READCREATE ) );
}


Q3. Is there some sample describing the steps needed to create a simple 
table in which rows can be added and deleted preferable with a mib.

Thanks.
Arjan



More information about the AGENTPP mailing list