FreeBSD Bugzilla – Attachment 6106 Details for
Bug 14095
Add some (cosmetic) functionality to whois(1)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 3.07 KB, created by
Joe Abley
on 1999-10-03 00:50:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Joe Abley
Created:
1999-10-03 00:50:01 UTC
Size:
3.07 KB
patch
obsolete
>diff -c whois/whois.1 whois.new/whois.1 >*** whois/whois.1 Sat Aug 28 12:17:00 1999 >--- whois.new/whois.1 Sun Oct 3 12:34:37 1999 >*************** >*** 70,80 **** >--- 70,91 ---- > Use the specified host instead of the default NIC > (whois.internic.net). > Either a host name or an IP address may be specified. >+ .It Fl m >+ Use the Route Arbiter Database >+ .Pq Tn RADB >+ database. It contains route policy specifications for a large >+ number of operators' networks. > .It Fl p > Use the Asia/Pacific Network Information Center > .Pq Tn APNIC > database. It contains network numbers used in East Asia, Australia, > New Zealand, and the Pacific islands. >+ .It Fl q >+ Construct the name of a whois server to use from the top-level domain >+ .Pq Tn TLD >+ of the supplied (single) argument, and appending ".whois-servers.net". >+ This effectively allows a suitable whois server to be selected >+ automatically for a large number of TLDs. > .It Fl r > Use the R\(aaeseaux IP Europ\(aaeens > .Pq Tn RIPE >diff -c whois/whois.c whois.new/whois.c >*** whois/whois.c Sat Aug 28 12:17:00 1999 >--- whois.new/whois.c Sun Oct 3 12:17:14 1999 >*************** >*** 63,68 **** >--- 63,70 ---- > #define RNICHOST "whois.ripe.net" > #define PNICHOST "whois.apnic.net" > #define RUNICHOST "whois.ripn.net" >+ #define MNICHOST "whois.ra.net" >+ #define QNICHOST_TAIL ".whois-servers.net" > #define WHOIS_PORT 43 > > static void usage __P((void)); >*************** >*** 79,91 **** > struct servent *sp; > int s; > char *host; > > #ifdef SOCKS > SOCKSinit(argv[0]); > #endif > > host = NICHOST; >! while ((ch = getopt(argc, argv, "adgh:prR")) != -1) > switch((char)ch) { > case 'a': > host = ANICHOST; >--- 81,97 ---- > struct servent *sp; > int s; > char *host; >+ char *qnichost; >+ int use_qnichost; >+ int i, j; > > #ifdef SOCKS > SOCKSinit(argv[0]); > #endif > > host = NICHOST; >! use_qnichost = 0; >! while ((ch = getopt(argc, argv, "adgh:mpqrR")) != -1) > switch((char)ch) { > case 'a': > host = ANICHOST; >*************** >*** 99,107 **** >--- 105,119 ---- > case 'h': > host = optarg; > break; >+ case 'm': >+ host = MNICHOST; >+ break; > case 'p': > host = PNICHOST; > break; >+ case 'q': >+ use_qnichost = 1; >+ break; > case 'r': > host = RNICHOST; > break; >*************** >*** 118,123 **** >--- 130,151 ---- > if (!argc) > usage(); > >+ if (use_qnichost != 0) { >+ if (argc == 1) { >+ for (i = j = 0; (*argv)[i]; i++) >+ if ((*argv)[i] == '.') j = i; >+ if (j != 0) { >+ qnichost = (char *) calloc(i - j + 1 + \ >+ strlen(QNICHOST_TAIL), sizeof(char)); >+ if (qnichost) { >+ strcpy(qnichost, *argv + j + 1); >+ strcat(qnichost, QNICHOST_TAIL); >+ host = qnichost; >+ } >+ } >+ } >+ } >+ > s = socket(PF_INET, SOCK_STREAM, 0); > if (s < 0) > err(EX_OSERR, "socket"); >*************** >*** 159,164 **** > static void > usage() > { >! fprintf(stderr, "usage: whois [-adgprR] [-h hostname] name ...\n"); > exit(EX_USAGE); > } >--- 187,192 ---- > static void > usage() > { >! fprintf(stderr, "usage: whois [-adgmpqrR] [-h hostname] name ...\n"); > exit(EX_USAGE); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 14095
: 6106