ICP
[Server-Side Protocols]

Collaboration diagram for ICP:

Classes

struct  _icp_common_t
class  ICPState
struct  icpUdpData

Modules

 ICPv2 Internals
 ICPv3 Internals

Enumerations

enum  icp_opcode {
  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
}

Functions

icp_opcodeoperator++ (icp_opcode &aCode)
HttpRequesticpGetRequest (char *url, int reqnum, int fd, Ip::Address &from)
int icpAccessAllowed (Ip::Address &from, HttpRequest *icp_request)
SQUIDCEXTERN void icpCreateAndSend (icp_opcode, int flags, char const *url, int reqnum, int pad, int fd, const Ip::Address &from)
icp_opcode icpGetCommonOpcode ()
SQUIDCEXTERN int icpUdpSend (int, const Ip::Address &, icp_common_t *, log_type, int)
SQUIDCEXTERN log_type icpLogFromICPCode (icp_opcode opcode)
void icpDenyAccess (Ip::Address &from, char *url, int reqnum, int fd)
SQUIDCEXTERN void icpHandleIcpV3 (int, Ip::Address &, char *, int)
SQUIDCEXTERN int icpCheckUdpHit (StoreEntry *, HttpRequest *request)
SQUIDCEXTERN void icpConnectionsOpen (void)
SQUIDCEXTERN void icpConnectionShutdown (void)
SQUIDCEXTERN void icpConnectionClose (void)
SQUIDCEXTERN int icpSetCacheKey (const cache_key *key)
SQUIDCEXTERN const cache_keyicpGetCacheKey (const char *url, int reqnum)

Variables

SQUIDCEXTERN PF icpHandleUdp
SQUIDCEXTERN PF icpUdpSendQueue

Enumeration Type Documentation

enum icp_opcode
Enumerator:
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 

Definition at line 5 of file icp_opcode.h.


Function Documentation

int icpAccessAllowed ( Ip::Address &  from,
HttpRequest icp_request 
)
SQUIDCEXTERN int icpCheckUdpHit ( StoreEntry ,
HttpRequest request 
)
SQUIDCEXTERN void icpConnectionClose ( void   ) 

Definition at line 811 of file icp_v2.cc.

References comm_close, debugs, icpConnectionShutdown(), and theOutIcpConnection.

Referenced by mainReconfigureStart(), and SquidShutdown().

SQUIDCEXTERN void icpConnectionShutdown ( void   ) 

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

Here we set 'theInIcpConnection' to -1 even though the ICP 'in' and 'out' sockets might be just one FD. This prevents this function from executing repeatedly. When we are really ready to exit or restart, main will comm_close the 'out' descriptor.

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 781 of file icp_v2.cc.

References assert, comm_close, COMM_SELECT_READ, commSetSelect(), debugs, NULL, theInIcpConnection, and theOutIcpConnection.

Referenced by icpConnectionClose(), and serverConnectionsClose().

SQUIDCEXTERN void icpCreateAndSend ( icp_opcode  ,
int  flags,
char const *  url,
int  reqnum,
int  pad,
int  fd,
const Ip::Address &  from 
)
void icpDenyAccess ( Ip::Address &  from,
char *  url,
int  reqnum,
int  fd 
)
SQUIDCEXTERN const cache_key* icpGetCacheKey ( const char *  url,
int  reqnum 
)
icp_opcode icpGetCommonOpcode (  ) 

This routine selects an ICP opcode for ICP misses.

Return values:
ICP_ERR no opcode selected here
ICP_MISS_NOFETCH store is rebuilding, no fetch is possible yet

Definition at line 374 of file icp_v2.cc.

References hit_only_mode_until, ICP_ERR, ICP_MISS_NOFETCH, opt_reload_hit_only, squid_curtime, and StoreController::store_dirs_rebuilding.

Referenced by ICP3State::created(), and ICP2State::created().

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

Definition at line 456 of file icp_v2.cc.

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

Referenced by doV2Query(), and doV3Query().

SQUIDCEXTERN void icpHandleIcpV3 ( int  ,
Ip::Address &  ,
char *  ,
int   
)
SQUIDCEXTERN log_type icpLogFromICPCode ( icp_opcode  opcode  ) 
SQUIDCEXTERN int icpSetCacheKey ( const cache_key key  ) 

Definition at line 869 of file icp_v2.cc.

References N_QUERIED_KEYS_MASK, and storeKeyCopy().

Referenced by neighborsUdpPing(), and peerCountMcastPeersStart().

icp_opcode& operator++ ( icp_opcode aCode  )  [inline]

Definition at line 80 of file ICP.h.


Variable Documentation

SQUIDCEXTERN PF icpHandleUdp

Definition at line 146 of file ICP.h.

Referenced by icpConnectionsOpen(), icpHandleUdp(), and icpIncomingConnectionOpened().

SQUIDCEXTERN PF icpUdpSendQueue

Definition at line 149 of file ICP.h.

Referenced by icpUdpSend().

Search

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors