>> "Amrani, Shachar" <[EMAIL PROTECTED]> wrote:
> 1. How do I get an array size ? 
>         (what I mean is: if I put the root MIB and I want to know how
>         many children it has?)

On Thu, 2005-04-07 at 09:39, K M wrote:
> 1) U cannot know the number of children under a node, but u can
> traverse the child list using -
> struct tree *tp, *temp;
> //Assing tp to the parent of interest here...
> for (temp = tp->child_list; temp; temp=temp->next_peer)

Careful.  That's true enough if you're interested in the
abstract structure of the overall MIB tree, but not if
you want to know about the data returned by a particular agent.

The code above is looking at how many MIB objects (not instances)
the *client* knows about.  This is purely controlled by which
MIB files are loaded by that client.

It's got nothing to do with what information a particular
agent might return.  The agent might well support some values
that the client doesn't have MIBs for (so wouldn't be included
in the tp->child_list).   And the agent almost certainly won't
implement everything that the client knows about.
  And of course, the agent is returning *instances*, not objects,
so might return several values relating to a single MIB (table)
object.

The only way to discover the children of a given MIB root
as far as the *agent* is concerned, is to walk that subtree,
and parse the results.

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

Reply via email to