#include "anyp/ProtocolType.h"
#include "ip/Address.h"
#include "LogTags.h"
#include "cache_snmp.h"
#include "snmp_vars.h"
Go to the source code of this file.
Namespaces | |
namespace | Ip |
Functions | |
void | clientdbUpdate (const Ip::Address &, const LogTags &, AnyP::ProtocolType, size_t) |
int | clientdbCutoffDenied (const Ip::Address &) |
void | clientdbDump (StoreEntry *) |
int | clientdbEstablished (const Ip::Address &, int) |
void | clientdbSetWriteLimiter (ClientInfo *info, const int writeSpeedLimit, const double initialBurst, const double highWatermark) |
ClientInfo * | clientdbGetInfo (const Ip::Address &addr) |
Ip::Address * | client_entry (Ip::Address *current) |
variable_list * | snmp_meshCtblFn (variable_list *, snint *) |
Function Documentation
◆ client_entry()
Ip::Address * client_entry | ( | Ip::Address * | current | ) |
Definition at line 421 of file client_db.cc.
References ClientInfo::addr, client_table, hash, hash_first(), hash_last(), hash_next(), hashKeyStr(), MAX_IPSTRLEN, and Ip::Address::toStr().
Referenced by client_Inst().
◆ clientdbCutoffDenied()
int clientdbCutoffDenied | ( | const Ip::Address & | addr | ) |
Definition at line 209 of file client_db.cc.
References SquidConfig::client_db, client_table, Config, ClientInfo::cutoff, CUTOFF_SECONDS, DBG_CRITICAL, debugs, hash_lookup(), ClientInfo::Icp, LOG_UDP_DENIED, MAX_IPSTRLEN, ClientInfo::Cutoff::n_denied, ClientInfo::Cutoff::n_req, ClientInfo::Protocol::n_requests, SquidConfig::onoff, ClientInfo::Protocol::result_hist, squid_curtime, ClientInfo::Cutoff::time, and Ip::Address::toStr().
Referenced by icpDenyAccess().
◆ clientdbDump()
void clientdbDump | ( | StoreEntry * | sentry | ) |
Definition at line 267 of file client_db.cc.
References ClientInfo::addr, client_table, fqdncache_gethostbyaddr(), hash, hash_first(), hash_next(), hashKeyStr(), ClientInfo::Http, ClientInfo::Icp, Math::intPercent(), LOG_TAG_NONE, LOG_TYPE_MAX, LOG_UDP_HIT, ClientInfo::n_established, ClientInfo::Protocol::n_requests, ClientInfo::Protocol::result_hist, and storeAppendPrintf().
Referenced by ClientDbRr::useConfig().
◆ clientdbEstablished()
int clientdbEstablished | ( | const Ip::Address & | addr, |
int | delta | ||
) |
This function tracks the number of currently established connections for a client IP address. When a connection is accepted, call this with delta = 1. When the connection is closed, call with delta = -1. To get the current value, simply call with delta = 0.
Definition at line 182 of file client_db.cc.
References SquidConfig::client_db, client_table, clientdbAdd(), Config, debug_trap(), hash_lookup(), MAX_IPSTRLEN, ClientInfo::n_established, SquidConfig::onoff, and Ip::Address::toStr().
Referenced by Comm::TcpAcceptor::acceptInto(), ACLMaxConnection::match(), ConnStateData::swanSong(), and ConnStateData::whenClientIpKnown().
◆ clientdbGetInfo()
ClientInfo * clientdbGetInfo | ( | const Ip::Address & | addr | ) |
Definition at line 119 of file client_db.cc.
References SquidConfig::client_db, client_table, Config, DBG_IMPORTANT, debugs, hash_lookup(), MAX_IPSTRLEN, SquidConfig::onoff, and Ip::Address::toStr().
Referenced by ConnStateData::whenClientIpKnown().
◆ clientdbSetWriteLimiter()
void clientdbSetWriteLimiter | ( | ClientInfo * | info, |
const int | writeSpeedLimit, | ||
const double | initialBurst, | ||
const double | highWatermark | ||
) |
◆ clientdbUpdate()
void clientdbUpdate | ( | const Ip::Address & | addr, |
const LogTags & | ltype, | ||
AnyP::ProtocolType | p, | ||
size_t | size | ||
) |
Definition at line 138 of file client_db.cc.
References SquidConfig::client_db, client_table, clientdbAdd(), Config, debug_trap(), hash_lookup(), ClientInfo::Protocol::hit_kbytes_out, ClientInfo::Http, ClientInfo::Icp, LogTags::isTcpHit(), ClientInfo::Protocol::kbytes_out, ClientInfo::last_seen, LOG_UDP_HIT, MAX_IPSTRLEN, ClientInfo::Protocol::n_requests, LogTags::oldType, SquidConfig::onoff, AnyP::PROTO_HTTP, AnyP::PROTO_ICP, ClientInfo::Protocol::result_hist, size, squid_curtime, and Ip::Address::toStr().
Referenced by icpDenyAccess(), icpLogIcp(), and ClientHttpRequest::logRequest().
◆ snmp_meshCtblFn()
variable_list * snmp_meshCtblFn | ( | variable_list * | Var, |
snint * | ErrP | ||
) |
Definition at line 442 of file client_db.cc.
References ClientInfo::addr, ASN_OCTET_STR, client_table, debugs, hash_lookup(), ClientInfo::Protocol::hit_kbytes_out, ClientInfo::Http, ClientInfo::Icp, INETADDRESSTYPE_IPV4, INETADDRESSTYPE_IPV6, Ip::Address::isIPv4(), ByteCounter::kb, ClientInfo::Protocol::kbytes_out, LEN_SQ_NET, LOG_TAG_NONE, LOG_TYPE_MAX, LOG_UDP_HIT, MAX_IPSTRLEN, MESH_CTBL_ADDR, MESH_CTBL_ADDR_TYPE, MESH_CTBL_HTBYTES, MESH_CTBL_HTHITBYTES, MESH_CTBL_HTHITS, MESH_CTBL_HTREQ, MESH_CTBL_ICPBYTES, MESH_CTBL_ICPHITBYTES, MESH_CTBL_ICPHITS, MESH_CTBL_ICPREQ, ClientInfo::Protocol::n_requests, variable_list::name, variable_list::name_length, oid2addr(), ClientInfo::Protocol::result_hist, SMI_COUNTER32, SMI_INTEGER, SNMP_ERR_NOERROR, SNMP_ERR_NOSUCHNAME, snmp_var_new(), snmp_var_new_integer(), snmpDebugOid(), variable_list::string, Ip::Address::toStr(), variable_list::type, variable_list::val, variable_list::val_len, and xstrdup.
Referenced by snmpInit().