On Sun, 2005-04-03 at 14:00, Jim Su wrote: > I simply want the agent to "list" all the configured modules
Nope - that's not how the agent works. The agent is asked for a particular value - either "give me this value" or "give me the next value after this". It's the *client* side (snmpwalk) that uses this to list the configured modules, by sending a sequence of requests. The agent treats each request completely independently. > Will a header_simple_table routine sufficient enough to handle > the iteration? That depends on the definition of your MIB. If it's a simple integer-indexed array (1-N), then yes. > If the header_simple_table routine is sufficient I assume > the MAX_VALID_INDEX is to be set to the total possible number > of moduleId? Yes. Quite correct. > I think what I am not clear about is how all the rows of data > in the table are returned? Each time the var_table() returns one > value and goes on the next oid, isn't it? No - each time, the var_table() routine returns one value. End of story (as far as the agent is concerned). It's *snmpwalk* that goes on to the next OID. > How do I "list" them (the same oid but different instance) header_simple_table() will handle most of this for you. Call that routine, extract the index value from the OID (i.e. the last entry in the 'name' array), and the return the requested value (vp->magic) from that particular row. Dave ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ 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