#include <snmp_textual_conventions.h>
Public Member Functions | |
TestAndIncr (const Oidx &) | |
virtual | ~TestAndIncr () |
virtual long | get_state () |
virtual void | set_state (long) |
virtual int | set (const Vbx &) |
Set the receiver's value and backup its old value for a later undo. | |
virtual boolean | value_ok (const Vbx &) |
Check whether the receiver's value may be set to the given new value. | |
virtual int | prepare_set_request (Request *, int &) |
Let the receiver prepare a SNMP SET subrequest. | |
virtual boolean | is_volatile () |
Check whether the entry is volatile or not. |
Represents integer-valued information used for atomic operations. When the management protocol is used to specify that an object instance having this syntax is to be modified, the new value supplied via the management protocol must precisely match the value presently held by the instance. If not, the management protocol set operation fails with an error of `inconsistentValue'. Otherwise, if the current value is the maximum value of 2^31-1 (2147483647 decimal), then the value held by the instance is wrapped to zero; otherwise, the value held by the instance is incremented by one. (Note that regardless of whether the management protocol set operation succeeds, the variable- binding in the request and response PDUs are identical.)
The value of the ACCESS clause for objects having this syntax is either `read-write' or `read-create'. When an instance of a columnar object having this syntax is created, any value may be supplied via the management protocol.
When the network management portion of the system is re- initialized, the value of every object instance having this syntax must either be incremented from its value prior to the re-initialization, or (if the value prior to the re- initialization is unknown) be set to a pseudo-randomly generated value."
This object for example is used to facilitate modification of table entries in the SNMP-TARGET-MIB module by multiple managers. In particular, it is useful when modifying the value of the snmpTargetAddrTagList object.
The procedure for modifying the snmpTargetAddrTagList object is as follows:
1. Retrieve the value of snmpTargetSpinLock and of snmpTargetAddrTagList.
2. Generate a new value for snmpTargetAddrTagList.
3. Set the value of snmpTargetSpinLock to the retrieved value, and the value of snmpTargetAddrTagList to the new value. If the set fails for the snmpTargetSpinLock object, go back to step 1."
TestAndIncr::TestAndIncr | ( | const Oidx & | ) |
virtual TestAndIncr::~TestAndIncr | ( | ) | [virtual] |
virtual long TestAndIncr::get_state | ( | ) | [virtual] |
virtual void TestAndIncr::set_state | ( | long | ) | [virtual] |
virtual int TestAndIncr::set | ( | const Vbx & | vb | ) | [virtual] |
Set the receiver's value and backup its old value for a later undo.
vb | - The variable binding that holds the new value. |
Reimplemented from MibLeaf.
virtual boolean TestAndIncr::value_ok | ( | const Vbx & | ) | [virtual] |
Check whether the receiver's value may be set to the given new value.
v | - A new value. |
Reimplemented from MibLeaf.
virtual int TestAndIncr::prepare_set_request | ( | Request * | , | |
int & | ||||
) | [virtual] |
Let the receiver prepare a SNMP SET subrequest.
req | - A pointer to the whole SNMP SET request. | |
ind | - The index of the subrequest to be processed. |
Reimplemented from MibLeaf.
virtual boolean TestAndIncr::is_volatile | ( | ) | [inline, virtual] |
Check whether the entry is volatile or not.
Reimplemented from MibEntry.