|
Squid Web Cache master
|
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 | |
| HttpRequestPointer | icpGetRequest (const char *url, int reqnum, int fd, const Ip::Address &from) |
| 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 (const Ip::Address &from, const 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_key * | icpGetCacheKey (const char *url, int reqnum) |
Variables | |
| PF | icpHandleUdp |
| enum icp_opcode |
Definition at line 13 of file icp_opcode.h.
| void icpClosePorts | ( | void | ) |
Definition at line 824 of file icp_v2.cc.
References DBG_IMPORTANT, debugs, icpConnectionShutdown(), icpOutgoingConn, and Comm::Connection::local.
Referenced by mainReconfigureStart(), releaseServerSockets(), and SquidShutdown().
| 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 799 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().
| void icpCreateAndSend | ( | icp_opcode | opcode, |
| int | flags, | ||
| char const * | url, | ||
| int | reqnum, | ||
| int | pad, | ||
| int | fd, | ||
| const Ip::Address & | from, | ||
| AccessLogEntryPointer | al | ||
| ) |
Definition at line 418 of file icp_v2.cc.
References AccessLogEntry::cache, AccessLogEntry::CacheDetails::code, icp_common_t::CreateMessage(), icpLogFromICPCode(), icpUdpSend(), and LogTags::update().
Referenced by doV2Query(), doV3Query(), icpDenyAccess(), icpGetRequest(), neighborsUdpPing(), and peerCountMcastPeersCreateAndSend().
| void icpDenyAccess | ( | const Ip::Address & | from, |
| const char * | url, | ||
| int | reqnum, | ||
| int | fd | ||
| ) |
Definition at line 428 of file icp_v2.cc.
References clientdbCutoffDenied(), clientdbUpdate(), ICP_DENIED, icpCreateAndSend(), LOG_UDP_DENIED, and AnyP::PROTO_ICP.
Referenced by icpGetRequest().
Definition at line 894 of file icp_v2.cc.
References Http::METHOD_GET, N_QUERIED_KEYS_MASK, neighbors_do_private_keys, queried_keys, and storeKeyPublic().
Referenced by icp_common_t::handleReply().
| icp_opcode icpGetCommonOpcode | ( | ) |
This routine selects an ICP opcode for ICP misses.
| ICP_ERR | no opcode selected here |
| ICP_MISS_NOFETCH | store 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().
| HttpRequestPointer icpGetRequest | ( | const char * | url, |
| int | reqnum, | ||
| int | fd, | ||
| const Ip::Address & | from | ||
| ) |
Definition at line 495 of file icp_v2.cc.
References HttpRequest::FromUrlXXX(), ICP_ERR, icpAccessAllowed(), icpCreateAndSend(), icpDenyAccess(), rfc1738_escape, and w_space.
Referenced by doV2Query(), and doV3Query().
| void icpHandleIcpV3 | ( | int | fd, |
| Ip::Address & | from, | ||
| char * | buf, | ||
| int | len | ||
| ) |
Definition at line 69 of file icp_v3.cc.
References DBG_CRITICAL, debugs, doV3Query(), icp_common_t::getOpCode(), icp_common_t::handleReply(), ICP_DECHO, ICP_DENIED, ICP_ERR, ICP_HIT, ICP_INVALID, ICP_MISS, ICP_MISS_NOFETCH, icp_opcode_str, ICP_QUERY, icp_common_t::length, and icp_common_t::opcode.
Referenced by icpHandleUdp().
| void icpOpenPorts | ( | void | ) |
Definition at line 717 of file icp_v2.cc.
References SquidConfig::Addrs, asyncCallbackFun, comm_open_listener(), COMM_SELECT_READ, Config, DBG_CRITICAL, debugs, enter_suid(), fatal(), Comm::Connection::fd, fd_note(), Ipc::fdnInIcpSocket, SquidConfig::icp, icpHandleUdp, icpIncomingConn, icpIncomingConnectionOpened(), icpOutgoingConn, IPV6_SPECIAL_SPLITSTACK, Ip::Address::isAnyAddr(), Comm::IsConnOpen(), Ip::Address::isNoAddr(), leave_suid(), Comm::Connection::local, port, Ip::Address::port(), SquidConfig::Port, Ip::Address::setIPv4(), Comm::SetSelect(), Ipc::StartListening(), SquidConfig::udp_incoming, and SquidConfig::udp_outgoing.
Referenced by serverConnectionsOpen().
Definition at line 881 of file icp_v2.cc.
References N_QUERIED_KEYS_MASK, queried_keys, and storeKeyCopy().
Referenced by neighborsUdpPing(), and peerCountMcastPeersCreateAndSend().
| PF icpHandleUdp |
Definition at line 109 of file ICP.h.
Referenced by icpHandleUdp(), icpIncomingConnectionOpened(), and icpOpenPorts().