summaryrefslogtreecommitdiff
path: root/usr.bin/whois/whois.c
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2015-11-02 20:39:38 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2015-11-02 20:39:38 +0000
commitf1c4e153fedc85347ddf7b928a514cb761d858bf (patch)
tree73a6eb2e7357c283b6b21e51137ddabba147c484 /usr.bin/whois/whois.c
parent76a6c3c6fa09e02f667ec4d1cd54c825397c78b8 (diff)
add support for whois -I, to use whois.iana.org (root zone database).
ok millert@, tweak/"everything else looks fine" jmc@
Diffstat (limited to 'usr.bin/whois/whois.c')
-rw-r--r--usr.bin/whois/whois.c10
1 files changed, 7 insertions, 3 deletions
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);
}