snmp_session wrapper add pack/unpack feature More...
#include <Session.h>


| Public Member Functions | |
| Session () | |
| Session (const Session &session) | |
| Session & | operator= (const Session &session) | 
| ~Session () | |
| void | pack (Ipc::TypedMsgHdr &msg) const | 
| prepare for sendmsg()  More... | |
| void | unpack (const Ipc::TypedMsgHdr &msg) | 
| restore struct from the message  More... | |
| Public Attributes | |
| int | Version | 
| u_char * | community | 
| int | community_len | 
| int | retries | 
| int | timeout | 
| char * | peername | 
| unsigned short | remote_port | 
| unsigned short | local_port | 
| Private Member Functions | |
| void | reset () | 
| free internal members  More... | |
Detailed Description
Constructor & Destructor Documentation
◆ Session() [1/2]
| Snmp::Session::Session | ( | ) | 
Definition at line 17 of file Session.cc.
◆ Session() [2/2]
| Snmp::Session::Session | ( | const Session & | session | ) | 
Definition at line 22 of file Session.cc.
References operator=().
◆ ~Session()
Member Function Documentation
◆ operator=()
| Snmp::Session & Snmp::Session::operator= | ( | const Session & | session | ) | 
Definition at line 28 of file Session.cc.
References snmp_session::community, snmp_session::peername, and xstrdup.
Referenced by Session().
◆ pack()
| void Snmp::Session::pack | ( | Ipc::TypedMsgHdr & | msg | ) | const | 
Definition at line 57 of file Session.cc.
References Must, Ipc::TypedMsgHdr::putFixed(), Ipc::TypedMsgHdr::putInt(), Ipc::TypedMsgHdr::putPod(), and retries.
◆ reset()
| 
 | private | 
◆ unpack()
| void Snmp::Session::unpack | ( | const Ipc::TypedMsgHdr & | msg | ) | 
Definition at line 76 of file Session.cc.
References Ipc::TypedMsgHdr::getFixed(), Ipc::TypedMsgHdr::getInt(), Ipc::TypedMsgHdr::getPod(), Must, retries, and xmalloc.
Member Data Documentation
◆ community
| 
 | inherited | 
Definition at line 61 of file snmp_session.h.
Referenced by operator=(), snmp_build(), and snmp_parse().
◆ community_len
| 
 | inherited | 
Definition at line 62 of file snmp_session.h.
Referenced by snmp_build(), and snmp_parse().
◆ local_port
| 
 | inherited | 
Definition at line 67 of file snmp_session.h.
◆ peername
| 
 | inherited | 
Definition at line 65 of file snmp_session.h.
Referenced by operator=().
◆ remote_port
| 
 | inherited | 
Definition at line 66 of file snmp_session.h.
◆ retries
| 
 | inherited | 
Definition at line 63 of file snmp_session.h.
◆ timeout
| 
 | inherited | 
Definition at line 64 of file snmp_session.h.
◆ Version
| 
 | inherited | 
Definition at line 59 of file snmp_session.h.
Referenced by snmp_build(), snmp_parse(), and snmpDecodePacket().
The documentation for this class was generated from the following files:
- src/snmp/Session.h
- src/snmp/Session.cc
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
