summaryrefslogtreecommitdiffstats
path: root/usr.bin/whois
diff options
context:
space:
mode:
authormike <mike@FreeBSD.org>2002-11-10 16:58:56 +0000
committermike <mike@FreeBSD.org>2002-11-10 16:58:56 +0000
commit4ae3d74b875ca71ef75824f3ec665633cb8af26d (patch)
tree798cb6141b668c22e2215e7759e5a230d516fcc1 /usr.bin/whois
parentb44a3dc802720312202ccbadd53581392891f39f (diff)
downloadFreeBSD-src-4ae3d74b875ca71ef75824f3ec665633cb8af26d.zip
FreeBSD-src-4ae3d74b875ca71ef75824f3ec665633cb8af26d.tar.gz
Add support for the Latin American and Caribbean IP address Regional
Registry (LACNIC) with the -l option and support for recursive IP address searches. PR: 44448 Submitted by: David Wolfskill <david@catwhisker.org> MFC after: 1 week
Diffstat (limited to 'usr.bin/whois')
-rw-r--r--usr.bin/whois/whois.112
-rw-r--r--usr.bin/whois/whois.c10
2 files changed, 16 insertions, 6 deletions
diff --git a/usr.bin/whois/whois.1 b/usr.bin/whois/whois.1
index f315342..521690a 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 aAdgimQrR6
+.Op Fl aAdgilmQrR6
.Op Fl c Ar country-code | Fl h Ar host
.Op Fl p Ar port
.Ar name ...
@@ -108,7 +108,8 @@ Registry for Internet Numbers
If a query to
.Tn ARIN
references
-.Tn APNIC
+.Tn APNIC ,
+.Tn LACNIC ,
or
.Tn RIPE ,
that server will be queried also, provided that the
@@ -148,7 +149,12 @@ can be looked up by prefixing
to the
.Tn NIC
handle in the query.)
-.Pp
+.It Fl l
+Use the Latin American and Caribbean IP address Regional Registry
+.Pq Tn LACNIC
+database.
+It contains network numbers used in much of Latin America and the
+Caribbean.
.It Fl m
Use the Route Arbiter Database
.Pq Tn RADB
diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c
index 372fc1c..c0473aa 100644
--- a/usr.bin/whois/whois.c
+++ b/usr.bin/whois/whois.c
@@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$");
#define DNICHOST "whois.nic.mil"
#define GNICHOST "whois.nic.gov"
#define ANICHOST "whois.arin.net"
+#define LNICHOST "whois.lacnic.net"
#define RNICHOST "whois.ripe.net"
#define PNICHOST "whois.apnic.net"
#define MNICHOST "whois.ra.net"
@@ -79,7 +80,7 @@ __FBSDID("$FreeBSD$");
#define ishost(h) (isalnum((unsigned char)h) || h == '.' || h == '-')
-const char *ip_whois[] = { RNICHOST, PNICHOST, BNICHOST, NULL };
+const char *ip_whois[] = { LNICHOST, RNICHOST, PNICHOST, BNICHOST, NULL };
const char *port = DEFAULT_PORT;
static char *choose_server(char *);
@@ -101,7 +102,7 @@ main(int argc, char *argv[])
country = host = qnichost = NULL;
flags = use_qnichost = 0;
- while ((ch = getopt(argc, argv, "aAc:dgh:imp:QrR6")) != -1) {
+ while ((ch = getopt(argc, argv, "aAc:dgh:ilmp:QrR6")) != -1) {
switch (ch) {
case 'a':
host = ANICHOST;
@@ -124,6 +125,9 @@ main(int argc, char *argv[])
case 'i':
host = INICHOST;
break;
+ case 'l':
+ host = LNICHOST;
+ break;
case 'm':
host = MNICHOST;
break;
@@ -315,7 +319,7 @@ static void
usage(void)
{
fprintf(stderr,
- "usage: whois [-aAdgimQrR6] [-c country-code | -h hostname] "
+ "usage: whois [-aAdgilmQrR6] [-c country-code | -h hostname] "
"[-p port] name ...\n");
exit(EX_USAGE);
}
OpenPOWER on IntegriCloud