neighbors.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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 "enums.h"
15 #include "ICP.h"
16 #include "lookup_t.h"
17 #include "typedefs.h" //for IRCB
18 
19 class HttpRequest;
20 class HttpRequestMethod;
21 class CachePeer;
22 class StoreEntry;
23 class URL;
24 
25 CachePeer *getFirstPeer(void);
31  StoreEntry *,
32  IRCB * callback,
33  void *data,
34  int *exprep,
35  int *timeout);
36 void neighborAddAcl(const char *, const char *);
37 
38 void neighborsUdpAck(const cache_key *, icp_common_t *, const Ip::Address &);
39 void neighborAdd(const char *, const char *, int, int, int, int, int);
40 void neighbors_init(void);
41 #if USE_HTCP
43 #endif
44 CachePeer *peerFindByName(const char *);
45 CachePeer *peerFindByNameAndPort(const char *, unsigned short);
49 void peerClearRRStart(void);
50 void peerClearRR(void);
55 int neighborUp(const CachePeer * e);
56 const char *neighborTypeStr(const CachePeer * e);
57 peer_t neighborType(const CachePeer *, const URL &);
61 int peerHTTPOkay(const CachePeer *, HttpRequest *);
62 
63 // TODO: Consider moving this method to CachePeer class.
65 time_t peerConnectTimeout(const CachePeer *peer);
66 
68 time_t positiveTimeout(const time_t timeout);
69 
71 bool peerCanOpenMore(const CachePeer *p);
73 bool peerHasConnAvailable(const CachePeer *p);
76 
77 CachePeer *whichPeer(const Ip::Address &from);
78 
79 #endif /* SQUID_NEIGHBORS_H_ */
80 
lookup_t peerDigestLookup(CachePeer *p, HttpRequest *request)
Definition: neighbors.cc:737
int neighborUp(const CachePeer *e)
Definition: neighbors.cc:1123
void peerConnectSucceded(CachePeer *)
Definition: neighbors.cc:1281
void const char HLPCB * callback
Definition: stub_helper.cc:16
void peerConnClosed(CachePeer *p)
Notifies peer of an associated connection closure.
Definition: neighbors.cc:237
htcp_clr_reason
Definition: enums.h:204
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)
bool peerHasConnAvailable(const CachePeer *p)
Whether the peer has idle or standby connections that can be used now.
Definition: neighbors.cc:222
CachePeer * getSingleParent(HttpRequest *)
int neighborsCount(HttpRequest *)
Definition: neighbors.cc:263
CachePeer * whichPeer(const Ip::Address &from)
Definition: neighbors.cc:95
char * p
Definition: membanger.c:43
CachePeer * getNextPeer(CachePeer *)
Definition: neighbors.cc:478
bool peerCanOpenMore(const CachePeer *p)
Whether we can open new connections to the peer (e.g., despite max-conn)
Definition: neighbors.cc:213
Definition: URL.h:24
void peerClearRRStart(void)
Definition: neighbors.cc:410
void const char HLPCB void * data
Definition: stub_helper.cc:16
void neighborAddAcl(const char *, const char *)
CachePeer * getRoundRobinParent(HttpRequest *request)
Definition: neighbors.cc:300
void neighborsHtcpClear(StoreEntry *, const char *, HttpRequest *, const HttpRequestMethod &, htcp_clr_reason)
Definition: neighbors.cc:1763
CachePeer * neighborsDigestSelect(HttpRequest *request)
Definition: neighbors.cc:779
CachePeer * peerFindByNameAndPort(const char *, unsigned short)
Definition: neighbors.cc:1105
void peerClearRR(void)
Definition: neighbors.cc:427
int peerHTTPOkay(const CachePeer *, HttpRequest *)
Definition: neighbors.cc:248
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:977
const char * neighborTypeStr(const CachePeer *e)
Definition: neighbors.cc:80
void dump_peer_options(StoreEntry *, CachePeer *)
Definition: neighbors.cc:1474
CachePeer * getDefaultParent(HttpRequest *request)
Definition: neighbors.cc:454
CachePeer * getWeightedRoundRobinParent(HttpRequest *request)
Definition: neighbors.cc:339
peer_t
Definition: enums.h:27
void neighbors_init(void)
Definition: neighbors.cc:531
void peerNoteDigestGone(CachePeer *p)
Definition: neighbors.cc:1155
time_t peerConnectTimeout(const CachePeer *peer)
Definition: neighbors.cc:1164
void peerConnectFailed(CachePeer *)
Definition: neighbors.cc:1274
void peerNoteDigestLookup(HttpRequest *request, CachePeer *p, lookup_t lookup)
Definition: neighbors.cc:842
int neighborsUdpPing(HttpRequest *, StoreEntry *, IRCB *callback, void *data, int *exprep, int *timeout)
Definition: neighbors.cc:573
lookup_t
Definition: lookup_t.h:12
CachePeer * getFirstPeer(void)
Definition: neighbors.cc:484
time_t positiveTimeout(const time_t timeout)
Definition: neighbors.cc:1171
CachePeer * getFirstUpParent(HttpRequest *)
Definition: neighbors.cc:278
peer_t neighborType(const CachePeer *, const URL &)
Definition: neighbors.cc:114
CachePeer * peerFindByName(const char *)
Definition: neighbors.cc:1092

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors