Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Dec 1999 21:44:42 -0500 (EST)
From:      matt <matt@S02.ARPA-CANADA.NET>
To:        FreeBSD-Stable@FreeBSD.ORG
Subject:   Little whois patch.
Message-ID:  <Pine.BSF.4.20.9912042141330.41590-200000@s02.arpa-canada.net>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]

Hi,
	I noticed that the Canadian Internic was being left out of the
whois command line opts, so I thought I'd add it to the options. I really
have no clue who to send this to, or if I should use send-pr maybe, but
it's technically not a problem. Hopefully one of the committers can give
me feedback on where this should go. It's diffed against 3.3-stable, does
nothing but give 'whois -c' for whois.internic.ca, us Canadians feel left
out, cheers. =)

Matt

[-- Attachment #2 --]
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);
 }

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.20.9912042141330.41590-200000>