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
This commit is contained in:
parent
95af37edb5
commit
a5d96e6d20
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user