#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()  More... | |
| void | unpack (const Ipc::TypedMsgHdr &msg) | 
| restore struct from the message  More... | |
| int | varCount () const | 
| size of variables list  More... | |
| void | clear () | 
| clear all internal members  More... | |
| void | setVars (variable_list *vars) | 
| perform assignment of variables list  More... | |
| void | clearVars () | 
| clear variables list  More... | |
| 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  More... | |
| void | assign (const Pdu &pdu) | 
| perform full assignment  More... | |
| Private Attributes | |
| unsigned int | aggrCount = 0 | 
| The number of other Pdus merged into.  More... | |
Detailed Description
snmp_pdu wrapper introduce the feature to aggregate variables and to pack/unpack message
Constructor & Destructor Documentation
◆ Pdu() [1/2]
◆ Pdu() [2/2]
◆ ~Pdu()
Member Function Documentation
◆ aggregate()
| 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, variable_list::next_variable, Snmp::Var::setName(), snmpAggrType(), varCount(), and snmp_pdu::variables.
Referenced by Snmp::Inquirer::aggregate().
◆ assign()
| 
 | 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.
◆ clear()
◆ clearSystemOid()
◆ clearVars()
| void Snmp::Pdu::clearVars | ( | ) | 
Definition at line 118 of file Pdu.cc.
References variable_list::next_variable.
◆ fixAggregate()
| 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().
◆ getSystemOid()
◆ init()
| 
 | private | 
Definition at line 46 of file Pdu.cc.
References SNMP_DEFAULT_ERRINDEX, and SNMP_DEFAULT_ERRSTAT.
Referenced by Pdu().
◆ operator=()
◆ pack()
| 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().
◆ setSystemOid()
Definition at line 156 of file Pdu.cc.
References Range< C, S >::end, NULL, Range< C, S >::size(), Range< C, S >::start, and xmalloc.
◆ setVars()
| void Snmp::Pdu::setVars | ( | variable_list * | vars | ) | 
Definition at line 130 of file Pdu.cc.
References variable_list::next_variable.
◆ unpack()
| 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.
◆ varCount()
| int Snmp::Pdu::varCount | ( | ) | const | 
Definition at line 220 of file Pdu.cc.
References variable_list::next_variable.
Referenced by aggregate().
Member Data Documentation
◆ address
| 
 | inherited | 
Definition at line 76 of file snmp_pdu.h.
Referenced by assign().
◆ agent_addr
| 
 | inherited | 
Definition at line 91 of file snmp_pdu.h.
Referenced by assign(), snmp_pdu_decode(), and snmp_pdu_encode().
◆ aggrCount
| 
 | private | 
◆ command
| 
 | inherited | 
Definition at line 75 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().
◆ enterprise
| 
 | inherited | 
Definition at line 89 of file snmp_pdu.h.
Referenced by snmp_free_pdu(), snmp_pdu_decode(), and snmp_pdu_encode().
◆ enterprise_length
| 
 | inherited | 
Definition at line 90 of file snmp_pdu.h.
Referenced by snmp_pdu_decode(), and snmp_pdu_encode().
◆ errindex
| 
 | inherited | 
Definition at line 80 of file snmp_pdu.h.
Referenced by assign(), snmp_fix_pdu(), snmp_pdu_decode(), snmp_pdu_encode(), and snmpAgentResponse().
◆ errstat
| 
 | inherited | 
Definition at line 79 of file snmp_pdu.h.
Referenced by Snmp::Inquirer::aggregate(), assign(), Snmp::Forwarder::sendError(), Snmp::SendResponse(), snmp_fix_pdu(), snmp_pdu_decode(), snmp_pdu_encode(), and snmpAgentResponse().
◆ max_repetitions
| 
 | inherited | 
Definition at line 84 of file snmp_pdu.h.
Referenced by assign(), snmp_coexist_V2toV1(), snmp_pdu_decode(), and snmp_pdu_encode().
◆ non_repeaters
| 
 | inherited | 
Definition at line 83 of file snmp_pdu.h.
Referenced by assign(), snmp_coexist_V2toV1(), snmp_pdu_decode(), and snmp_pdu_encode().
◆ reqid
| 
 | inherited | 
Definition at line 78 of file snmp_pdu.h.
Referenced by assign(), snmp_build(), snmp_fix_pdu(), snmp_pdu_decode(), snmp_pdu_encode(), snmpAgentResponse(), and snmpDecodePacket().
◆ specific_type
| 
 | inherited | 
Definition at line 93 of file snmp_pdu.h.
Referenced by assign(), snmp_pdu_decode(), and snmp_pdu_encode().
◆ time
| 
 | inherited | 
Definition at line 94 of file snmp_pdu.h.
Referenced by assign(), snmp_pdu_decode(), and snmp_pdu_encode().
◆ trap_type
| 
 | inherited | 
Definition at line 92 of file snmp_pdu.h.
Referenced by assign(), snmp_pdu_decode(), and snmp_pdu_encode().
◆ variables
| 
 | inherited | 
Definition at line 86 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(), and snmpAgentResponse().
The documentation for this class was generated from the following files:
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products
