Bug 15267

Summary: CHANGE-REQUEST: WHOIS(1) - Support Internic.CA (Canada)
Product: Base System Reporter: matt <matt>
Component: binAssignee: joe <joe>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.3-STABLE   
Hardware: Any   
OS: Any   

Description matt 1999-12-05 06:20:01 UTC
WHOIS(1) had no builtin support for whois.internic.ca which is the Canadian
Internic Registry. As a Canadian, I hate to be left out. Therefore, I added
support for whois.internic.ca via 'whois -c [domain.ca]'

Thanks in advance for (hopefully) accepting this addition.

Fix: This is diffed against 3.3-STABLE source, has been tested locally by
myself on 3.3-STABLE machine, manpage update also included and tested.
	
---- START CUT: WHOIS.DIFF ----



--- END CUT: WHOIS.DIFF -----KdqvtboZdHKPWrVNtcwahgn7TGyrcNW7qSls5QtwC1MwemP3
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

diff -urbN whois.old/whois.1 whois/whois.1
--- whois.old/whois.1   Fri Sep 17 10:35:56 1999
+++ whois/whois.1       Sat Dec  4 21:25:51 1999
@@ -40,7 +40,7 @@
 .Nd Internet domain name and network number directory service
 .Sh SYNOPSIS
 .Nm whois
-.Op Fl adgprR
+.Op Fl acdgprR
 .Op Fl h Ar host
 .Ar name ...
 .Sh DESCRIPTION
@@ -58,6 +58,10 @@
 covered neither by
 .Tn APNIC nor by
 .Tn RIPE .
+.It Fl c
+Use the Canadian Internic Registry 
+database. It contains points of contact for subdomains of
+.Tn \&.CA .
 .It Fl d
 Use the US Department of Defense
 database.  It contains points of contact for subdomains of
diff -urbN whois.old/whois.c whois/whois.c
--- whois.old/whois.c   Sat Dec  4 21:21:28 1999
+++ whois/whois.c       Sat Dec  4 21:25:51 1999
@@ -57,6 +57,7 @@
 #include <unistd.h>
 
 #define        NICHOST         "whois.internic.net"
+#define        CNICHOST        "whois.internic.ca"
 #define        DNICHOST        "whois.nic.mil"
 #define        GNICHOST        "whois.nic.gov"
 #define        ANICHOST        "whois.arin.net"
@@ -85,11 +86,14 @@
 #endif
 
        host = NICHOST;
-       while ((ch = getopt(argc, argv, "adgh:prR")) != -1)
+       while ((ch = getopt(argc, argv, "acdgh:prR")) != -1)
                switch((char)ch) {
                case 'a':
                        host = ANICHOST;
                        break;
+               case 'c':
+                       host = CNICHOST;
+                       break;
                case 'd':
                        host = DNICHOST;
                        break;
@@ -159,6 +163,6 @@
 static void
 usage()
 {
-       fprintf(stderr, "usage: whois [-adgprR] [-h hostname] name ...\n");
+       fprintf(stderr, "usage: whois [-acdgprR] [-h hostname] name ...\n");
        exit(EX_USAGE);
 }
How-To-Repeat: 
N/A
Comment 1 Szilveszter Adam 1999-12-05 06:51:15 UTC
Hi!

I think you should wait until the whois(1) client gets MFC-d from -CURRENT.
It will handle this situation and also others just fine! It automatically
finds the whois server needed for most domains.

I am running it on
-STABLE already and no problems found this far except for a statement in the
man page which no longer applies, it says that -i option queries the Network
Solutions InterNIC database. InterNIC is no longer handled by NS, Inc. The
client has been updated accordingly a couple of days ago, but not the man
page, so here it is...:-)

--- whois.1.orig	Fri Dec  3 11:08:49 1999
+++ whois.1	Sun Dec  5 08:09:23 1999
@@ -81,7 +81,7 @@
 to whois.crsnic.net provided.
 .It Fl i
 Use the Network Solutions Registry for Internet Numbers
-.Pq Tn InterNIC
+.Pq Tn whois.networksolutions.com
 database.  It contains network numbers and domain contact information
 for most of
 .Tn \&.COM ,
@@ -89,7 +89,13 @@
 .Tn \&.ORG
 and
 .Tn \&.EDU
-domains.
+domains. NOTE! The registration of these doamins is now done by a number of
+independent and competing registrars and this database holds no information
+on the domains registered by organizations other than Network Solutions, Inc. 
+Also, note that the InterNIC database
+.Pq Tn whois.internic.net
+is no longer handled by Network Solutions, Inc. For details, see:
+http://www.internic.net/.
 .It Fl m
 Use the Route Arbiter Database
 .Pq Tn RADB



On Sun, Dec 05, 1999 at 06:16:53AM -0000, matt@S02.ARPA-CANADA.NET wrote:
> 
> >Number:         15267
> >Category:       bin
> >Synopsis:       CHANGE-REQUEST: WHOIS(1) - Support Internic.CA (Canada)
> >Confidential:   no
> >Severity:       non-critical
> >Priority:       low
> >Responsible:    freebsd-bugs
> >State:          open
> >Quarter:        
> >Keywords:       
> >Date-Required:
> >Class:          change-request
> >Submitter-Id:   current-users
> >Arrival-Date:   Sat Dec  4 22:20:01 PST 1999
> >Closed-Date:
> >Last-Modified:
> >Originator:     Matt
> >Release:        FreeBSD 3.3-STABLE i386
> >Organization:
> N/A
> >Environment:
> 
> N/A
> 
> >Description:
> 
> WHOIS(1) had no builtin support for whois.internic.ca which is the Canadian
> Internic Registry. As a Canadian, I hate to be left out. Therefore, I added
> support for whois.internic.ca via 'whois -c [domain.ca]'
> 
> Thanks in advance for (hopefully) accepting this addition.
> 
> >How-To-Repeat:
> 
> N/A
> 
> >Fix:
> 
> This is diffed against 3.3-STABLE source, has been tested locally by
> myself on 3.3-STABLE machine, manpage update also included and tested.
> 	
> ---- START CUT: WHOIS.DIFF ----
> 
> diff -urbN whois.old/whois.1 whois/whois.1
> --- whois.old/whois.1   Fri Sep 17 10:35:56 1999
> +++ whois/whois.1       Sat Dec  4 21:25:51 1999
> @@ -40,7 +40,7 @@
>  .Nd Internet domain name and network number directory service
>  .Sh SYNOPSIS
>  .Nm whois
> -.Op Fl adgprR
> +.Op Fl acdgprR
>  .Op Fl h Ar host
>  .Ar name ...
>  .Sh DESCRIPTION
> @@ -58,6 +58,10 @@
>  covered neither by
>  .Tn APNIC nor by
>  .Tn RIPE .
> +.It Fl c
> +Use the Canadian Internic Registry 
> +database. It contains points of contact for subdomains of
> +.Tn \&.CA .
>  .It Fl d
>  Use the US Department of Defense
>  database.  It contains points of contact for subdomains of
> diff -urbN whois.old/whois.c whois/whois.c
> --- whois.old/whois.c   Sat Dec  4 21:21:28 1999
> +++ whois/whois.c       Sat Dec  4 21:25:51 1999
> @@ -57,6 +57,7 @@
>  #include <unistd.h>
>  
>  #define        NICHOST         "whois.internic.net"
> +#define        CNICHOST        "whois.internic.ca"
>  #define        DNICHOST        "whois.nic.mil"
>  #define        GNICHOST        "whois.nic.gov"
>  #define        ANICHOST        "whois.arin.net"
> @@ -85,11 +86,14 @@
>  #endif
>  
>         host = NICHOST;
> -       while ((ch = getopt(argc, argv, "adgh:prR")) != -1)
> +       while ((ch = getopt(argc, argv, "acdgh:prR")) != -1)
>                 switch((char)ch) {
>                 case 'a':
>                         host = ANICHOST;
>                         break;
> +               case 'c':
> +                       host = CNICHOST;
> +                       break;
>                 case 'd':
>                         host = DNICHOST;
>                         break;
> @@ -159,6 +163,6 @@
>  static void
>  usage()
>  {
> -       fprintf(stderr, "usage: whois [-adgprR] [-h hostname] name ...\n");
> +       fprintf(stderr, "usage: whois [-acdgprR] [-h hostname] name ...\n");
>         exit(EX_USAGE);
>  }
> 
> --- END CUT: WHOIS.DIFF ---
> 
> >Release-Note:
> >Audit-Trail:
> >Unformatted:
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-bugs" in the body of the message

-- 
-------------------------------------------------------------------------------
                *** Adam Szilveszter * JATE AJTK Szeged ***
Comment 2 Jeroen Ruigrok/Asmodai 1999-12-05 12:24:06 UTC
-On [19991205 08:00], matt@S02.ARPA-CANADA.NET (matt@S02.ARPA-CANADA.NET) wrote:
>>Description:
>
>WHOIS(1) had no builtin support for whois.internic.ca which is the Canadian
>Internic Registry. As a Canadian, I hate to be left out. Therefore, I added
>support for whois.internic.ca via 'whois -c [domain.ca]'

While we are there, lets add flags for all TLD registrars.

whois -r won't show me my daily needed .nl domains.

Have you even considered using shell aliases?

alias cawhois='whois -h whois.internic.ca'

[needless to say, I use nlwhois aliases and some others for my whois
database queries]

-- 
Jeroen Ruigrok van der Werven/Asmodai           asmodai@[wxs.nl|bart.nl]
Documentation nutter.          *BSD: Technical excellence at its best...  
The BSD Programmer's Documentation Project <http://home.wxs.nl/~asmodai>
Once sent from the Golden Hall...
Comment 3 joe freebsd_committer freebsd_triage 1999-12-05 21:33:27 UTC
State Changed
From-To: open->suspended

The new whois in -current already provided equivilent functionality. 
I've suspended this -pr, pending merge of the new whois into -stable. 
Comment 4 joe freebsd_committer freebsd_triage 1999-12-05 21:36:03 UTC
Responsible Changed
From-To: freebsd-bugs->joe

I'm in charge of this one. 
Comment 5 joe freebsd_committer freebsd_triage 1999-12-20 14:08:09 UTC
State Changed
From-To: suspended->closed

The whois client from -current has now been merged into -stable 
in time for the 3.4 release.