version 1.43, 2010/03/04 21:37:56 |
version 1.44, 2013/03/05 16:09:10 |
|
|
#define LNICHOST "whois.lacnic.net" |
#define LNICHOST "whois.lacnic.net" |
#define AFNICHOST "whois.afrinic.net" |
#define AFNICHOST "whois.afrinic.net" |
#define BNICHOST "whois.registro.br" |
#define BNICHOST "whois.registro.br" |
|
#define PDBHOST "whois.peeringdb.com" |
#define QNICHOST_TAIL ".whois-servers.net" |
#define QNICHOST_TAIL ".whois-servers.net" |
|
|
#define WHOIS_PORT "whois" |
#define WHOIS_PORT "whois" |
|
|
|
|
country = host = NULL; |
country = host = NULL; |
flags = rval = 0; |
flags = rval = 0; |
while ((ch = getopt(argc, argv, "aAc:dgh:ilmp:qQrR")) != -1) |
while ((ch = getopt(argc, argv, "aAc:dgh:ilmp:PqQrR")) != -1) |
switch (ch) { |
switch (ch) { |
case 'a': |
case 'a': |
host = ANICHOST; |
host = ANICHOST; |
|
|
case 'p': |
case 'p': |
port_whois = optarg; |
port_whois = optarg; |
break; |
break; |
|
case 'P': |
|
host = PDBHOST; |
|
break; |
case 'q': |
case 'q': |
/* deprecated, now the default */ |
/* deprecated, now the default */ |
break; |
break; |
|
|
extern char *__progname; |
extern char *__progname; |
|
|
fprintf(stderr, |
fprintf(stderr, |
"usage: %s [-AadgilmQRr] [-c country-code | -h host] " |
"usage: %s [-AadgilmPQRr] [-c country-code | -h host] " |
"[-p port] name ...\n", __progname); |
"[-p port] name ...\n", __progname); |
exit(1); |
exit(1); |
} |
} |