From 89c1baad28cab48a5875c0082ce9ad168081a088 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Fri, 4 Mar 2016 18:06:23 +0100 Subject: [PATCH] utils-dns: remove unused code --- src/utils_dns.c | 8 -------- src/utils_dns.h | 6 ------ 2 files changed, 14 deletions(-) diff --git a/src/utils_dns.c b/src/utils_dns.c index 71a14d87..2c7a59d3 100644 --- a/src/utils_dns.c +++ b/src/utils_dns.c @@ -156,9 +156,6 @@ typedef int (printer)(const char *, ...); /* * Global variables */ -int qtype_counts[T_MAX]; -int opcode_counts[OP_MAX]; -int qclass_counts[C_MAX]; #if HAVE_PCAP_H static pcap_t *pcap_obj = NULL; @@ -418,11 +415,6 @@ handle_dns(const char *buf, int len) qh.length = (uint16_t) len; - /* gather stats */ - qtype_counts[qh.qtype]++; - qclass_counts[qh.qclass]++; - opcode_counts[qh.opcode]++; - if (Callback != NULL) Callback (&qh); diff --git a/src/utils_dns.h b/src/utils_dns.h index 83f0ea40..ef7de0a6 100644 --- a/src/utils_dns.h +++ b/src/utils_dns.h @@ -48,8 +48,6 @@ #define DNS_MSG_HDR_SZ 12 #define T_MAX 65536 -#define OP_MAX 16 -#define C_MAX 65536 #define MAX_QNAME_SZ 512 struct rfc1035_header_s { @@ -75,10 +73,6 @@ struct rfc1035_header_s { }; typedef struct rfc1035_header_s rfc1035_header_t; -extern int qtype_counts[T_MAX]; -extern int opcode_counts[OP_MAX]; -extern int qclass_counts[C_MAX]; - #if HAVE_PCAP_H void dnstop_set_pcap_obj (pcap_t *po); #endif -- 2.30.2