|
AGENT++
4.0.3
|
#include <request.h>
Public Types | |
| typedef NS_SNMP CTarget | TargetType |
| target type when SNMPv3 must not be supported | |
Public Types inherited from Synchronized | |
| enum | TryLockResult { LOCKED = 1, BUSY = 0, OWNED = -1 } |
Public Member Functions | |
| Request (const Pdux &, const TargetType &) | |
| Construct a Request. | |
| Request (const Request &) | |
| Copy constructor. | |
| virtual | ~Request () |
| Destructor. | |
| virtual bool | contains (const Vbx &) |
| Check whether the receiver contains a specified variable binding. | |
| virtual int | position (const Vbx &) |
| Return the position of a specified variable binding in the receiver request. | |
| virtual bool | finished () const |
| Check whether the receiver request is finished (all variable bindings have been processed). | |
| virtual bool | is_done (int) const |
| Check whether a specified variable binding (sub-request) has been processed. | |
| virtual void | finish (int, const Vbx &) |
| Finish a sub-request by setting the receivers variable binding at the given sub-request index to a specified value and marking the sub-request as done. | |
| virtual void | finish (int) |
| Mark a subrequest as done, without changing its value. | |
| virtual void | set_ready (int) |
| Set a sub-request ready for commit. | |
| virtual void | unset_ready (int) |
| Set a sub-request not-ready for commit. | |
| virtual bool | is_ready (int) const |
| Check whether a specified variable binding (sub-request) is ready to commit (applies only for SET-Requests). | |
| virtual int | first_pending () const |
| Return the index of the first pending (done == FALSE) subrequest. | |
| virtual void | error (int, int) |
| Set the error status of the receiver request. | |
| virtual Vbx | get_value (int) |
| Return the variable binding of the specified sub-request. | |
| Vbx * | search_value (const Oidx &) const |
| Get the value for a given OID if the request contains such an instance. | |
| Vbx | get_original_value (unsigned int i) |
| Gets the original variable binding of the specified sub-request. | |
| virtual NS_SNMP SnmpInt32 | get_syntax (int) |
| Return the syntax of the specified sub-request (variable binding). | |
| virtual Oidx | get_oid (int) |
| Return the object identifier of the specified sub-request. | |
| virtual void | set_oid (const Oidx &, int) |
| Set the object identifier of a specified sub-request. | |
| unsigned short | get_type () |
| Return the request type. | |
| unsigned long | get_request_id () |
| Return the request id of the receiver. | |
| unsigned long | get_transaction_id () |
| Return the agent wide unique transaction id of the receiver. | |
| int | get_error_status () |
| Return the error status of the receiver request. | |
| int | get_error_index () |
| Return the index of the sub-request that failed with an error condition. | |
| void | set_error_status (int s) |
| Set the error status of the receiver request. | |
| void | set_error_index (int i) |
| Set the error index of the receiver request. | |
| void | set_transaction_id (unsigned long id) |
| Set the transaction id of the receiver sub-request. | |
| int | subrequests () |
| Return the count of sub-requests in the receiver request. | |
| int | get_non_rep () |
| Return the count of non repetition variable bindings of a GETBULK request. | |
| int | get_rep () |
| Return the count of repetition variable bindings of a GETBULK request. | |
| int | get_max_rep () |
| Return the maximum repetition of repetition variable bindings of a GETBULK request. | |
| virtual bool | add_rep_row () |
| Add a repetition row to the GETBULK request PDU. | |
| virtual bool | init_rep_row (int) |
| Initialize a repetition row of a GETBULK request PDU. | |
| virtual void | trim_request (int) |
| Trim the request's variable bindings to a given number of elements. | |
| void | inc_outstanding () |
| Increment the number of variable bindings to be processed by one. | |
| void | dec_outstanding () |
| Decrement the number of variable bindings to be processed by one. | |
| void | no_outstanding () |
| Set the number of variable bindings to be processed to 0. | |
| Pdux * | get_pdu () |
| Return a pointer to the receiver's PDU. | |
| NS_SNMP CTarget * | get_address () |
| Return a pointer to the request's originator address. | |
| NS_SNMP snmp_version | get_snmp_version () |
| Get the request's version. | |
| MibEntry * | get_locked (int) |
| Get a pointer to the MibEntry object that has been locked for the given subrequest. | |
| void | set_locked (int, MibEntry *) |
| Set the locked MibEntry for the given subrequest id. | |
| void | set_unlocked (int) |
| Set the given subrequest as unlocked. | |
| int | lock_index (MibEntry *) |
| Determine the lock index of a MibEntry. | |
| void | trim_bulk_response () |
| Trim BULK response PDU to N+M*R variables and set OIDs of variables with END OF MIB VIEW syntax to either the corresponding request OID (R == 0) or to the last successor found. | |
Public Member Functions inherited from Synchronized | |
| Synchronized () | |
| ~Synchronized () | |
| void | wait () |
| Causes current thread to wait until another thread invokes the notify() method or the notifyAll() method for this object. | |
| bool | wait (unsigned long timeout) |
| Causes current thread to wait until either another thread invokes the notify() method or the notifyAll() method for this object, or a specified amount of time has elapsed. | |
| void | notify () |
| Wakes up a single thread that is waiting on this object's monitor. | |
| void | notify_all () |
| Wakes up all threads that are waiting on this object's monitor. | |
| bool | lock () |
| Enter a critical section. | |
| TryLockResult | trylock () |
| Try to enter a critical section. | |
| bool | unlock () |
| Leave a critical section. | |
Public Attributes | |
| u_char | phase |
Protected Member Functions | |
| Request () | |
| virtual void | init_from_pdu () |
| void | check_exception (int, Vbx &) |
| int | get_max_response_length () |
Protected Attributes | |
| Pdux * | pdu |
| Vbx * | originalVbs |
| int | originalSize |
| NS_SNMP UdpAddress | from |
| bool * | done |
| bool * | ready |
| int | outstanding |
| int | size |
| int | non_rep |
| int | max_rep |
| int | repeater |
| NS_SNMP snmp_version | version |
| unsigned long | transaction_id |
| Array< MibEntry > | locks |
| TargetType | target |
Friends | |
| class | RequestList |
| class | Mib |
| typedef NS_SNMP CTarget Request::TargetType |
target type when SNMPv3 must not be supported
| Request::Request | ( | const Pdux & | , |
| const TargetType & | |||
| ) |
|
virtual |
Destructor.
|
protected |
|
virtual |
Add a repetition row to the GETBULK request PDU.
|
protected |
|
virtual |
Check whether the receiver contains a specified variable binding.
| vb | - A variable binding. |
| void Request::dec_outstanding | ( | ) |
Decrement the number of variable bindings to be processed by one.
|
virtual |
Set the error status of the receiver request.
| index | - The index of the sub-request that failed. |
| error | - An error code describing the error condition. |
|
virtual |
Finish a sub-request by setting the receivers variable binding at the given sub-request index to a specified value and marking the sub-request as done.
| i | - The index of the sub-request to finish. |
| vb | - A variable binding. |
|
virtual |
Mark a subrequest as done, without changing its value.
| index | the index of the sub-request to finish. |
|
virtual |
Check whether the receiver request is finished (all variable bindings have been processed).
|
virtual |
Return the index of the first pending (done == FALSE) subrequest.
|
inline |
Return a pointer to the request's originator address.
(only available without _SNMPv3)
|
inline |
Return the index of the sub-request that failed with an error condition.
|
inline |
Return the error status of the receiver request.
| MibEntry* Request::get_locked | ( | int | ) |
|
inline |
Return the maximum repetition of repetition variable bindings of a GETBULK request.
|
protected |
|
inline |
Return the count of non repetition variable bindings of a GETBULK request.
|
virtual |
Return the object identifier of the specified sub-request.
| index | - An index of a sub-request (starting from 0). |
|
inline |
Gets the original variable binding of the specified sub-request.
| index | the zero-based index of the sub-request. |
|
inline |
Return a pointer to the receiver's PDU.
|
inline |
Return the count of repetition variable bindings of a GETBULK request.
|
inline |
Return the request id of the receiver.
|
inline |
Get the request's version.
|
virtual |
Return the syntax of the specified sub-request (variable binding).
| index | - An index of a sub-request (starting from 0). |
|
inline |
Return the agent wide unique transaction id of the receiver.
|
inline |
Return the request type.
|
virtual |
Return the variable binding of the specified sub-request.
| index | - An index of a sub-request (starting from 0). |
| void Request::inc_outstanding | ( | ) |
Increment the number of variable bindings to be processed by one.
|
protectedvirtual |
|
virtual |
Initialize a repetition row of a GETBULK request PDU.
| row | the repetition row to be initialized (counted from 1, row 0 is the non-repeated first row) |
|
virtual |
Check whether a specified variable binding (sub-request) has been processed.
| i | - The index (starting from 0) of the variable binding to check. |
|
virtual |
Check whether a specified variable binding (sub-request) is ready to commit (applies only for SET-Requests).
| i | - The index (starting from 0) of the variable binding to check. |
| int Request::lock_index | ( | MibEntry * | ) |
Determine the lock index of a MibEntry.
The lock index is the index of the subrequest that acquired a lock for the given MibEntry.
| entry | a pointer to a MibEntry object. |
| void Request::no_outstanding | ( | ) |
Set the number of variable bindings to be processed to 0.
|
virtual |
Return the position of a specified variable binding in the receiver request.
| vb | - A variable binding. |
|
inline |
Set the error index of the receiver request.
| s | - The sub-request index of a failed sub-request. |
|
inline |
Set the error status of the receiver request.
| s | - An error status. |
| void Request::set_locked | ( | int | , |
| MibEntry * | |||
| ) |
|
virtual |
Set the object identifier of a specified sub-request.
| oid | - An object identifier. |
| index | - An index of a sub-request (starting from 0). |
|
virtual |
Set a sub-request ready for commit.
| i | - The index of the sub-request to be set ready for commit. |
|
inline |
Set the transaction id of the receiver sub-request.
| id | - An unique transaction id. |
| void Request::set_unlocked | ( | int | ) |
Set the given subrequest as unlocked.
| ind | a subrequest index. |
|
inline |
Return the count of sub-requests in the receiver request.
| void Request::trim_bulk_response | ( | ) |
Trim BULK response PDU to N+M*R variables and set OIDs of variables with END OF MIB VIEW syntax to either the corresponding request OID (R == 0) or to the last successor found.
N = nonrep, M = maxrep, R = rep.
This method does is a NOP when called on a request type other than GETBULK.
|
virtual |
Trim the request's variable bindings to a given number of elements.
Elements are removed starting from the end.
| count | the count of variable bindings that should remain. |
|
virtual |
Set a sub-request not-ready for commit.
| i | - The index of the sub-request to be set not-ready for commit. |
|
friend |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| u_char Request::phase |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
1.8.2