]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/snmp/Inquirer.h
9e923196eba1afee48f1decdf29164eb4287c9cf
2 * Copyright (C) 1996-2022 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_INQUIRER_H
12 #define SQUID_SNMPX_INQUIRER_H
14 #include "comm/forward.h"
15 #include "ipc/Inquirer.h"
16 #include "snmp/forward.h"
19 class CommCloseCbParams
;
24 /// Coordinator's job that sends a PDU request to each strand,
25 /// aggregates strand responses and send back the result to client
26 class Inquirer
: public Ipc::Inquirer
28 CBDATA_CHILD(Inquirer
);
31 Inquirer(const Request
& aRequest
, const Ipc::StrandCoords
& coords
);
35 void start() override
;
36 bool doneAll() const override
;
38 /* Ipc::Inquirer API */
39 void cleanup() override
;
40 void handleException(const std::exception
& e
) override
;
41 void sendResponse() override
;
42 bool aggregate(Ipc::Response::Pointer aResponse
) override
;
45 void noteCommClosed(const CommCloseCbParams
& params
);
48 Pdu aggrPdu
; ///< aggregated pdu
49 Comm::ConnectionPointer conn
; ///< client connection descriptor
51 AsyncCall::Pointer writer
; ///< comm_write callback
52 AsyncCall::Pointer closer
; ///< comm_close handler
57 #endif /* SQUID_SNMPX_INQUIRER_H */