FwdState.h
Go to the documentation of this file.
62 static void Start(const Comm::ConnectionPointer &client, StoreEntry *, HttpRequest *, const AccessLogEntryPointer &alp);
108 FwdState(const Comm::ConnectionPointer &client, StoreEntry *, HttpRequest *, const AccessLogEntryPointer &alp);
135 void advanceDestination(const char *stepDescription, const Comm::ConnectionPointer &conn, const StepStart &startStep);
150 void syncWithServerConn(const Comm::ConnectionPointer &server, const char *host, const bool reused);
PconnPool * fwdPconnPool
a collection of previously used persistent Squid-to-peer HTTP(S) connections
Definition: FwdState.cc:78
tos_t aclMapTOS(acl_tos *, ACLChecklist *)
Checks for a TOS value to apply depending on the ACL.
Definition: FwdState.cc:1453
void getOutgoingAddress(HttpRequest *, const Comm::ConnectionPointer &)
Definition: FwdState.cc:1476
void GetMarkingsToServer(HttpRequest *request, Comm::Connection &conn)
Definition: FwdState.cc:1555
void ResetMarkingsToServer(HttpRequest *, Comm::Connection &)
Definition: FwdState.cc:1564
Ip::NfMarkConfig aclFindNfMarkConfig(acl_nfmark *, ACLChecklist *)
Checks for a netfilter mark value to apply depending on the ACL.
Definition: FwdState.cc:1465
#define RefCountable
The locking interface for use on Reference-Counted classes.
Definition: Lock.h:66
Definition: Checklist.h:27
Definition: AccessLogEntry.h:41
Definition: Connection.h:73
Definition: errorpage.h:89
Definition: FwdState.h:53
void secureConnectionToPeerIfNeeded(const Comm::ConnectionPointer &)
handles an established TCP connection to peer (including origin servers)
Definition: FwdState.cc:968
Comm::ConnectionPointer clientConn
a possibly open connection to the client.
Definition: FwdState.h:178
void reactToZeroSizeObject()
ERR_ZERO_SIZE_OBJECT requires special adjustments.
Definition: FwdState.cc:481
void noteDestinationsEnd(ErrorState *selectionError) override
Definition: FwdState.cc:621
void connectedToPeer(Security::EncryptorAnswer &answer)
called when all negotiations with the TLS-speaking peer have been completed
Definition: FwdState.cc:1015
void successfullyConnectedToPeer(const Comm::ConnectionPointer &)
called when all negotiations with the peer have been completed
Definition: FwdState.cc:1051
FwdState(const Comm::ConnectionPointer &client, StoreEntry *, HttpRequest *, const AccessLogEntryPointer &alp)
Definition: FwdState.cc:120
JobWait< HappyConnOpener > transportWait
waits for a transport connection to the peer to be established/opened
Definition: FwdState.h:190
void pconnPush(Comm::ConnectionPointer &conn, const char *domain)
static void Start(const Comm::ConnectionPointer &client, StoreEntry *, HttpRequest *, const AccessLogEntryPointer &alp)
Initiates request forwarding to a peer or origin server.
Definition: FwdState.cc:341
void noteDestination(Comm::ConnectionPointer conn) override
called when a new unique destination has been found
Definition: FwdState.cc:592
static void HandleStoreAbort(FwdState *)
called by Store if the entry is no longer usable
Definition: FwdState.cc:83
time_t connectingTimeout(const Comm::ConnectionPointer &conn) const
Definition: FwdState.cc:1439
bool connected_okay
TCP link ever opened properly. This affects retry of POST,PUT,CONNECT,etc.
Definition: FwdState.h:183
static bool EnoughTimeToReForward(const time_t fwdStart)
Definition: FwdState.cc:436
void closePendingConnection(const Comm::ConnectionPointer &conn, const char *reason)
get rid of a to-server connection that failed to become serverConn
Definition: FwdState.cc:96
void connectDone(const Comm::ConnectionPointer &conn, Comm::Flag status, int xerrno)
Comm::ConnectionPointer const & serverConnection() const
Definition: FwdState.h:104
Comm::ConnectionPointer serverConn
a successfully opened connection to a server.
Definition: FwdState.h:203
static time_t ForwardTimeout(const time_t fwdStart)
time left to finish the whole forwarding process (which started at fwdStart)
Definition: FwdState.cc:428
void closeServerConnection(const char *reason)
stops monitoring server connection for closure and updates pconn stats
Definition: FwdState.cc:108
CBDATA_CHILD(FwdState)
JobWait< Security::PeerConnector > encryptionWait
waits for the established transport connection to be secured/encrypted
Definition: FwdState.h:193
void updateAttempts(int)
sets n_tries to the given value (while keeping ALE, if any, in sync)
Definition: FwdState.cc:1096
void usePinned()
send request on an existing connection dedicated to the requesting client
Definition: FwdState.cc:1152
void tunnelEstablishmentDone(Http::TunnelerAnswer &answer)
resumes operations after the (possibly failed) HTTP CONNECT exchange
Definition: FwdState.cc:930
static void logReplyStatus(int tries, const Http::StatusCode status)
Definition: FwdState.cc:1397
static void RegisterWithCacheManager(void)
Definition: FwdState.cc:1391
void updateAleWithFinalError()
updates ALE when we finalize the transaction error (if any)
Definition: FwdState.cc:238
bool exhaustedTries() const
whether we have used up all permitted forwarding attempts
Definition: FwdState.cc:1411
void establishTunnelThruProxy(const Comm::ConnectionPointer &)
Definition: FwdState.cc:909
void stopAndDestroy(const char *reason)
ends forwarding; relies on refcounting so the effect may not be immediate
Definition: FwdState.cc:183
bool checkRetriable()
Whether we may try sending this request again after a failure.
Definition: FwdState.cc:734
void syncWithServerConn(const Comm::ConnectionPointer &server, const char *host, const bool reused)
commits to using the given open to-peer connection
Definition: FwdState.cc:1066
bool waitingForDispatched
whether we are waiting for the last dispatch()ed activity to end
Definition: FwdState.h:200
void notifyConnOpener()
makes sure connection opener knows that the destinations have changed
Definition: FwdState.cc:660
void markStoredReplyAsWhole(const char *whyWeAreSure)
Definition: FwdState.cc:580
void secureConnectionToPeer(const Comm::ConnectionPointer &)
encrypts an established TCP connection to peer (including origin servers)
Definition: FwdState.cc:997
struct FwdState::@67 flags
static void fwdStart(const Comm::ConnectionPointer &client, StoreEntry *, HttpRequest *)
Same as Start() but no master xaction info (AccessLogEntry) available.
Definition: FwdState.cc:412
void syncHierNote(const Comm::ConnectionPointer &server, const char *host)
Definition: FwdState.cc:1086
ErrorState * makeConnectingError(const err_type type) const
void advanceDestination(const char *stepDescription, const Comm::ConnectionPointer &conn, const StepStart &startStep)
starts a preparation step for an established connection; retries on failures
Definition: FwdState.cc:821
Final result (an open connection or an error) sent to the job initiator.
Definition: HappyConnOpener.h:76
Definition: HappyConnOpener.h:106
Definition: HttpRequest.h:49
Definition: HttpTunnelerAnswer.h:30
Definition: pconn.h:113
Definition: ResolvedPeers.h:122
Interface for those who need a list of peers to forward a request to.
Definition: PeerSelectState.h:33
Definition: ResolvedPeers.h:34
Definition: EncryptorAnswer.h:22
Definition: Store.h:42
Definition: QosConfig.h:45
Definition: QosConfig.h:31