From 8873885f5e9fde0fe1848264ac58a69d86f17f98 Mon Sep 17 00:00:00 2001 From: jhay Date: Mon, 23 Jan 2006 13:49:39 +0000 Subject: Add AfriNIC as a RIR. PR: 80421 Submitted by: Adrian Frith MFC after: 6 days --- usr.bin/whois/whois.1 | 11 ++++++++--- usr.bin/whois/whois.c | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/whois/whois.1 b/usr.bin/whois/whois.1 index 33486dc..fbbf740 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 aAbdgiIklmQrR6 +.Op Fl aAbdfgiIklmQrR6 .Op Fl c Ar country-code | Fl h Ar host .Op Fl p Ar port .Ar name ... @@ -58,7 +58,7 @@ Use the American Registry for Internet Numbers .Pq Tn ARIN database. It contains network numbers used in those parts of the world covered neither by -.Tn APNIC +.Tn APNIC , AfriNIC , LACNIC , nor by .Tn RIPE . .Pp @@ -87,6 +87,11 @@ Use the US Department of Defense database. It contains points of contact for subdomains of .Pa .MIL . +.It Fl f +Use the African Network Information Centre +.Pq Tn AfriNIC +database. It contains network numbers used in Africa and the islands of the +western Indian Ocean. .It Fl g Use the US non-military federal government database, which contains points of contact for subdomains of @@ -112,7 +117,7 @@ Registry for Internet Numbers If a query to .Tn ARIN references -.Tn APNIC , LACNIC , +.Tn APNIC , AfriNIC , LACNIC , or .Tn RIPE , that server will be queried also, provided that the 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); } -- cgit v1.1