net_db.cc
Go to the documentation of this file.
309 debugs(38, 3, "netdbSendPing: " << hostname << " moved from " << n->network << " to " << na->network);
314 debugs(38, DBG_IMPORTANT, "ERROR: Squid BUG: net_db_name list bug: " << hostname << " not found");
416 debugs(38, 3, "netdbPeerAdd: Growing peer list for '" << n->network << "' to " << n->n_peers_alloc);
776 const auto remainingSpace = ex->parsingBuffer.space().positionAt(receivedData.offset + receivedData.length);
898 storeAppendPrintf(sentry, "%-46.46s %4d/%4d %7.1f %5.1f", /* Max between 16 (IPv4) or 46 (IPv6) */
1037 debugs(38, 5, "netdbExchangeUpdatePeer: Aborting peer update for '" << addr << "', NetDB cannot handle IPv6.");
1186 char *uri = internalRemoteUri(p->secure.encryptTransport, p->host, p->http_port, "/squid-internal-dynamic/", netDB);
1201 storeClientCopy(ex->sc, ex->e, ex->parsingBuffer.makeInitialSpace(), netdbExchangeHandleReply, ex);
1219 findUsableParentAtHostname(PeerSelector *ps, const char * const hostname, const HttpRequest &request)
Definition: wordlist.h:41
Definition: ipcache.h:50
struct StoreIOBuffer::@130 flags
static net_db_peer * netdbPeerByName(const netdbEntry *n, const char *)
Definition: net_db.cc:386
void netdbUpdatePeer(const AnyP::Uri &url, CachePeer *e, int irtt, int ihops)
Definition: net_db.cc:986
void append(char const *, int) override
Appends a c-string to existing packed data.
Definition: store.cc:803
struct SquidConfig::@96 Netdb
static Ip::Address networkFromInaddr(const Ip::Address &a)
Definition: net_db.cc:349
Definition: CachePeer.h:28
const ipcache_addrs * ipcache_gethostbyname(const char *name, int flags)
Definition: ipcache.cc:729
StoreIOBuffer & positionAt(const int64_t newOffset)
convenience method for changing the offset of a being-configured buffer
Definition: StoreIOBuffer.h:47
void replaceHttpReply(const HttpReplyPointer &, const bool andStartWriting=true)
Definition: store.cc:1705
CBDATA_CLASS_INIT(netdbExchangeState)
CBDATA_CLASS(netdbExchangeState)
char * toStr(char *buf, const unsigned int blen, int force=AF_UNSPEC) const
Definition: Address.cc:812
const char * c_str()
a NUL-terminated version of content(); same lifetime as content()
Definition: ParsingBuffer.h:45
peer_t neighborType(const CachePeer *p, const AnyP::Uri &url)
Definition: neighbors.cc:116
#define MAX_IPSTRLEN
Length of buffer that needs to be allocated to old a null-terminated IP-string.
Definition: forward.h:25
Definition: HttpRequest.h:48
char * internalRemoteUri(bool encrypt, const char *host, unsigned short port, const char *dir, const SBuf &name)
Definition: internal.cc:95
struct timeval current_time
the current UNIX time in timeval {seconds, microseconds} format
Definition: gadgets.cc:18
Definition: StoreIOBuffer.h:15
static netdbEntry * netdbLookupAddr(const Ip::Address &addr)
Definition: net_db.cc:254
Definition: RequestFlags.h:22
time_t getCurrentTime() STUB_RETVAL(0) int tvSubUsec(struct timeval
Http::StatusCode status() const
retrieve the status code for this status line
Definition: StatusLine.h:45
void consume(size_t)
get rid of previously appended() prefix of a given size
Definition: ParsingBuffer.cc:68
void appended(const char *, size_t)
remember the new bytes received into the previously provided space()
Definition: ParsingBuffer.cc:47
void ipcache_nbgethostbyname(const char *name, IPH *handler, void *handlerData)
Definition: ipcache.cc:609
Definition: net_db.h:48
Logfile * logfileOpen(const char *path, size_t bufsz, int fatal_flag)
Definition: File.cc:40
const char * peername
associated CachePeer::host (i.e. cache_peer hostname, not name=value!)
Definition: net_db.h:41
Definition: net_db.h:37
Definition: ParsingBuffer.h:35
netdbExchangeState(CachePeer *aPeer, const HttpRequestPointer &theReq)
Definition: net_db.cc:64
StoreEntry * storeCreateEntry(const char *url, const char *logUrl, const RequestFlags &flags, const HttpRequestMethod &method)
Definition: store.cc:759
static CachePeer * findUsableParentAtHostname(PeerSelector *ps, const char *const hostname, const HttpRequest &request)
Definition: net_db.cc:1219
static void netdbHostInsert(netdbEntry *n, const char *hostname)
Definition: net_db.cc:150
static void netdbHashInsert(netdbEntry *n, Ip::Address &addr)
Definition: net_db.cc:117
Definition: HttpReply.h:24
StoreIOBuffer makeInitialSpace()
Definition: ParsingBuffer.h:84
Definition: Store.h:37
Definition: hash.h:23
void RegisterAction(char const *action, char const *desc, OBJH *handler, Protected, Atomic, Format)
Definition: Registration.cc:54
Definition: StoreClient.h:73
static HttpRequest * FromUrlXXX(const char *url, const MasterXaction::Pointer &, const HttpRequestMethod &method=Http::METHOD_GET)
Definition: HttpRequest.cc:528
void DomainPing(Ip::Address &to, const char *domain)
Definition: IcmpSquid.cc:177
void setAnyAddr()
NOTE: Does NOT clear the Port stored. Only the Address and Type.
Definition: Address.cc:197
Definition: net_db.cc:59
void netdbExchangeUpdatePeer(Ip::Address &addr, CachePeer *e, double rtt, double hops)
Definition: net_db.cc:1027
Definition: PeerSelectState.h:59
Definition: net_db.h:23
Definition: cbdata.h:365
Store::ParsingBuffer parsingBuffer
for receiving a NetDB reply body from Store and interpreting it
Definition: net_db.cc:85
static void fwdStart(const Comm::ConnectionPointer &client, StoreEntry *, HttpRequest *)
Same as Start() but no master xaction info (AccessLogEntry) available.
Definition: FwdState.cc:407
void netdbHostData(const char *host, int *samp, int *rtt, int *hops)
Definition: net_db.cc:961
bool encryptTransport
whether transport encryption (TLS/SSL) is to be used on connections to the peer
Definition: PeerOptions.h:147
void setHeaders(Http::StatusCode status, const char *reason, const char *ctype, int64_t clen, time_t lmt, time_t expires)
Definition: HttpReply.cc:170
void eventAddIsh(const char *name, EVH *func, void *arg, double delta_ish, int weight)
Definition: event.cc:114
void netdbHandlePingReply(const Ip::Address &from, int hops, int rtt)
Definition: net_db.cc:828
int storeUnregister(store_client *sc, StoreEntry *e, void *data)
Definition: store_client.cc:765
void storeClientCopy(store_client *sc, StoreEntry *e, StoreIOBuffer copyInto, STCB *callback, void *data)
Definition: store_client.cc:224
size_t contentSize() const
the total number of append()ed bytes that were not consume()d
Definition: ParsingBuffer.cc:41
Definition: Address.h:42
void IPH(const ipcache_addrs *, const Dns::LookupDetails &details, void *)
Definition: ipcache.h:227
store_client * storeClientListAdd(StoreEntry *e, void *data)
Definition: store_client.cc:124
AnyP::ProtocolVersion ProtocolVersion(unsigned int aMajor, unsigned int aMinor)
HTTP version label information.
Definition: ProtocolVersion.h:19
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products