diff options
-rw-r--r-- | usr.bin/dig/dig.c | 59 | ||||
-rw-r--r-- | usr.bin/host/host.c | 48 | ||||
-rw-r--r-- | usr.sbin/nslookup/Makefile | 134 | ||||
-rw-r--r-- | usr.sbin/nslookup/debug.c | 23 | ||||
-rw-r--r-- | usr.sbin/nslookup/getinfo.c | 2 | ||||
-rw-r--r-- | usr.sbin/nslookup/list.c | 59 | ||||
-rw-r--r-- | usr.sbin/nslookup/main.c | 2 | ||||
-rw-r--r-- | usr.sbin/nslookup/nslookup.help | 6 | ||||
-rw-r--r-- | usr.sbin/nslookup/pathnames.h | 2 | ||||
-rw-r--r-- | usr.sbin/nslookup/res.h | 2 | ||||
-rw-r--r-- | usr.sbin/nslookup/send.c | 2 | ||||
-rw-r--r-- | usr.sbin/nslookup/skip.c | 2 | ||||
-rw-r--r-- | usr.sbin/nslookup/subr.c | 12 |
13 files changed, 272 insertions, 81 deletions
diff --git a/usr.bin/dig/dig.c b/usr.bin/dig/dig.c index 6ac5865..e6978a5 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 4.9.1.17 1994/07/19 22:51:24 vixie Exp $"; +static char rcsid[] = "$Id: dig.c,v 8.4 1995/06/19 08:35:06 vixie Exp $"; #endif /* @@ -197,8 +197,7 @@ jmp_buf env; HostInfo *defaultPtr = NULL; HostInfo curHostInfo, defaultRec; int curHostValid = FALSE; -int queryType = T_A; -int queryClass = C_IN; +int queryType, queryClass; extern int StringToClass(), StringToType(); /* subr.c */ #if defined(BSD) && BSD >= 199006 && !defined(RISCOS_BSD) FILE *yyin = NULL; @@ -221,7 +220,7 @@ stackarg(y, l) case '\t': case ' ': l++; break; - case NULL: + case '\0': case '\n': done++; *y = NULL; @@ -246,7 +245,12 @@ main(argc, argv) { struct hostent *hp; short port = htons(NAMESERVER_PORT); - u_char packet[PACKETSZ]; + /* Wierd stuff for SPARC alignment, hurts nothing else. */ + union { + HEADER header_; + u_char packet_[PACKETSZ]; + } packet_; +#define packet (packet_.packet_) u_char answer[8*1024]; int n; char doping[90]; @@ -260,7 +264,7 @@ main(argc, argv) int anyflag = 0; int sticky = 0; int tmp; - int qtype = 1, qclass = 1; + int qtypeSet; int addrflag = 0; int zone = 0; int bytes_out, bytes_in; @@ -283,6 +287,7 @@ main(argc, argv) res_init(); _res.pfcode = PRF_DEF; + qtypeSet = 0; gethostname(myhostname, (sizeof myhostname)); defsrv = strcat(defbuf, inet_ntoa(_res.nsaddr.sin_addr)); res_x = _res; @@ -296,7 +301,7 @@ main(argc, argv) if ((((afile = (char *) getenv("LOCALDEF")) != (char *) NULL) && ((fp = open(afile, O_RDONLY)) > 0)) || ((fp = open(SAVEENV, O_RDONLY)) > 0)) { - read(fp, &res_x, (sizeof res_x)); + read(fp, (char *)&res_x, (sizeof res_x)); close(fp); _res = res_x; } @@ -362,7 +367,8 @@ main(argc, argv) stackarg(ay, qptr); /* defaults */ - qtype = qclass = 1; + queryType = T_NS; + queryClass = C_IN; zone = 0; *pingstr = 0; srv = NULL; @@ -408,11 +414,11 @@ main(argc, argv) case 'c': if ((tmp = atoi(*++argv)) || *argv[0]=='0') { - qclass = tmp; + queryClass = tmp; } else if (tmp = StringToClass(*argv, 0, NULL) ) { - qclass = tmp; + queryClass = tmp; } else { printf( "; invalid class specified\n" @@ -422,11 +428,13 @@ main(argc, argv) case 't': if ((tmp = atoi(*++argv)) || *argv[0]=='0') { - qtype = tmp; + queryType = tmp; + qtypeSet++; } else if (tmp = StringToType(*argv, 0, NULL) ) { - qtype = tmp; + queryType = tmp; + qtypeSet++; } else { printf( "; invalid type specified\n" @@ -434,8 +442,10 @@ main(argc, argv) } break; case 'x': - if (qtype == T_A) - qtype = T_ANY; + if (!qtypeSet) { + queryType = T_ANY; + qtypeSet++; + } if (!(addrc = *++argv)) { printf( "; no arg for -x?\n" @@ -472,18 +482,19 @@ main(argc, argv) if ((tmp = StringToType(*argv, -1, NULL)) != -1) { if ((T_ANY == tmp) && anyflag++) { - qclass = C_ANY; + queryClass = C_ANY; continue; } if (T_AXFR == tmp) { _res.pfcode = PRF_ZONE; zone++; } else { - qtype = tmp; + queryType = tmp; + qtypeSet++; } } else if ((tmp = StringToClass(*argv, -1, NULL)) != -1) { - qclass = tmp; + queryClass = tmp; } else { bzero(domain, (sizeof domain)); sprintf(domain,"%s",*argv); @@ -518,7 +529,7 @@ main(argc, argv) ((fp = open(SAVEENV, O_WRONLY|O_CREAT|O_TRUNC, S_IREAD|S_IWRITE)) > 0)) { - write(fp, &_res, (sizeof _res)); + write(fp, (char *)&_res, (sizeof _res)); close(fp); } envsave = 0; @@ -622,7 +633,13 @@ main(argc, argv) continue; } - bytes_out = n = res_mkquery(QUERY, domain, qclass, qtype, + if (*domain && !qtypeSet) { + queryType = T_A; + qtypeSet++; + } + + bytes_out = n = res_mkquery(QUERY, domain, + queryClass, queryType, NULL, 0, NULL, packet, sizeof(packet)); if (n < 0) { @@ -1011,7 +1028,7 @@ printZone(zone, sin) __putshort(msglen, (u_char *)&len); if (write(sockFD, (char *)&len, INT16SZ) != INT16SZ || - write(sockFD, (char *) &buf, msglen) != msglen) { + write(sockFD, (char *)&buf, msglen) != msglen) { int e = errno; perror(";; write"); (void) close(sockFD); @@ -1046,7 +1063,7 @@ printZone(zone, sin) * The server sent too much data to fit the existing buffer -- * allocate a new one. */ - if (len > answerLen) { + if (len > (u_int)answerLen) { if (answerLen != 0) { free(answer); } diff --git a/usr.bin/host/host.c b/usr.bin/host/host.c index e041e4e..9efb95b 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 4.9.1.13 1994/07/19 22:51:24 vixie Exp $"; +static char rcsid[] = "$Id: host.c,v 8.5 1995/06/29 09:26:32 vixie Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -360,10 +360,10 @@ printanswer(hp) printf("\n\n"); } -hperror(errno) -int errno; +hperror(errnum) +int errnum; { -switch(errno) { +switch(errnum) { case HOST_NOT_FOUND: fprintf(stderr,"Host not found.\n"); break; @@ -459,7 +459,7 @@ gethostinfo(name) char *name; { register char *cp, **domain; - int n; + u_int n; int hp; int nDomain; int asis = 0; @@ -765,15 +765,20 @@ pr_rr(cp, msg, file, filter) case T_HINFO: case T_ISDN: - if (n = *cp++) { - if (doprint) - fprintf(file,"%c%.*s", punc, n, cp); - cp += n; - } - if (n = *cp++) { - if (doprint) - fprintf(file,"%c%.*s", punc, n, cp); - cp += n; + { + u_char *cp2 = cp + dlen; + if (n = *cp++) { + if (doprint) + fprintf(file,"%c%.*s", punc, n, cp); + cp += n; + } + if ((cp < cp2) && (n = *cp++)) { + if (doprint) + fprintf(file,"%c%.*s", punc, n, cp); + cp += n; + } else if (type == T_HINFO) + if (doprint) + fprintf(file,"\n; *** Warning *** OS-type missing"); } break; @@ -805,10 +810,13 @@ pr_rr(cp, msg, file, filter) case T_AFSDB: case T_RT: if (doprint) - if (verbose) - fprintf(file,"\t%ld ",_getshort(cp)); + if (type == T_MX) + fprintf(file," (pri=%d) by ", _getshort(cp)); else - fprintf(file," "); + if (verbose) + fprintf(file,"\t%d ", _getshort(cp)); + else + fprintf(file," "); cp += sizeof(u_short); cp = (u_char *)pr_cdname(cp, msg, name, sizeof(name)); if (doprint) @@ -842,7 +850,7 @@ pr_rr(cp, msg, file, filter) while (cp < end) { if (n = *cp++) { for (j = n; j > 0 && cp < end ; j --) - if (*cp == '\n') { + if ((*cp == '\n') || (*cp == '"')) { if (doprint){ (void) putc('\\', file); (void) putc(*cp++, file); @@ -947,7 +955,7 @@ pr_type(type) case T_MG: /* mail group member */ return("MG"); case T_MX: /* mail routing info */ - return(verbose? "MX" : "mail is handled by"); + return(verbose? "MX" : "mail is handled"); case T_TXT: /* TXT - descriptive info */ return(verbose? "TXT" : "descriptive text"); case T_AFSDB: /* AFS/DCE info */ @@ -1447,7 +1455,9 @@ DecodeError(result) case NXDOMAIN: return("Non-existent domain"); break; case NOTIMP: return("Not implemented"); break; case REFUSED: return("Query refused"); break; +#ifdef NOCHANGE case NOCHANGE: return("No change"); break; +#endif case NO_INFO: return("No information"); break; case ERROR: return("Unspecified error"); break; case TIME_OUT: return("Timed out"); break; diff --git a/usr.sbin/nslookup/Makefile b/usr.sbin/nslookup/Makefile index 4295c99..36d83b4 100644 --- a/usr.sbin/nslookup/Makefile +++ b/usr.sbin/nslookup/Makefile @@ -1,14 +1,126 @@ -# @(#)Makefile 8.1 (Berkeley) 6/6/93 +# +# @(#)Makefile 5.20 (Berkeley) 10/2/89 +# $Id: Makefile,v 8.2 1995/01/11 08:58:13 vixie Exp $ +# -PROG= nslookup -SRCS= main.c commands.l getinfo.c debug.c send.c skip.c list.c subr.c -MAN8= nslookup.8 -DPADD+= ${LIBL} -LDADD+= -ll -CLEANFILES+=lex.yy.o +## ++Copyright++ 1987 +## - +## Copyright (c) 1987 +## The Regents of the University of California. All rights reserved. +## +## Redistribution and use in source and binary forms, with or without +## modification, are permitted provided that the following conditions +## are met: +## 1. Redistributions of source code must retain the above copyright +## notice, this list of conditions and the following disclaimer. +## 2. Redistributions in binary form must reproduce the above copyright +## notice, this list of conditions and the following disclaimer in the +## documentation and/or other materials provided with the distribution. +## 3. All advertising materials mentioning features or use of this software +## must display the following acknowledgement: +## This product includes software developed by the University of +## California, Berkeley and its contributors. +## 4. Neither the name of the University nor the names of its contributors +## may be used to endorse or promote products derived from this software +## without specific prior written permission. +## +## THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +## ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +## ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +## FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +## DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +## OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +## LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +## OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## - +## Portions Copyright (c) 1993 by Digital Equipment Corporation. +## +## Permission to use, copy, modify, and 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, and that +## the name of Digital Equipment Corporation not be used in advertising or +## publicity pertaining to distribution of the document or software without +## specific, written prior permission. +## +## THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +## WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +## OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +## CORPORATION 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. +## - +## --Copyright-- -beforeinstall: - install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/nslookup.help \ - ${DESTDIR}/usr/share/misc +DESTDIR = +DESTBIN = /usr/bin +COMPINCL = ../../compat/include +CC= cc +SHELL= /bin/sh +CDEBUG= -O +INCL = ../../include +RES= ../../res/libresolv.a +COMPLIB= ../../compat/lib/lib44bsd.a +LDFLAGS = +LIBS = -ll +LEX = lex +DESTHELP= /usr/lib +DEFS= -D_PATH_HELPFILE=\"$(DESTHELP)/nslookup.help\" -.include <bsd.prog.mk> +#(bsd/386, 4.4bsd, other net2 descendents) +#DESTHELP= /usr/share/misc +#COMPINCL= . +#COMPLIB= +#LIBS = -ll -lutil +#LEX = lex -I + +#(sgi irix4) +#DESTHELP= /usr/bsd +#DEFS= -xansi -signed -D__STDC__ -D_BSD_SIGNALS \ +# -D_PATH_HELPFILE=\"$(DESTHELP)/nslookup.help\" +#COMPLIB= + +#(sgi irix5) +#DESTHELP= /usr/share/misc +#DEFS= -xansi -signed -D__BIT_TYPES_DEFINED__ -D_BSD_SIGNALS \ +# -D_PATH_HELPFILE=\"$(DESTHELP)/nslookup.help\" +#COMPLIB= + +CFLAGS= ${CDEBUG} -I${INCL} -I${COMPINCL} ${DEFS} +CSRCS= main.c getinfo.c debug.c send.c skip.c list.c subr.c +SRCS= ${CSRCS} commands.c +OBJS= main.o getinfo.o debug.o send.o skip.o list.o subr.o commands.o + +all: nslookup + +nslookup: ${OBJS} ${RES} ${COMPLIB} + ${CC} ${CDEBUG} ${LDFLAGS} -o $@ ${OBJS} \ + ${RES} ${COMPLIB} ${LIBS} + +clean: + rm -f ${OBJS} core nslookup commands.c lex.yy.c lex.yy.o + rm -f *.BAK *.CKP *~ + +cleandir: clean + rm -f tags .depend + +depend: ${SRCS} + mkdep ${CPPFLAGS} -I${INCL} -I${COMPINCL} ${DEFS} ${SRCS} + +install: + ${INSTALL} -s -c -o bin -g bin -m 755 nslookup ${DESTDIR}${DESTBIN}/ + ${INSTALL} -c -o bin -g bin -m 444 nslookup.help \ + ${DESTDIR}${DESTHELP}/ + +lint: ${SRCS} + lint ${SRCS} + +tags: ${CSRCS} + ctags ${CSRCS} + +# DO NOT DELETE THIS LINE -- mkdep uses it. +# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. diff --git a/usr.sbin/nslookup/debug.c b/usr.sbin/nslookup/debug.c index d8af2fc..cdfd5a6 100644 --- a/usr.sbin/nslookup/debug.c +++ b/usr.sbin/nslookup/debug.c @@ -55,7 +55,7 @@ #ifndef lint static char sccsid[] = "@(#)debug.c 5.26 (Berkeley) 3/21/91"; -static char rcsid[] = "$Id: debug.c,v 4.9.1.9 1994/06/06 09:08:43 vixie Exp $"; +static char rcsid[] = "$Id: debug.c,v 8.2 1995/06/29 09:26:34 vixie Exp $"; #endif /* not lint */ /* @@ -140,8 +140,6 @@ Fprint_query(msg, eom, printHeader,file) fprintf(file,", want recursion"); if (hp->ra) fprintf(file,", recursion avail."); - if (hp->pr) - fprintf(file,", primary"); fprintf(file,"\n\tquestions = %d", ntohs(hp->qdcount)); fprintf(file,", answers = %d", ntohs(hp->ancount)); fprintf(file,", authority records = %d", ntohs(hp->nscount)); @@ -334,6 +332,15 @@ Print_rr(cp, msg, eom, file) cp += INT16SZ; fprintf(file,", mail exchanger = "); goto doname; + case T_PX: + fprintf(file,"\tpreference = %u",_getshort((u_char*)cp)); + cp += INT16SZ; + fprintf(file,", RFC 822 = "); + cp = Print_cdname(cp, msg, eom, file); + fprintf(file,"\nX.400 = "); + cp = Print_cdname(cp, msg, eom, file); + (void) putc('\n', file); + break; case T_RT: fprintf(file,"\tpreference = %u",_getshort((u_char*)cp)); cp += INT16SZ; @@ -355,22 +362,24 @@ doname: break; case T_HINFO: + cp2 = cp + dlen; if (n = *cp++) { fprintf(file,"\tCPU = %.*s", n, cp); cp += n; } - if (n = *cp++) { + if ((cp < cp2) && (n = *cp++)) { fprintf(file,"\tOS = %.*s\n", n, cp); cp += n; - } + } else fprintf(file, "\n*** Warning *** OS-type missing\n"); break; case T_ISDN: + cp2 = cp + dlen; if (n = *cp++) { fprintf(file,"\tISDN = \"%.*s", n, cp); cp += n; } - if (n = *cp++) { + if ((cp < cp2) && (n = *cp++)) { fprintf(file,"-%.*s\"\n", n, cp); cp += n; } else fprintf(file,"\"\n"); @@ -426,7 +435,7 @@ doname: while (cp < cp2) { if (n = (unsigned char) *cp++) { for (c = n; c > 0 && cp < cp2; c--) - if (*cp == '\n') { + if ((*cp == '\n') || (*cp == '"')) { (void) putc('\\', file); (void) putc(*cp++, file); } else diff --git a/usr.sbin/nslookup/getinfo.c b/usr.sbin/nslookup/getinfo.c index 610d57ad..4e23566 100644 --- a/usr.sbin/nslookup/getinfo.c +++ b/usr.sbin/nslookup/getinfo.c @@ -55,7 +55,7 @@ #ifndef lint static char sccsid[] = "@(#)getinfo.c 5.26 (Berkeley) 3/21/91"; -static char rcsid[] = "$Id: getinfo.c,v 4.9.1.6 1994/06/01 21:10:16 vixie Exp $"; +static char rcsid[] = "$Id: getinfo.c,v 8.1 1994/12/15 06:24:31 vixie Exp $"; #endif /* not lint */ /* diff --git a/usr.sbin/nslookup/list.c b/usr.sbin/nslookup/list.c index e78d143..43f18ab 100644 --- a/usr.sbin/nslookup/list.c +++ b/usr.sbin/nslookup/list.c @@ -55,7 +55,7 @@ #ifndef lint static char sccsid[] = "@(#)list.c 5.23 (Berkeley) 3/21/91"; -static char rcsid[] = "$Id: list.c,v 4.9.1.11 1994/06/06 09:08:43 vixie Exp $"; +static char rcsid[] = "$Id: list.c,v 8.3 1994/12/19 08:35:16 vixie Exp $"; #endif /* not lint */ /* @@ -203,6 +203,8 @@ ListHosts(string, putToFile) qtype = T_HINFO; } else if (strcmp("-m", option) == 0) { qtype = T_MX; + } else if (strcmp("-p", option) == 0) { + qtype = T_PX; } else if (strcmp("-s", option) == 0) { qtype = T_WKS; } else if (strcmp("-d", option) == 0) { @@ -356,6 +358,9 @@ ListSubr(qtype, domain, cmd) case T_MX: fprintf(filePtr, " %-30s\n", "Metric & Host"); break; + case T_PX: + fprintf(filePtr, " %-30s\n", "Mapping information"); + break; case T_AFSDB: fprintf(filePtr, " %-30s\n", "Subtype & Host"); break; @@ -401,6 +406,9 @@ ListSubr(qtype, domain, cmd) case T_NSAP: fprintf(filePtr, " %-30s\n", "NSAP address"); break; + case T_NSAP_PTR: + fprintf(filePtr, " %-30s\n", "NSAP pointer"); + break; case T_NS: fprintf(filePtr, " %-30s\n", "Name Servers"); break; @@ -445,7 +453,7 @@ ListSubr(qtype, domain, cmd) * The server sent too much data to fit the existing buffer -- * allocate a new one. */ - if (len > answerLen) { + if (len > (u_int)answerLen) { if (answerLen != 0) { free(answer); } @@ -686,6 +694,7 @@ PrintListInfo(file, msg, eom, qtype, domain) case T_NS: case T_PTR: + case T_NSAP_PTR: putc(' ', file); if (qtype != T_ANY) fprintf(file,"%s = ", type == T_PTR ? "host" : "server"); @@ -694,16 +703,21 @@ PrintListInfo(file, msg, eom, qtype, domain) case T_HINFO: case T_ISDN: - if (n = *cp++) { - (void)sprintf(name,"%.*s", n, cp); - fprintf(file," %-10s", name); - cp += n; - } else { - fprintf(file," %-10s", " "); - } - if (n = *cp++) { - fprintf(file," %.*s", n, cp); - cp += n; + { + u_char *cp2 = cp + dlen; + if (n = *cp++) { + (void)sprintf(name,"%.*s", n, cp); + fprintf(file," %-10s", name); + cp += n; + } else { + fprintf(file," %-10s", " "); + } + if (cp == cp2) + break; + if (n = *cp++) { + fprintf(file," %.*s", n, cp); + cp += n; + } } break; @@ -746,6 +760,25 @@ PrintListInfo(file, msg, eom, qtype, domain) fprintf(file, " %s", name2); break; + case T_PX: + pref = _getshort((u_char*)cp); + cp += INT16SZ; + fprintf(file," %-3d ",pref); + nameLen = dn_expand(msg, eom, cp, name2, sizeof name2); + if (nameLen < 0) { + fprintf(file, " ***\n"); + return (ERROR); + } + fprintf(file, " %s", name2); + cp += strlen((char *)cp) + 1; + nameLen = dn_expand(msg, eom, cp, name2, sizeof name2); + if (nameLen < 0) { + fprintf(file, " ***\n"); + return (ERROR); + } + fprintf(file, " %s", name2); + break; + case T_TXT: case T_X25: { @@ -756,7 +789,7 @@ PrintListInfo(file, msg, eom, qtype, domain) while (cp < cp2) { if (n = (unsigned char) *cp++) { for (c = n; c > 0 && cp < cp2; c--) - if (*cp == '\n') { + if ((*cp == '\n') || (*cp == '"')) { (void) putc('\\', file); (void) putc(*cp++, file); } else diff --git a/usr.sbin/nslookup/main.c b/usr.sbin/nslookup/main.c index 2324ed8..f0df230 100644 --- a/usr.sbin/nslookup/main.c +++ b/usr.sbin/nslookup/main.c @@ -61,7 +61,7 @@ char copyright[] = #ifndef lint static char sccsid[] = "@(#)main.c 5.42 (Berkeley) 3/3/91"; -static char rcsid[] = "$Id: main.c,v 4.9.1.3 1993/09/16 09:02:07 vixie Exp $"; +static char rcsid[] = "$Id: main.c,v 8.1 1994/12/15 06:24:31 vixie Exp $"; #endif /* not lint */ /* diff --git a/usr.sbin/nslookup/nslookup.help b/usr.sbin/nslookup/nslookup.help index 2c17d4d..09b6897 100644 --- a/usr.sbin/nslookup/nslookup.help +++ b/usr.sbin/nslookup/nslookup.help @@ -1,4 +1,4 @@ -$Id: nslookup.help,v 4.9.1.3 1993/12/06 00:43:17 vixie Exp $ +$Id: nslookup.help,v 8.2 1995/06/29 09:26:34 vixie Exp $ Commands: (identifiers are shown in uppercase, [] means optional) NAME - print info about the host/domain NAME using default server @@ -16,12 +16,12 @@ set OPTION - set an option root=NAME - set root server to NAME retry=X - set number of retries to X timeout=X - set initial time-out interval to X seconds - querytype=X - set query type, e.g., A,ANY,CNAME,HINFO,MX,NS,PTR,SOA,TXT,WKS + querytype=X - set query type, e.g., A,ANY,CNAME,HINFO,MX,PX,NS,PTR,SOA,TXT,WKS type=X - synonym for querytype class=X - set query class to one of IN (Internet), CHAOS, HESIOD or ANY server NAME - set default server to NAME, using current default server lserver NAME - set default server to NAME, using initial server -finger [USER] - finger the optional NAME at the current default host +finger [USER] - finger the optional USER at the current default host root - set current default server to the root ls [opt] DOMAIN [> FILE] - list addresses in DOMAIN (optional: output to FILE) -a - list canonical names and aliases diff --git a/usr.sbin/nslookup/pathnames.h b/usr.sbin/nslookup/pathnames.h index a915293..bfeae4f 100644 --- a/usr.sbin/nslookup/pathnames.h +++ b/usr.sbin/nslookup/pathnames.h @@ -55,7 +55,7 @@ /* * @(#)pathnames.h 5.1 (Berkeley) 5/28/90 - * $Id: pathnames.h,v 4.9.1.3 1993/09/16 09:02:07 vixie Exp $ + * $Id: pathnames.h,v 8.1 1994/12/15 06:24:31 vixie Exp $ */ #define _PATH_NSLOOKUPRC "/.nslookuprc" diff --git a/usr.sbin/nslookup/res.h b/usr.sbin/nslookup/res.h index e86bc2f..9363f38 100644 --- a/usr.sbin/nslookup/res.h +++ b/usr.sbin/nslookup/res.h @@ -55,7 +55,7 @@ /* * @(#)res.h 5.10 (Berkeley) 6/1/90 - * $Id: res.h,v 4.9.1.3 1994/06/01 21:10:16 vixie Exp $ + * $Id: res.h,v 8.1 1994/12/15 06:24:31 vixie Exp $ */ /* diff --git a/usr.sbin/nslookup/send.c b/usr.sbin/nslookup/send.c index e895bfa..46c74b5 100644 --- a/usr.sbin/nslookup/send.c +++ b/usr.sbin/nslookup/send.c @@ -55,7 +55,7 @@ #ifndef lint static char sccsid[] = "@(#)send.c 5.18 (Berkeley) 3/2/91"; -static char rcsid[] = "$Id: send.c,v 4.9.1.5 1994/06/06 09:08:43 vixie Exp $"; +static char rcsid[] = "$Id: send.c,v 8.1 1994/12/15 06:24:31 vixie Exp $"; #endif /* not lint */ /* diff --git a/usr.sbin/nslookup/skip.c b/usr.sbin/nslookup/skip.c index 4119951..2c78377 100644 --- a/usr.sbin/nslookup/skip.c +++ b/usr.sbin/nslookup/skip.c @@ -55,7 +55,7 @@ #ifndef lint static char sccsid[] = "@(#)skip.c 5.12 (Berkeley) 3/21/91"; -static char rcsid[] = "$Id: skip.c,v 4.9.1.6 1994/06/01 21:10:16 vixie Exp $"; +static char rcsid[] = "$Id: skip.c,v 8.1 1994/12/15 06:24:31 vixie Exp $"; #endif /* not lint */ /* diff --git a/usr.sbin/nslookup/subr.c b/usr.sbin/nslookup/subr.c index f9d9012..c1a93af 100644 --- a/usr.sbin/nslookup/subr.c +++ b/usr.sbin/nslookup/subr.c @@ -55,7 +55,7 @@ #ifndef lint static char sccsid[] = "@(#)subr.c 5.24 (Berkeley) 3/2/91"; -static char rcsid[] = "$Id: subr.c,v 4.9.1.7 1994/07/19 22:51:24 vixie Exp $"; +static char rcsid[] = "$Id: subr.c,v 8.2 1994/12/15 06:27:07 vixie Exp $"; #endif /* not lint */ /* @@ -372,7 +372,9 @@ DecodeError(result) case NXDOMAIN: return("Non-existent host/domain"); break; case NOTIMP: return("Not implemented"); break; case REFUSED: return("Query refused"); break; +#ifdef NOCHANGE case NOCHANGE: return("No change"); break; +#endif case TIME_OUT: return("Timed out"); break; case NO_INFO: return("No information"); break; case ERROR: return("Unspecified error"); break; @@ -428,6 +430,8 @@ StringToType(type, dflt, errorfile) return(T_NS); /* authoritative server */ if (strcasecmp(type, "MX") == 0) return(T_MX); /* mail exchanger */ + if (strcasecmp(type, "PX") == 0) + return(T_PX); /* mapping information */ if (strcasecmp(type, "CNAME") == 0) return(T_CNAME); /* canonical name */ if (strcasecmp(type, "SOA") == 0) @@ -474,6 +478,8 @@ StringToType(type, dflt, errorfile) return(T_AFSDB); /* DCE or AFS server */ if (strcasecmp(type, "NSAP") == 0) return(T_NSAP); /* NSAP address */ + if (strcasecmp(type, "NSAP_PTR") == 0) + return(T_NSAP_PTR); /* NSAP reverse pointer */ if (errorfile) fprintf(errorfile, "unknown query type: %s\n", type); return(dflt); @@ -524,6 +530,8 @@ DecodeType(type) return("mailbox information"); case T_MX: return("mail exchanger"); + case T_PX: + return("mapping information"); case T_TXT: return("text"); case T_RP: @@ -538,6 +546,8 @@ DecodeType(type) return("router"); case T_NSAP: return("nsap address"); + case T_NSAP_PTR: + return("domain name pointer"); case T_UINFO: return("user information"); case T_UID: |