Hello,

I'm coding a small MIB with embedded perl and I need to proccess SET
request. NetSNMP::agent's API shows 7 different SET states:

               MODE_SET_ACTION
               MODE_SET_BEGIN
               MODE_SET_COMMIT
               MODE_SET_FREE
               MODE_SET_RESERVE1
               MODE_SET_RESERVE2
               MODE_SET_UNDO

Where could I get an explanation for them? Why don't we have one and
only MODE_SET state (like in GET or GETNEXT)?

Really I only need to implement a simple SET: my program should check
whether received OID is the right one, then store the value and exit.
I've thought of implementing all of this in one state (for instance,
MODE_SET_RESERVE1), but I don't know if that's not good...

Example code for man page states the following:

"...
                       } elsif ($request_info->getMode() ==
MODE_SET_RESERVE1) {
                           if ($oid != new
NetSNMP::OID(".1.3.6.1.4.1.8072.9999.9999.7375.1.0")) {  # do error
checking here
                               $request->setError($request_info,
SNMP_ERR_NOSUCHNAME);
                           }
                       } elsif ($request_info->getMode() ==
MODE_SET_ACTION) {
                           # ... (or use the value)
                           $value = $request->getValue();
..."


Is there any constrain which avoid to getValue() in MODE_SET_RESERVE1
state? Does setError() only works on MODE_SET_RESERVE1 state? The
example doesn't clear things up for me...

Any good explanation is welcome. TIA.

Cheers,
-Roman





-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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