This is an automated email from the ASF dual-hosted git repository.

rrm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 4201d8f  Removes dead code from iocore/dns (#7025)
4201d8f is described below

commit 4201d8ff2e2cc38c2d1b72c3fe4e85ce5e906664
Author: Randall Meyer <[email protected]>
AuthorDate: Wed Jul 22 17:42:35 2020 -0700

    Removes dead code from iocore/dns (#7025)
---
 iocore/dns/I_DNSProcessor.h      |  3 +--
 iocore/dns/P_DNSProcessor.h      | 30 ------------------------------
 iocore/dns/P_SplitDNSProcessor.h |  8 --------
 3 files changed, 1 insertion(+), 40 deletions(-)

diff --git a/iocore/dns/I_DNSProcessor.h b/iocore/dns/I_DNSProcessor.h
index 83f4bd2..a5b4591 100644
--- a/iocore/dns/I_DNSProcessor.h
+++ b/iocore/dns/I_DNSProcessor.h
@@ -25,8 +25,7 @@
 
 #include "SRV.h"
 
-const int DOMAIN_SERVICE_PORT        = NAMESERVER_PORT;
-const int DEFAULT_DOMAIN_NAME_SERVER = 0;
+const int DOMAIN_SERVICE_PORT = NAMESERVER_PORT;
 
 const int MAX_DNS_REQUEST_LEN  = NS_PACKETSZ;
 const int MAX_DNS_RESPONSE_LEN = 65536;
diff --git a/iocore/dns/P_DNSProcessor.h b/iocore/dns/P_DNSProcessor.h
index 9ff1b4b..6284328 100644
--- a/iocore/dns/P_DNSProcessor.h
+++ b/iocore/dns/P_DNSProcessor.h
@@ -23,12 +23,6 @@
 
 #pragma once
 
-/*
-  #include "I_DNS.h"
-  #include <arpa/nameser.h>
-  #include "I_Cache.h"
-  #include "P_Net.h"
-*/
 #include "I_EventSystem.h"
 
 #define MAX_NAMED 32
@@ -78,13 +72,8 @@ extern unsigned int dns_sequence_number;
 #endif
 
 // Events
-
 #define DNS_EVENT_LOOKUP DNS_EVENT_EVENTS_START
 
-extern int dns_fd;
-
-void *dns_udp_receiver(void *arg);
-
 // Stats
 enum DNS_Stats {
   dns_total_lookups_stat,
@@ -95,7 +84,6 @@ enum DNS_Stats {
   dns_fail_time_stat,
   dns_retries_stat,
   dns_max_retries_exceeded_stat,
-  dns_sequence_number_stat,
   dns_in_flight_stat,
   DNS_Stat_Count
 };
@@ -107,27 +95,12 @@ struct RecRawStatBlock;
 extern RecRawStatBlock *dns_rsb;
 
 // Stat Macros
-
-#define DNS_DEBUG_COUNT_DYN_STAT(_x, _y) RecIncrRawStatCount(dns_rsb, 
mutex->thread_holding, (int)_x, _y)
-
 #define DNS_INCREMENT_DYN_STAT(_x) RecIncrRawStatSum(dns_rsb, 
mutex->thread_holding, (int)_x, 1)
 
 #define DNS_DECREMENT_DYN_STAT(_x) RecIncrRawStatSum(dns_rsb, 
mutex->thread_holding, (int)_x, -1)
 
 #define DNS_SUM_DYN_STAT(_x, _r) RecIncrRawStatSum(dns_rsb, 
mutex->thread_holding, (int)_x, _r)
 
-#define DNS_READ_DYN_STAT(_x, _count, _sum)        \
-  do {                                             \
-    RecGetRawStatSum(dns_rsb, (int)_x, &_sum);     \
-    RecGetRawStatCount(dns_rsb, (int)_x, &_count); \
-  } while (0)
-
-#define DNS_SET_DYN_COUNT(_x, _count) RecSetRawStatCount(dns_rsb, _x, _count);
-
-#define DNS_INCREMENT_THREAD_DYN_STAT(_s, _t) RecIncrRawStatSum(dns_rsb, _t, 
(int)_s, 1);
-
-#define DNS_DECREMENT_THREAD_DYN_STAT(_s, _t) RecIncrRawStatSum(dns_rsb, _t, 
(int)_s, -1);
-
 /**
   One DNSEntry is allocated per outstanding request. This continuation
   handles TIMEOUT events for the request as well as storing all
@@ -330,6 +303,3 @@ DNSHandler::DNSHandler()
   SET_HANDLER(&DNSHandler::startEvent);
   Debug("net_epoll", "inline DNSHandler::DNSHandler()");
 }
-
-#define DOT_SEPARATED(_x) \
-  ((unsigned char *)&(_x))[0], ((unsigned char *)&(_x))[1], ((unsigned char 
*)&(_x))[2], ((unsigned char *)&(_x))[3]
diff --git a/iocore/dns/P_SplitDNSProcessor.h b/iocore/dns/P_SplitDNSProcessor.h
index 41d0fb9..6f42a47 100644
--- a/iocore/dns/P_SplitDNSProcessor.h
+++ b/iocore/dns/P_SplitDNSProcessor.h
@@ -217,11 +217,3 @@ SplitDNSRecord::SplitDNSRecord() {}
    SplitDNSRecord::~SplitDNSRecord()
    -------------------------------------------------------------- */
 TS_INLINE SplitDNSRecord::~SplitDNSRecord() {}
-
-/* ------------------
-   Helper Functions
-   ------------------ */
-
-SplitDNSRecord *createDefaultServer();
-void reloadDefaultParent(char *val);
-void reloadParentFile();

Reply via email to