#include <vb.h>
Collaboration diagram for Vb:
Variable binding lists in SNMP++ are represented as arrays of Vb objects. Vb objects are passed to and from SNMP objects to provide getting or setting MIB values. The vb class keeps its own memory for objects and does not utilize pointers to external data structures.
Definition at line 99 of file vb.h.
Public Member Functions | |
| Vb () | |
| Constructor with no arguments. | |
| Vb (const Oid &oid) | |
| Constructor to initialize the oid. | |
| Vb (const Vb &vb) | |
| Copy constructor. | |
| ~Vb () | |
| Destructor that frees all allocated memory. | |
| Vb & | operator= (const Vb &vb) |
| Overloaded assignment operator. | |
| Vb * | clone () const |
| Clone operator. | |
| void | set_oid (const Oid &oid) |
| Set the oid from another oid. | |
| void | get_oid (Oid &oid) const |
| Get the oid portion. | |
| const Oid & | get_oid () const |
| Get the oid portion as a const. | |
| void | set_value (const SnmpSyntax &val) |
| Set the value using any SnmpSyntax object. | |
| void | set_value (const int i) |
| Set the value with an int. | |
| void | set_value (const long i) |
| Set the value with an int. | |
| void | set_value (const unsigned long i) |
| Set the value with an unsigned long int. | |
| void | set_value (const char *ptr) |
| Set value using a null terminated string. | |
| void | set_value (const unsigned char *ptr, const unsigned int len) |
| Set value using a string and length. | |
| void | set_null () |
| Set the value portion of the vb to null, if its not already. | |
| int | get_value (SnmpSyntax &val) const |
| Get the value using a SnmpSyntax object. | |
| int | get_value (int &i) const |
| Get the value. | |
| int | get_value (long &i) const |
| Get the value. | |
| int | get_value (unsigned long &i) const |
| Get the value. | |
| int | get_value (unsigned char *ptr, unsigned long &len) const |
| Get the value. | |
| int | get_value (unsigned char *ptr, unsigned long &len, const unsigned long maxlen) const |
| Get the value. | |
| int | get_value (char *ptr) const |
| Get the value. | |
| SmiUINT32 | get_syntax () const |
| Return the syntax or the exception status. | |
| void | set_syntax (const SmiUINT32 syntax) |
| Set the syntax. | |
| void | set_exception_status (const SmiUINT32 status) |
| Set the exception status. | |
| const char * | get_printable_value () const |
| Return a formatted version of the value. | |
| const char * | get_printable_oid () const |
| Return a formatted version of the Oid. | |
| bool | valid () const |
| Return the validity of a Vb object. | |
| int | get_asn1_length () const |
| Return the space needed for serialization. | |
| void | clear () |
| Reset the object. | |
Protected Member Functions | |
| void | free_vb () |
| Free the value portion. | |
Protected Attributes | |
| Oid | iv_vb_oid |
| SnmpSyntax * | iv_vb_value |
| SmiUINT32 | exception_status |
Friends | |
| DLLOPT friend void | set_exception_status (Vb *vb, const SmiUINT32 status) |
| deprecated! Use Vb::set_exception_status() | |
|
|
Constructor with no arguments. This constructor creates an unitialized vb. Definition at line 111 of file vb.h. References SNMP_CLASS_SUCCESS. |
|
|
Constructor to initialize the oid. This constructor creates a vb with oid portion initialized. Definition at line 118 of file vb.h. References oid, and SNMP_CLASS_SUCCESS. |
|
|
Copy constructor.
|
|
|
Destructor that frees all allocated memory.
|
|
|
Reset the object.
|
|
|
Clone operator.
|
|
|
Free the value portion.
|
|
|
Return the space needed for serialization.
|
|
|
Get the oid portion as a const.
|
|
|
Get the oid portion.
Definition at line 154 of file vb.h. References oid. |
|
|
Return a formatted version of the Oid.
|
|
|
Return a formatted version of the value.
|
|
|
Return the syntax or the exception status.
|
|
|
Get the value. This method will only return success if the value of the vb is SMI OCTET.
|
|
||||||||||||||||
|
Get the value. This method will only return success if the value of the vb is SMI OCTET.
|
|
||||||||||||
|
Get the value. This method will only return success if the value of the vb is SMI OCTET.
|
|
|
Get the value. This method will only return success if the value of the vb can be mapped to an unsigned long (SMI types uint32, counter32, gauge and timeticks).
|
|
|
Get the value. This method will only return success if the value of the vb is SMI INT32.
|
|
|
Get the value. This method will only return success if the value of the vb is SMI INT32.
|
|
|
Get the value using a SnmpSyntax object.
|
|
|
Overloaded assignment operator.
|
|
|
Set the exception status.
|
|
|
Set the value portion of the vb to null, if its not already.
|
|
|
Set the oid from another oid.
Definition at line 146 of file vb.h. References oid. |
|
|
Set the syntax. The Value portion of the Vb will be deleted and a new value portion is allocated with it's default value (zero).
|
|
||||||||||||
|
Set value using a string and length. The syntax of the Vb will be set to SMI octet. |
|
|
Set value using a null terminated string. The syntax of the Vb will be set to SMI octet. |
|
|
Set the value with an unsigned long int. The syntax of the Vb will be set to SMI UINT32. |
|
|
Set the value with an int. The syntax of the Vb will be set to SMI INT32. |
|
|
Set the value with an int. The syntax of the Vb will be set to SMI INT32. |
|
|
Set the value using any SnmpSyntax object.
Definition at line 169 of file vb.h. References SnmpSyntax::clone(). |
|
|
Return the validity of a Vb object.
|
|
||||||||||||
|
deprecated! Use Vb::set_exception_status()
|
|
|
|
|
|
|
|
|
|
1.3.2