|
Lines 65-70
Link Here
|
| 65 |
#define DNICHOST "whois.nic.mil" |
65 |
#define DNICHOST "whois.nic.mil" |
| 66 |
#define GNICHOST "whois.nic.gov" |
66 |
#define GNICHOST "whois.nic.gov" |
| 67 |
#define ANICHOST "whois.arin.net" |
67 |
#define ANICHOST "whois.arin.net" |
|
|
68 |
#define LNICHOST "whois.lacnic.net" |
| 68 |
#define RNICHOST "whois.ripe.net" |
69 |
#define RNICHOST "whois.ripe.net" |
| 69 |
#define PNICHOST "whois.apnic.net" |
70 |
#define PNICHOST "whois.apnic.net" |
| 70 |
#define MNICHOST "whois.ra.net" |
71 |
#define MNICHOST "whois.ra.net" |
|
Lines 79-85
Link Here
|
| 79 |
|
80 |
|
| 80 |
#define ishost(h) (isalnum((unsigned char)h) || h == '.' || h == '-') |
81 |
#define ishost(h) (isalnum((unsigned char)h) || h == '.' || h == '-') |
| 81 |
|
82 |
|
| 82 |
const char *ip_whois[] = { RNICHOST, PNICHOST, BNICHOST, NULL }; |
83 |
const char *ip_whois[] = { LNICHOST, RNICHOST, PNICHOST, BNICHOST, NULL }; |
| 83 |
const char *port = DEFAULT_PORT; |
84 |
const char *port = DEFAULT_PORT; |
| 84 |
|
85 |
|
| 85 |
static char *choose_server(char *); |
86 |
static char *choose_server(char *); |
|
Lines 101-107
Link Here
|
| 101 |
|
102 |
|
| 102 |
country = host = qnichost = NULL; |
103 |
country = host = qnichost = NULL; |
| 103 |
flags = use_qnichost = 0; |
104 |
flags = use_qnichost = 0; |
| 104 |
while ((ch = getopt(argc, argv, "aAc:dgh:imp:QrR6")) != -1) { |
105 |
while ((ch = getopt(argc, argv, "aAc:dgh:ilmp:QrR6")) != -1) { |
| 105 |
switch (ch) { |
106 |
switch (ch) { |
| 106 |
case 'a': |
107 |
case 'a': |
| 107 |
host = ANICHOST; |
108 |
host = ANICHOST; |
|
Lines 123-128
Link Here
|
| 123 |
break; |
124 |
break; |
| 124 |
case 'i': |
125 |
case 'i': |
| 125 |
host = INICHOST; |
126 |
host = INICHOST; |
|
|
127 |
break; |
| 128 |
case 'l': |
| 129 |
host = LNICHOST; |
| 126 |
break; |
130 |
break; |
| 127 |
case 'm': |
131 |
case 'm': |
| 128 |
host = MNICHOST; |
132 |
host = MNICHOST; |