Re: GET/SET variable in Sub-agent

2004-10-11 Thread Dave Shield
> You *SHOULD* set the error in the request, per standard method, and > return SNMP_ERR_NOERROR! OK - I'll update TBB accordingly, and tweak the 'mib2c' templates that I submitted recently. (I don't think that breaks the 5.2 "feature freeze") Can I suggest that you mention this in the handler d

Re: GET/SET variable in Sub-agent

2004-10-08 Thread Wes Hardaker
> On Wed, 06 Oct 2004 15:45:03 +0100, Dave Shield <[EMAIL PROTECTED]> said: Dave> When I asked Wes about this, he said that he'd started by using the Dave> SNMP_ERR_xxx value as the return value from the function, and later Dave> moved to setting this in the request structure. Yep. I wanted

Re: GET/SET variable in Sub-agent

2004-10-06 Thread Coders
On Wed, 06 Oct 2004 15:58:10 +0100 Dave wrote: DS> netsnmp_handler_registration *reg = DS> netsnmp_create_handler_registration( ..., handle_myObject, ... ); DS> netsnmp_watcher_info *watch = DS> netsnmp_create_watcher_info( buf, sizeof( buf ), DS>

Re: GET/SET variable in Sub-agent

2004-10-06 Thread Dave Shield
> One more thing, is there a way to make net-snmp read my MIB module and > then use the library to find out what are de DEFAULT values and > allowable range of the INTEGER scalars defined in the MIB module Not at run-time - no. (Well, it's obviously possible, but I don't have the code to do it)

Re: GET/SET variable in Sub-agent

2004-10-06 Thread Dave Shield
Dave> So the full code for a watched writable scalar helper would be: Dave> Dave>netsnmp_set_request_error( reqinfo, request, Dave> SNMP_ERR_WRONGVALUE ); Dave>return SNMP_ERR_WRONGVALUE; Robert> I'm not sure ab

Re: GET/SET variable in Sub-agent

2004-10-06 Thread Coders
On Wed, 06 Oct 2004 10:12:20 +0100 Dave wrote: DS> So the full code for a watched writable scalar helper would be: DS> DS>netsnmp_set_request_error( reqinfo, request, DS> SNMP_ERR_WRONGVALUE ); DS>return SNMP_ERR

Re: GET/SET variable in Sub-agent

2004-10-06 Thread Ivens Porto
Dave Shield wrote: In my sub-agent I will have a few INTEGER variables (not a table, plain INTERGERs) that will be GET/SET. For the moment I'm thinking about using netsnmp_register_int_instance() with the default integer handler. Are these scalar MIB objects? Or individual instances (e.g. as pa

Re: GET/SET variable in Sub-agent

2004-10-06 Thread Dave Shield
> In my sub-agent I will have a few INTEGER variables (not a table, plain > INTERGERs) that will be GET/SET. For the moment I'm thinking about using > netsnmp_register_int_instance() with the default integer handler. Are these scalar MIB objects? Or individual instances (e.g. as part of a wide