]> git.ipfire.org Git - thirdparty/squid.git/blob - src/snmp/Session.h
Sync with trunk
[thirdparty/squid.git] / src / snmp / Session.h
1 /*
2 * $Id$
3 *
4 * DEBUG: section 49 SNMP Interface
5 *
6 */
7
8 #ifndef SQUID_SNMPX_SESSION_H
9 #define SQUID_SNMPX_SESSION_H
10
11 #include "ipc/forward.h"
12 #include "snmp.h"
13 #include "snmp_session.h"
14
15
16 namespace Snmp
17 {
18
19 /// snmp_session wrapper add pack/unpack feature
20 class Session: public snmp_session
21 {
22 public:
23 Session();
24 Session(const Session& session);
25 Session& operator = (const Session& session);
26 ~Session();
27
28 void pack(Ipc::TypedMsgHdr& msg) const; ///< prepare for sendmsg()
29 void unpack(const Ipc::TypedMsgHdr& msg); ///< restore struct from the message
30 void clear(); ///< clear internal members
31
32 private:
33 void free(); ///< free internal members
34 void assign(const Session& session); ///< perform full assignment
35 };
36
37 } // namespace Snmp
38
39 #endif /* SQUID_SNMPX_SESSION_H */