The Vbx class is a sub class of Vb that provides additional methods for manipulating SNMP variable bindings values.
More...
#include <snmp_pp_ext.h>
|
| static bool | equal (Vbx *, Vbx *, int) |
| | Compare two Vbx arrays for equality.
|
| |
| static int | to_asn1 (Vbx *, int, unsigned char *&, int &) |
| | Encode a given array of variable bindings into a octet stream using ASN.1 (BER).
|
| |
| static int | from_asn1 (Vbx *&, int &, unsigned char *&, int &) |
| | Decode a character stream that holds BER encoded sequence of variable bindings into an array of variable bindings.
|
| |
The Vbx class is a sub class of Vb that provides additional methods for manipulating SNMP variable bindings values.
AGENT++ uses Vbx instead of Vb. Most of the base methods of Vb are redefined as const methods.
- Version
- 3.4
- Author
- Frank Fock
| Vbx::Vbx |
( |
const NS_SNMP Oid & |
oid | ) |
|
|
inline |
Constructor with oid and value.
- Parameters
-
| oid | the oid part of the new variable binding. |
| value | the value part of the new variable binding. |
Clear the content of the variable binding.
The content of the receiver will be the same as after creating it by Vbx()
| Vbx* Vbx::clone |
( |
| ) |
const |
|
inline |
| static bool Vbx::equal |
( |
Vbx * |
, |
|
|
Vbx * |
, |
|
|
int |
|
|
) |
| |
|
static |
Compare two Vbx arrays for equality.
- Parameters
-
| vbxArray1 | an array of n Vbx variable bindings. |
| vbxArray2 | an array of n Vbx variable bindings. |
| n | the number of elements in the above arrays. |
- Returns
- TRUE if the oids and the values of both variable binding arrays are equal.
| static int Vbx::from_asn1 |
( |
Vbx *& |
, |
|
|
int & |
, |
|
|
unsigned char *& |
, |
|
|
int & |
|
|
) |
| |
|
static |
Decode a character stream that holds BER encoded sequence of variable bindings into an array of variable bindings.
- Parameters
-
| vbs | returns a pointer to an array of variable bindings. The caller has to delete the pointer if success is returned. |
| size | returns the size of the above array. |
| buf | a pointer to a character stream holding a BER encoded sequence of variable bindings. After execution, this pointer will point to first character in buf after the decoded sequence. |
| bufsize | the number of characters left in the buffer (for decoding). This will be decremented by the amount of decoded bytes. |
| Oidx Vbx::get_oid |
( |
| ) |
const |
|
inline |
Return the oid value of the receiver.
- Returns
- a copy of the oid value of the receiver.
| void Vbx::get_oid |
( |
Oidx & |
oid | ) |
const |
|
inline |
| static int Vbx::to_asn1 |
( |
Vbx * |
, |
|
|
int |
, |
|
|
unsigned char *& |
, |
|
|
int & |
|
|
) |
| |
|
static |
Encode a given array of variable bindings into a octet stream using ASN.1 (BER).
Note: The list of variable bindings is encoded as a sequence of oid/value pairs.
- Parameters
-
| vbs | a pointer to an array of variable bindings. |
| size | the size of the above array. |
| buf | returns a pointer to the character stream that holds the BER encoding. Note that the user of this method is responsible to free the memory allocated for buf. |
| bufsize | the size of the returned character stream. |
- Returns
- 0 on success.
| int operator== |
( |
const Vbx & |
, |
|
|
const Vbx & |
|
|
) |
| |
|
friend |
The documentation for this class was generated from the following file: