Hi, Thanks Dave. What I've done now is:
{ // Declare the top Oid for my table oid genServerTableOid[] = { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1 }; size_t genServerTableOidLen = OID_LENGTH(genServerTableOid); // Get an unique index from the master agent u_long allocatedIndex = register_int_index(genServerTableOid, genServerTableOidLen, ANY_INTEGER_INDEX); // Strangely, it has to begin with the index 2... @todo while ( allocatedIndex <= 1 && allocatedIndex > 0 ) { allocatedIndex = register_int_index(genServerTableOid, genServerTableOidLen, ANY_INTEGER_INDEX); } // Define the oid of the first column from the index returned oid genServerAllocatedOid[] = { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, allocatedIndex }; size_t genServerAllocatedOidLen = OID_LENGTH(genServerAllocatedOid); // Define the structure of the table ... // Set the range_subid to the first column of the row handlerServerTable->range_subid = genServerAllocatedOid; // set the range_ubound ??? handlerServerTable->range_ubound = allocatedIndex; } If I test this with App1 (I launch my application several times), this works. But with App2, this is not working, probably because of the range_ubound (I'm a little bit confused with that parameter). If I understand you, I should set range_ubound to 5 (I have five columns in my row) ? I'm not really sure... >From: "Dave Shield" <[EMAIL PROTECTED]> >To: "Arnaud BODENAN" <[EMAIL PROTECTED]> >CC: net-snmp-users@lists.sourceforge.net >Subject: Re: multiple Sub-agents managing the same table >Date: Tue, 5 Sep 2006 09:20:12 +0100 > >On 05/09/06, Arnaud BODENAN <[EMAIL PROTECTED]> wrote: > > So, it seems that I have to use the attributes range_subid and >range_ubound > > of the netsnmp_handler_registration structure when I register a region >of my > > table to the master agent. > >Yes. > > > > I thought that withe range Oids between 1 and 10, > > this allowes me to reserver a region between 1 and 10 for the current > > application; > >No - you should be thinking in terms of registering a single row of the >table. >The OID range is used to indicate the list of column objects to register, >all sharing the same index value. > >Set up an OID array containing the full numeric OID - *including* >index subidentifier(s) - of the first column in this particular row. >Then use 'range_subid' to indicate which subidentifier identifies the >MIB column object, and 'range_ubound' to indicate the last valid >column. > >Repeat this for each row in turn - using the index returned from >'register_int_index' > > > > the function register_int_index returns always 1 > >What's the OID that you pass to this routine? >*That* must be the same for each subagent (typically the OID of the >table itself) - so that they know they're working with the same set of >indexes. > The OID passed to the 'register_mib' (or similar) call will be >different each time, since this refers to a particular row. But the >shared index allocation needs a common OID to register indexes >against. > >Dave > >------------------------------------------------------------------------- >Using Tomcat but need to do more? Need to support web services, security? >Get stuff done quickly with pre-integrated technology to make your job >easier >Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >_______________________________________________ >Net-snmp-users mailing list >Net-snmp-users@lists.sourceforge.net >Please see the following page to unsubscribe or change other options: >https://lists.sourceforge.net/lists/listinfo/net-snmp-users > _________________________________________________________________ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users