AGENT++  4.0.3
Public Member Functions | Static Public Member Functions | Friends | List of all members
Vbx Class Reference

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>

Inheritance diagram for Vbx:
MibStaticEntry

Public Member Functions

 Vbx ()
 
 Vbx (const NS_SNMP Vb &vb)
 
 Vbx (const NS_SNMP Oid &oid)
 
 Vbx (const NS_SNMP Oid &oid, const NS_SNMP SnmpSyntax &val)
 Constructor with oid and value.
 
Oidx get_oid () const
 Return the oid value of the receiver.
 
void get_oid (Oidx &oid) const
 
void clear ()
 Clear the content of the variable binding.
 
Vbxclone () const
 

Static Public Member Functions

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.
 

Friends

int operator== (const Vbx &, const Vbx &)
 

Detailed Description

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

Constructor & Destructor Documentation

Vbx::Vbx ( )
inline
Vbx::Vbx ( const NS_SNMP Vb &  vb)
inline
Vbx::Vbx ( const NS_SNMP Oid &  oid)
inline
Vbx::Vbx ( const NS_SNMP Oid &  oid,
const NS_SNMP SnmpSyntax &  val 
)
inline

Constructor with oid and value.

Parameters
oidthe oid part of the new variable binding.
valuethe value part of the new variable binding.

Member Function Documentation

void Vbx::clear ( )

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
vbxArray1an array of n Vbx variable bindings.
vbxArray2an array of n Vbx variable bindings.
nthe 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
vbsreturns a pointer to an array of variable bindings. The caller has to delete the pointer if success is returned.
sizereturns the size of the above array.
bufa 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.
bufsizethe 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
vbsa pointer to an array of variable bindings.
sizethe size of the above array.
bufreturns 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.
bufsizethe size of the returned character stream.
Returns
0 on success.

Friends And Related Function Documentation

int operator== ( const Vbx ,
const Vbx  
)
friend

The documentation for this class was generated from the following file: