summaryrefslogtreecommitdiff
path: root/usr.bin/dig/lib
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2020-09-14 08:39:14 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2020-09-14 08:39:14 +0000
commit91273258f09702d56f03712ff5f914eecc3b3cf8 (patch)
treef836b1a70c3ab1afd6ba5d7795aac38e3f8bf6cd /usr.bin/dig/lib
parent39e22bb2ce4e6987cefa3f3dcc8c75ba31f46b16 (diff)
Bunch of dead stores and otherwise unused stuff lets us get rid of
unix/net.{c.h}. We need to sprinkle in a few #includes that net.h dragged in. OK deraadt
Diffstat (limited to 'usr.bin/dig/lib')
-rw-r--r--usr.bin/dig/lib/dns/rdata.c4
-rw-r--r--usr.bin/dig/lib/dns/rdata/ch_3/a_1.c4
-rw-r--r--usr.bin/dig/lib/dns/rdata/generic/ipseckey_45.c4
-rw-r--r--usr.bin/dig/lib/dns/rdata/generic/l32_105.c2
-rw-r--r--usr.bin/dig/lib/dns/rdata/generic/l64_106.c2
-rw-r--r--usr.bin/dig/lib/dns/rdata/generic/lp_107.c2
-rw-r--r--usr.bin/dig/lib/dns/rdata/generic/mx_15.c4
-rw-r--r--usr.bin/dig/lib/dns/rdata/generic/nid_104.c2
-rw-r--r--usr.bin/dig/lib/dns/rdata/hs_4/a_1.c4
-rw-r--r--usr.bin/dig/lib/dns/rdata/in_1/a6_38.c4
-rw-r--r--usr.bin/dig/lib/dns/rdata/in_1/a_1.c5
-rw-r--r--usr.bin/dig/lib/dns/rdata/in_1/aaaa_28.c4
-rw-r--r--usr.bin/dig/lib/dns/rdata/in_1/wks_11.c4
-rw-r--r--usr.bin/dig/lib/isc/include/isc/netaddr.h6
-rw-r--r--usr.bin/dig/lib/isc/include/isc/sockaddr.h8
-rw-r--r--usr.bin/dig/lib/isc/netaddr.c5
-rw-r--r--usr.bin/dig/lib/isc/sockaddr.c6
-rw-r--r--usr.bin/dig/lib/isc/unix/Makefile.inc4
-rw-r--r--usr.bin/dig/lib/isc/unix/include/isc/net.h116
-rw-r--r--usr.bin/dig/lib/isc/unix/net.c43
-rw-r--r--usr.bin/dig/lib/isc/unix/socket.c4
21 files changed, 27 insertions, 210 deletions
diff --git a/usr.bin/dig/lib/dns/rdata.c b/usr.bin/dig/lib/dns/rdata.c
index 32a7150175b..98cd5212f55 100644
--- a/usr.bin/dig/lib/dns/rdata.c
+++ b/usr.bin/dig/lib/dns/rdata.c
@@ -14,10 +14,12 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rdata.c,v 1.30 2020/02/26 18:49:02 florian Exp $ */
+/* $Id: rdata.c,v 1.31 2020/09/14 08:39:12 florian Exp $ */
/*! \file */
+#include <arpa/inet.h>
+
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
diff --git a/usr.bin/dig/lib/dns/rdata/ch_3/a_1.c b/usr.bin/dig/lib/dns/rdata/ch_3/a_1.c
index e52e506efc5..97f9cca441b 100644
--- a/usr.bin/dig/lib/dns/rdata/ch_3/a_1.c
+++ b/usr.bin/dig/lib/dns/rdata/ch_3/a_1.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: a_1.c,v 1.11 2020/02/26 18:47:58 florian Exp $ */
+/* $Id: a_1.c,v 1.12 2020/09/14 08:39:12 florian Exp $ */
/* by Bjorn.Victor@it.uu.se, 2005-05-07 */
/* Based on generic/soa_6.c and generic/mx_15.c */
@@ -22,8 +22,6 @@
#ifndef RDATA_CH_3_A_1_C
#define RDATA_CH_3_A_1_C
-#include <isc/net.h>
-
static inline isc_result_t
totext_ch_a(ARGS_TOTEXT) {
isc_region_t region;
diff --git a/usr.bin/dig/lib/dns/rdata/generic/ipseckey_45.c b/usr.bin/dig/lib/dns/rdata/generic/ipseckey_45.c
index 1e675582e0b..7d4554da1ae 100644
--- a/usr.bin/dig/lib/dns/rdata/generic/ipseckey_45.c
+++ b/usr.bin/dig/lib/dns/rdata/generic/ipseckey_45.c
@@ -14,15 +14,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ipseckey_45.c,v 1.12 2020/02/26 18:47:59 florian Exp $ */
+/* $Id: ipseckey_45.c,v 1.13 2020/09/14 08:39:12 florian Exp $ */
#ifndef RDATA_GENERIC_IPSECKEY_45_C
#define RDATA_GENERIC_IPSECKEY_45_C
#include <string.h>
-#include <isc/net.h>
-
static inline isc_result_t
totext_ipseckey(ARGS_TOTEXT) {
isc_region_t region;
diff --git a/usr.bin/dig/lib/dns/rdata/generic/l32_105.c b/usr.bin/dig/lib/dns/rdata/generic/l32_105.c
index 16be0340513..8848a9ec00d 100644
--- a/usr.bin/dig/lib/dns/rdata/generic/l32_105.c
+++ b/usr.bin/dig/lib/dns/rdata/generic/l32_105.c
@@ -19,8 +19,6 @@
#include <string.h>
-#include <isc/net.h>
-
static inline isc_result_t
totext_l32(ARGS_TOTEXT) {
isc_region_t region;
diff --git a/usr.bin/dig/lib/dns/rdata/generic/l64_106.c b/usr.bin/dig/lib/dns/rdata/generic/l64_106.c
index d0395f0e0a4..013b0f5ce48 100644
--- a/usr.bin/dig/lib/dns/rdata/generic/l64_106.c
+++ b/usr.bin/dig/lib/dns/rdata/generic/l64_106.c
@@ -19,8 +19,6 @@
#include <string.h>
-#include <isc/net.h>
-
static inline isc_result_t
totext_l64(ARGS_TOTEXT) {
isc_region_t region;
diff --git a/usr.bin/dig/lib/dns/rdata/generic/lp_107.c b/usr.bin/dig/lib/dns/rdata/generic/lp_107.c
index 20fe155cf82..faf719f403c 100644
--- a/usr.bin/dig/lib/dns/rdata/generic/lp_107.c
+++ b/usr.bin/dig/lib/dns/rdata/generic/lp_107.c
@@ -19,8 +19,6 @@
#include <string.h>
-#include <isc/net.h>
-
static inline isc_result_t
totext_lp(ARGS_TOTEXT) {
isc_region_t region;
diff --git a/usr.bin/dig/lib/dns/rdata/generic/mx_15.c b/usr.bin/dig/lib/dns/rdata/generic/mx_15.c
index 87ba5128b8f..4d96aef1f19 100644
--- a/usr.bin/dig/lib/dns/rdata/generic/mx_15.c
+++ b/usr.bin/dig/lib/dns/rdata/generic/mx_15.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: mx_15.c,v 1.12 2020/02/26 18:47:59 florian Exp $ */
+/* $Id: mx_15.c,v 1.13 2020/09/14 08:39:12 florian Exp $ */
/* reviewed: Wed Mar 15 18:05:46 PST 2000 by brister */
@@ -23,8 +23,6 @@
#include <string.h>
-#include <isc/net.h>
-
static inline isc_result_t
totext_mx(ARGS_TOTEXT) {
isc_region_t region;
diff --git a/usr.bin/dig/lib/dns/rdata/generic/nid_104.c b/usr.bin/dig/lib/dns/rdata/generic/nid_104.c
index fd6898a7a95..70b45fc1ca0 100644
--- a/usr.bin/dig/lib/dns/rdata/generic/nid_104.c
+++ b/usr.bin/dig/lib/dns/rdata/generic/nid_104.c
@@ -19,8 +19,6 @@
#include <string.h>
-#include <isc/net.h>
-
static inline isc_result_t
totext_nid(ARGS_TOTEXT) {
isc_region_t region;
diff --git a/usr.bin/dig/lib/dns/rdata/hs_4/a_1.c b/usr.bin/dig/lib/dns/rdata/hs_4/a_1.c
index 1f7f9c64401..1fc7529c20c 100644
--- a/usr.bin/dig/lib/dns/rdata/hs_4/a_1.c
+++ b/usr.bin/dig/lib/dns/rdata/hs_4/a_1.c
@@ -14,15 +14,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: a_1.c,v 1.10 2020/02/26 18:38:15 florian Exp $ */
+/* $Id: a_1.c,v 1.11 2020/09/14 08:39:12 florian Exp $ */
/* reviewed: Thu Mar 16 15:58:36 PST 2000 by brister */
#ifndef RDATA_HS_4_A_1_C
#define RDATA_HS_4_A_1_C
-#include <isc/net.h>
-
static inline isc_result_t
totext_hs_a(ARGS_TOTEXT) {
isc_region_t region;
diff --git a/usr.bin/dig/lib/dns/rdata/in_1/a6_38.c b/usr.bin/dig/lib/dns/rdata/in_1/a6_38.c
index fdc5ff18355..d7ca82fc235 100644
--- a/usr.bin/dig/lib/dns/rdata/in_1/a6_38.c
+++ b/usr.bin/dig/lib/dns/rdata/in_1/a6_38.c
@@ -14,15 +14,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: a6_38.c,v 1.12 2020/02/26 18:47:59 florian Exp $ */
+/* $Id: a6_38.c,v 1.13 2020/09/14 08:39:12 florian Exp $ */
/* RFC2874 */
#ifndef RDATA_IN_1_A6_28_C
#define RDATA_IN_1_A6_28_C
-#include <isc/net.h>
-
static inline isc_result_t
totext_in_a6(ARGS_TOTEXT) {
isc_region_t sr, ar;
diff --git a/usr.bin/dig/lib/dns/rdata/in_1/a_1.c b/usr.bin/dig/lib/dns/rdata/in_1/a_1.c
index 8353a2dcedb..7049ab52d7d 100644
--- a/usr.bin/dig/lib/dns/rdata/in_1/a_1.c
+++ b/usr.bin/dig/lib/dns/rdata/in_1/a_1.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: a_1.c,v 1.10 2020/02/26 18:38:15 florian Exp $ */
+/* $Id: a_1.c,v 1.11 2020/09/14 08:39:12 florian Exp $ */
/* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */
@@ -22,8 +22,7 @@
#define RDATA_IN_1_A_1_C
#include <string.h>
-
-#include <isc/net.h>
+#include <sys/socket.h>
static inline isc_result_t
totext_in_a(ARGS_TOTEXT) {
diff --git a/usr.bin/dig/lib/dns/rdata/in_1/aaaa_28.c b/usr.bin/dig/lib/dns/rdata/in_1/aaaa_28.c
index c49e260262b..9d325337fbe 100644
--- a/usr.bin/dig/lib/dns/rdata/in_1/aaaa_28.c
+++ b/usr.bin/dig/lib/dns/rdata/in_1/aaaa_28.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: aaaa_28.c,v 1.10 2020/02/26 18:38:15 florian Exp $ */
+/* $Id: aaaa_28.c,v 1.11 2020/09/14 08:39:12 florian Exp $ */
/* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */
@@ -23,8 +23,6 @@
#ifndef RDATA_IN_1_AAAA_28_C
#define RDATA_IN_1_AAAA_28_C
-#include <isc/net.h>
-
static inline isc_result_t
totext_in_aaaa(ARGS_TOTEXT) {
isc_region_t region;
diff --git a/usr.bin/dig/lib/dns/rdata/in_1/wks_11.c b/usr.bin/dig/lib/dns/rdata/in_1/wks_11.c
index 78d1243c68c..a5464533284 100644
--- a/usr.bin/dig/lib/dns/rdata/in_1/wks_11.c
+++ b/usr.bin/dig/lib/dns/rdata/in_1/wks_11.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: wks_11.c,v 1.13 2020/02/26 18:47:59 florian Exp $ */
+/* $Id: wks_11.c,v 1.14 2020/09/14 08:39:12 florian Exp $ */
/* Reviewed: Fri Mar 17 15:01:49 PST 2000 by explorer */
@@ -25,8 +25,6 @@
#include <limits.h>
#include <stdlib.h>
-#include <isc/net.h>
-
static inline isc_result_t
totext_in_wks(ARGS_TOTEXT) {
isc_region_t sr;
diff --git a/usr.bin/dig/lib/isc/include/isc/netaddr.h b/usr.bin/dig/lib/isc/include/isc/netaddr.h
index c3be66e2e83..120b8825faa 100644
--- a/usr.bin/dig/lib/isc/include/isc/netaddr.h
+++ b/usr.bin/dig/lib/isc/include/isc/netaddr.h
@@ -14,18 +14,20 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: netaddr.h,v 1.4 2020/02/17 18:58:39 jung Exp $ */
+/* $Id: netaddr.h,v 1.5 2020/09/14 08:39:12 florian Exp $ */
#ifndef ISC_NETADDR_H
#define ISC_NETADDR_H 1
/*! \file isc/netaddr.h */
-#include <isc/net.h>
#include <isc/types.h>
#include <sys/types.h>
+#include <sys/socket.h>
#include <sys/un.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
struct isc_netaddr {
unsigned int family;
diff --git a/usr.bin/dig/lib/isc/include/isc/sockaddr.h b/usr.bin/dig/lib/isc/include/isc/sockaddr.h
index d8168cbd4fd..45165ffe91d 100644
--- a/usr.bin/dig/lib/isc/include/isc/sockaddr.h
+++ b/usr.bin/dig/lib/isc/include/isc/sockaddr.h
@@ -14,14 +14,17 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sockaddr.h,v 1.3 2020/02/13 13:53:01 jsg Exp $ */
+/* $Id: sockaddr.h,v 1.4 2020/09/14 08:39:12 florian Exp $ */
#ifndef ISC_SOCKADDR_H
#define ISC_SOCKADDR_H 1
/*! \file isc/sockaddr.h */
-#include <isc/net.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
#include <isc/types.h>
#include <sys/un.h>
@@ -34,7 +37,6 @@ struct isc_sockaddr {
struct sockaddr_un sunix;
} type;
unsigned int length; /* XXXRTH beginning? */
- ISC_LINK(struct isc_sockaddr) link;
};
#define ISC_SOCKADDR_CMPADDR 0x0001 /*%< compare the address
diff --git a/usr.bin/dig/lib/isc/netaddr.c b/usr.bin/dig/lib/isc/netaddr.c
index 20f610a7f88..a55c81688cf 100644
--- a/usr.bin/dig/lib/isc/netaddr.c
+++ b/usr.bin/dig/lib/isc/netaddr.c
@@ -14,14 +14,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: netaddr.c,v 1.7 2020/02/25 05:00:43 jsg Exp $ */
+/* $Id: netaddr.c,v 1.8 2020/09/14 08:39:12 florian Exp $ */
/*! \file */
#include <stdio.h>
#include <isc/buffer.h>
-#include <isc/net.h>
#include <isc/netaddr.h>
#include <isc/sockaddr.h>
@@ -123,7 +122,7 @@ isc_boolean_t
isc_netaddr_ismulticast(isc_netaddr_t *na) {
switch (na->family) {
case AF_INET:
- return (ISC_TF(ISC_IPADDR_ISMULTICAST(na->type.in.s_addr)));
+ return (ISC_TF(IN_MULTICAST(na->type.in.s_addr)));
case AF_INET6:
return (ISC_TF(IN6_IS_ADDR_MULTICAST(&na->type.in6)));
default:
diff --git a/usr.bin/dig/lib/isc/sockaddr.c b/usr.bin/dig/lib/isc/sockaddr.c
index 73ae6cfa9b5..c53c5473c23 100644
--- a/usr.bin/dig/lib/isc/sockaddr.c
+++ b/usr.bin/dig/lib/isc/sockaddr.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sockaddr.c,v 1.7 2020/02/25 05:00:43 jsg Exp $ */
+/* $Id: sockaddr.c,v 1.8 2020/09/14 08:39:12 florian Exp $ */
/*! \file */
@@ -172,7 +172,6 @@ isc_sockaddr_any(isc_sockaddr_t *sockaddr)
sockaddr->type.sin.sin_addr.s_addr = INADDR_ANY;
sockaddr->type.sin.sin_port = 0;
sockaddr->length = sizeof(sockaddr->type.sin);
- ISC_LINK_INIT(sockaddr, link);
}
void
@@ -184,7 +183,6 @@ isc_sockaddr_any6(isc_sockaddr_t *sockaddr)
sockaddr->type.sin6.sin6_addr = in6addr_any;
sockaddr->type.sin6.sin6_port = 0;
sockaddr->length = sizeof(sockaddr->type.sin6);
- ISC_LINK_INIT(sockaddr, link);
}
void
@@ -197,7 +195,6 @@ isc_sockaddr_fromin(isc_sockaddr_t *sockaddr, const struct in_addr *ina,
sockaddr->type.sin.sin_addr = *ina;
sockaddr->type.sin.sin_port = htons(port);
sockaddr->length = sizeof(sockaddr->type.sin);
- ISC_LINK_INIT(sockaddr, link);
}
void
@@ -224,7 +221,6 @@ isc_sockaddr_fromin6(isc_sockaddr_t *sockaddr, const struct in6_addr *ina6,
sockaddr->type.sin6.sin6_addr = *ina6;
sockaddr->type.sin6.sin6_port = htons(port);
sockaddr->length = sizeof(sockaddr->type.sin6);
- ISC_LINK_INIT(sockaddr, link);
}
int
diff --git a/usr.bin/dig/lib/isc/unix/Makefile.inc b/usr.bin/dig/lib/isc/unix/Makefile.inc
index 69c3c7f18bc..a0037d74c2c 100644
--- a/usr.bin/dig/lib/isc/unix/Makefile.inc
+++ b/usr.bin/dig/lib/isc/unix/Makefile.inc
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile.inc,v 1.6 2020/09/14 08:37:09 florian Exp $
+# $OpenBSD: Makefile.inc,v 1.7 2020/09/14 08:39:12 florian Exp $
.PATH: ${.CURDIR}/lib/isc/unix
-SRCS+= app.c errno2result.c socket.c net.c
+SRCS+= app.c errno2result.c socket.c
diff --git a/usr.bin/dig/lib/isc/unix/include/isc/net.h b/usr.bin/dig/lib/isc/unix/include/isc/net.h
deleted file mode 100644
index 3bf8aea2e98..00000000000
--- a/usr.bin/dig/lib/isc/unix/include/isc/net.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: net.h,v 1.5 2020/02/13 13:53:01 jsg Exp $ */
-
-#ifndef ISC_NET_H
-#define ISC_NET_H 1
-
-/*****
- ***** Module Info
- *****/
-
-/*! \file
- * \brief
- * Basic Networking Types
- *
- * This module is responsible for defining the following basic networking
- * types:
- *
- *\li struct in_addr
- *\li struct in6_addr
- *\li struct in6_pktinfo
- *\li struct sockaddr
- *\li struct sockaddr_in
- *\li struct sockaddr_in6
- *\li struct sockaddr_storage
- *\li in_port_t
- *
- * It ensures that the AF_ and PF_ macros are defined.
- *
- * It declares ntoh[sl]() and hton[sl]().
- *
- * It declares inet_aton(), inet_ntop(), and inet_pton().
- *
- * It ensures that #INADDR_LOOPBACK, #INADDR_ANY, #IN6ADDR_ANY_INIT,
- * IN6ADDR_V4MAPPED_INIT, in6addr_any, and in6addr_loopback are available.
- *
- * It ensures that IN_MULTICAST() is available to check for multicast
- * addresses.
- *
- * MP:
- *\li No impact.
- *
- * Reliability:
- *\li No anticipated impact.
- *
- * Resources:
- *\li N/A.
- *
- * Security:
- *\li No anticipated impact.
- *
- * Standards:
- *\li BSD Socket API
- *\li RFC2553
- */
-
-/***
- *** Imports.
- ***/
-
-#include <sys/socket.h> /* Contractual promise. */
-
-#include <netinet/in.h> /* Contractual promise. */
-#include <arpa/inet.h> /* Contractual promise. */
-
-/*% IP address. */
-#define ISC__IPADDR(x) ((uint32_t)htonl((uint32_t)(x)))
-
-/*% Is IP address multicast? */
-#define ISC_IPADDR_ISMULTICAST(i) \
- (((uint32_t)(i) & ISC__IPADDR(0xf0000000)) \
- == ISC__IPADDR(0xe0000000))
-
-#define ISC_IPADDR_ISEXPERIMENTAL(i) \
- (((uint32_t)(i) & ISC__IPADDR(0xf0000000)) \
- == ISC__IPADDR(0xf0000000))
-
-/***
- *** Functions.
- ***/
-
-void
-isc_net_disableipv4(void);
-
-void
-isc_net_disableipv6(void);
-
-#define ISC_NET_DSCPRECVV4 0x01 /* Can receive sent DSCP value IPv4 */
-#define ISC_NET_DSCPRECVV6 0x02 /* Can receive sent DSCP value IPv6 */
-#define ISC_NET_DSCPSETV4 0x04 /* Can set DSCP on socket IPv4 */
-#define ISC_NET_DSCPSETV6 0x08 /* Can set DSCP on socket IPv6 */
-#define ISC_NET_DSCPPKTV4 0x10 /* Can set DSCP on per packet IPv4 */
-#define ISC_NET_DSCPPKTV6 0x20 /* Can set DSCP on per packet IPv6 */
-#define ISC_NET_DSCPALL 0x3f /* All valid flags */
-
-unsigned int
-isc_net_probedscp(void);
-/*%<
- * Probe the level of DSCP support.
- */
-
-#endif /* ISC_NET_H */
diff --git a/usr.bin/dig/lib/isc/unix/net.c b/usr.bin/dig/lib/isc/unix/net.c
deleted file mode 100644
index cd37a756ffa..00000000000
--- a/usr.bin/dig/lib/isc/unix/net.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: net.c,v 1.1 2020/02/07 09:58:54 florian Exp $ */
-
-#include <isc/net.h>
-#include <isc/result.h>
-
-static isc_result_t ipv4_result = ISC_R_SUCCESS;
-static isc_result_t ipv6_result = ISC_R_SUCCESS;
-static unsigned int dscp_result =
- ISC_NET_DSCPSETV4 | ISC_NET_DSCPRECVV4 | ISC_NET_DSCPPKTV4 |
- ISC_NET_DSCPSETV6 | ISC_NET_DSCPRECVV6 | ISC_NET_DSCPPKTV6;
-
-unsigned int
-isc_net_probedscp(void) {
- return (dscp_result);
-}
-
-void
-isc_net_disableipv4(void) {
- if (ipv4_result == ISC_R_SUCCESS)
- ipv4_result = ISC_R_DISABLED;
-}
-
-void
-isc_net_disableipv6(void) {
- if (ipv6_result == ISC_R_SUCCESS)
- ipv6_result = ISC_R_DISABLED;
-}
diff --git a/usr.bin/dig/lib/isc/unix/socket.c b/usr.bin/dig/lib/isc/unix/socket.c
index e96cbff0294..56851275b90 100644
--- a/usr.bin/dig/lib/isc/unix/socket.c
+++ b/usr.bin/dig/lib/isc/unix/socket.c
@@ -34,7 +34,6 @@
#include <isc/list.h>
#include <isc/log.h>
-#include <isc/net.h>
#include <isc/region.h>
#include <isc/socket.h>
#include <isc/task.h>
@@ -1348,8 +1347,7 @@ socket_create(isc_socketmgr_t *manager0, int pf, isc_sockettype_t type,
switch (sock->type) {
case isc_sockettype_udp:
-#define DCSPPKT(pf) ((pf == AF_INET) ? ISC_NET_DSCPPKTV4 : ISC_NET_DSCPPKTV6)
- sock->pktdscp = (isc_net_probedscp() & DCSPPKT(pf)) != 0;
+ sock->pktdscp = 1;
break;
case isc_sockettype_tcp:
break;