On Fri, 19 Nov 2004 11:02:35 +0800 Jim wrote:
JS>      What is the possible approach to enhance the current agent to return
JS>      multiple "set" of data in one walk?  The table is defined as variable4
JS>      {}.

Did you generate the code using mib2c?

JS I think to define the multiple sets of data for that  table, I
JS>      need to add the "abcTableSetIndex" in that variable. This number is
JS>      variant - meaning it depends on how many set of data the agent will
JS>      poll out from the share memory.

Exactly. There is only one catch here - indexes aren't supposed to change. For
example, if you have 3 sets of data, the indexes would be (1,2,3). If the
second set goes away, the indexes must be (1,3). You can't just renumber to
(1,2). And if set 2 comes back, it should be 2 again. One could make a case
for just using 4, so you have (1,3,4), but you definitely don't want to end
up with (1,2(previously 3),3(previously 2)). So you will need some way of
uniquely identifying a set.

JS>      How do I specify the oid for each
JS>      table entry for each different set of data, since the number of set is
JS>      unknown at the time this variable is defined?

You don't specify indexes. You define the basic table structure (columns), and
the indexes are dealt with at run-time.

I haven't done old-api code in a while, but there are tons of examples in the
code. There are helper functions (header_simplex, header_complex) to help with
indexes in the old-api code.

-- 
Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>  
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users>

You are lost in a twisty maze of little standards, all different. 


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
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

Reply via email to