On Thu, 2005-06-16 at 18:34, George, Geo wrote:
> Thanks Robert.
> So is there any way I can validate the user input? That is, if user
> tries to set an OID which is not valid (Not in specific view /not able
> to retrieve info / type is not as we expect etc), then it should return
> BAD_VALUE.

There are a number of examples of how to validate SET assignments
in the 'agent/mibgroup/' subtree.  Look for mention of the call
   netsnmp_set_request_error()

However, please note that 'badValue' is only relevant to SNMPv1
requests.  MIB module handlers should set the (more detailed)
SNMPv2 errors instead, and the main agent framework will convert
this into an SNMPv1 error when appropriate.

Note also that the VACM-based access checks will be applied
*before* calling your MIB module handler.  So if the OID is not
in view, then the main agent framework will reject the request,
and your handler will not be called.

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-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