|
Lines 63-68
Link Here
|
| 63 |
#define RNICHOST "whois.ripe.net" |
63 |
#define RNICHOST "whois.ripe.net" |
| 64 |
#define PNICHOST "whois.apnic.net" |
64 |
#define PNICHOST "whois.apnic.net" |
| 65 |
#define RUNICHOST "whois.ripn.net" |
65 |
#define RUNICHOST "whois.ripn.net" |
|
|
66 |
#define UNICHOST "whois.nic.uk" |
| 66 |
#define WHOIS_PORT 43 |
67 |
#define WHOIS_PORT 43 |
| 67 |
|
68 |
|
| 68 |
static void usage __P((void)); |
69 |
static void usage __P((void)); |
|
Lines 85-91
Link Here
|
| 85 |
#endif |
86 |
#endif |
| 86 |
|
87 |
|
| 87 |
host = NICHOST; |
88 |
host = NICHOST; |
| 88 |
while ((ch = getopt(argc, argv, "adgh:prR")) != -1) |
89 |
while ((ch = getopt(argc, argv, "adgh:prRu")) != -1) |
| 89 |
switch((char)ch) { |
90 |
switch((char)ch) { |
| 90 |
case 'a': |
91 |
case 'a': |
| 91 |
host = ANICHOST; |
92 |
host = ANICHOST; |
|
Lines 108-113
Link Here
|
| 108 |
case 'R': |
109 |
case 'R': |
| 109 |
host = RUNICHOST; |
110 |
host = RUNICHOST; |
| 110 |
break; |
111 |
break; |
|
|
112 |
case 'u': |
| 113 |
host = UNICHOST; |
| 114 |
break; |
| 111 |
case '?': |
115 |
case '?': |
| 112 |
default: |
116 |
default: |
| 113 |
usage(); |
117 |
usage(); |
|
Lines 159-164
Link Here
|
| 159 |
static void |
163 |
static void |
| 160 |
usage() |
164 |
usage() |
| 161 |
{ |
165 |
{ |
| 162 |
fprintf(stderr, "usage: whois [-adgprR] [-h hostname] name ...\n"); |
166 |
fprintf(stderr, "usage: whois [-adgprRu] [-h hostname] name ...\n"); |
| 163 |
exit(EX_USAGE); |
167 |
exit(EX_USAGE); |
| 164 |
} |
168 |
} |