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");
432 debugs(38, 3, "netdbPeerAdd: Growing peer list for '" << n->network << "' to " << n->n_peers_alloc);
792 const auto remainingSpace = ex->parsingBuffer.space().positionAt(receivedData.offset + receivedData.length);
914 storeAppendPrintf(sentry, "%-46.46s %4d/%4d %7.1f %5.1f", /* Max between 16 (IPv4) or 46 (IPv6) */
1053 debugs(38, 5, "netdbExchangeUpdatePeer: Aborting peer update for '" << addr << "', NetDB cannot handle IPv6.");
1202 char *uri = internalRemoteUri(p->secure.encryptTransport, p->host, p->http_port, "/squid-internal-dynamic/", netDB);
1217 storeClientCopy(ex->sc, ex->e, ex->parsingBuffer.makeInitialSpace(), netdbExchangeHandleReply, ex);
1235findUsableParentAtHostname(PeerSelector *ps, const char * const hostname, const HttpRequest &request)
Definition: CachePeer.h:31
Definition: ipcache.h:51
static void fwdStart(const Comm::ConnectionPointer &client, StoreEntry *, HttpRequest *)
Same as Start() but no master xaction info (AccessLogEntry) available.
Definition: FwdState.cc:412
Definition: HttpReply.h:25
void setHeaders(Http::StatusCode status, const char *reason, const char *ctype, int64_t clen, time_t lmt, time_t expires)
Definition: HttpReply.cc:170
Definition: HttpRequest.h:49
static HttpRequest * FromUrlXXX(const char *url, const MasterXaction::Pointer &, const HttpRequestMethod &method=Http::METHOD_GET)
Definition: HttpRequest.cc:528
Http::StatusCode status() const
retrieve the status code for this status line
Definition: StatusLine.h:45
void DomainPing(Ip::Address &to, const char *domain)
Definition: IcmpSquid.cc:177
Definition: Address.h:41
char * toStr(char *buf, const unsigned int blen, int force=AF_UNSPEC) const
Definition: Address.cc:792
void setAnyAddr()
NOTE: Does NOT clear the Port stored. Only the Address and Type.
Definition: Address.cc:177
Definition: PeerSelectState.h:60
Definition: RequestFlags.h:23
bool encryptTransport
whether transport encryption (TLS/SSL) is to be used on connections to the peer
Definition: PeerOptions.h:147
struct SquidConfig::@105 Netdb
Definition: Store.h:42
void replaceHttpReply(const HttpReplyPointer &, const bool andStartWriting=true)
Definition: store.cc:1691
void append(char const *, int) override
Appends a c-string to existing packed data.
Definition: store.cc:789
Definition: StoreIOBuffer.h:16
struct StoreIOBuffer::@141 flags
StoreIOBuffer & positionAt(const int64_t newOffset)
convenience method for changing the offset of a being-configured buffer
Definition: StoreIOBuffer.h:47
Definition: ParsingBuffer.h:36
void consume(size_t)
get rid of previously appended() prefix of a given size
Definition: ParsingBuffer.cc:68
const char * c_str()
a NUL-terminated version of content(); same lifetime as content()
Definition: ParsingBuffer.h:45
size_t contentSize() const
the total number of append()ed bytes that were not consume()d
Definition: ParsingBuffer.cc:41
StoreIOBuffer makeInitialSpace()
Definition: ParsingBuffer.h:84
void appended(const char *, size_t)
remember the new bytes received into the previously provided space()
Definition: ParsingBuffer.cc:47
Definition: cbdata.h:361
Definition: hash.h:23
Definition: net_db.h:25
Definition: net_db.h:38
const char * peername
associated CachePeer::host (i.e. cache_peer hostname, not name=value!)
Definition: net_db.h:41
Definition: net_db.h:50
Definition: net_db.cc:60
CBDATA_CLASS(netdbExchangeState)
netdbExchangeState(CachePeer *aPeer, const HttpRequestPointer &theReq)
Definition: net_db.cc:64
Store::ParsingBuffer parsingBuffer
for receiving a NetDB reply body from Store and interpreting it
Definition: net_db.cc:85
Definition: StoreClient.h:70
Definition: wordlist.h:20
void eventAddIsh(const char *name, EVH *func, void *arg, double delta_ish, int weight)
Definition: event.cc:114
const ipcache_addrs * ipcache_gethostbyname(const char *name, int flags)
Definition: ipcache.cc:728
void ipcache_nbgethostbyname(const char *name, IPH *handler, void *handlerData)
Definition: ipcache.cc:608
SQUIDCEXTERN void hash_remove_link(hash_table *, hash_link *)
Definition: hash.cc:220
char * internalRemoteUri(bool encrypt, const char *host, unsigned short port, const char *dir, const SBuf &name)
Definition: internal.cc:96
#define MAX_IPSTRLEN
Length of buffer that needs to be allocated to old a null-terminated IP-string.
Definition: forward.h:25
void IPH(const ipcache_addrs *, const Dns::LookupDetails &details, void *)
Definition: ipcache.h:227
Logfile * logfileOpen(const char *path, size_t bufsz, int fatal_flag)
Definition: File.cc:40
AnyP::ProtocolVersion ProtocolVersion(unsigned int aMajor, unsigned int aMinor)
HTTP version label information.
Definition: ProtocolVersion.h:19
void RegisterAction(char const *action, char const *desc, OBJH *handler, int pw_req_flag, int atomic)
Definition: Registration.cc:16
peer_t neighborType(const CachePeer *p, const AnyP::Uri &url)
Definition: neighbors.cc:114
static void netdbHashInsert(netdbEntry *n, Ip::Address &addr)
Definition: net_db.cc:117
void netdbHostData(const char *host, int *samp, int *rtt, int *hops)
Definition: net_db.cc:977
static net_db_peer * netdbPeerByName(const netdbEntry *n, const char *)
Definition: net_db.cc:402
void netdbExchangeUpdatePeer(Ip::Address &addr, CachePeer *e, double rtt, double hops)
Definition: net_db.cc:1043
static void netdbHostInsert(netdbEntry *n, const char *hostname)
Definition: net_db.cc:150
static netdbEntry * netdbLookupAddr(const Ip::Address &addr)
Definition: net_db.cc:254
void netdbUpdatePeer(const AnyP::Uri &url, CachePeer *e, int irtt, int ihops)
Definition: net_db.cc:1002
static CachePeer * findUsableParentAtHostname(PeerSelector *ps, const char *const hostname, const HttpRequest &request)
Definition: net_db.cc:1235
CBDATA_CLASS_INIT(netdbExchangeState)
void netdbHandlePingReply(const Ip::Address &from, int hops, int rtt)
Definition: net_db.cc:844
StoreEntry * storeCreateEntry(const char *url, const char *logUrl, const RequestFlags &flags, const HttpRequestMethod &method)
Definition: store.cc:745
int storeUnregister(store_client *sc, StoreEntry *e, void *data)
Definition: store_client.cc:749
void storeClientCopy(store_client *sc, StoreEntry *e, StoreIOBuffer copyInto, STCB *callback, void *data)
Definition: store_client.cc:213
store_client * storeClientListAdd(StoreEntry *e, void *data)
Definition: store_client.cc:123
time_t getCurrentTime() STUB_RETVAL(0) int tvSubUsec(struct timeval
struct timeval current_time
the current UNIX time in timeval {seconds, microseconds} format
Definition: gadgets.cc:17