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 "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 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 URL &);
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:1150
CachePeer * getFirstUpParent(PeerSelector *)
Definition: neighbors.cc:283
void peerConnectSucceded(CachePeer *)
Definition: neighbors.cc:1308
void const char HLPCB * callback
Definition: stub_helper.cc:16
void peerConnClosed(CachePeer *p)
Notifies peer of an associated connection closure.
Definition: neighbors.cc:242
htcp_clr_reason
Definition: enums.h:211
CachePeer * getRoundRobinParent(PeerSelector *)
Definition: neighbors.cc:308
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:268
bool peerHasConnAvailable(const CachePeer *p)
Whether the peer has idle or standby connections that can be used now.
Definition: neighbors.cc:227
int peerHTTPOkay(const CachePeer *, PeerSelector *)
Definition: neighbors.cc:253
CachePeer * whichPeer(const Ip::Address &from)
Definition: neighbors.cc:95
char * p
Definition: membanger.c:43
CachePeer * getNextPeer(CachePeer *)
Definition: neighbors.cc:495
CachePeer * neighborsDigestSelect(PeerSelector *)
Definition: neighbors.cc:798
bool peerCanOpenMore(const CachePeer *p)
Whether we can open new connections to the peer (e.g., despite max-conn)
Definition: neighbors.cc:218
Definition: URL.h:24
int neighborsUdpPing(HttpRequest *, StoreEntry *, IRCB *callback, PeerSelector *ps, int *exprep, int *timeout)
Definition: neighbors.cc:590
void peerClearRRStart(void)
Definition: neighbors.cc:424
void neighborAddAcl(const char *, const char *)
void neighborsHtcpClear(StoreEntry *, const char *, HttpRequest *, const HttpRequestMethod &, htcp_clr_reason)
Definition: neighbors.cc:1795
CachePeer * peerFindByNameAndPort(const char *, unsigned short)
Definition: neighbors.cc:1132
void peerClearRR(void)
Definition: neighbors.cc:441
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:998
const char * neighborTypeStr(const CachePeer *e)
Definition: neighbors.cc:80
void dump_peer_options(StoreEntry *, CachePeer *)
Definition: neighbors.cc:1500
lookup_t peerDigestLookup(CachePeer *p, PeerSelector *)
Definition: neighbors.cc:754
peer_t
Definition: enums.h:27
void neighbors_init(void)
Definition: neighbors.cc:548
void peerNoteDigestGone(CachePeer *p)
Definition: neighbors.cc:1182
time_t peerConnectTimeout(const CachePeer *peer)
Definition: neighbors.cc:1191
void peerConnectFailed(CachePeer *)
Definition: neighbors.cc:1301
void peerNoteDigestLookup(HttpRequest *request, CachePeer *p, lookup_t lookup)
Definition: neighbors.cc:863
CachePeer * getDefaultParent(PeerSelector *)
Definition: neighbors.cc:468
lookup_t
Definition: lookup_t.h:12
CachePeer * getWeightedRoundRobinParent(PeerSelector *)
Definition: neighbors.cc:350
CachePeer * getFirstPeer(void)
Definition: neighbors.cc:501
time_t positiveTimeout(const time_t timeout)
Definition: neighbors.cc:1198
peer_t neighborType(const CachePeer *, const URL &)
Definition: neighbors.cc:114
CachePeer * peerFindByName(const char *)
Definition: neighbors.cc:1119

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors