/*
- * DEBUG: section 35 FQDN Cache
- * AUTHOR: Harvest Derived
- *
- * SQUID Web Proxy Cache http://www.squid-cache.org/
- * ----------------------------------------------------------
- *
- * Squid is the result of efforts by numerous individuals from
- * the Internet community; see the CONTRIBUTORS file for full
- * details. Many organizations have provided support for Squid's
- * development; see the SPONSORS file for full details. Squid is
- * Copyrighted (C) 2001 by the Regents of the University of
- * California; see the COPYRIGHT file for full details. Squid
- * incorporates software developed and/or copyrighted by other
- * sources; see the CREDITS file for full details.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
*
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
*/
+/* DEBUG: section 35 FQDN Cache */
+
#include "squid.h"
#include "cbdata.h"
#include "DnsLookupDetails.h"
#include "event.h"
#include "helper.h"
-#include "HelperReply.h"
-#include "Mem.h"
#include "mgr/Registration.h"
#include "SquidConfig.h"
#include "SquidDns.h"
#include "SquidTime.h"
#include "StatCounters.h"
#include "Store.h"
+#include "util.h"
#include "wordlist.h"
#if SQUID_SNMP
class fqdncache_entry
{
public:
- hash_link hash; /* must be first */
+ hash_link hash; /* must be first */
time_t lastref;
time_t expires;
unsigned char name_count;
/**
\ingroup FQDNCacheInternal
- \param name FQDN hash string.
+ \param name FQDN hash string.
\retval Match for given name
*/
static fqdncache_entry *
/// \ingroup FQDNCacheAPI
void
-fqdncache_purgelru(void *notused)
+fqdncache_purgelru(void *)
{
dlink_node *m;
dlink_node *prev = NULL;
fqdncache_entry *t;
while (m) {
- if (i != NULL) { /* need to delay deletion */
- fqdncacheRelease(i); /* we just override locks */
+ if (i != NULL) { /* need to delay deletion */
+ fqdncacheRelease(i); /* we just override locks */
i = NULL;
}
/**
\ingroup FQDNCacheAPI
*
- \param addr IP address of domain to resolve.
- \param handler A pointer to the function to be called when
- * the reply from the FQDN cache
- * (or the DNS if the FQDN cache misses)
- \param handlerData Information that is passed to the handler
- * and does not affect the FQDN cache.
+ \param addr IP address of domain to resolve.
+ \param handler A pointer to the function to be called when
+ * the reply from the FQDN cache
+ * (or the DNS if the FQDN cache misses)
+ \param handlerData Information that is passed to the handler
+ * and does not affect the FQDN cache.
*/
void
fqdncache_nbgethostbyaddr(const Ip::Address &addr, FQDNH * handler, void *handlerData)
* DNS, unless this is requested, by setting the flags
* to FQDN_LOOKUP_IF_MISS.
*
- \param addr address of the FQDN being resolved
- \param flags values are NULL or FQDN_LOOKUP_IF_MISS. default is NULL.
+ \param addr address of the FQDN being resolved
+ \param flags values are NULL or FQDN_LOOKUP_IF_MISS. default is NULL.
*
*/
const char *
* The worldist is to be managed by the caller,
* including pointed-to strings
*
- \param addr FQDN name to be added.
- \param hostnames ??
+ \param addr FQDN name to be added.
+ \param hostnames ??
*/
void
fqdncacheAddEntryFromHosts(char *addr, wordlist * hostnames)
}
fce->name_count = j;
- fce->names[j] = NULL; /* it's safe */
+ fce->names[j] = NULL; /* it's safe */
fce->flags.fromhosts = true;
fqdncacheAddEntry(fce);
fqdncacheLockEntry(fce);
}
#endif /*SQUID_SNMP */
+