Skip site navigation (1)Skip section navigation (2)
Date:      4 Mar 2003 12:04:03 -0000
From:      James Raftery <james@now.ie>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/48914: [PATCH] Add flag to whois(1) to query IANA TLD WHOIS server
Message-ID:  <20030304120403.92059.qmail@bender.kerna.ie>

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

>Number:         48914
>Category:       bin
>Synopsis:       [PATCH] Add flag to whois(1) to query IANA TLD WHOIS server
>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:   Tue Mar 04 04:10:06 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     James Raftery
>Release:        FreeBSD 4.7-RELEASE-p3 i386
>Organization:
>Environment:
System: FreeBSD bender.kerna.ie 4.7-RELEASE-p3 FreeBSD 4.7-RELEASE-p3 #6: Thu Jan 9 14:06:32 GMT 2003 root@bender.kerna.ie:/usr/obj/usr/src/sys/BENDER i386

>Description:
	Patch to add a -I flag to whois(1) to query the IANA TLD
	WHOIS server, whois.iana.org. All TLD info. has been moved out
	of the NetSol and InterNIC WHOIS services.

>How-To-Repeat:
	N/A

>Fix:
	Patch below adds a -I flag. 'whois -I ie' will query
	whois.iana.org for 'ie' and show the results.


diff -ruN usr.bin/whois.orig/whois.1 usr.bin/whois/whois.1
--- usr.bin/whois.orig/whois.1	Tue Mar  4 11:46:57 2003
+++ usr.bin/whois/whois.1	Tue Mar  4 11:53:18 2003
@@ -40,7 +40,7 @@
 .Nd "Internet domain name and network number directory service"
 .Sh SYNOPSIS
 .Nm
-.Op Fl adgimpQrR6
+.Op Fl adgiImpQrR6
 .Op Fl c Ar country-code | Fl h Ar host
 .Ar name ...
 .Sh DESCRIPTION
@@ -142,6 +142,11 @@
 .Tn NIC
 handle in the query.)
 .Pp
+.It Fl I
+Use the Internet Assigned Numbers Authority
+.Pq Tn IANA
+database.
+It contains network information for top-level domains.
 .It Fl m
 Use the Route Arbiter Database
 .Pq Tn RADB
diff -ruN usr.bin/whois.orig/whois.c usr.bin/whois/whois.c
--- usr.bin/whois.orig/whois.c	Tue Mar  4 11:47:16 2003
+++ usr.bin/whois/whois.c	Tue Mar  4 11:53:18 2003
@@ -64,6 +64,7 @@
 #define	INICHOST	"whois.networksolutions.com"
 #define	DNICHOST	"whois.nic.mil"
 #define	GNICHOST	"whois.nic.gov"
+#define	IANAHOST	"whois.iana.org"
 #define	ANICHOST	"whois.arin.net"
 #define	RNICHOST	"whois.ripe.net"
 #define	PNICHOST	"whois.apnic.net"
@@ -100,7 +101,7 @@
 
 	country = host = qnichost = NULL;
 	flags = use_qnichost = 0;
-	while ((ch = getopt(argc, argv, "ac:dgh:impQrR6")) != -1) {
+	while ((ch = getopt(argc, argv, "ac:dgh:iImpQrR6")) != -1) {
 		switch (ch) {
 		case 'a':
 			host = ANICHOST;
@@ -120,6 +121,9 @@
 		case 'i':
 			host = INICHOST;
 			break;
+		case 'I':
+			host = IANAHOST;
+			break;
 		case 'm':
 			host = MNICHOST;
 			break;
@@ -310,7 +314,7 @@
 usage(void)
 {
 	fprintf(stderr,
-	    "usage: whois [-adgimpQrR6] [-c country-code | -h hostname] "
+	    "usage: whois [-adgiImpQrR6] [-c country-code | -h hostname] "
 	    "name ...\n");
 	exit(EX_USAGE);
 }
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030304120403.92059.qmail>