On Tue, 2005-06-28 at 04:18, [EMAIL PROTECTED] wrote: > Hi, Greetings, > > How does snmpd distinguish snmpget and snmpwalk requests, > by GET and GETNEXT? > In callback function varXXX(), does argument, "exact", > indicate a request is from snmpget or snmpwalk?
Yes. Or strictly, whether it's a GET and GETNEXT request. See the file 'AGENT.txt' for a fuller description. > It seems even for walk request, "exact" still could be 1. Yes - but only in very particular circumstances. If you try walking a complete subtree, "snmpwalk" should only ever send GETNEXT requests. But if you try walking a single instance, the first GETNEXT will return an irrelevant value, so snmpwalk would normally display nothing at all. So in this case (and this case *only*), snmpwalk then issues a GET request for the requested value. But the agent doesn't see "snmpwalk" requests - it just receives a series of individual GET and/or GETNEXT requests. snmpwalk is working at a slightly higher level. > Is there a way which I can know a request is from snmpget or > snmpwalk in varXXX()? That's what 'exact' is for. Dave ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
