]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/snmp/Forwarder.h
4 * DEBUG: section 49 SNMP Interface
8 #ifndef SQUID_SNMPX_FORWARDER_H
9 #define SQUID_SNMPX_FORWARDER_H
11 #include "ipc/Forwarder.h"
13 #include "snmp/Session.h"
15 class CommCloseCbParams
;
20 /** Forwards a single client SNMP request to Coordinator.
21 * Waits for an ACK from Coordinator
22 * Send the data unit with an error response if forwarding fails.
24 class Forwarder
: public Ipc::Forwarder
27 Forwarder(const Pdu
& aPdu
, const Session
& aSession
, int aFd
,
28 const Ip::Address
& anAddress
);
31 /* Ipc::Forwarder API */
32 virtual void cleanup(); ///< perform cleanup actions
33 virtual void handleTimeout();
34 virtual void handleException(const std::exception
& e
);
37 void noteCommClosed(const CommCloseCbParams
& params
);
38 void sendError(int error
);
41 int fd
; ///< client connection descriptor
42 AsyncCall::Pointer closer
; ///< comm_close handler for the connection
44 CBDATA_CLASS2(Forwarder
);
47 extern void SendResponse(unsigned int requestId
, const Pdu
& pdu
);
51 #endif /* SQUID_SNMPX_FORWARDER_H */