From owner-freebsd-bugs Tue Mar 4 4:10:13 2003 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13BC237B401 for ; Tue, 4 Mar 2003 04:10:10 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 35F5343FA3 for ; Tue, 4 Mar 2003 04:10:09 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h24CA9NS059429 for ; Tue, 4 Mar 2003 04:10:09 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h24CA94J059428; Tue, 4 Mar 2003 04:10:09 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9FE1037B401 for ; Tue, 4 Mar 2003 04:04:09 -0800 (PST) Received: from worf.kerna.com (worf.kerna.com [194.106.143.118]) by mx1.FreeBSD.org (Postfix) with SMTP id 3902243FD7 for ; Tue, 4 Mar 2003 04:04:06 -0800 (PST) (envelope-from james@now.ie) Received: (qmail 92060 invoked by uid 1001); 4 Mar 2003 12:04:03 -0000 Message-Id: <20030304120403.92059.qmail@bender.kerna.ie> Date: 4 Mar 2003 12:04:03 -0000 From: James Raftery Reply-To: James Raftery To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/48914: [PATCH] Add flag to whois(1) to query IANA TLD WHOIS server Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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