Re: Parameters to netsnmp_table_set_add_indexes()

Vincent Bernat <[email protected]>
Newsgroups gmane.network.net-snmp.user
Organization One Piece
Message-ID <[email protected]>
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.
-- 
BOFH excuse  #383: Your processor has  taken a ride to  Heaven's Gate on
the UFO behind Hale-Bopp's comet.

------------------------------------------------------------------------------
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
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.