neighbors.h File Reference
#include "anyp/forward.h"
#include "enums.h"
#include "ICP.h"
#include "lookup_t.h"
#include "typedefs.h"
Include dependency graph for neighbors.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

CachePeergetFirstPeer (void)
 
CachePeergetFirstUpParent (PeerSelector *)
 
CachePeergetNextPeer (CachePeer *)
 
CachePeergetSingleParent (PeerSelector *)
 
int neighborsCount (PeerSelector *)
 
int neighborsUdpPing (HttpRequest *, StoreEntry *, IRCB *callback, PeerSelector *ps, int *exprep, int *timeout)
 
void neighborAddAcl (const char *, const char *)
 
void neighborsUdpAck (const cache_key *, icp_common_t *, const Ip::Address &)
 
void neighborAdd (const char *, const char *, int, int, int, int, int)
 
void neighbors_init (void)
 
void neighborsHtcpClear (StoreEntry *, HttpRequest *, const HttpRequestMethod &, htcp_clr_reason)
 
CachePeerpeerFindByName (const char *)
 
CachePeerpeerFindByNameAndPort (const char *, unsigned short)
 
CachePeergetDefaultParent (PeerSelector *)
 
CachePeergetRoundRobinParent (PeerSelector *)
 
CachePeergetWeightedRoundRobinParent (PeerSelector *)
 
void peerClearRRStart (void)
 
void peerClearRR (void)
 
lookup_t peerDigestLookup (CachePeer *p, PeerSelector *)
 
CachePeerneighborsDigestSelect (PeerSelector *)
 
void peerNoteDigestLookup (HttpRequest *request, CachePeer *p, lookup_t lookup)
 
void peerNoteDigestGone (CachePeer *p)
 
int neighborUp (const CachePeer *e)
 
const char * neighborTypeStr (const CachePeer *e)
 
peer_t neighborType (const CachePeer *, const AnyP::Uri &)
 
void peerConnectFailed (CachePeer *)
 
void peerConnectSucceded (CachePeer *)
 
void dump_peer_options (StoreEntry *, CachePeer *)
 
int peerHTTPOkay (const CachePeer *, PeerSelector *)
 
time_t positiveTimeout (const time_t timeout)
 
bool peerCanOpenMore (const CachePeer *p)
 Whether we can open new connections to the peer (e.g., despite max-conn) More...
 
bool peerHasConnAvailable (const CachePeer *p)
 Whether the peer has idle or standby connections that can be used now. More...
 
void peerConnClosed (CachePeer *p)
 Notifies peer of an associated connection closure. More...
 
CachePeerwhichPeer (const Ip::Address &from)
 

Function Documentation

◆ dump_peer_options()

◆ getDefaultParent()

◆ getFirstPeer()

CachePeer* getFirstPeer ( void  )

Definition at line 508 of file neighbors.cc.

References Config, and SquidConfig::peers.

Referenced by statPeerSelect().

◆ getFirstUpParent()

◆ getNextPeer()

CachePeer* getNextPeer ( CachePeer )

Definition at line 502 of file neighbors.cc.

References CachePeer::next.

Referenced by statPeerSelect().

◆ getRoundRobinParent()

◆ getSingleParent()

CachePeer* getSingleParent ( PeerSelector )

◆ getWeightedRoundRobinParent()

◆ neighborAdd()

void neighborAdd ( const char *  ,
const char *  ,
int  ,
int  ,
int  ,
int  ,
int   
)

◆ neighborAddAcl()

void neighborAddAcl ( const char *  ,
const char *   
)

◆ neighbors_init()

◆ neighborsCount()

int neighborsCount ( PeerSelector )

Definition at line 274 of file neighbors.cc.

References Config, debugs, CachePeer::next, NULL, SquidConfig::peers, and peerWouldBePinged().

Referenced by peerSelectIcpPing().

◆ neighborsDigestSelect()

◆ neighborsHtcpClear()

◆ neighborsUdpAck()

◆ neighborsUdpPing()

int neighborsUdpPing ( HttpRequest ,
StoreEntry ,
IRCB callback,
PeerSelector ps,
int exprep,
int timeout 
)

◆ neighborType()

◆ neighborTypeStr()

const char* neighborTypeStr ( const CachePeer e)

◆ neighborUp()

◆ peerCanOpenMore()

bool peerCanOpenMore ( const CachePeer p)

◆ peerClearRR()

void peerClearRR ( void  )

Called whenever the round-robin counters need to be reset to a sane state. So far those times are:

  • On startup and reconfigure - to set the counters to sane initial settings.
  • When a CachePeer has revived from dead, to prevent the revived CachePeer being flooded with requests which it has 'missed' during the down period.

Definition at line 448 of file neighbors.cc.

References Config, CachePeer::next, NULL, SquidConfig::peers, and CachePeer::rr_count.

Referenced by peerAlive(), and peerClearRRLoop().

◆ peerClearRRStart()

void peerClearRRStart ( void  )

This gets called on startup and restart to kick off the CachePeer round-robin maintenance event. It ensures that no matter how many times its called no more than one event is scheduled.

Definition at line 431 of file neighbors.cc.

References NULL, and peerClearRRLoop().

Referenced by parse_peer().

◆ peerConnClosed()

◆ peerConnectFailed()

◆ peerConnectSucceded()

◆ peerDigestLookup()

◆ peerFindByName()

CachePeer* peerFindByName ( const char *  )

◆ peerFindByNameAndPort()

CachePeer* peerFindByNameAndPort ( const char *  ,
unsigned short   
)

◆ peerHasConnAvailable()

bool peerHasConnAvailable ( const CachePeer p)

Definition at line 233 of file neighbors.cc.

References PconnPool::count(), debugs, CachePeer::pool, and CachePeer::standby.

Referenced by peerHTTPOkay().

◆ peerHTTPOkay()

◆ peerNoteDigestGone()

void peerNoteDigestGone ( CachePeer p)

◆ peerNoteDigestLookup()

void peerNoteDigestLookup ( HttpRequest request,
CachePeer p,
lookup_t  lookup 
)

Definition at line 869 of file neighbors.cc.

References debugs, CachePeer::host, lookup_t_str, and request().

Referenced by PeerSelector::handleIcpReply(), and neighborsDigestSelect().

◆ positiveTimeout()

time_t positiveTimeout ( const time_t  timeout)
Returns
max(1, timeout)

Definition at line 1188 of file neighbors.cc.

References max().

Referenced by FwdState::connectingTimeout(), and PeerPoolMgr::handleOpenedConnection().

◆ whichPeer()

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors