summaryrefslogtreecommitdiffstats
path: root/usr.bin/whois/whois.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/whois/whois.c')
-rw-r--r--usr.bin/whois/whois.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c
index c5bf9f4..9c4a03e 100644
--- a/usr.bin/whois/whois.c
+++ b/usr.bin/whois/whois.c
@@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$");
#define NORIDHOST "whois.norid.no"
#define IANAHOST "whois.iana.org"
#define GERMNICHOST "de.whois-servers.net"
+#define FNICHOST "whois.afrinic.net"
#define DEFAULT_PORT "whois"
#define WHOIS_SERVER_ID "Whois Server: "
#define WHOIS_ORG_SERVER_ID "Registrant Street1:Whois Server:"
@@ -86,7 +87,8 @@ __FBSDID("$FreeBSD$");
#define ishost(h) (isalnum((unsigned char)h) || h == '.' || h == '-')
-const char *ip_whois[] = { LNICHOST, RNICHOST, PNICHOST, BNICHOST, NULL };
+const char *ip_whois[] = { LNICHOST, RNICHOST, PNICHOST, BNICHOST,
+ FNICHOST, NULL };
const char *port = DEFAULT_PORT;
static char *choose_server(char *);
@@ -108,7 +110,7 @@ main(int argc, char *argv[])
country = host = qnichost = NULL;
flags = use_qnichost = 0;
- while ((ch = getopt(argc, argv, "aAbc:dgh:iIklmp:QrR6")) != -1) {
+ while ((ch = getopt(argc, argv, "aAbc:dfgh:iIklmp:QrR6")) != -1) {
switch (ch) {
case 'a':
host = ANICHOST;
@@ -125,6 +127,9 @@ main(int argc, char *argv[])
case 'd':
host = DNICHOST;
break;
+ case 'f':
+ host = FNICHOST;
+ break;
case 'g':
host = GNICHOST;
break;
@@ -356,7 +361,7 @@ static void
usage(void)
{
fprintf(stderr,
- "usage: whois [-aAbdgiIklmQrR6] [-c country-code | -h hostname] "
+ "usage: whois [-aAbdfgiIklmQrR6] [-c country-code | -h hostname] "
"[-p port] name ...\n");
exit(EX_USAGE);
}
OpenPOWER on IntegriCloud