On Tue, Jun 09, 2009 at 08:10:49AM +0200, Vincent Bernat wrote:
> OoO En  cette fin  de nuit blanche  du mardi  09 juin 2009,  vers 05:14,
> Joshua Tolley <eggyk...@gmail.com> disait :
> 
> > I've noticed that mib2c's generated code makes calls to
> > netsnmp_table_set_add_indexes() something like this one:
> 
> > netsnmp_table_set_add_indexes(table_set, 
> >     ASN_OCTET_STR,  /* index: firstIndexField */
> >     ASN_INTEGER,    /* index: secondIndexField */ 
> >     ASN_INTEGER,    /* index: thirdIndexField */
> >     0); 
> 
> > What's the final 0 argument for? I've been unable to answer that question 
> > for
> > myself. I've guessed (correctly, I hope) that should I want to add indexes 
> > to
> > a table registration one at a time, rather than all at once, I can call
> > netsnmp_table_helper_add_index() once per index. But I'm wondering if I need
> > to add a 0 to the list of index types I pass to
> > netsnmp_table_helper_add_index(). Thanks in advance for any answers you can
> > give.
> 
> netsnmp_table_helper_add_index   accepts    an   arbitrary   number   of
> arguments. The final  0 is the way to let this  function know that there
> is no more  argument. So, even if  you only pass one index,  you need to
> add the final 0.

That makes sense. I'll leave it off when I add indexes one at a time. Thanks.

- Josh / eggyknap

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
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

Reply via email to