summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1996-01-07 06:21:58 +0000
committerPeter Wemm <peter@FreeBSD.org>1996-01-07 06:21:58 +0000
commitfe18bfce4b0b2f6c39ee1fc49e22a40d78da9ea8 (patch)
tree8d03f6d932b348beb66de18c0c5e18135ceb6db3
parent7756c6b9ecb98ee5c35d9c7ce4e407a13323b9b0 (diff)
Notes
-rw-r--r--usr.bin/dig/dig.c13
-rw-r--r--usr.bin/dnsquery/dnsquery.c38
-rw-r--r--usr.bin/host/host.c4
3 files changed, 46 insertions, 9 deletions
diff --git a/usr.bin/dig/dig.c b/usr.bin/dig/dig.c
index 0557412088d9..b45912053730 100644
--- a/usr.bin/dig/dig.c
+++ b/usr.bin/dig/dig.c
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "$Id: dig.c,v 1.4 1995/05/30 06:29:46 rgrimes Exp $";
+static char rcsid[] = "$Id: dig.c,v 1.5 1995/08/20 22:32:37 peter Exp $";
#endif
/*
@@ -288,6 +288,7 @@ main(argc, argv)
res_init();
_res.pfcode = PRF_DEF;
qtypeSet = 0;
+ bzero(domain, (sizeof domain));
gethostname(myhostname, (sizeof myhostname));
defsrv = strcat(defbuf, inet_ntoa(_res.nsaddr.sin_addr));
res_x = _res;
@@ -648,7 +649,8 @@ main(argc, argv)
continue;
}
eecode = 0;
- __fp_resstat(NULL, stdout);
+ if (_res.pfcode & RES_PRF_HEAD1)
+ __fp_resstat(NULL, stdout);
(void) gettimeofday(&start_time, NULL);
if ((bytes_in = n = res_send(packet, n,
answer, sizeof(answer))) < 0) {
@@ -902,14 +904,19 @@ res_re_init()
static char localdomain[] = "LOCALDOMAIN";
char *buf;
long pfcode = _res.pfcode;
+#if defined(__RES) && (__RES >= 19931104)
+ long ndots = _res.ndots;
+#endif
/* this is ugly but putenv() is more portable than setenv() */
buf = malloc((sizeof localdomain) +strlen(_res.defdname) +10/*fuzz*/);
sprintf(buf, "%s=%s", localdomain, _res.defdname);
putenv(buf); /* keeps the argument, so we won't free it */
- _res.options &= ~RES_INIT;
res_init();
_res.pfcode = pfcode;
+#if defined(__RES) && (__RES >= 19931104)
+ _res.ndots = ndots;
+#endif
}
diff --git a/usr.bin/dnsquery/dnsquery.c b/usr.bin/dnsquery/dnsquery.c
index 295cc4eb9df2..59d1f2353661 100644
--- a/usr.bin/dnsquery/dnsquery.c
+++ b/usr.bin/dnsquery/dnsquery.c
@@ -70,10 +70,22 @@ char *argv[];
type = T_A;
else if (!strcasecmp(optarg, "NS"))
type = T_NS;
+ else if (!strcasecmp(optarg, "MD"))
+ type = T_MD;
+ else if (!strcasecmp(optarg, "MF"))
+ type = T_MF;
else if (!strcasecmp(optarg, "CNAME"))
type = T_CNAME;
else if (!strcasecmp(optarg, "SOA"))
type = T_SOA;
+ else if (!strcasecmp(optarg, "MB"))
+ type = T_MB;
+ else if (!strcasecmp(optarg, "MG"))
+ type = T_MG;
+ else if (!strcasecmp(optarg, "MR"))
+ type = T_MR;
+ else if (!strcasecmp(optarg, "NULL"))
+ type = T_NULL;
else if (!strcasecmp(optarg, "WKS"))
type = T_WKS;
else if (!strcasecmp(optarg, "PTR"))
@@ -84,16 +96,34 @@ char *argv[];
type = T_MINFO;
else if (!strcasecmp(optarg, "MX"))
type = T_MX;
- else if (!strcasecmp(optarg, "MG"))
- type = T_MG;
- else if (!strcasecmp(optarg, "RP"))
- type = T_RP;
else if (!strcasecmp(optarg, "TXT"))
type = T_TXT;
+ else if (!strcasecmp(optarg, "RP"))
+ type = T_RP;
else if (!strcasecmp(optarg, "AFSDB"))
type = T_AFSDB;
else if (!strcasecmp(optarg, "ANY"))
type = T_ANY;
+ else if (!strcasecmp(optarg, "X25"))
+ type = T_X25;
+ else if (!strcasecmp(optarg, "ISDN"))
+ type = T_ISDN;
+ else if (!strcasecmp(optarg, "RT"))
+ type = T_RT;
+ else if (!strcasecmp(optarg, "NSAP"))
+ type = T_NSAP;
+ else if (!strcasecmp(optarg, "SIG"))
+ type = T_SIG;
+ else if (!strcasecmp(optarg, "KEY"))
+ type = T_KEY;
+ else if (!strcasecmp(optarg, "PX"))
+ type = T_PX;
+ else if (!strcasecmp(optarg, "GPOS"))
+ type = T_GPOS;
+ else if (!strcasecmp(optarg, "AAAA"))
+ type = T_AAAA;
+ else if (!strcasecmp(optarg, "LOC"))
+ type = T_LOC;
else {
fprintf(stderr, "Bad type (%s)\n", optarg);
exit(-1);
diff --git a/usr.bin/host/host.c b/usr.bin/host/host.c
index d43823c3e4bc..f417a3c79e96 100644
--- a/usr.bin/host/host.c
+++ b/usr.bin/host/host.c
@@ -67,7 +67,7 @@ char copyright[] =
*/
#ifndef lint
-static char rcsid[] = "$Id: host.c,v 1.4 1995/08/20 22:32:57 peter Exp $";
+static char rcsid[] = "$Id: host.c,v 1.5 1995/10/23 16:07:56 peter Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -813,7 +813,7 @@ pr_rr(cp, msg, file, filter)
case T_AFSDB:
case T_RT:
if (doprint)
- if (type == T_MX)
+ if (type == T_MX && !verbose)
fprintf(file," (pri=%d) by ", _getshort(cp));
else
if (verbose)