neighbors.h File Reference
#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 (HttpRequest *)
 
CachePeergetNextPeer (CachePeer *)
 
CachePeergetSingleParent (HttpRequest *)
 
int neighborsCount (HttpRequest *)
 
int neighborsUdpPing (HttpRequest *, StoreEntry *, IRCB *callback, void *data, 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 *, const char *, HttpRequest *, const HttpRequestMethod &, htcp_clr_reason)
 
CachePeerpeerFindByName (const char *)
 
CachePeerpeerFindByNameAndPort (const char *, unsigned short)
 
CachePeergetDefaultParent (HttpRequest *request)
 
CachePeergetRoundRobinParent (HttpRequest *request)
 
CachePeergetWeightedRoundRobinParent (HttpRequest *request)
 
void peerClearRRStart (void)
 
void peerClearRR (void)
 
lookup_t peerDigestLookup (CachePeer *p, HttpRequest *request)
 
CachePeerneighborsDigestSelect (HttpRequest *request)
 
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 URL &)
 
void peerConnectFailed (CachePeer *)
 
void peerConnectSucceded (CachePeer *)
 
void dump_peer_options (StoreEntry *, CachePeer *)
 
int peerHTTPOkay (const CachePeer *, HttpRequest *)
 
time_t peerConnectTimeout (const CachePeer *peer)
 
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

CachePeer* getFirstPeer ( void  )

Definition at line 484 of file neighbors.cc.

References Config, and SquidConfig::peers.

Referenced by statPeerSelect().

CachePeer* getNextPeer ( CachePeer )

Definition at line 478 of file neighbors.cc.

References CachePeer::next.

Referenced by statPeerSelect().

CachePeer* getSingleParent ( HttpRequest )
void neighborAdd ( const char *  ,
const char *  ,
int  ,
int  ,
int  ,
int  ,
int   
)
void neighborAddAcl ( const char *  ,
const char *   
)
int neighborsCount ( HttpRequest )

Definition at line 263 of file neighbors.cc.

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

Referenced by peerSelectIcpPing().

int neighborsUdpPing ( HttpRequest ,
StoreEntry ,
IRCB callback,
void *  data,
int exprep,
int timeout 
)
const char* neighborTypeStr ( const CachePeer e)
bool peerCanOpenMore ( const CachePeer p)
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 427 of file neighbors.cc.

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

Referenced by peerAlive(), and peerClearRRLoop().

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 410 of file neighbors.cc.

References NULL, and peerClearRRLoop().

Referenced by parse_peer().

time_t peerConnectTimeout ( const CachePeer peer)
Returns
the effective connect timeout for the given peer
the effective connect timeout for this peer

Definition at line 1164 of file neighbors.cc.

References Config, CachePeer::connect_timeout_raw, SquidConfig::peer_connect, and SquidConfig::Timeout.

Referenced by Comm::Connection::connectTimeout(), PeerPoolMgr::handleOpenedConnection(), PeerPoolMgr::openNewConnection(), and peerProbeConnect().

CachePeer* peerFindByName ( const char *  )
CachePeer* peerFindByNameAndPort ( const char *  ,
unsigned  short 
)
bool peerHasConnAvailable ( const CachePeer p)

Definition at line 222 of file neighbors.cc.

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

Referenced by peerHTTPOkay().

void peerNoteDigestGone ( CachePeer p)

Definition at line 1155 of file neighbors.cc.

References cbdataReferenceDone, and CachePeer::digest.

Referenced by peerDigestDestroy().

void peerNoteDigestLookup ( HttpRequest request,
CachePeer p,
lookup_t  lookup 
)
time_t positiveTimeout ( const time_t  timeout)
Returns
max(1, timeout)

Definition at line 1171 of file neighbors.cc.

References max().

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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors