summaryrefslogtreecommitdiffstats
path: root/usr.sbin/nslookup/list.c
diff options
context:
space:
mode:
authorpst <pst@FreeBSD.org>1994-09-22 21:50:41 +0000
committerpst <pst@FreeBSD.org>1994-09-22 21:50:41 +0000
commitbd9687cba0ea622e7d0e53cb2012bd49775c1c39 (patch)
tree474fb81f64ebafceb3ae68300db2f1405e6605ae /usr.sbin/nslookup/list.c
parentde2ff4fecc1c5ee837edf79387552a98d675c639 (diff)
downloadFreeBSD-src-bd9687cba0ea622e7d0e53cb2012bd49775c1c39.zip
FreeBSD-src-bd9687cba0ea622e7d0e53cb2012bd49775c1c39.tar.gz
Port nslookup to FreeBSD
Diffstat (limited to 'usr.sbin/nslookup/list.c')
-rw-r--r--usr.sbin/nslookup/list.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/usr.sbin/nslookup/list.c b/usr.sbin/nslookup/list.c
index e78d143..6bafe19 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 1.1.1.1 1994/09/22 21:36:01 pst Exp $";
#endif /* not lint */
/*
@@ -73,6 +73,7 @@ static char rcsid[] = "$Id: list.c,v 4.9.1.11 1994/06/06 09:08:43 vixie Exp $";
#include <sys/param.h>
#include <sys/socket.h>
#include <netinet/in.h>
+#include <netiso/iso.h>
#include <arpa/nameser.h>
#include <arpa/inet.h>
#include <resolv.h>
@@ -81,8 +82,8 @@ static char rcsid[] = "$Id: list.c,v 4.9.1.11 1994/06/06 09:08:43 vixie Exp $";
#include <limits.h>
#include <ctype.h>
#include <errno.h>
+#include <string.h>
#include "res.h"
-#include "../../conf/portability.h"
extern char *_res_resultcodes[]; /* res_debug.c */
extern char *pager;
@@ -586,6 +587,7 @@ PrintListInfo(file, msg, eom, qtype, domain)
u_int32_t ttl;
int n, pref;
struct in_addr inaddr;
+ struct iso_addr isoa;
char name[NAME_LEN];
char name2[NAME_LEN];
Boolean stripped;
@@ -768,7 +770,11 @@ PrintListInfo(file, msg, eom, qtype, domain)
break;
case T_NSAP:
- fprintf(file, " %s", inet_nsap_ntoa(dlen, cp, NULL));
+ isoa.isoa_len = dlen;
+ if (isoa.isoa_len > sizeof(isoa.isoa_genaddr))
+ isoa.isoa_len = sizeof(isoa.isoa_genaddr);
+ bcopy(cp, isoa.isoa_genaddr, isoa.isoa_len);
+ fprintf(file, " %s", iso_ntoa(&isoa));
break;
case T_MINFO:
OpenPOWER on IntegriCloud