aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorCeri Davies <ceri@FreeBSD.org>2004-12-11 13:14:07 +0000
committerCeri Davies <ceri@FreeBSD.org>2004-12-11 13:14:07 +0000
commit876b0a88ddbd47d8e251005a65f722163b17b7b3 (patch)
tree70b74b6af38a1ec8a1996d482639796c26cb4e0f /usr.bin
parente71171f31b0c880ec4b225def94ddafebdbb5345 (diff)
downloadsrc-876b0a88ddbd47d8e251005a65f722163b17b7b3.tar.gz
src-876b0a88ddbd47d8e251005a65f722163b17b7b3.zip
Add a -k flag for querying whois.krnic.net (the National Internet
Development Agency of Korea) which hold details of IP address allocations within Korea. Approved by: bms
Notes
Notes: svn path=/head/; revision=138681
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/whois/whois.18
-rw-r--r--usr.bin/whois/whois.c8
2 files changed, 13 insertions, 3 deletions
diff --git a/usr.bin/whois/whois.1 b/usr.bin/whois/whois.1
index 28efda159057..6977cf23f930 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 aAbdgiIlmQrR6
+.Op Fl aAbdgiIklmQrR6
.Op Fl c Ar country-code | Fl h Ar host
.Op Fl p Ar port
.Ar name ...
@@ -157,6 +157,12 @@ Use the Internet Assigned Numbers Authority
.Pq Tn IANA
database.
It contains network information for top-level domains.
+.It Fl k
+Use the National Internet Development Agency of Korea's
+.Pq Tn KRNIC
+database.
+It contains network numbers and domain contact information
+for Korea.
.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 def4fdf58c1f..51ca8c8b5d62 100644
--- a/usr.bin/whois/whois.c
+++ b/usr.bin/whois/whois.c
@@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$");
#define GNICHOST "whois.nic.gov"
#define ANICHOST "whois.arin.net"
#define LNICHOST "whois.lacnic.net"
+#define KNICHOST "whois.krnic.net"
#define RNICHOST "whois.ripe.net"
#define PNICHOST "whois.apnic.net"
#define MNICHOST "whois.ra.net"
@@ -107,7 +108,7 @@ main(int argc, char *argv[])
country = host = qnichost = NULL;
flags = use_qnichost = 0;
- while ((ch = getopt(argc, argv, "aAbc:dgh:iIlmp:QrR6")) != -1) {
+ while ((ch = getopt(argc, argv, "aAbc:dgh:iIklmp:QrR6")) != -1) {
switch (ch) {
case 'a':
host = ANICHOST;
@@ -136,6 +137,9 @@ main(int argc, char *argv[])
case 'I':
host = IANAHOST;
break;
+ case 'k':
+ host = KNICHOST;
+ break;
case 'l':
host = LNICHOST;
break;
@@ -351,7 +355,7 @@ static void
usage(void)
{
fprintf(stderr,
- "usage: whois [-aAbdgiIlmQrR6] [-c country-code | -h hostname] "
+ "usage: whois [-aAbdgiIklmQrR6] [-c country-code | -h hostname] "
"[-p port] name ...\n");
exit(EX_USAGE);
}