Session.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
3  *
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.
7  */
8 
9 /* DEBUG: section 49 SNMP Interface */
10 
11 #ifndef SQUID_SNMPX_SESSION_H
12 #define SQUID_SNMPX_SESSION_H
13 
14 #include "ipc/forward.h"
15 #include "snmp.h"
16 #include "snmp_session.h"
17 
18 namespace Snmp
19 {
20 
22 class Session: public snmp_session
23 {
24 public:
25  Session();
26  Session(const Session& session);
27  Session& operator = (const Session& session);
28  ~Session();
29 
30  void pack(Ipc::TypedMsgHdr& msg) const;
31  void unpack(const Ipc::TypedMsgHdr& msg);
32  void clear();
33 
34 private:
35  void free();
36  void assign(const Session& session);
37 };
38 
39 } // namespace Snmp
40 
41 #endif /* SQUID_SNMPX_SESSION_H */
42 
snmp_session wrapper add pack/unpack feature
Definition: Session.h:22
void unpack(const Ipc::TypedMsgHdr &msg)
restore struct from the message
Definition: Session.cc:92
void assign(const Session &session)
perform full assignment
Definition: Session.cc:59
void pack(Ipc::TypedMsgHdr &msg) const
prepare for sendmsg()
Definition: Session.cc:73
void clear()
clear internal members
Definition: Session.cc:41
Session & operator=(const Session &session)
Definition: Session.cc:33
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:31
void free()
free internal members
Definition: Session.cc:47

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors