Squid Web Cache master
Loading...
Searching...
No Matches
XactionInitiator.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2025 The Squid Software Foundation and contributors
3 *
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.
7 */
8
9#ifndef SQUID_SRC_XACTIONINITIATOR_H
10#define SQUID_SRC_XACTIONINITIATOR_H
11
14public:
16 enum Initiator {
18 initClient = 1 << 0,
19 initPeerPool = 1 << 1,
20 initCertFetcher = 1 << 2,
21 initCacheDigest = 1 << 4,
22 initHtcp = 1<< 5,
23 initIcp = 1 << 6,
24 initIcmp = 1 << 7,
25 initIpc = 1 << 9,
26 initAdaptation = 1 << 10,
27 initIcon = 1 << 11,
28 initPeerMcast = 1 << 12,
29 initServer = 1 << 13,
30
31 initAdaptationOrphan_ = 1 << 31
32 };
33
34 typedef uint32_t Initiators;
35
36 // this class is a just a trivial wrapper so we allow explicit conversions
38
40 bool in(Initiators setOfInitiators) const {return (initiator & setOfInitiators) != 0;}
41
43 bool internalClient() const {
44 return (initiator & InternalInitiators()) != 0;
45 }
46
51
54 return 0xFFFFFFFF;
55 }
56
57 static Initiators ParseInitiators(const char *name);
58
59private:
61
63};
64
65#endif /* SQUID_SRC_XACTIONINITIATOR_H */
66
identifies a protocol agent or Squid feature initiating transactions
static Initiators ParseInitiators(const char *name)
Initiator
transaction triggers
@ initPeerMcast
neighbor multicast
@ initIcp
the ICP/neighbors subsystem
@ initIcmp
the ICMP RTT database (NetDB) neighbors exchange subsystem
@ initAdaptation
ICAP/ECAP requests generated by Squid.
@ initHtcp
HTCP client.
@ initServer
HTTP/2 push request (not yet supported by Squid)
@ initCacheDigest
Cache Digest fetching code.
@ initIcon
internal icons
@ initAdaptationOrphan_
eCAP-created HTTP message w/o an associated HTTP transaction (not ACL-detectable)
@ initPeerPool
PeerPool manager.
@ initCertFetcher
Missing intermediate certificates fetching code.
@ initClient
HTTP or FTP client.
@ initIpc
the IPC subsystem
static Initiators AllInitiators()
all initiators
static Initiators InternalInitiators()
internally generated requests
bool internalClient() const
whether the transaction was initiated by an internal subsystem
uint32_t Initiators
Initiator set.
bool in(Initiators setOfInitiators) const
whether this initiator belongs to the given set
XactionInitiator(Initiator i)