]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/CachePeer.h
2 * Copyright (C) 1996-2014 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 #ifndef SQUID_CACHEPEER_H_
10 #define SQUID_CACHEPEER_H_
12 #include "acl/forward.h"
13 #include "base/CbcPointer.h"
15 #include "icp_opcode.h"
16 #include "ip/Address.h"
18 //TODO: remove, it is unconditionally defined and always used.
19 #define PEER_MULTICAST_SIBLINGS 1
21 #if HAVE_OPENSSL_SSL_H
22 #include <openssl/ssl.h>
25 class CachePeerDomainList
;
26 class NeighborTypeDomainList
;
48 int n_keepalives_sent
;
49 int n_keepalives_recv
;
53 time_t last_connect_failure
;
54 time_t last_connect_probe
;
55 int logged_state
; /* so we can print dead/revived msgs */
56 int conn_open
; /* current opened connections */
61 int counts
[ICP_END
+1];
73 unsigned short http_port
;
74 CachePeerDomainList
*peer_domain
;
75 NeighborTypeDomainList
*typelist
;
85 bool weighted_roundrobin
;
92 bool htcp_no_purge_clr
;
94 bool htcp_forward_clr
;
96 bool no_netdb_exchange
;
103 bool set
; //If false, whole url is to be used. Overrides others
116 #if PEER_MULTICAST_SIBLINGS
125 double avg_n_members
;
127 int n_replies_expected
;
132 bool count_event_pending
;
136 #if USE_CACHE_DIGESTS
142 int tcp_up
; /* 0 if a connect() fails */
144 Ip::Address addresses
[10];
152 double load_multiplier
;
153 double load_factor
; /* normalized weight value */
158 double load_multiplier
;
159 double load_factor
; /* normalized weight value */
164 double load_multiplier
;
165 double load_factor
; /* normalized weight value */
168 char *login
; /* Proxy authorization */
169 time_t connect_timeout
;
170 int connect_fail_limit
;
173 PconnPool
*pool
; ///< idle connection pool for this peer
174 CbcPointer
<PeerPoolMgr
> mgr
; ///< pool manager
175 int limit
; ///< the limit itself
176 bool waitingForClose
; ///< a conn must close before we open a standby conn
177 } standby
; ///< optional "cache_peer standby=limit" feature
178 char *domain
; /* Forced domain */
193 SSL_SESSION
*sslSession
;
200 #endif /* SQUID_CACHEPEER_H_ */