From: Amos Jeffries Date: Tue, 3 Jan 2012 02:19:30 +0000 (-0700) Subject: SourceLayout: DNS component code style changes X-Git-Tag: BumpSslServerFirst.take05~12^2~94 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f64091a7feba6201f19f6b311449225fd0e515e7;p=thirdparty%2Fsquid.git SourceLayout: DNS component code style changes - 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 --- diff --git a/configure.ac b/configure.ac index ffa11c44d3..3b5902d556 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/squid3.dox b/squid3.dox index f5557c37af..069dbe8f01 100644 --- a/squid3.dox +++ b/squid3.dox @@ -1266,7 +1266,7 @@ PREDEFINED = __cplusplus \ USE_CLASSFUL \ USE_DELAY_POOLS \ USE_DLMALLOC \ - USE_DNSSERVERS \ + USE_DNSHELPER \ USE_EPOLL \ USE_GNUREGEX \ USE_HEXDUMP \ diff --git a/src/Makefile.am b/src/Makefile.am index 2436a34d9a..9e8e299ccc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 index 0000000000..635b5a8270 --- /dev/null +++ b/src/SquidDns.h @@ -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 */ diff --git a/src/cache_cf.cc b/src/cache_cf.cc index bacec750b8..b0a363f8fc 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -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) { diff --git a/src/cf.data.pre b/src/cf.data.pre index eac6677394..b15356fc3b 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -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. diff --git a/src/cf_gen_defines b/src/cf_gen_defines index c0435374ca..c430bbb1b9 100644 --- a/src/cf_gen_defines +++ b/src/cf_gen_defines @@ -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" diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index 6daba7540f..9ee0a8167e 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -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 */ } diff --git a/src/dns.cc b/src/dns.cc index 984fdfca11..cf874d412e 100644 --- a/src/dns.cc +++ b/src/dns.cc @@ -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 */ diff --git a/src/dns_internal.cc b/src/dns_internal.cc index 91de65a44c..1135e0abcd 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -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 ¶ms) 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 */ diff --git a/src/enums.h b/src/enums.h index a49f357857..ce34b251d2 100644 --- a/src/enums.h +++ b/src/enums.h @@ -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, diff --git a/src/fqdncache.cc b/src/fqdncache.cc index bdf57a3c68..831718ecff 100644 --- a/src/fqdncache.cc +++ b/src/fqdncache.cc @@ -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); diff --git a/src/ipcache.cc b/src/ipcache.cc index 820e18901b..30129c1cf7 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -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 } diff --git a/src/main.cc b/src/main.cc index 2a94775a57..cb58e09710 100644 --- a/src/main.cc +++ b/src/main.cc @@ -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 diff --git a/src/protos.h b/src/protos.h index 85535539da..f8227bbb5f 100644 --- a/src/protos.h +++ b/src/protos.h @@ -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 */ diff --git a/src/snmp_core.cc b/src/snmp_core.cc index e5579529ac..729c0d1bca 100644 --- a/src/snmp_core.cc +++ b/src/snmp_core.cc @@ -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); diff --git a/src/structs.h b/src/structs.h index f677de8d01..37382fe7f7 100644 --- a/src/structs.h +++ b/src/structs.h @@ -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