|
Squid Web Cache master
|
#include <Var.h>
Public Member Functions | |
| Var () | |
| Var (const Var &var) | |
| Var & | operator= (const Var &var) |
| ~Var () | |
| Var & | operator+= (const Var &var) |
| Var & | operator/= (int num) |
| bool | operator< (const Var &var) const |
| bool | operator> (const Var &var) const |
| void | pack (Ipc::TypedMsgHdr &msg) const |
| prepare for sendmsg() | |
| void | unpack (const Ipc::TypedMsgHdr &msg) |
| restore struct from the message | |
| Range< const oid * > | getName () const |
| returns variable name | |
| void | setName (const Range< const oid * > &aName) |
| set new variable name | |
| void | clearName () |
| clear variable name | |
| bool | isNull () const |
| int | asInt () const |
| returns variable value as integer | |
| unsigned int | asGauge () const |
| returns variable value as unsigned int | |
| int | asCounter () const |
| returns variable value as Counter32 | |
| long long int | asCounter64 () const |
| returns variable value as Counter64 | |
| unsigned int | asTimeTicks () const |
| returns variable value as time ticks | |
| Range< const oid * > | asObject () const |
| returns variable value as object oid | |
| Range< const u_char * > | asString () const |
| returns variable value as chars string | |
| void | setInt (int value) |
| assign int value to variable | |
| void | setCounter (int value) |
| assign Counter32 value to variable | |
| void | setGauge (unsigned int value) |
| assign unsigned int value to variable | |
| void | setString (const Range< const u_char * > &string) |
| assign string to variable | |
| void | setObject (const Range< const oid * > &object) |
| assign object oid to variable | |
| void | setTimeTicks (unsigned int ticks) |
| assign unsigned int (time) value to variable | |
| void | setCounter64 (long long int counter) |
| assign Counter64 value to variable | |
| void | copyValue (const Var &var) |
| copy variable from another one | |
| void | clearValue () |
| clear .val member | |
| void | clear () |
| clear all internal members | |
Public Attributes | ||
| struct variable_list * | next_variable | |
| oid * | name | |
| int | name_length | |
| u_char | type | |
| union { | ||
| int * integer | ||
| u_char * string | ||
| oid * objid | ||
| } | val | |
| int | val_len | |
Private Member Functions | |
| void | init () |
| initialize members | |
| void | assign (const Var &var) |
| perform full assignment | |
| void | setValue (const void *value, int length, int aType) |
| set new variable value | |
variable_list wrapper implement the feature to change the name/value of variable and to pack/unpack message
| int Snmp::Var::asCounter | ( | ) | const |
Definition at line 213 of file Var.cc.
References Must, and SMI_COUNTER32.
Referenced by operator+=(), operator<(), and operator>().
| long long int Snmp::Var::asCounter64 | ( | ) | const |
Definition at line 221 of file Var.cc.
References Must, and SMI_COUNTER64.
Referenced by operator+=(), operator<(), and operator>().
| unsigned int Snmp::Var::asGauge | ( | ) | const |
Definition at line 205 of file Var.cc.
References Must, and SMI_GAUGE32.
Referenced by operator+=(), operator<(), and operator>().
| int Snmp::Var::asInt | ( | ) | const |
Definition at line 197 of file Var.cc.
References Must, and SMI_INTEGER.
Referenced by operator+=(), operator<(), and operator>().
|
private |
Definition at line 150 of file Var.cc.
References copyValue(), and getName().
| Range< const u_char * > Snmp::Var::asString | ( | ) | const |
Definition at line 247 of file Var.cc.
References Must, and SMI_STRING.
| unsigned int Snmp::Var::asTimeTicks | ( | ) | const |
Definition at line 229 of file Var.cc.
References Must, and SMI_TIMETICKS.
Referenced by operator+=(), operator<(), and operator>().
| void Snmp::Var::copyValue | ( | const Var & | var | ) |
Definition at line 297 of file Var.cc.
References variable_list::string, variable_list::type, variable_list::val, and variable_list::val_len.
Referenced by Snmp::Pdu::aggregate().
Definition at line 165 of file Var.cc.
Referenced by Snmp::Pdu::aggregate(), and assign().
| bool Snmp::Var::isNull | ( | ) | const |
Definition at line 191 of file Var.cc.
References SMI_NULLOBJ.
Referenced by Snmp::Pdu::aggregate().
Definition at line 51 of file Var.cc.
References asCounter(), asCounter64(), asGauge(), asInt(), asTimeTicks(), DBG_CRITICAL, debugs, SMI_COUNTER32, SMI_COUNTER64, SMI_GAUGE32, SMI_INTEGER, SMI_TIMETICKS, and TexcHere.
Definition at line 78 of file Var.cc.
References DBG_CRITICAL, debugs, Must, SMI_COUNTER32, SMI_COUNTER64, SMI_GAUGE32, SMI_INTEGER, SMI_TIMETICKS, and TexcHere.
| bool Snmp::Var::operator< | ( | const Var & | var | ) | const |
Definition at line 105 of file Var.cc.
References asCounter(), asCounter64(), asGauge(), asInt(), asTimeTicks(), DBG_CRITICAL, debugs, SMI_COUNTER32, SMI_COUNTER64, SMI_GAUGE32, SMI_INTEGER, SMI_TIMETICKS, and TexcHere.
| bool Snmp::Var::operator> | ( | const Var & | var | ) | const |
Definition at line 128 of file Var.cc.
References asCounter(), asCounter64(), asGauge(), asInt(), asTimeTicks(), DBG_CRITICAL, debugs, SMI_COUNTER32, SMI_COUNTER64, SMI_GAUGE32, SMI_INTEGER, SMI_TIMETICKS, and TexcHere.
| void Snmp::Var::pack | ( | Ipc::TypedMsgHdr & | msg | ) | const |
Definition at line 324 of file Var.cc.
References Must, Ipc::TypedMsgHdr::putFixed(), Ipc::TypedMsgHdr::putInt(), and Ipc::TypedMsgHdr::putPod().
Referenced by Snmp::Pdu::pack().
| void Snmp::Var::setCounter | ( | int | value | ) |
Definition at line 261 of file Var.cc.
References SMI_COUNTER32.
| void Snmp::Var::setCounter64 | ( | long long int | counter | ) |
Definition at line 285 of file Var.cc.
References SMI_COUNTER64.
| void Snmp::Var::setGauge | ( | unsigned int | value | ) |
Definition at line 267 of file Var.cc.
References SMI_GAUGE32.
| void Snmp::Var::setInt | ( | int | value | ) |
Definition at line 255 of file Var.cc.
References SMI_INTEGER.
Definition at line 171 of file Var.cc.
References Range< C, S >::end, NULL, Range< C, S >::size(), Range< C, S >::start, and xmalloc.
Referenced by Snmp::Pdu::aggregate().
| void Snmp::Var::setString | ( | const Range< const u_char * > & | string | ) |
Definition at line 273 of file Var.cc.
References size, and SMI_STRING.
| void Snmp::Var::setTimeTicks | ( | unsigned int | ticks | ) |
Definition at line 291 of file Var.cc.
References SMI_TIMETICKS.
| void Snmp::Var::unpack | ( | const Ipc::TypedMsgHdr & | msg | ) |
Definition at line 340 of file Var.cc.
References Ipc::TypedMsgHdr::getFixed(), Ipc::TypedMsgHdr::getInt(), Ipc::TypedMsgHdr::getPod(), Must, and xmalloc.
Referenced by Snmp::Pdu::unpack().
|
inherited |
Definition at line 50 of file snmp_vars.h.
Referenced by snmp_var_DecodeVarBind(), snmp_var_EncodeVarBind(), snmp_var_free(), and snmp_var_new_integer().
|
inherited |
Definition at line 46 of file snmp_vars.h.
Referenced by Snmp::Pdu::aggregate(), Snmp::Pdu::fixAggregate(), snmp_add_null_var(), snmp_confFn(), snmp_meshCtblFn(), snmp_meshPtblFn(), snmp_netDnsFn(), snmp_netFqdnFn(), snmp_netIpFn(), snmp_prfProtoFn(), snmp_prfSysFn(), snmp_sysFn(), snmp_var_clone(), snmp_var_DecodeVarBind(), snmp_var_EncodeVarBind(), snmp_var_free(), snmp_var_new(), and snmpAgentResponse().
|
inherited |
Definition at line 47 of file snmp_vars.h.
Referenced by Snmp::Pdu::aggregate(), Snmp::Pdu::fixAggregate(), snmp_add_null_var(), snmp_confFn(), snmp_meshCtblFn(), snmp_meshPtblFn(), snmp_netDnsFn(), snmp_netFqdnFn(), snmp_netIpFn(), snmp_prfProtoFn(), snmp_prfSysFn(), snmp_sysFn(), snmp_var_clone(), snmp_var_DecodeVarBind(), snmp_var_EncodeVarBind(), snmp_var_new(), and snmpAgentResponse().
|
inherited |
Definition at line 45 of file snmp_vars.h.
Referenced by Snmp::Pdu::clearVars(), Snmp::Pdu::fixAggregate(), Snmp::Pdu::pack(), Snmp::Pdu::setVars(), snmp_add_null_var(), snmp_fix_pdu(), snmp_free_pdu(), snmp_var_DecodeVarBind(), snmp_var_EncodeVarBind(), snmpAgentResponse(), Snmp::Pdu::unpack(), and Snmp::Pdu::varCount().
|
inherited |
Definition at line 52 of file snmp_vars.h.
Referenced by snmp_pdu_decode(), snmp_var_DecodeVarBind(), and snmp_var_EncodeVarBind().
|
inherited |
Definition at line 51 of file snmp_vars.h.
Referenced by copyValue(), snmp_confFn(), snmp_meshCtblFn(), snmp_meshPtblFn(), snmp_var_clone(), snmp_var_DecodeVarBind(), snmp_var_EncodeVarBind(), and snmp_var_free().
|
inherited |
Definition at line 48 of file snmp_vars.h.
Referenced by copyValue(), snmp_confFn(), snmp_meshCtblFn(), snmp_meshPtblFn(), snmp_var_DecodeVarBind(), snmp_var_EncodeVarBind(), snmp_var_new(), and snmp_var_new_integer().
| union { ... } variable_list::val |
|
inherited |
Definition at line 54 of file snmp_vars.h.
Referenced by copyValue(), snmp_confFn(), snmp_meshCtblFn(), snmp_meshPtblFn(), snmp_var_clone(), snmp_var_DecodeVarBind(), snmp_var_EncodeVarBind(), and snmp_var_new_integer().