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