Thanks Frank for the quick reply. That was helpful.

best,
Pradip

On Fri, Oct 9, 2009 at 12:00 AM, Frank Fock <[email protected]> wrote:

> Hi Pradip,
>
> The toSubIndex(..) methods of the SMI types
> are used to form an index OID from SNMP values.
> It does *not* hash the values. It simply
> transforms them. For OctetStrings, it uses each
> characters decimal value as OID sub-identifier.
>
> To generate a integer index, you can use:
>
> IndexGenerator ig = new IndexGenerator(new Integer32(0));
> OID nextIndex = ig.nextSubIndex();
>
> Regards,
> Frank
>
> pradip de wrote:
>
>> Hi,
>> What is the typical technique for generating an index to add a row in a
>> table ? What does the OctetString.toSubIndex(boolean) actually do? Does it
>> generate a OID index by using some kind of hashing mechanism over the
>> OCtetString? Should I use an OctetString that I can assume to be unique
>> for
>> each row I add and use it to create an index? I have no problem with this
>> but sometimes it generates a really long OID for that field. How do I get
>> index values of single integers incremented each time I add a row?
>> thanks,
>> Pradip
>> _______________________________________________
>> SNMP4J mailing list
>> [email protected]
>> http://lists.agentpp.org/mailman/listinfo/snmp4j
>>
>
> --
> AGENT++
> http://www.agentpp.com
> http://www.snmp4j.com
> http://www.mibexplorer.com
> http://www.mibdesigner.com
>
>
_______________________________________________
SNMP4J mailing list
[email protected]
http://lists.agentpp.org/mailman/listinfo/snmp4j

Reply via email to