]> git.ipfire.org Git - thirdparty/squid.git/blob - src/snmp/Request.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / snmp / Request.h
1 /*
2 * $Id$
3 *
4 * DEBUG: section 49 SNMP Interface
5 *
6 */
7
8 #ifndef SQUID_SNMPX_REQUEST_H
9 #define SQUID_SNMPX_REQUEST_H
10
11 #include "ip/Address.h"
12 #include "ipc/forward.h"
13 #include "ipc/Request.h"
14 #include "snmp/Pdu.h"
15 #include "snmp/Session.h"
16
17 namespace Snmp
18 {
19
20 /// SNMP request
21 class Request: public Ipc::Request
22 {
23 public:
24 Request(int aRequestorId, unsigned int aRequestId, const Pdu& aPdu,
25 const Session& aSession, int aFd, const Ip::Address& anAddress);
26
27 explicit Request(const Ipc::TypedMsgHdr& msg); ///< from recvmsg()
28 /* Ipc::Request API */
29 virtual void pack(Ipc::TypedMsgHdr& msg) const;
30 virtual Pointer clone() const;
31
32 private:
33 Request(const Request& request);
34
35 public:
36 Pdu pdu; ///< SNMP protocol data unit
37 Session session; ///< SNMP session
38 int fd; ///< client connection descriptor
39 Ip::Address address; ///< client address
40 };
41
42 } // namespace Snmp
43
44 #endif /* SQUID_SNMPX_REQUEST_H */