summaryrefslogtreecommitdiffstats
path: root/usr.bin/whois
diff options
context:
space:
mode:
authorjoe <joe@FreeBSD.org>1999-12-05 22:43:36 +0000
committerjoe <joe@FreeBSD.org>1999-12-05 22:43:36 +0000
commitd754df97260a7e78d5e49e384c49f42562968ad2 (patch)
tree5d7541a9532a8f92f4cb797f90629fc994ba55f4 /usr.bin/whois
parentc4981853cb4ee1265e9aa4dc0cf794bbda0c4d5e (diff)
downloadFreeBSD-src-d754df97260a7e78d5e49e384c49f42562968ad2.zip
FreeBSD-src-d754df97260a7e78d5e49e384c49f42562968ad2.tar.gz
Added a -6 option to lookup information using the whois.6bone.net
database. PR: misc/10803 misc/10804
Diffstat (limited to 'usr.bin/whois')
-rw-r--r--usr.bin/whois/whois.14
-rw-r--r--usr.bin/whois/whois.c8
2 files changed, 10 insertions, 2 deletions
diff --git a/usr.bin/whois/whois.1 b/usr.bin/whois/whois.1
index 4dd0184..b2499e4 100644
--- a/usr.bin/whois/whois.1
+++ b/usr.bin/whois/whois.1
@@ -117,6 +117,10 @@ Use the Russia Network Information Center
database. It contains network numbers and domain contact information
for subdomains of
.Tn \&.RU .
+.It Fl 6
+Use the IPv6 Resource Center
+.Pq Tn 6bone
+database. It contains network names and addresses for the IPv6 network.
.El
.Pp
The operands specified to
diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c
index 2aba8f2..32f0f7d 100644
--- a/usr.bin/whois/whois.c
+++ b/usr.bin/whois/whois.c
@@ -67,6 +67,7 @@ static const char rcsid[] =
#define RUNICHOST "whois.ripn.net"
#define MNICHOST "whois.ra.net"
#define QNICHOST_TAIL ".whois-servers.net"
+#define SNICHOST "whois.6bone.net"
#define WHOIS_PORT 43
#define WHOIS_RECURSE 0x01
@@ -97,7 +98,7 @@ main(argc, argv)
qnichost = NULL;
flags = 0;
use_qnichost = 0;
- while ((ch = getopt(argc, argv, "adgh:impQrR")) != -1)
+ while ((ch = getopt(argc, argv, "adgh:impQrR6")) != -1)
switch((char)ch) {
case 'a':
host = ANICHOST;
@@ -129,6 +130,9 @@ main(argc, argv)
case 'R':
host = RUNICHOST;
break;
+ case '6':
+ host = SNICHOST;
+ break;
case '?':
default:
usage();
@@ -276,6 +280,6 @@ static void
usage()
{
(void)fprintf(stderr,
- "usage: whois [-adgimpQrR] [-h hostname] name ...\n");
+ "usage: whois [-adgimpQrR6] [-h hostname] name ...\n");
exit(EX_USAGE);
}
OpenPOWER on IntegriCloud