Re: Parameters to netsnmp_table_set_add_indexes()

Joshua Tolley <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <20090609141906.GC20209@eddie>
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 <[email protected]> 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

------------------------------------------------------------------------------
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
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
signature.asc (application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkoub1oACgkQRiRfCGf1UMNUewCghEv80ANRH3BBjDR2O60hNVW0
oQwAn0lyiJomoSBiRQh6U/EK8FMUoga+
=gjbH
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.