73 #ifdef SNMP_PP_NAMESPACE 113 Vb(
const Vb &vb) : iv_vb_value(0) { *
this = vb; };
123 Vb& operator=(
const Vb &vb);
159 { free_vb(); iv_vb_value = val.
clone(); };
174 { free_vb(); iv_vb_value =
new SnmpUInt32(i); };
184 { free_vb(); iv_vb_value =
new SnmpInt32(i); };
194 { free_vb(); iv_vb_value =
new SnmpUInt32(i); };
202 { free_vb(); iv_vb_value =
new OctetStr(ptr); };
209 void set_value(
const unsigned char *ptr,
const unsigned int len)
210 { free_vb(); iv_vb_value =
new OctetStr(ptr, len); };
239 int get_value(
int &i)
const;
252 int get_value(
unsigned int &i)
const;
263 int get_value(
long &i)
const;
276 int get_value(
unsigned long &i)
const;
305 int get_value(
unsigned char *ptr,
unsigned long &len)
const;
325 int get_value(
unsigned char *ptr,
327 const unsigned long maxlen,
328 const bool add_null_byte =
false)
const;
344 int get_value(
char *ptr)
const;
355 {
return ((iv_vb_value) ? iv_vb_value->clone() : 0); };
384 { free_vb(); exception_status = status; };
396 const char *get_printable_value()
const;
404 {
return iv_vb_oid.get_printable(); };
418 int get_asn1_length()
const;
423 void clear() { free_vb(); iv_vb_oid.clear(); };
437 #ifdef SNMP_PP_NAMESPACE 441 #endif // _SNMP_VB_H_
void set_value(const int i)
Set the value with an int.
void set_value(const SnmpSyntax &val)
Set the value using any SnmpSyntax object.
void set_oid(const Oid &oid)
Set the oid from another oid.
~Vb()
Destructor that frees all allocated memory.
The Vb class is the encapsulation of the SNMP variable binding.
SmiUINT32 get_exception_status() const
Get the exception status.
Vb(const Vb &vb)
Copy constructor.
SnmpSyntax * clone_value() const
Clone the value portion of the variable binding.
32 bit signed integer class.
void set_exception_status(const SmiUINT32 status)
Set the exception status.
Vb()
Constructor with no arguments.
The Object Identifier Class.
void set_null()
Set the value portion of the vb to null, if its not already.
Vb * clone() const
Clone operator.
void set_value(const char *ptr)
Set value using a null terminated string.
SmiUINT32 exception_status
void set_value(const long i)
Set the value with a long int.
const Oid & get_oid() const
Get the oid portion as a const.
32 bit unsigned integer class.
const char * get_printable_oid() const
Return a formatted version of the Oid.
void get_oid(Oid &oid) const
Get the oid portion.
unsigned long long pp_uint64
#define SNMP_CLASS_SUCCESS
success
void set_value(const unsigned long i)
Set the value with an unsigned long int.
void set_value(const unsigned char *ptr, const unsigned int len)
Set value using a string and length.
Vb(const Oid &oid)
Constructor to initialize the oid.
void set_value(const unsigned int i)
Set the value with an unsigned int.
An "abstract" (pure virtual) class that serves as the base class for all specific SNMP syntax types...
virtual SnmpSyntax * clone() const =0
Virtual clone operation for creating a new Value from an existing value.