summaryrefslogtreecommitdiffstats
path: root/usr.bin/whois
diff options
context:
space:
mode:
authorbms <bms@FreeBSD.org>2004-06-14 14:03:10 +0000
committerbms <bms@FreeBSD.org>2004-06-14 14:03:10 +0000
commitd01943f8ff8deb5a03cd1b9919f176cb0d092195 (patch)
treef659c1f0fd2c400be62d938ce0a72499fae0cb46 /usr.bin/whois
parente0216af91bff091678e2783dfb06bfd6a336f874 (diff)
downloadFreeBSD-src-d01943f8ff8deb5a03cd1b9919f176cb0d092195.zip
FreeBSD-src-d01943f8ff8deb5a03cd1b9919f176cb0d092195.tar.gz
Add whois.iana.org to the whois(1) utility, under the -I option.
PR: bin/48914 Submitted by: James Raftery
Diffstat (limited to 'usr.bin/whois')
-rw-r--r--usr.bin/whois/whois.17
-rw-r--r--usr.bin/whois/whois.c8
2 files changed, 12 insertions, 3 deletions
diff --git a/usr.bin/whois/whois.1 b/usr.bin/whois/whois.1
index 34b8e35..2187fd0 100644
--- a/usr.bin/whois/whois.1
+++ b/usr.bin/whois/whois.1
@@ -40,7 +40,7 @@
.Nd "Internet domain name and network number directory service"
.Sh SYNOPSIS
.Nm
-.Op Fl aAdgilmQrR6
+.Op Fl aAdgiIlmQrR6
.Op Fl c Ar country-code | Fl h Ar host
.Op Fl p Ar port
.Ar name ...
@@ -148,6 +148,11 @@ can be looked up by prefixing
to the
.Tn NIC
handle in the query.)
+.It Fl I
+Use the Internet Assigned Numbers Authority
+.Pq Tn IANA
+database.
+It contains network information for top-level domains.
.It Fl l
Use the Latin American and Caribbean IP address Regional Registry
.Pq Tn LACNIC
diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c
index 729c2e2..54ee7d0 100644
--- a/usr.bin/whois/whois.c
+++ b/usr.bin/whois/whois.c
@@ -73,6 +73,7 @@ __FBSDID("$FreeBSD$");
#define SNICHOST "whois.6bone.net"
#define BNICHOST "whois.registro.br"
#define NORIDHOST "whois.norid.no"
+#define IANAHOST "whois.iana.org"
#define DEFAULT_PORT "whois"
#define WHOIS_SERVER_ID "Whois Server: "
#define WHOIS_ORG_SERVER_ID "Registrant Street1:Whois Server:"
@@ -104,7 +105,7 @@ main(int argc, char *argv[])
country = host = qnichost = NULL;
flags = use_qnichost = 0;
- while ((ch = getopt(argc, argv, "aAc:dgh:ilmp:QrR6")) != -1) {
+ while ((ch = getopt(argc, argv, "aAc:dgh:iIlmp:QrR6")) != -1) {
switch (ch) {
case 'a':
host = ANICHOST;
@@ -127,6 +128,9 @@ main(int argc, char *argv[])
case 'i':
host = INICHOST;
break;
+ case 'I':
+ host = IANAHOST;
+ break;
case 'l':
host = LNICHOST;
break;
@@ -338,7 +342,7 @@ static void
usage(void)
{
fprintf(stderr,
- "usage: whois [-aAdgilmQrR6] [-c country-code | -h hostname] "
+ "usage: whois [-aAdgiIlmQrR6] [-c country-code | -h hostname] "
"[-p port] name ...\n");
exit(EX_USAGE);
}
OpenPOWER on IntegriCloud