Collaboration diagram for ICP:

Modules

 ICPv2 Internals
 
 ICPv3 Internals
 

Enumerations

enum  icp_opcode {
  enumBegin_ = 0 ,
  ICP_INVALID = enumBegin_ ,
  ICP_QUERY ,
  ICP_HIT ,
  ICP_MISS ,
  ICP_ERR ,
  ICP_SEND ,
  ICP_SENDA ,
  ICP_DATABEG ,
  ICP_DATA ,
  ICP_DATAEND ,
  ICP_SECHO ,
  ICP_DECHO ,
  ICP_NOTIFY ,
  ICP_INVALIDATE ,
  ICP_DELETE ,
  ICP_UNUSED15 ,
  ICP_UNUSED16 ,
  ICP_UNUSED17 ,
  ICP_UNUSED18 ,
  ICP_UNUSED19 ,
  ICP_UNUSED20 ,
  ICP_MISS_NOFETCH ,
  ICP_DENIED ,
  ICP_HIT_OBJ ,
  ICP_END ,
  enumEnd_ = ICP_END
}
 

Functions

HttpRequesticpGetRequest (char *url, int reqnum, int fd, Ip::Address &from)
 
bool icpAccessAllowed (Ip::Address &from, HttpRequest *icp_request)
 
void icpCreateAndSend (icp_opcode, int flags, char const *url, int reqnum, int pad, int fd, const Ip::Address &from, AccessLogEntryPointer)
 
icp_opcode icpGetCommonOpcode ()
 
void icpDenyAccess (Ip::Address &from, char *url, int reqnum, int fd)
 
void icpHandleIcpV3 (int, Ip::Address &, char *, int)
 
void icpOpenPorts (void)
 
void icpConnectionShutdown (void)
 
void icpClosePorts (void)
 
int icpSetCacheKey (const cache_key *key)
 
const cache_keyicpGetCacheKey (const char *url, int reqnum)
 

Variables

PF icpHandleUdp
 

Detailed Description

Enumeration Type Documentation

◆ icp_opcode

enum icp_opcode
Enumerator
enumBegin_ 
ICP_INVALID 
ICP_QUERY 
ICP_HIT 
ICP_MISS 
ICP_ERR 
ICP_SEND 
ICP_SENDA 
ICP_DATABEG 
ICP_DATA 
ICP_DATAEND 
ICP_SECHO 
ICP_DECHO 
ICP_NOTIFY 
ICP_INVALIDATE 
ICP_DELETE 
ICP_UNUSED15 
ICP_UNUSED16 
ICP_UNUSED17 
ICP_UNUSED18 
ICP_UNUSED19 
ICP_UNUSED20 
ICP_MISS_NOFETCH 
ICP_DENIED 
ICP_HIT_OBJ 
ICP_END 
enumEnd_ 

Definition at line 13 of file icp_opcode.h.

Function Documentation

◆ icpAccessAllowed()

◆ icpClosePorts()

void icpClosePorts ( void  )

◆ icpConnectionShutdown()

void icpConnectionShutdown ( void  )

icpConnectionShutdown only closes the 'in' socket if it is different than the 'out' socket.

Release the 'in' socket for lazy closure. in and out sockets may be sharing one same FD. This prevents this function from executing repeatedly.

Normally we only write to the outgoing ICP socket, but we also have a read handler there to catch messages sent to that specific interface. During shutdown, we must disable reading on the outgoing socket.

Definition at line 779 of file icp_v2.cc.

References assert, COMM_SELECT_READ, DBG_IMPORTANT, debugs, Comm::Connection::fd, icpIncomingConn, icpOutgoingConn, Comm::IsConnOpen(), Comm::Connection::local, and Comm::SetSelect().

Referenced by icpClosePorts(), and serverConnectionsClose().

◆ icpCreateAndSend()

void icpCreateAndSend ( icp_opcode  opcode,
int  flags,
char const *  url,
int  reqnum,
int  pad,
int  fd,
const Ip::Address from,
AccessLogEntryPointer  al 
)

◆ icpDenyAccess()

void icpDenyAccess ( Ip::Address from,
char *  url,
int  reqnum,
int  fd 
)

◆ icpGetCacheKey()

const cache_key * icpGetCacheKey ( const char *  url,
int  reqnum 
)

◆ icpGetCommonOpcode()

icp_opcode icpGetCommonOpcode ( )

This routine selects an ICP opcode for ICP misses.

Return values
ICP_ERRno opcode selected here
ICP_MISS_NOFETCHstore is rebuilding, no fetch is possible yet

Definition at line 376 of file icp_v2.cc.

References hit_only_mode_until, ICP_ERR, ICP_MISS_NOFETCH, opt_reload_hit_only, squid_curtime, and Store::Controller::store_dirs_rebuilding.

Referenced by doV2Query(), and doV3Query().

◆ icpGetRequest()

HttpRequest * icpGetRequest ( char *  url,
int  reqnum,
int  fd,
Ip::Address from 
)

Definition at line 457 of file icp_v2.cc.

References HttpRequest::FromUrlXXX(), ICP_ERR, icpCreateAndSend(), rfc1738_escape, and w_space.

Referenced by doV2Query(), and doV3Query().

◆ icpHandleIcpV3()

◆ icpOpenPorts()

◆ icpSetCacheKey()

int icpSetCacheKey ( const cache_key key)

Definition at line 861 of file icp_v2.cc.

References N_QUERIED_KEYS_MASK, queried_keys, and storeKeyCopy().

Referenced by neighborsUdpPing(), and peerCountMcastPeersCreateAndSend().

Variable Documentation

◆ icpHandleUdp

PF icpHandleUdp

Definition at line 108 of file ICP.h.

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors