neighbors.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 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_SRC_NEIGHBORS_H
12 #define SQUID_SRC_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 
30  StoreEntry *,
31  IRCB * callback,
32  PeerSelector *ps,
33  int *exprep,
34  int *timeout);
35 void neighborAddAcl(const char *, const char *);
36 
37 void neighborsUdpAck(const cache_key *, icp_common_t *, const Ip::Address &);
38 void neighborAdd(const char *, const char *, int, int, int, int, int);
39 void neighbors_init(void);
40 #if USE_HTCP
42 #endif
43 
45 CachePeer *findCachePeerByName(const char *);
46 
50 void peerClearRRStart(void);
51 void peerClearRR(void);
52 
53 // TODO: Move, together with its many dependencies and callers, into CachePeer.
56 void peerAlive(CachePeer *);
57 
61 int neighborUp(const CachePeer * e);
62 const char *neighborTypeStr(const CachePeer * e);
63 peer_t neighborType(const CachePeer *, const AnyP::Uri &);
65 int peerHTTPOkay(const CachePeer *, PeerSelector *);
66 
68 time_t positiveTimeout(const time_t timeout);
69 
71 bool peerCanOpenMore(const CachePeer *p);
73 bool peerHasConnAvailable(const CachePeer *p);
75 void peerConnClosed(CachePeer *p);
76 
77 CachePeer *whichPeer(const Ip::Address &from);
78 
79 #endif /* SQUID_SRC_NEIGHBORS_H */
80 
void peerNoteDigestLookup(HttpRequest *request, CachePeer *p, lookup_t lookup)
Definition: neighbors.cc:811
CachePeer * neighborsDigestSelect(PeerSelector *)
Definition: neighbors.cc:749
CachePeer * getDefaultParent(PeerSelector *)
Definition: neighbors.cc:468
Definition: Uri.h:31
HttpRequest * request
CachePeer * whichPeer(const Ip::Address &from)
Definition: neighbors.cc:98
unsigned char cache_key
Store key.
Definition: forward.h:29
int neighborUp(const CachePeer *e)
Definition: neighbors.cc:1058
void neighbors_init(void)
Definition: neighbors.cc:504
void neighborsHtcpClear(StoreEntry *, HttpRequest *, const HttpRequestMethod &, htcp_clr_reason)
Definition: neighbors.cc:1675
CachePeer * getSingleParent(PeerSelector *)
bool peerHasConnAvailable(const CachePeer *p)
Whether the peer has idle or standby connections that can be used now.
Definition: neighbors.cc:226
void neighborAddAcl(const char *, const char *)
void peerConnClosed(CachePeer *p)
Notifies peer of an associated connection closure.
Definition: neighbors.cc:241
void IRCB(CachePeer *, peer_t, AnyP::ProtocolType, void *, void *data)
Definition: typedefs.h:22
void neighborAdd(const char *, const char *, int, int, int, int, int)
bool peerCanOpenMore(const CachePeer *p)
Whether we can open new connections to the peer (e.g., despite max-conn)
Definition: neighbors.cc:217
peer_t
Definition: enums.h:22
int neighborsUdpPing(HttpRequest *, StoreEntry *, IRCB *callback, PeerSelector *ps, int *exprep, int *timeout)
Definition: neighbors.cc:544
void peerClearRR(void)
Definition: neighbors.cc:442
lookup_t peerDigestLookup(CachePeer *p, PeerSelector *)
Definition: neighbors.cc:703
lookup_t
Definition: lookup_t.h:12
void peerClearRRStart(void)
Definition: neighbors.cc:425
CachePeer * getFirstUpParent(PeerSelector *)
Definition: neighbors.cc:281
int neighborsCount(PeerSelector *)
Definition: neighbors.cc:267
void peerAlive(CachePeer *)
Definition: neighbors.cc:449
const char * neighborTypeStr(const CachePeer *e)
Definition: neighbors.cc:83
CachePeer * getWeightedRoundRobinParent(PeerSelector *)
Definition: neighbors.cc:349
void dump_peer_options(StoreEntry *, CachePeer *)
Definition: neighbors.cc:1382
peer_t neighborType(const CachePeer *, const AnyP::Uri &)
Definition: neighbors.cc:116
CachePeer * getRoundRobinParent(PeerSelector *)
Definition: neighbors.cc:307
void neighborsUdpAck(const cache_key *, icp_common_t *, const Ip::Address &)
Definition: neighbors.cc:927
time_t positiveTimeout(const time_t timeout)
Definition: neighbors.cc:1092
int peerHTTPOkay(const CachePeer *, PeerSelector *)
Definition: neighbors.cc:252
CachePeer * findCachePeerByName(const char *)
cache_peer with a given name (or nil)
Definition: neighbors.cc:1048
htcp_clr_reason
Definition: enums.h:234

 

Introduction

Documentation

Support

Miscellaneous