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

List of all members.

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 boolean 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:
oid the oid part of the new variable binding.
value the value part of the new variable binding.


Member Function Documentation

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]

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 boolean 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::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.

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.


Friends And Related Function Documentation

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


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

Generated on Fri May 29 22:36:56 2009 for AGENT++ by  doxygen 1.5.6