11#ifndef SQUID_SNMPX_VAR_H
12#define SQUID_SNMPX_VAR_H
68 void setValue(
const void* value,
int length,
int aType);
struct msghdr with a known type, fixed-size I/O and control buffers
void setCounter64(long long int counter)
assign Counter64 value to variable
void setInt(int value)
assign int value to variable
Var & operator+=(const Var &var)
Var & operator=(const Var &var)
Var & operator/=(int num)
void copyValue(const Var &var)
copy variable from another one
void setObject(const Range< const oid * > &object)
assign object oid to variable
unsigned int asGauge() const
returns variable value as unsigned int
bool operator<(const Var &var) const
void unpack(const Ipc::TypedMsgHdr &msg)
restore struct from the message
bool operator>(const Var &var) const
void clearName()
clear variable name
void setTimeTicks(unsigned int ticks)
assign unsigned int (time) value to variable
void clear()
clear all internal members
Range< const oid * > getName() const
returns variable name
void setValue(const void *value, int length, int aType)
set new variable value
int asCounter() const
returns variable value as Counter32
void init()
initialize members
int asInt() const
returns variable value as integer
void setCounter(int value)
assign Counter32 value to variable
long long int asCounter64() const
returns variable value as Counter64
unsigned int asTimeTicks() const
returns variable value as time ticks
void setGauge(unsigned int value)
assign unsigned int value to variable
Range< const oid * > asObject() const
returns variable value as object oid
void assign(const Var &var)
perform full assignment
void pack(Ipc::TypedMsgHdr &msg) const
prepare for sendmsg()
void setString(const Range< const u_char * > &string)
assign string to variable
void setName(const Range< const oid * > &aName)
set new variable name
void clearValue()
clear .val member
Range< const u_char * > asString() const
returns variable value as chars string