ICP
[Server-Side Protocols]
|
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_opcode & | operator++ (icp_opcode &aCode) |
| HttpRequest * | icpGetRequest (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_key * | icpGetCacheKey (const char *url, int reqnum) |
Variables | |
| SQUIDCEXTERN PF | icpHandleUdp |
| SQUIDCEXTERN PF | icpUdpSendQueue |
Enumeration Type Documentation
| enum icp_opcode |
- Enumerator:
Definition at line 5 of file icp_opcode.h.
Function Documentation
| int icpAccessAllowed | ( | Ip::Address & | from, | |
| HttpRequest * | icp_request | |||
| ) |
Definition at line 433 of file icp_v2.cc.
References SquidConfig::accessList, Config, ACLChecklist::fastCheck(), SquidConfig::icp, ACLFilledChecklist::my_addr, NULL, and ACLFilledChecklist::src_addr.
Referenced by doV2Query(), and doV3Query().
| SQUIDCEXTERN int icpCheckUdpHit | ( | StoreEntry * | , | |
| HttpRequest * | request | |||
| ) |
Definition at line 350 of file icp_v2.cc.
References Config, SquidConfig::icp_hit_stale, NULL, SquidConfig::onoff, refreshCheckICP(), and StoreEntry::validToSend().
Referenced by ICP3State::created(), and ICP2State::created().
| 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 icpConnectionsOpen | ( | void | ) |
Definition at line 676 of file icp_v2.cc.
References addr, SquidConfig::Addrs, asyncCall(), COMM_NONBLOCKING, comm_open_listener(), COMM_SELECT_READ, commSetSelect(), Config, DBG_CRITICAL, debugs, Ip::EnableIpv6, enter_suid(), fatal(), fd_note(), Ipc::fdnInIcpSocket, SquidConfig::icp, icpHandleUdp, icpIncomingConnectionOpened(), IPPROTO_UDP, leave_suid(), NULL, SquidConfig::Port, port, Ipc::StartListening(), theOutICPAddr, theOutIcpConnection, SquidConfig::udp_incoming, SquidConfig::udp_outgoing, x, and xstrerror().
Referenced by serverConnectionsOpen().
| SQUIDCEXTERN void icpCreateAndSend | ( | icp_opcode | , | |
| int | flags, | |||
| char const * | url, | |||
| int | reqnum, | |||
| int | pad, | |||
| int | fd, | |||
| const Ip::Address & | from | |||
| ) |
Definition at line 410 of file icp_v2.cc.
References _icp_common_t::createMessage(), icpLogFromICPCode(), and icpUdpSend().
Referenced by ICP3State::created(), ICP2State::created(), icpDenyAccess(), and icpGetRequest().
| void icpDenyAccess | ( | Ip::Address & | from, | |
| char * | url, | |||
| int | reqnum, | |||
| int | fd | |||
| ) |
Definition at line 417 of file icp_v2.cc.
References AclMatchedName, clientdbCutoffDenied(), clientdbUpdate(), debugs, ICP_DENIED, icpCreateAndSend(), LOG_UDP_DENIED, and PROTO_ICP.
Referenced by doV2Query(), and doV3Query().
| SQUIDCEXTERN const cache_key* icpGetCacheKey | ( | const char * | url, | |
| int | reqnum | |||
| ) |
Definition at line 882 of file icp_v2.cc.
References METHOD_GET, N_QUERIED_KEYS_MASK, neighbors_do_private_keys, and storeKeyPublic().
Referenced by _icp_common_t::handleReply().
| 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 | ||||
| ) |
Definition at line 112 of file icp_v3.cc.
References debugs, doV3Query(), _icp_common_t::handleReply(), ICP_DECHO, ICP_DENIED, ICP_ERR, ICP_HIT, ICP_INVALID, ICP_MISS, ICP_MISS_NOFETCH, ICP_QUERY, _icp_common_t::length, and _icp_common_t::opcode.
Referenced by icpHandleUdp().
| SQUIDCEXTERN log_type icpLogFromICPCode | ( | icp_opcode | opcode | ) |
Definition at line 387 of file icp_v2.cc.
References fatal(), ICP_DENIED, ICP_ERR, ICP_HIT, ICP_MISS, ICP_MISS_NOFETCH, LOG_UDP_DENIED, LOG_UDP_HIT, LOG_UDP_INVALID, LOG_UDP_MISS, and LOG_UDP_MISS_NOFETCH.
Referenced by icpCreateAndSend().
| 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().
| SQUIDCEXTERN int icpUdpSend | ( | int | , | |
| const Ip::Address & | , | |||
| icp_common_t * | , | |||
| log_type | , | |||
| int | ||||
| ) |
Definition at line 299 of file icp_v2.cc.
References icpUdpData::address, COMM_SELECT_WRITE, comm_udp_sendto(), commSetSelect(), current_time, debugs, _StatCounters::icp, icp_opcode_str, icpCount(), icpLogIcp(), icpUdpSendQueue, icpUdpData::len, _icp_common_t::length, icpUdpData::logcode, icpUdpData::msg, icpUdpData::next, NULL, _icp_common_t::opcode, icpUdpData::queue_time, _StatCounters::replies_dropped, _StatCounters::replies_queued, safe_free, SENT, statCounter, x, and xcalloc.
Referenced by icpCreateAndSend(), icpUdpSendQueue(), neighborsUdpPing(), and peerCountMcastPeersStart().
| icp_opcode& operator++ | ( | icp_opcode & | aCode | ) | [inline] |
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
- About Squid
- Why Squid?
- Squid Developers
- How to Help Out
- Getting Squid
- Donate
- Squid Deployment Case-Studies
Documentation
- FAQ | Wiki | Book
- Configuration Reference
- Configuration Guide - Visolve
- Configuration Examples
- Users guide
- Non-English
- Security Advisories
- More...
Support
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products
