|
Squid Web Cache master
|
#include <Pdu.h>
Public Member Functions | |
| Pdu () | |
| Pdu (const Pdu &pdu) | |
| Pdu & | operator= (const Pdu &pdu) |
| ~Pdu () | |
| void | aggregate (const Pdu &pdu) |
| void | fixAggregate () |
| void | pack (Ipc::TypedMsgHdr &msg) const |
| prepare for sendmsg() | |
| void | unpack (const Ipc::TypedMsgHdr &msg) |
| restore struct from the message | |
| int | varCount () const |
| size of variables list | |
| void | clear () |
| clear all internal members | |
| void | setVars (variable_list *vars) |
| perform assignment of variables list | |
| void | clearVars () |
| clear variables list | |
| Range< const oid * > | getSystemOid () const |
| void | setSystemOid (const Range< const oid * > &systemOid) |
| void | clearSystemOid () |
Public Attributes | |
| int | command |
| struct sockaddr_in | address |
| int | reqid |
| int | errstat |
| int | errindex |
| int | non_repeaters |
| int | max_repetitions |
| struct variable_list * | variables |
| oid * | enterprise |
| int | enterprise_length |
| struct sockaddr_in | agent_addr |
| int | trap_type |
| int | specific_type |
| u_int | time |
Private Member Functions | |
| void | init () |
| initialize members | |
| void | assign (const Pdu &pdu) |
| perform full assignment | |
Private Attributes | |
| unsigned int | aggrCount = 0 |
| The number of other Pdus merged into. | |
snmp_pdu wrapper introduce the feature to aggregate variables and to pack/unpack message
| void Snmp::Pdu::aggregate | ( | const Pdu & | pdu | ) |
Definition at line 55 of file Pdu.cc.
References atAverage, atMax, atMin, atSum, Snmp::Var::copyValue(), Snmp::Var::getName(), Snmp::Var::isNull(), Must, variable_list::name, variable_list::name_length, Snmp::Var::setName(), snmpAggrType(), varCount(), and snmp_pdu::variables.
Referenced by Snmp::Inquirer::aggregate().
|
private |
Definition at line 99 of file Pdu.cc.
References snmp_pdu::address, snmp_pdu::agent_addr, aggrCount, snmp_pdu::command, snmp_pdu::errindex, snmp_pdu::errstat, getSystemOid(), snmp_pdu::max_repetitions, snmp_pdu::non_repeaters, snmp_pdu::reqid, snmp_pdu::specific_type, snmp_pdu::time, snmp_pdu::trap_type, and snmp_pdu::variables.
| void Snmp::Pdu::clearVars | ( | ) |
Definition at line 118 of file Pdu.cc.
References variable_list::next_variable.
| void Snmp::Pdu::fixAggregate | ( | ) |
Definition at line 229 of file Pdu.cc.
References atAverage, variable_list::name, variable_list::name_length, variable_list::next_variable, and snmpAggrType().
|
private |
Definition at line 46 of file Pdu.cc.
References SNMP_DEFAULT_ERRINDEX, and SNMP_DEFAULT_ERRSTAT.
Referenced by Pdu().
| void Snmp::Pdu::pack | ( | Ipc::TypedMsgHdr & | msg | ) | const |
Definition at line 167 of file Pdu.cc.
References Must, variable_list::next_variable, Snmp::Var::pack(), Ipc::TypedMsgHdr::putFixed(), Ipc::TypedMsgHdr::putInt(), and Ipc::TypedMsgHdr::putPod().
Definition at line 156 of file Pdu.cc.
References Range< C, S >::end, NULL, Range< C, S >::size(), Range< C, S >::start, and xmalloc.
| void Snmp::Pdu::setVars | ( | variable_list * | vars | ) |
Definition at line 130 of file Pdu.cc.
References variable_list::next_variable.
| void Snmp::Pdu::unpack | ( | const Ipc::TypedMsgHdr & | msg | ) |
Definition at line 191 of file Pdu.cc.
References Ipc::TypedMsgHdr::getFixed(), Ipc::TypedMsgHdr::getInt(), Ipc::TypedMsgHdr::getPod(), variable_list::next_variable, Snmp::Var::unpack(), and xmalloc.
| int Snmp::Pdu::varCount | ( | ) | const |
Definition at line 220 of file Pdu.cc.
References variable_list::next_variable.
Referenced by aggregate().
|
inherited |
Definition at line 52 of file snmp_pdu.h.
Referenced by assign(), and snmp_pdu_create().
|
inherited |
Definition at line 67 of file snmp_pdu.h.
Referenced by assign(), snmp_pdu_decode(), and snmp_pdu_encode().
|
private |
|
inherited |
Definition at line 51 of file snmp_pdu.h.
Referenced by assign(), Snmp::Forwarder::sendError(), Snmp::SendResponse(), snmp_coexist_V2toV1(), snmp_fix_pdu(), snmp_msg_Encode(), snmp_pdu_create(), snmp_pdu_decode(), snmp_pdu_encode(), snmp_pdu_fix(), and snmpAgentResponse().
|
inherited |
Definition at line 65 of file snmp_pdu.h.
Referenced by snmp_free_pdu(), snmp_pdu_create(), snmp_pdu_decode(), and snmp_pdu_encode().
|
inherited |
Definition at line 66 of file snmp_pdu.h.
Referenced by snmp_pdu_create(), snmp_pdu_decode(), and snmp_pdu_encode().
|
inherited |
Definition at line 56 of file snmp_pdu.h.
Referenced by assign(), snmp_fix_pdu(), snmp_pdu_create(), snmp_pdu_decode(), snmp_pdu_encode(), and snmpAgentResponse().
|
inherited |
Definition at line 55 of file snmp_pdu.h.
Referenced by Snmp::Inquirer::aggregate(), assign(), Snmp::Forwarder::sendError(), Snmp::SendResponse(), snmp_fix_pdu(), snmp_pdu_create(), snmp_pdu_decode(), snmp_pdu_encode(), and snmpAgentResponse().
|
inherited |
Definition at line 60 of file snmp_pdu.h.
Referenced by assign(), snmp_coexist_V2toV1(), snmp_pdu_decode(), and snmp_pdu_encode().
|
inherited |
Definition at line 59 of file snmp_pdu.h.
Referenced by assign(), snmp_coexist_V2toV1(), snmp_pdu_decode(), and snmp_pdu_encode().
|
inherited |
Definition at line 54 of file snmp_pdu.h.
Referenced by assign(), snmp_build(), snmp_fix_pdu(), snmp_pdu_decode(), snmp_pdu_encode(), snmpAgentResponse(), and snmpDecodePacket().
|
inherited |
Definition at line 69 of file snmp_pdu.h.
Referenced by assign(), snmp_pdu_decode(), and snmp_pdu_encode().
|
inherited |
Definition at line 70 of file snmp_pdu.h.
Referenced by assign(), snmp_pdu_decode(), and snmp_pdu_encode().
|
inherited |
Definition at line 68 of file snmp_pdu.h.
Referenced by assign(), snmp_pdu_decode(), and snmp_pdu_encode().
|
inherited |
Definition at line 62 of file snmp_pdu.h.
Referenced by aggregate(), assign(), snmp_add_null_var(), snmp_fix_pdu(), snmp_free_pdu(), snmp_msg_Decode(), snmp_msg_Encode(), snmp_pdu_create(), and snmpAgentResponse().