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_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
20class HttpRequest;
22class CachePeer;
23class StoreEntry;
24class PeerSelector;
25
30 StoreEntry *,
31 IRCB * callback,
32 PeerSelector *ps,
33 int *exprep,
34 int *timeout);
35void neighborAddAcl(const char *, const char *);
36
37void neighborsUdpAck(const cache_key *, icp_common_t *, const Ip::Address &);
38void neighborAdd(const char *, const char *, int, int, int, int, int);
39void neighbors_init(void);
40#if USE_HTCP
42#endif
43
45CachePeer *findCachePeerByName(const char *);
46
50void peerClearRRStart(void);
51void peerClearRR(void);
52
53// TODO: Move, together with its many dependencies and callers, into CachePeer.
56void peerAlive(CachePeer *);
57
61int neighborUp(const CachePeer * e);
62const char *neighborTypeStr(const CachePeer * e);
63peer_t neighborType(const CachePeer *, const AnyP::Uri &);
65int peerHTTPOkay(const CachePeer *, PeerSelector *);
66
68time_t positiveTimeout(const time_t timeout);
69
71bool peerCanOpenMore(const CachePeer *p);
73bool peerHasConnAvailable(const CachePeer *p);
76
77CachePeer *whichPeer(const Ip::Address &from);
78
79#endif /* SQUID_NEIGHBORS_H_ */
80
Definition: Uri.h:31
HttpRequest * request
htcp_clr_reason
Definition: enums.h:240
peer_t
Definition: enums.h:27
lookup_t
Definition: lookup_t.h:12
peer_t neighborType(const CachePeer *, const AnyP::Uri &)
Definition: neighbors.cc:114
void peerClearRR(void)
Definition: neighbors.cc:448
const char * neighborTypeStr(const CachePeer *e)
Definition: neighbors.cc:81
void peerNoteDigestLookup(HttpRequest *request, CachePeer *p, lookup_t lookup)
Definition: neighbors.cc:813
void neighborsUdpAck(const cache_key *, icp_common_t *, const Ip::Address &)
Definition: neighbors.cc:929
void neighborsHtcpClear(StoreEntry *, HttpRequest *, const HttpRequestMethod &, htcp_clr_reason)
Definition: neighbors.cc:1673
CachePeer * getFirstUpParent(PeerSelector *)
Definition: neighbors.cc:286
CachePeer * whichPeer(const Ip::Address &from)
Definition: neighbors.cc:96
int neighborUp(const CachePeer *e)
Definition: neighbors.cc:1060
void neighbors_init(void)
Definition: neighbors.cc:510
CachePeer * getRoundRobinParent(PeerSelector *)
Definition: neighbors.cc:313
void dump_peer_options(StoreEntry *, CachePeer *)
Definition: neighbors.cc:1371
bool peerHasConnAvailable(const CachePeer *p)
Whether the peer has idle or standby connections that can be used now.
Definition: neighbors.cc:231
void peerAlive(CachePeer *)
Definition: neighbors.cc:455
CachePeer * findCachePeerByName(const char *)
cache_peer with a given name (or nil)
Definition: neighbors.cc:1050
int neighborsCount(PeerSelector *)
Definition: neighbors.cc:272
void neighborAddAcl(const char *, const char *)
int neighborsUdpPing(HttpRequest *, StoreEntry *, IRCB *callback, PeerSelector *ps, int *exprep, int *timeout)
Definition: neighbors.cc:550
CachePeer * neighborsDigestSelect(PeerSelector *)
Definition: neighbors.cc:751
time_t positiveTimeout(const time_t timeout)
Definition: neighbors.cc:1095
void peerClearRRStart(void)
Definition: neighbors.cc:431
bool peerCanOpenMore(const CachePeer *p)
Whether we can open new connections to the peer (e.g., despite max-conn)
Definition: neighbors.cc:222
int peerHTTPOkay(const CachePeer *, PeerSelector *)
Definition: neighbors.cc:257
void neighborAdd(const char *, const char *, int, int, int, int, int)
void peerConnClosed(CachePeer *p)
Notifies peer of an associated connection closure.
Definition: neighbors.cc:246
CachePeer * getSingleParent(PeerSelector *)
lookup_t peerDigestLookup(CachePeer *p, PeerSelector *)
Definition: neighbors.cc:705
CachePeer * getDefaultParent(PeerSelector *)
Definition: neighbors.cc:474
CachePeer * getWeightedRoundRobinParent(PeerSelector *)
Definition: neighbors.cc:355
unsigned char cache_key
Store key.
Definition: forward.h:29
void IRCB(CachePeer *, peer_t, AnyP::ProtocolType, void *, void *data)
Definition: typedefs.h:22

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors