peer_select.cc File Reference
#include "squid.h"
#include "acl/FilledChecklist.h"
#include "base/InstanceId.h"
#include "CachePeer.h"
#include "carp.h"
#include "client_side.h"
#include "dns/LookupDetails.h"
#include "errorpage.h"
#include "event.h"
#include "FwdState.h"
#include "globals.h"
#include "hier_code.h"
#include "htcp.h"
#include "http/Stream.h"
#include "HttpRequest.h"
#include "icmp/net_db.h"
#include "ICP.h"
#include "ip/tools.h"
#include "ipcache.h"
#include "neighbors.h"
#include "peer_sourcehash.h"
#include "peer_userhash.h"
#include "PeerSelectState.h"
#include "SquidConfig.h"
#include "SquidTime.h"
#include "Store.h"
#include "URL.h"
Include dependency graph for peer_select.cc:

Go to the source code of this file.

Classes

class  FwdServer
 

Functions

static void peerSelectFoo (ps_state *)
 
static void peerPingTimeout (void *data)
 
static void peerIcpParentMiss (CachePeer *, icp_common_t *, ps_state *)
 
static void peerHtcpParentMiss (CachePeer *, HtcpReplyData *, ps_state *)
 
static void peerHandleHtcpReply (CachePeer *, peer_t, HtcpReplyData *, void *)
 
static int peerCheckNetdbDirect (ps_state *psstate)
 
static void peerGetSomeNeighbor (ps_state *)
 
static void peerGetSomeNeighborReplies (ps_state *)
 
static void peerGetSomeDirect (ps_state *)
 
static void peerGetSomeParent (ps_state *)
 
static void peerGetAllParents (ps_state *)
 
static void peerAddFwdServer (FwdServer **, CachePeer *, hier_code)
 
static void peerSelectPinned (ps_state *ps)
 
static int peerSelectIcpPing (HttpRequest *request, int direct, StoreEntry *entry)
 
static void peerSelect (PeerSelectionInitiator *initiator, HttpRequest *request, AccessLogEntry::Pointer const &al, StoreEntry *entry)
 
static void peerCheckNeverDirectDone (allow_t answer, void *data)
 
static void peerCheckAlwaysDirectDone (allow_t answer, void *data)
 
static bool peerSelectionAborted (ps_state *psstate)
 
void peerSelectDnsPaths (ps_state *psstate)
 
bool peerAllowedToUse (const CachePeer *p, HttpRequest *request)
 
void peerSelectInit (void)
 
static void peerHandleIcpReply (CachePeer *p, peer_t type, icp_common_t *header, void *data)
 
static void peerHandlePingReply (CachePeer *p, peer_t type, AnyP::ProtocolType proto, void *pingdata, void *data)
 
 InstanceIdDefinitions (ps_state,"PeerSelector")
 

Variables

struct {
   int   timeouts
 
PeerStats
 
static const char * DirectStr []
 
static IRCB peerHandlePingReply
 

Function Documentation

InstanceIdDefinitions ( ps_state  ,
"PeerSelector"   
)
static void peerAddFwdServer ( FwdServer **  FSVR,
CachePeer p,
hier_code  code 
)
static
static void peerCheckAlwaysDirectDone ( allow_t  answer,
void *  data 
)
static
static void peerCheckNeverDirectDone ( allow_t  answer,
void *  data 
)
static
static void peerGetSomeDirect ( ps_state ps)
static
static void peerHandleHtcpReply ( CachePeer p,
peer_t  type,
HtcpReplyData htcp,
void *  data 
)
static
static void peerHandlePingReply ( CachePeer p,
peer_t  type,
AnyP::ProtocolType  proto,
void *  pingdata,
void *  data 
)
static
static void peerPingTimeout ( void *  data)
static
void peerSelectInit ( void  )

Definition at line 766 of file peer_select.cc.

References PeerStats.

Referenced by serverConnectionsOpen().

static bool peerSelectionAborted ( ps_state psstate)
static
Returns
true (after destroying psstate) if the peer initiator is gone
false (without side effects) otherwise

Definition at line 238 of file peer_select.cc.

References debugs, and ps_state::interestedInitiator().

Referenced by ps_state::noteIp(), ps_state::noteIps(), ps_state::noteLookup(), peerPingTimeout(), peerSelectDnsPaths(), and peerSelectFoo().

Variable Documentation

const char* DirectStr[]
static
Initial value:
= {
"DIRECT_UNKNOWN",
"DIRECT_NO",
"DIRECT_MAYBE",
"DIRECT_YES"
}

Definition at line 68 of file peer_select.cc.

Referenced by peerCheckAlwaysDirectDone(), peerCheckNeverDirectDone(), and peerSelectFoo().

IRCB peerHandlePingReply
static

Definition at line 77 of file peer_select.cc.

Referenced by peerGetSomeNeighbor().

struct { ... } PeerStats

Referenced by peerPingTimeout(), and peerSelectInit().

int timeouts

Definition at line 65 of file peer_select.cc.

Referenced by main_loop().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors