]> git.ipfire.org Git - thirdparty/squid.git/blob - src/MasterXaction.h
Various audit updates
[thirdparty/squid.git] / src / MasterXaction.h
1 #ifndef SQUID_SRC_MASTERXACTION_H
2 #define SQUID_SRC_MASTERXACTION_H
3
4 #include "anyp/forward.h"
5 #include "base/CbcPointer.h"
6 #include "base/InstanceId.h"
7 #include "base/Lock.h"
8 #include "comm/forward.h"
9
10 /** Master transaction details.
11 *
12 * Aggregates historical data from individual related protocol-specific
13 * transactions such as an HTTP client transaction and the corresponding
14 * HTTP or FTP server transaction.
15 *
16 * Individual transaction information worth sending or logging should be
17 * recorded here, ideally without exposing other master transaction users
18 * to internal details of individual transactions. For example, storing an
19 * HTTP client IP address is a good idea but storing a pointer to some
20 * client-side job which maintains that address is not.
21 *
22 * A master transaction is created by a newly accepted client connection,
23 * a new request on the existing client connection, or an internal request
24 * generated by Squid. All client-side protocols, including HTTP, HTCP, ICP,
25 * and SNMP will eventually create master transactions.
26 *
27 * A master transaction is auto-destroyed when its last user is gone.
28 */
29 class MasterXaction : public RefCountable
30 {
31 public:
32 typedef RefCount<MasterXaction> Pointer;
33
34 /// transaction ID.
35 InstanceId<MasterXaction> id;
36
37 /// the listening port which originated this transaction
38 AnyP::PortCfgPointer squidPort;
39
40 /// the client TCP connection which originated this transaction
41 Comm::ConnectionPointer tcpClient;
42
43 // TODO: add state from other Jobs in the transaction
44 };
45
46 #endif /* SQUID_SRC_MASTERXACTION_H */