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 | |
HttpRequest * | icpGetRequest (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_key * | icpGetCacheKey (const char *url, int reqnum) |
Variables | |
PF | icpHandleUdp |
Detailed Description
Enumeration Type Documentation
◆ icp_opcode
enum icp_opcode |
Definition at line 13 of file icp_opcode.h.
Function Documentation
◆ icpAccessAllowed()
bool icpAccessAllowed | ( | Ip::Address & | from, |
HttpRequest * | icp_request | ||
) |
Definition at line 444 of file icp_v2.cc.
References SquidConfig::accessList, Acl::Answer::allowed(), Config, ACLChecklist::fastCheck(), SquidConfig::icp, ACLFilledChecklist::my_addr, Ip::Address::setNoAddr(), and ACLFilledChecklist::src_addr.
Referenced by doV2Query(), and doV3Query().
◆ icpClosePorts()
void icpClosePorts | ( | void | ) |
Definition at line 804 of file icp_v2.cc.
References DBG_IMPORTANT, debugs, icpConnectionShutdown(), icpOutgoingConn, and Comm::Connection::local.
Referenced by mainReconfigureStart(), releaseServerSockets(), and SquidShutdown().
◆ 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 | ||
) |
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().
◆ icpDenyAccess()
void icpDenyAccess | ( | Ip::Address & | from, |
char * | url, | ||
int | reqnum, | ||
int | fd | ||
) |
Definition at line 428 of file icp_v2.cc.
References AclMatchedName, clientdbCutoffDenied(), clientdbUpdate(), debugs, ICP_DENIED, icpCreateAndSend(), LOG_UDP_DENIED, and AnyP::PROTO_ICP.
Referenced by doV2Query(), and doV3Query().
◆ icpGetCacheKey()
Definition at line 874 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().
◆ icpGetCommonOpcode()
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 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()
void icpHandleIcpV3 | ( | int | fd, |
Ip::Address & | from, | ||
char * | buf, | ||
int | len | ||
) |
Definition at line 71 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().
◆ icpOpenPorts()
void icpOpenPorts | ( | void | ) |
Definition at line 697 of file icp_v2.cc.
References SquidConfig::Addrs, asyncCallbackFun, comm_open_listener(), COMM_SELECT_READ, Config, DBG_CRITICAL, debugs, Ip::EnableIpv6, 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().
◆ icpSetCacheKey()
Definition at line 861 of file icp_v2.cc.
References N_QUERIED_KEYS_MASK, queried_keys, and storeKeyCopy().
Referenced by neighborsUdpPing(), and peerCountMcastPeersCreateAndSend().