]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/snmp/Forwarder.h
2 * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
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.
9 /* DEBUG: section 49 SNMP Interface */
11 #ifndef SQUID_SNMPX_FORWARDER_H
12 #define SQUID_SNMPX_FORWARDER_H
14 #include "ipc/Forwarder.h"
16 #include "snmp/Session.h"
18 class CommCloseCbParams
;
23 /** Forwards a single client SNMP request to Coordinator.
24 * Waits for an ACK from Coordinator
25 * Send the data unit with an error response if forwarding fails.
27 class Forwarder
: public Ipc::Forwarder
29 CBDATA_CLASS(Forwarder
);
32 Forwarder(const Pdu
& aPdu
, const Session
& aSession
, int aFd
,
33 const Ip::Address
& anAddress
);
36 /* Ipc::Forwarder API */
37 virtual void cleanup(); ///< perform cleanup actions
38 virtual void handleTimeout();
39 virtual void handleException(const std::exception
& e
);
42 void noteCommClosed(const CommCloseCbParams
& params
);
43 void sendError(int error
);
46 int fd
; ///< client connection descriptor
47 AsyncCall::Pointer closer
; ///< comm_close handler for the connection
50 void SendResponse(unsigned int requestId
, const Pdu
& pdu
);
54 #endif /* SQUID_SNMPX_FORWARDER_H */