]>
Commit | Line | Data |
---|---|---|
51ea0904 | 1 | /* |
f70aedc4 | 2 | * Copyright (C) 1996-2021 The Squid Software Foundation and contributors |
51ea0904 | 3 | * |
bbc27441 AJ |
4 | * Squid software is distributed under GPLv2+ license and includes |
5 | * contributions from numerous individuals and organizations. | |
6 | * Please see the COPYING and CONTRIBUTORS files for details. | |
51ea0904 CT |
7 | */ |
8 | ||
bbc27441 AJ |
9 | /* DEBUG: section 49 SNMP Interface */ |
10 | ||
51ea0904 CT |
11 | #ifndef SQUID_SNMPX_SESSION_H |
12 | #define SQUID_SNMPX_SESSION_H | |
13 | ||
51ea0904 CT |
14 | #include "ipc/forward.h" |
15 | #include "snmp.h" | |
16 | #include "snmp_session.h" | |
17 | ||
51ea0904 CT |
18 | namespace Snmp |
19 | { | |
20 | ||
21 | /// snmp_session wrapper add pack/unpack feature | |
22 | class Session: public snmp_session | |
23 | { | |
24 | public: | |
25 | Session(); | |
26 | Session(const Session& session); | |
27 | Session& operator = (const Session& session); | |
b56b37cf | 28 | ~Session() { reset(); } |
51ea0904 CT |
29 | |
30 | void pack(Ipc::TypedMsgHdr& msg) const; ///< prepare for sendmsg() | |
31 | void unpack(const Ipc::TypedMsgHdr& msg); ///< restore struct from the message | |
51ea0904 CT |
32 | |
33 | private: | |
b56b37cf | 34 | void reset(); ///< free internal members |
51ea0904 CT |
35 | }; |
36 | ||
37 | } // namespace Snmp | |
38 | ||
39 | #endif /* SQUID_SNMPX_SESSION_H */ | |
f53969cc | 40 |