> From: tresh tresh [mailto:xtresh@gmail.com]
> Sent: Thursday, October 16, 2008 8:57 AM

> can somebody describe me how snmpwalk work?

Perhaps, but there is no point in doing so. It will use some combination of GET, GET-NEXT, and GET-BULK (implemented within the agent as get-next, I believe) requests. It shouldn't matter, though, as your subagent must be able to handle all of these in any order.

> Does it run the
> getnext request all the time? Is that it?

Again, don't worry about this.

> And how does it
> finish?

It finds itself past the end of the tree it's walking, and discards the extra response(s).

> I suppose getnext will return the next object even if
> it is in another subtree than in the one which was requested.

Yes, but the subagent does not, as it cannot know which MIBs are registered.

> In other words, let's say I request for an OID which is the
> last one in some subtree. Getnext will return an next OID
> no matter it's in a different subtree. Am I right here?


> But snmpwalk stops itself when it has got all the data in the
> specified subtree. For example, snmpwalk -v 1 -c public
> computer.com system will print just OIDs in the system subtree.


> I want to implement my own mib using just a simple program
> and pass_persist directive.

Hyark, hyark! "Simple" program... the "Simple" is all in the Network Management Protocol - none left for the subagents!

> I don't exactly know how to
> implement getnext comand.

You don't.

> What should the program return when
> the last OID in my mib is requested by getnext ?

The pass_persist documentation in the snmpd.conf manpage explains exactly how your program must respond to agent requests. Just implement that spec.



This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
Net-snmp-users mailing list
Please see the following page to unsubscribe or change other options: