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 
int neighborUp(const CachePeer *e)
Definition: neighbors.cc:1149
CachePeer * getFirstUpParent(PeerSelector *)
Definition: neighbors.cc:282
void peerConnectSucceded(CachePeer *)
Definition: neighbors.cc:1299
void const char HLPCB * callback
Definition: stub_helper.cc:16
void peerConnClosed(CachePeer *p)
Notifies peer of an associated connection closure.
Definition: neighbors.cc:241
htcp_clr_reason
Definition: enums.h:233
CachePeer * getRoundRobinParent(PeerSelector *)
Definition: neighbors.cc:307
CachePeer * getSingleParent(PeerSelector *)
unsigned char cache_key
Store key.
Definition: forward.h:29
struct _request * request(char *urlin)
Definition: tcp-banger2.c:291
void neighborAdd(const char *, const char *, int, int, int, int, int)
int neighborsCount(PeerSelector *)
Definition: neighbors.cc:267
bool peerHasConnAvailable(const CachePeer *p)
Whether the peer has idle or standby connections that can be used now.
Definition: neighbors.cc:226
int peerHTTPOkay(const CachePeer *, PeerSelector *)
Definition: neighbors.cc:252
CachePeer * whichPeer(const Ip::Address &from)
Definition: neighbors.cc:94
char * p
Definition: membanger.c:43
CachePeer * getNextPeer(CachePeer *)
Definition: neighbors.cc:494
peer_t neighborType(const CachePeer *, const AnyP::Uri &)
Definition: neighbors.cc:113
CachePeer * neighborsDigestSelect(PeerSelector *)
Definition: neighbors.cc:797
bool peerCanOpenMore(const CachePeer *p)
Whether we can open new connections to the peer (e.g., despite max-conn)
Definition: neighbors.cc:217
int neighborsUdpPing(HttpRequest *, StoreEntry *, IRCB *callback, PeerSelector *ps, int *exprep, int *timeout)
Definition: neighbors.cc:589
void peerClearRRStart(void)
Definition: neighbors.cc:423
void neighborAddAcl(const char *, const char *)
void neighborsHtcpClear(StoreEntry *, const char *, HttpRequest *, const HttpRequestMethod &, htcp_clr_reason)
Definition: neighbors.cc:1785
CachePeer * peerFindByNameAndPort(const char *, unsigned short)
Definition: neighbors.cc:1131
void peerClearRR(void)
Definition: neighbors.cc:440
void IRCB(CachePeer *, peer_t, AnyP::ProtocolType, void *, void *data)
Definition: typedefs.h:22
void neighborsUdpAck(const cache_key *, icp_common_t *, const Ip::Address &)
Definition: neighbors.cc:997
const char * neighborTypeStr(const CachePeer *e)
Definition: neighbors.cc:79
Definition: Uri.h:30
void dump_peer_options(StoreEntry *, CachePeer *)
Definition: neighbors.cc:1490
lookup_t peerDigestLookup(CachePeer *p, PeerSelector *)
Definition: neighbors.cc:753
peer_t
Definition: enums.h:27
void neighbors_init(void)
Definition: neighbors.cc:547
void peerNoteDigestGone(CachePeer *p)
time_t peerConnectTimeout(const CachePeer *peer)
Definition: neighbors.cc:1182
void peerConnectFailed(CachePeer *)
Definition: neighbors.cc:1292
void peerNoteDigestLookup(HttpRequest *request, CachePeer *p, lookup_t lookup)
Definition: neighbors.cc:862
CachePeer * getDefaultParent(PeerSelector *)
Definition: neighbors.cc:467
lookup_t
Definition: lookup_t.h:12
CachePeer * getWeightedRoundRobinParent(PeerSelector *)
Definition: neighbors.cc:349
CachePeer * getFirstPeer(void)
Definition: neighbors.cc:500
time_t positiveTimeout(const time_t timeout)
Definition: neighbors.cc:1189
CachePeer * peerFindByName(const char *)
Definition: neighbors.cc:1118

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors