]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SourceLayout: DNS component code style changes
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 3 Jan 2012 02:19:30 +0000 (19:19 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 3 Jan 2012 02:19:30 +0000 (19:19 -0700)
- removes "dnsserver" terminology from all the Squid internals and
  ./configure docs. Replacing it with "helper" to avoid confusion.

- updates the automake conditional to ENABLE_DNSHELPER and code define
  to USE_DNSHELPER inline with coding guidelines.

- shuffles the DNS API definitions to their own header, SquidDns.h, and
  de-duplicates the init/shutdown API calls to remove some #if

17 files changed:
configure.ac
squid3.dox
src/Makefile.am
src/SquidDns.h [new file with mode: 0644]
src/cache_cf.cc
src/cf.data.pre
src/cf_gen_defines
src/client_side_reply.cc
src/dns.cc
src/dns_internal.cc
src/enums.h
src/fqdncache.cc
src/ipcache.cc
src/main.cc
src/protos.h
src/snmp_core.cc
src/structs.h

index ffa11c44d35bda2674410d50552fdd1dd61f5a08..3b5902d556e59fc9608e6ed66a0ba5e002afea3b 100644 (file)
@@ -1588,19 +1588,19 @@ AC_ARG_ENABLE(ident-lookups,
 AC_MSG_NOTICE([Support for Ident lookups enabled: ${enable_ident_lookups:=yes}])
 SQUID_DEFINE_BOOL(USE_IDENT,$enable_ident_lookups,[Support for Ident (RFC 931) lookups])
 
-squid_opt_use_dnsserver="no"
+squid_opt_use_dnshelper="no"
 AC_ARG_ENABLE(internal-dns,
   AS_HELP_STRING([--disable-internal-dns],
            [Prevents Squid from directly sending and receiving DNS messages, 
             and instead enables the old external 'dnsserver' processes.]), [
   if test "x$enableval" = "xno" ; then
     AC_MSG_WARN([Disabling Internal DNS queries])
-    squid_opt_use_dnsserver="yes"
+    squid_opt_use_dnshelper="yes"
   fi
 ])
-SQUID_DEFINE_BOOL(USE_DNSSERVERS,$squid_opt_use_dnsserver,
+SQUID_DEFINE_BOOL(USE_DNSHELPER,$squid_opt_use_dnshelper,
   [Use dnsserver processes instead of the internal DNS protocol support])
-AM_CONDITIONAL([USE_DNSSERVER],[test "x$squid_opt_use_dnsserver" = "xyes" ])
+AM_CONDITIONAL([ENABLE_DNSHELPER],[test "x$squid_opt_use_dnshelper" = "xyes" ])
 
 
 AM_CONDITIONAL(USE_SSL_CRTD, false)
@@ -3386,7 +3386,7 @@ SQUID_DETECT_TCP_RECV_BUFSIZE
 SQUID_CHECK_NEED_SYS_ERRLIST
 SQUID_CHECK_MAXPATHLEN
 
-if test "x$squid_opt_use_dnsserver" = "xyes"; then
+if test "x$squid_opt_use_dnshelper" = "xyes"; then
   SQUID_CHECK_LIBRESOLV_DNS_TTL_HACK
   SQUID_CHECK_RESOLVER_FIELDS
 fi
index f5557c37af4fb2baeb2d0b5d36bf9f64c00144f4..069dbe8f01934883d400354b83e74e378702fad4 100644 (file)
@@ -1266,7 +1266,7 @@ PREDEFINED             = __cplusplus \
                          USE_CLASSFUL \
                          USE_DELAY_POOLS \
                          USE_DLMALLOC \
-                         USE_DNSSERVERS \
+                         USE_DNSHELPER \
                          USE_EPOLL \
                          USE_GNUREGEX \
                          USE_HEXDUMP \
index 2436a34d9a3a7c1648a387d276528f4499893544..9e8e299ccc109c3a970b74e8c0c02590c119fdcf 100644 (file)
@@ -7,15 +7,17 @@
 include $(top_srcdir)/src/Common.am
 
 AUTOMAKE_OPTIONS = subdir-objects
-if USE_DNSSERVER
+
+if ENABLE_DNSHELPER
 DNSSOURCE = dns.cc
-DNSSERVER = dnsserver
+DNSHELPER = dnsserver
 else
 DNSSOURCE = dns_internal.cc
-DNSSERVER =
+DNSHELPER =
 endif
 
 DNSSOURCE += \
+       SquidDns.h \
        DnsLookupDetails.h \
        DnsLookupDetails.cc
 
@@ -203,7 +205,7 @@ bin_PROGRAMS =
 
 
 libexec_PROGRAMS = \
-       $(DNSSERVER) \
+       $(DNSHELPER) \
        $(DISK_PROGRAMS) \
        $(UNLINKD)
 
@@ -636,7 +638,6 @@ unlinkd_LDADD = \
 
 ## dnsserver is a standalone helper. Do not link to any internal libraries
 dnsserver_SOURCES = dnsserver.cc
-## SquidNew.cc tests/stub_debug.cc test_tools.cc time.cc
 dnsserver_LDADD = $(COMPAT_LIB)
 
 recv_announce_SOURCES = recv-announce.cc
diff --git a/src/SquidDns.h b/src/SquidDns.h
new file mode 100644 (file)
index 0000000..635b5a8
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef SQUID_DNS_H
+#define SQUID_DNS_H
+
+namespace Ip {
+class Address;
+}
+
+// generic DNS API
+extern void dnsInit(void);
+extern void dnsShutdown(void);
+
+#if USE_DNSHELPER
+// external DNS helper API
+extern void dnsSubmit(const char *lookup, HLPCB * callback, void *data);
+#else
+// internal DNS client API
+extern void idnsALookup(const char *, IDNSCB *, void *);
+extern void idnsPTRLookup(const Ip::Address &, IDNSCB *, void *);
+#endif
+
+#endif /* SQUID_DNS_H */
index bacec750b85adcf7d8d47d0c3e2755941dd2b3a4..b0a363f8fcda47ea797ce698f023d5a97363a939 100644 (file)
@@ -161,7 +161,7 @@ static void parseBytesLine(size_t * bptr, const char *units);
 #if USE_SSL
 static void parseBytesOptionValue(size_t * bptr, const char *units, char const * value);
 #endif
-#if !USE_DNSSERVERS
+#if !USE_DNSHELPER
 static void parseBytesLineSigned(ssize_t * bptr, const char *units);
 #endif
 static size_t parseBytesUnits(const char *unit);
@@ -639,11 +639,9 @@ configDoConfigure(void)
     else
         visible_appname_string = (char const *)APP_FULLNAME;
 
-#if USE_DNSSERVERS
-
+#if USE_DNSHELPER
     if (Config.dnsChildren.n_max < 1)
-        fatal("No dnsservers allocated");
-
+        fatal("No DNS helpers allocated");
 #endif
 
     if (Config.Program.redirect) {
@@ -704,8 +702,7 @@ configDoConfigure(void)
     }
 
     requirePathnameExists("MIME Config Table", Config.mimeTablePathname);
-#if USE_DNSSERVERS
-
+#if USE_DNSHELPER
     requirePathnameExists("cache_dns_program", Config.Program.dnsserver);
 #endif
 #if USE_UNLINKD
@@ -1136,7 +1133,7 @@ parseBytesLine(size_t * bptr, const char *units)
         self_destruct();
 }
 
-#if !USE_DNSSERVERS
+#if !USE_DNSHELPER
 static void
 parseBytesLineSigned(ssize_t * bptr, const char *units)
 {
@@ -3055,7 +3052,7 @@ free_time_t(time_t * var)
     *var = 0;
 }
 
-#if !USE_DNSSERVERS
+#if !USE_DNSHELPER
 static void
 dump_time_msec(StoreEntry * entry, const char *name, time_msec_t var)
 {
@@ -3092,7 +3089,7 @@ dump_b_size_t(StoreEntry * entry, const char *name, size_t var)
     storeAppendPrintf(entry, "%s %d %s\n", name, (int) var, B_BYTES_STR);
 }
 
-#if !USE_DNSSERVERS
+#if !USE_DNSHELPER
 static void
 dump_b_ssize_t(StoreEntry * entry, const char *name, ssize_t var)
 {
@@ -3136,7 +3133,7 @@ parse_b_size_t(size_t * var)
     parseBytesLine(var, B_BYTES_STR);
 }
 
-#if !USE_DNSSERVERS
+#if !USE_DNSHELPER
 static void
 parse_b_ssize_t(ssize_t * var)
 {
@@ -3170,7 +3167,7 @@ free_size_t(size_t * var)
     *var = 0;
 }
 
-#if !USE_DNSSERVERS
+#if !USE_DNSHELPER
 static void
 free_ssize_t(ssize_t * var)
 {
index eac66773943e1a1ead5fc84e9ebfdb46e2e8141d..b15356fc3b4aa9a48519d7069cfd8d32f47c9e10 100644 (file)
@@ -7064,7 +7064,7 @@ DOC_END
 
 NAME: cache_dns_program
 TYPE: string
-IFDEF: USE_DNSSERVERS
+IFDEF: USE_DNSHELPER
 DEFAULT: @DEFAULT_DNSSERVER@
 LOC: Config.Program.dnsserver
 DOC_START
@@ -7073,7 +7073,7 @@ DOC_END
 
 NAME: dns_children
 TYPE: HelperChildConfig
-IFDEF: USE_DNSSERVERS
+IFDEF: USE_DNSHELPER
 DEFAULT: 32 startup=1 idle=1
 LOC: Config.dnsChildren
 DOC_START
@@ -7107,7 +7107,7 @@ NAME: dns_retransmit_interval
 TYPE: time_msec
 DEFAULT: 5 seconds
 LOC: Config.Timeout.idns_retransmit
-IFDEF: !USE_DNSSERVERS
+IFDEF: !USE_DNSHELPER
 DOC_START
        Initial retransmit interval for DNS queries. The interval is
        doubled each time all configured DNS servers have been tried.
@@ -7117,7 +7117,7 @@ NAME: dns_timeout
 TYPE: time_msec
 DEFAULT: 30 seconds
 LOC: Config.Timeout.idns_query
-IFDEF: !USE_DNSSERVERS
+IFDEF: !USE_DNSHELPER
 DOC_START
        DNS Query timeout. If no response is received to a DNS query
        within this time all DNS servers for the queried domain
@@ -7128,7 +7128,7 @@ NAME: dns_packet_max
 TYPE: b_ssize_t
 DEFAULT: none
 LOC: Config.dns.packet_max
-IFDEF: !USE_DNSSERVERS
+IFDEF: !USE_DNSHELPER
 DOC_START
        Maximum number of bytes packet size to advertise via EDNS.
        Set to "none" to disable EDNS large packet support.
@@ -7229,7 +7229,7 @@ NAME: ignore_unknown_nameservers
 TYPE: onoff
 LOC: Config.onoff.ignore_unknown_nameservers
 DEFAULT: on
-IFDEF: !USE_DNSSERVERS
+IFDEF: !USE_DNSHELPER
 DOC_START
        By default Squid checks that DNS responses are received
        from the same IP addresses they are sent to.  If they
@@ -7242,7 +7242,7 @@ NAME: dns_v4_fallback
 TYPE: onoff
 DEFAULT: on
 LOC: Config.onoff.dns_require_A
-IFDEF: !USE_DNSSERVERS
+IFDEF: !USE_DNSHELPER
 DOC_START
        Standard practice with DNS is to lookup either A or AAAA records
        and use the results if it succeeds. Only looking up the other if
@@ -7263,7 +7263,7 @@ NAME: dns_v4_first
 TYPE: onoff
 DEFAULT: off
 LOC: Config.dns.v4_first
-IFDEF: !USE_DNSSERVERS
+IFDEF: !USE_DNSHELPER
 DOC_START
        With the IPv6 Internet being as fast or faster than IPv4 Internet
        for most networks Squid prefers to contact websites over IPv6.
index c0435374ca59112cd8182d78b87f7b962605691c..c430bbb1b951cd98f973b34810b8a77eaada015d 100644 (file)
@@ -15,8 +15,8 @@ BEGIN {
        define["SQUID_SNMP"]="--enable-snmp"
        define["USE_ADAPTATION"]="--enable-ecap or --enable-icap-client"
        define["USE_CACHE_DIGESTS"]="--enable-cache-digests"
-       define["USE_DNSSERVERS"]="--disable-internal-dns"
-       define["!USE_DNSSERVERS"]="--enable-internal-dns"
+       define["USE_DNSHELPER"]="--disable-internal-dns"
+       define["!USE_DNSHELPER"]="--enable-internal-dns"
        define["USE_ECAP"]="--enable-ecap"
        define["USE_ERR_LOCALES"]="--enable-auto-locale"
        define["USE_HTCP"]="--enable-htcp"
index 6daba7540fc8e136826c66628fede006bfe16044..9ee0a8167e1920381715bf7316fc8cbcc2e31dd4 100644 (file)
@@ -1565,15 +1565,11 @@ clientReplyContext::identifyFoundObject(StoreEntry *newEntry)
       */
     if (r->flags.nocache) {
 
-#if USE_DNSSERVERS
-
+#if USE_DNSHELPER
         ipcacheInvalidate(r->GetHost());
-
 #else
-
         ipcacheInvalidateNegative(r->GetHost());
-
-#endif /* USE_DNSSERVERS */
+#endif /* USE_DNSHELPER */
 
     }
 
@@ -1581,15 +1577,11 @@ clientReplyContext::identifyFoundObject(StoreEntry *newEntry)
 
     else if (r->flags.nocache_hack) {
 
-#if USE_DNSSERVERS
-
+#if USE_DNSHELPER
         ipcacheInvalidate(r->GetHost());
-
 #else
-
         ipcacheInvalidateNegative(r->GetHost());
-
-#endif /* USE_DNSSERVERS */
+#endif /* USE_DNSHELPER */
 
     }
 
index 984fdfca111423ca268ffcb1d71e3d8a9c3a0631..cf874d412ee9e705b46a0accd8a8fa7027cf87e7 100644 (file)
@@ -44,7 +44,7 @@
    #if to include the external DNS code in compile process when
    using external DNS.
  */
-#if USE_DNSSERVERS
+#if USE_DNSHELPER
 
 static helper *dnsservers = NULL;
 
@@ -180,4 +180,4 @@ snmp_netDnsFn(variable_list * Var, snint * ErrP)
 }
 
 #endif /* SQUID_SNMP */
-#endif /* USE_DNSSERVERS */
+#endif /* USE_DNSHELPER */
index 91de65a44c95e25f3b2d35172d06c3d6dc9a361b..1135e0abcd2eac92926bf9777d4647f14325fe43 100644 (file)
@@ -60,7 +60,7 @@
    #ifndef to exclude the internal DNS code from compile process when
    using external DNS process.
  */
-#if !USE_DNSSERVERS
+#if !USE_DNSHELPER
 #if _SQUID_WINDOWS_
 #include "squid_windows.h"
 #define REG_TCPIP_PARA_INTERFACES "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces"
@@ -821,7 +821,7 @@ idnsVCClosed(const CommCloseCbParams &params)
     delete vc->queue;
     delete vc->msg;
     vc->conn = NULL;
-    if (vc->ns < nns) // XXX: idnsShutdown may have freed nameservers[]
+    if (vc->ns < nns) // XXX: dnsShutdown may have freed nameservers[]
         nameservers[vc->ns].vc = NULL;
     cbdataFree(vc);
 }
@@ -1492,7 +1492,7 @@ idnsRegisterWithCacheManager(void)
 }
 
 void
-idnsInit(void)
+dnsInit(void)
 {
     static int init = 0;
 
@@ -1589,7 +1589,7 @@ idnsInit(void)
 }
 
 void
-idnsShutdown(void)
+dnsShutdown(void)
 {
     if (DnsSocketA < 0 && DnsSocketB < 0)
         return;
@@ -1763,7 +1763,7 @@ idnsPTRLookup(const Ip::Address &addr, IDNSCB * callback, void *data)
  * The function to return the DNS via SNMP
  */
 variable_list *
-snmp_netIdnsFn(variable_list * Var, snint * ErrP)
+snmp_netDnsFn(variable_list * Var, snint * ErrP)
 {
     int i, n = 0;
     variable_list *Answer = NULL;
@@ -1811,4 +1811,4 @@ snmp_netIdnsFn(variable_list * Var, snint * ErrP)
 }
 
 #endif /*SQUID_SNMP */
-#endif /* USE_DNSSERVERS */
+#endif /* USE_DNSHELPER */
index a49f3578575c8f1bbbe7a653b5516c8ce9532c51..ce34b251d241975ded30cc142349c18731e892e8 100644 (file)
@@ -228,7 +228,7 @@ typedef enum {
     // following pools are initialized late by their component if needed (or never)
     MEM_FQDNCACHE_ENTRY,
     MEM_FWD_SERVER,
-#if !USE_DNSSERVERS
+#if !USE_DNSHELPER
     MEM_IDNS_QUERY,
 #endif
     MEM_IPCACHE_ENTRY,
index bdf57a3c681d530cf1ec59155c2cf402fd1f2805..831718ecffaffb90bb31d50734c6c38f9efdc987 100644 (file)
@@ -37,6 +37,7 @@
 #include "DnsLookupDetails.h"
 #include "event.h"
 #include "mgr/Registration.h"
+#include "SquidDns.h"
 #include "SquidTime.h"
 #include "StatCounters.h"
 #include "Store.h"
@@ -128,7 +129,7 @@ static struct _fqdn_cache_stats {
 /// \ingroup FQDNCacheInternal
 static dlink_list lru_list;
 
-#if USE_DNSSERVERS
+#if USE_DNSHELPER
 static HLPCB fqdncacheHandleReply;
 static int fqdncacheParse(fqdncache_entry *, const char *buf);
 #else
@@ -340,7 +341,7 @@ fqdncacheCallback(fqdncache_entry * f, int wait)
 }
 
 /// \ingroup FQDNCacheInternal
-#if USE_DNSSERVERS
+#if USE_DNSHELPER
 static int
 fqdncacheParse(fqdncache_entry *f, const char *inbuf)
 {
@@ -492,7 +493,7 @@ fqdncacheParse(fqdncache_entry *f, rfc1035_rr * answers, int nr, const char *err
  * Callback for handling DNS results.
  */
 static void
-#if USE_DNSSERVERS
+#if USE_DNSHELPER
 fqdncacheHandleReply(void *data, char *reply)
 #else
 fqdncacheHandleReply(void *data, rfc1035_rr * answers, int na, const char *error_message)
@@ -503,7 +504,7 @@ fqdncacheHandleReply(void *data, rfc1035_rr * answers, int na, const char *error
     ++FqdncacheStats.replies;
     const int age = f->age();
     statCounter.dns.svcTime.count(age);
-#if USE_DNSSERVERS
+#if USE_DNSHELPER
 
     fqdncacheParse(f, reply);
 #else
@@ -578,8 +579,7 @@ fqdncache_nbgethostbyaddr(const Ip::Address &addr, FQDNH * handler, void *handle
     f->handlerData = cbdataReference(handlerData);
     f->request_time = current_time;
     c = new generic_cbdata(f);
-#if USE_DNSSERVERS
-
+#if USE_DNSHELPER
     dnsSubmit(hashKeyStr(&f->hash), fqdncacheHandleReply, c);
 #else
     idnsPTRLookup(addr, fqdncacheHandleReply, c);
index 820e18901b33a8795848e149d6b37ade9d6fb8d2..30129c1cf7be3365e29c84e2a0cc10d2f6dcb6df 100644 (file)
@@ -39,6 +39,7 @@
 #include "ip/tools.h"
 #include "ipcache.h"
 #include "mgr/Registration.h"
+#include "SquidDns.h"
 #include "SquidTime.h"
 #include "StatCounters.h"
 #include "Store.h"
@@ -134,13 +135,13 @@ static dlink_list lru_list;
 static void stat_ipcache_get(StoreEntry *);
 
 static FREE ipcacheFreeEntry;
-#if USE_DNSSERVERS
+#if USE_DNSHELPER
 static HLPCB ipcacheHandleReply;
 #else
 static IDNSCB ipcacheHandleReply;
 #endif
 static int ipcacheExpiredEntry(ipcache_entry *);
-#if USE_DNSSERVERS
+#if USE_DNSHELPER
 static int ipcacheParse(ipcache_entry *, const char *buf);
 #else
 static int ipcacheParse(ipcache_entry *, rfc1035_rr *, int, const char *error);
@@ -352,7 +353,7 @@ ipcacheCallback(ipcache_entry *i, int wait)
 }
 
 /// \ingroup IPCacheAPI
-#if USE_DNSSERVERS
+#if USE_DNSHELPER
 static int
 ipcacheParse(ipcache_entry *i, const char *inbuf)
 {
@@ -588,7 +589,7 @@ ipcacheParse(ipcache_entry *i, rfc1035_rr * answers, int nr, const char *error_m
 
 /// \ingroup IPCacheInternal
 static void
-#if USE_DNSSERVERS
+#if USE_DNSHELPER
 ipcacheHandleReply(void *data, char *reply)
 #else
 ipcacheHandleReply(void *data, rfc1035_rr * answers, int na, const char *error_message)
@@ -600,7 +601,7 @@ ipcacheHandleReply(void *data, rfc1035_rr * answers, int na, const char *error_m
     const int age = i->age();
     statCounter.dns.svcTime.count(age);
 
-#if USE_DNSSERVERS
+#if USE_DNSHELPER
     ipcacheParse(i, reply);
 #else
 
@@ -693,11 +694,9 @@ ipcache_nbgethostbyname(const char *name, IPH * handler, void *handlerData)
     i->handlerData = cbdataReference(handlerData);
     i->request_time = current_time;
     c = new generic_cbdata(i);
-#if USE_DNSSERVERS
-
+#if USE_DNSHELPER
     dnsSubmit(hashKeyStr(&i->hash), ipcacheHandleReply, c);
 #else
-
     idnsALookup(hashKeyStr(&i->hash), ipcacheHandleReply, c);
 #endif
 }
index 2a94775a5796f5a56cbd8beea319e6d54e830162..cb58e09710d332909e81fe06556ddeb367a86bb5 100644 (file)
@@ -66,6 +66,7 @@
 #include "format/Token.h"
 #include "fs/Module.h"
 #include "PeerSelectState.h"
+#include "SquidDns.h"
 #include "Store.h"
 #include "ICP.h"
 #include "ident/Ident.h"
@@ -735,13 +736,7 @@ mainReconfigureStart(void)
 
     htcpSocketClose();
 #endif
-#if USE_DNSSERVERS
-
     dnsShutdown();
-#else
-
-    idnsShutdown();
-#endif
 #if USE_SSL_CRTD
     Ssl::Helper::GetInstance()->Shutdown();
 #endif
@@ -824,13 +819,7 @@ mainReconfigureFinish(void *)
     icapLogOpen();
 #endif
     storeLogOpen();
-#if USE_DNSSERVERS
-
     dnsInit();
-#else
-
-    idnsInit();
-#endif
 #if USE_SSL_CRTD
     Ssl::Helper::GetInstance()->Init();
 #endif
@@ -888,7 +877,7 @@ static void
 mainRotate(void)
 {
     icmpEngine.Close();
-#if USE_DNSSERVERS
+#if USE_DNSHELPER
     dnsShutdown();
 #endif
     redirectShutdown();
@@ -905,7 +894,7 @@ mainRotate(void)
     icapLogRotate();               /*icap.log*/
 #endif
     icmpEngine.Open();
-#if USE_DNSSERVERS
+#if USE_DNSHELPER
     dnsInit();
 #endif
     redirectInit();
@@ -1029,16 +1018,8 @@ mainInitialize(void)
 
     parseEtcHosts();
 
-#if USE_DNSSERVERS
-
     dnsInit();
 
-#else
-
-    idnsInit();
-
-#endif
-
 #if USE_SSL_CRTD
     Ssl::Helper::GetInstance()->Init();
 #endif
@@ -1847,13 +1828,7 @@ SquidShutdown()
 #endif
 
     debugs(1, 1, "Shutting down...");
-#if USE_DNSSERVERS
-
     dnsShutdown();
-#else
-
-    idnsShutdown();
-#endif
 #if USE_SSL_CRTD
     Ssl::Helper::GetInstance()->Shutdown();
 #endif
index 85535539da5f5874f6c9c1c512009be80302a3e8..f8227bbb5f94cf28e223599f37aee0fb71bffeaf 100644 (file)
@@ -125,17 +125,6 @@ SQUIDCEXTERN void file_write_mbuf(int fd, off_t, MemBuf mb, DWCB * handler, void
 SQUIDCEXTERN void file_read(int, char *, int, off_t, DRCB *, void *);
 SQUIDCEXTERN void disk_init(void);
 
-SQUIDCEXTERN void dnsShutdown(void);
-SQUIDCEXTERN void dnsInit(void);
-SQUIDCEXTERN void dnsSubmit(const char *lookup, HLPCB * callback, void *data);
-
-/* dns_internal.c */
-SQUIDCEXTERN void idnsInit(void);
-SQUIDCEXTERN void idnsShutdown(void);
-SQUIDCEXTERN void idnsALookup(const char *, IDNSCB *, void *);
-
-SQUIDCEXTERN void idnsPTRLookup(const Ip::Address &, IDNSCB *, void *);
-
 SQUIDCEXTERN void fd_close(int fd);
 SQUIDCEXTERN void fd_open(int fd, unsigned int type, const char *);
 SQUIDCEXTERN void fd_note(int fd, const char *);
@@ -266,11 +255,7 @@ extern variable_list *snmp_prfProtoFn(variable_list *, snint *);
 extern variable_list *snmp_prfPeerFn(variable_list *, snint *);
 extern variable_list *snmp_netIpFn(variable_list *, snint *);
 extern variable_list *snmp_netFqdnFn(variable_list *, snint *);
-#if USE_DNSSERVERS
 extern variable_list *snmp_netDnsFn(variable_list *, snint *);
-#else
-extern variable_list *snmp_netIdnsFn(variable_list *, snint *);
-#endif /* USE_DNSSERVERS */
 extern variable_list *snmp_meshPtblFn(variable_list *, snint *);
 extern variable_list *snmp_meshCtblFn(variable_list *, snint *);
 #endif /* SQUID_SNMP */
index e5579529ac61a28559c0a33d75a68de781a18662..729c0d1bcab3eeef6274a8098982dd1f187073cd 100644 (file)
@@ -236,15 +236,9 @@ snmpInit(void)
     snmpAddNodeStr("1.3.6.1.4.1.3495.1.4.2", FQDN_GHBN, snmp_netFqdnFn, static_Inst, atSum);
 
     snmpAddNodeStr("1.3.6.1.4.1.3495.1.4", NET_DNS_CACHE, NULL, NULL);
-#if USE_DNSSERVERS
     snmpAddNodeStr("1.3.6.1.4.1.3495.1.4.3", DNS_REQ, snmp_netDnsFn, static_Inst, atSum);
     snmpAddNodeStr("1.3.6.1.4.1.3495.1.4.3", DNS_REP, snmp_netDnsFn, static_Inst, atSum);
     snmpAddNodeStr("1.3.6.1.4.1.3495.1.4.3", DNS_SERVERS, snmp_netDnsFn, static_Inst, atSum);
-#else
-    snmpAddNodeStr("1.3.6.1.4.1.3495.1.4.3", DNS_REQ, snmp_netIdnsFn, static_Inst, atSum);
-    snmpAddNodeStr("1.3.6.1.4.1.3495.1.4.3", DNS_REP, snmp_netIdnsFn, static_Inst, atSum);
-    snmpAddNodeStr("1.3.6.1.4.1.3495.1.4.3", DNS_SERVERS, snmp_netIdnsFn, static_Inst, atSum);
-#endif
 
     /* SQ_MESH - 1.3.6.1.4.1.3495.1.5 */
     snmpAddNodeStr("1.3.6.1.4.1.3495.1", 5, NULL, NULL);
index f677de8d013b4ed44fca82011c263664703d3ad6..37382fe7f7046064821aaa3cfc6b3e18f2d4b9a1 100644 (file)
@@ -218,8 +218,7 @@ struct SquidConfig {
         int icp_query_min;     /* msec */
         int mcast_icp_query;   /* msec */
 
-#if !USE_DNSSERVERS
-
+#if !USE_DNSHELPER
         time_msec_t idns_retransmit;
         time_msec_t idns_query;
 #endif
@@ -303,7 +302,7 @@ struct SquidConfig {
     char *effectiveGroup;
 
     struct {
-#if USE_DNSSERVERS
+#if USE_DNSHELPER
         char *dnsserver;
 #endif
 
@@ -320,8 +319,7 @@ struct SquidConfig {
 #endif
 
     } Program;
-#if USE_DNSSERVERS
-
+#if USE_DNSHELPER
     HelperChildConfig dnsChildren;
 #endif