diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2015-11-02 20:39:38 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2015-11-02 20:39:38 +0000 |
commit | f1c4e153fedc85347ddf7b928a514cb761d858bf (patch) | |
tree | 73a6eb2e7357c283b6b21e51137ddabba147c484 | |
parent | 76a6c3c6fa09e02f667ec4d1cd54c825397c78b8 (diff) |
add support for whois -I, to use whois.iana.org (root zone database).
ok millert@, tweak/"everything else looks fine" jmc@
-rw-r--r-- | usr.bin/whois/whois.1 | 11 | ||||
-rw-r--r-- | usr.bin/whois/whois.c | 10 |
2 files changed, 15 insertions, 6 deletions
diff --git a/usr.bin/whois/whois.1 b/usr.bin/whois/whois.1 index ba3ba415bf0..73b4c6ec0b2 100644 --- a/usr.bin/whois/whois.1 +++ b/usr.bin/whois/whois.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: whois.1,v 1.33 2015/04/09 19:29:53 sthen Exp $ +.\" $OpenBSD: whois.1,v 1.34 2015/11/02 20:39:37 sthen Exp $ .\" $NetBSD: whois.1,v 1.5 1995/08/31 21:51:32 jtc Exp $ .\" .\" Copyright (c) 1985, 1990, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)whois.1 8.2 (Berkeley) 6/20/94 .\" -.Dd $Mdocdate: April 9 2015 $ +.Dd $Mdocdate: November 2 2015 $ .Dt WHOIS 1 .Os .Sh NAME @@ -38,7 +38,7 @@ .Nd Internet domain name and network number directory service .Sh SYNOPSIS .Nm whois -.Op Fl AadgilmPQRr +.Op Fl AadgIilmPQRr .Oo .Fl c Ar country-code | Fl h Ar host .Oc @@ -124,6 +124,11 @@ If the query is not a domain name or IP address, .Nm will fall back to .Pa whois.crsnic.net . +.It Fl I +Use the Internet Assigned Numbers Authority +.Pq whois.iana.org +root zone database. +It contains information about top-level domains. .It Fl i Use the Network Solutions Registry for Internet Numbers .Pq Tn whois.networksolutions.com diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c index 3af66c4c5dd..d46b989fa3c 100644 --- a/usr.bin/whois/whois.c +++ b/usr.bin/whois/whois.c @@ -1,4 +1,4 @@ -/* $OpenBSD: whois.c,v 1.51 2015/11/02 17:16:35 mmcc Exp $ */ +/* $OpenBSD: whois.c,v 1.52 2015/11/02 20:39:37 sthen Exp $ */ /* * Copyright (c) 1980, 1993 @@ -58,6 +58,7 @@ #define AFNICHOST "whois.afrinic.net" #define BNICHOST "whois.registro.br" #define PDBHOST "whois.peeringdb.com" +#define IANAHOST "whois.iana.org" #define QNICHOST_TAIL ".whois-servers.net" #define WHOIS_PORT "whois" @@ -82,7 +83,7 @@ main(int argc, char *argv[]) country = host = NULL; flags = rval = 0; - while ((ch = getopt(argc, argv, "aAc:dgh:ilmp:PqQrR")) != -1) + while ((ch = getopt(argc, argv, "aAc:dgh:iIlmp:PqQrR")) != -1) switch (ch) { case 'a': host = ANICHOST; @@ -105,6 +106,9 @@ main(int argc, char *argv[]) case 'i': host = INICHOST; break; + case 'I': + host = IANAHOST; + break; case 'l': host = LNICHOST; break; @@ -343,7 +347,7 @@ usage(void) extern char *__progname; fprintf(stderr, - "usage: %s [-AadgilmPQRr] [-c country-code | -h host] " + "usage: %s [-AadgIilmPQRr] [-c country-code | -h host] " "[-p port] name ...\n", __progname); exit(1); } |