neighbors.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2018 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 /* DEBUG: section 15 Neighbor Routines */
10 
11 #ifndef SQUID_NEIGHBORS_H_
12 #define SQUID_NEIGHBORS_H_
13 
14 #include "anyp/forward.h"
15 #include "enums.h"
16 #include "ICP.h"
17 #include "lookup_t.h"
18 #include "typedefs.h" //for IRCB
19 
20 class HttpRequest;
21 class HttpRequestMethod;
22 class CachePeer;
23 class StoreEntry;
24 class PeerSelector;
25 
26 CachePeer *getFirstPeer(void);
32  StoreEntry *,
33  IRCB * callback,
34  PeerSelector *ps,
35  int *exprep,
36  int *timeout);
37 void neighborAddAcl(const char *, const char *);
38 
39 void neighborsUdpAck(const cache_key *, icp_common_t *, const Ip::Address &);
40 void neighborAdd(const char *, const char *, int, int, int, int, int);
41 void neighbors_init(void);
42 #if USE_HTCP
44 #endif
45 CachePeer *peerFindByName(const char *);
46 CachePeer *peerFindByNameAndPort(const char *, unsigned short);
50 void peerClearRRStart(void);
51 void peerClearRR(void);
56 int neighborUp(const CachePeer * e);
57 const char *neighborTypeStr(const CachePeer * e);
58 peer_t neighborType(const CachePeer *, const AnyP::Uri &);
62 int peerHTTPOkay(const CachePeer *, PeerSelector *);
63 
64 // TODO: Consider moving this method to CachePeer class.
66 time_t peerConnectTimeout(const CachePeer *peer);
67 
69 time_t positiveTimeout(const time_t timeout);
70 
72 bool peerCanOpenMore(const CachePeer *p);
74 bool peerHasConnAvailable(const CachePeer *p);
77 
78 CachePeer *whichPeer(const Ip::Address &from);
79 
80 #endif /* SQUID_NEIGHBORS_H_ */
81 
CachePeer * getWeightedRoundRobinParent(PeerSelector *ps)
Definition: neighbors.cc:349
void const char HLPCB * callback
Definition: stub_helper.cc:16
htcp_clr_reason
Definition: enums.h:233
CachePeer * getSingleParent(PeerSelector *)
unsigned char cache_key
Store key.
Definition: forward.h:29
time_t peerConnectTimeout(const CachePeer *peer)
Definition: neighbors.cc:1182
struct _request * request(char *urlin)
Definition: tcp-banger2.c:291
CachePeer * getDefaultParent(PeerSelector *ps)
Definition: neighbors.cc:467
void neighborAdd(const char *, const char *, int, int, int, int, int)
CachePeer * peerFindByNameAndPort(const char *name, unsigned short port)
Definition: neighbors.cc:1131
char * p
Definition: membanger.c:43
int neighborsUdpPing(HttpRequest *request, StoreEntry *entry, IRCB *callback, PeerSelector *ps, int *exprep, int *timeout)
Definition: neighbors.cc:589
CachePeer * getRoundRobinParent(PeerSelector *ps)
Definition: neighbors.cc:307
void neighborsUdpAck(const cache_key *key, icp_common_t *header, const Ip::Address &from)
Definition: neighbors.cc:997
void peerClearRR()
Definition: neighbors.cc:440
void peerConnectSucceded(CachePeer *p)
Definition: neighbors.cc:1299
void peerConnClosed(CachePeer *p)
Notifies peer of an associated connection closure.
Definition: neighbors.cc:241
void peerConnectFailed(CachePeer *p)
Definition: neighbors.cc:1292
CachePeer * getFirstUpParent(PeerSelector *ps)
Definition: neighbors.cc:282
peer_t neighborType(const CachePeer *p, const AnyP::Uri &url)
Definition: neighbors.cc:113
void neighborAddAcl(const char *, const char *)
bool peerCanOpenMore(const CachePeer *p)
Whether we can open new connections to the peer (e.g., despite max-conn)
Definition: neighbors.cc:217
CachePeer * getNextPeer(CachePeer *p)
Definition: neighbors.cc:494
const char * neighborTypeStr(const CachePeer *p)
Definition: neighbors.cc:79
void IRCB(CachePeer *, peer_t, AnyP::ProtocolType, void *, void *data)
Definition: typedefs.h:22
CachePeer * whichPeer(const Ip::Address &from)
Definition: neighbors.cc:94
time_t positiveTimeout(const time_t timeout)
Definition: neighbors.cc:1189
void dump_peer_options(StoreEntry *sentry, CachePeer *p)
Definition: neighbors.cc:1490
void neighborsHtcpClear(StoreEntry *e, const char *uri, HttpRequest *req, const HttpRequestMethod &method, htcp_clr_reason reason)
Definition: neighbors.cc:1785
bool peerHasConnAvailable(const CachePeer *p)
Whether the peer has idle or standby connections that can be used now.
Definition: neighbors.cc:226
Definition: Uri.h:30
int peerHTTPOkay(const CachePeer *p, PeerSelector *ps)
Definition: neighbors.cc:252
CachePeer * neighborsDigestSelect(PeerSelector *ps)
Definition: neighbors.cc:797
lookup_t peerDigestLookup(CachePeer *p, PeerSelector *ps)
Definition: neighbors.cc:753
peer_t
Definition: enums.h:27
void peerNoteDigestGone(CachePeer *p)
int neighborUp(const CachePeer *p)
Definition: neighbors.cc:1149
CachePeer * getFirstPeer(void)
Definition: neighbors.cc:500
int neighborsCount(PeerSelector *ps)
Definition: neighbors.cc:267
void peerNoteDigestLookup(HttpRequest *request, CachePeer *p, lookup_t lookup)
Definition: neighbors.cc:862
void peerClearRRStart(void)
Definition: neighbors.cc:423
lookup_t
Definition: lookup_t.h:12
CachePeer * peerFindByName(const char *name)
Definition: neighbors.cc:1118
void neighbors_init(void)
Definition: neighbors.cc:547

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors