Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 May 2001 10:29:22 +0300
From:      Peter Pentchev <roam@orbitel.bg>
To:        Joachim Strombergson <watchman@ludd.luth.se>
Cc:        FreeBSD-Audit <audit@FreeBSD.ORG>
Subject:   Re: Patch to add nic-se to whois
Message-ID:  <20010521102922.E2781@ringworld.oblivion.bg>
In-Reply-To: <3B0841FB.188D5933@ludd.luth.se>; from watchman@ludd.luth.se on Mon, May 21, 2001 at 12:15:23AM %2B0200
References:  <3B0841FB.188D5933@ludd.luth.se>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, May 21, 2001 at 12:15:23AM +0200, Joachim Strombergson wrote:
> Aloha!
> 
> Trying my hands at contributing and hacking FreeBSD again.
> 
> This is an adaption of a patch from OpenBSD that adds nic-se as one of
> the databases whois knows about.
> 
> Could someone look at the patch and see if it's an ok patch? Also is
> this something we should add to the system?
> 
> Thanks!

Hi,

Attached is a slightly modified version of your patch, which preserves
whitespace (tabs), and follows style(9) guidelines in ordering function
arguments (as pointed out by Will :)

This patch also adds a description for the -s flag in the manpage,
as well as several -mdoc style fixes to the manpage.  Actually, the -s
flag documentation is only 6 lines of the whois.1 patch, all the rest
are style fixes :)

Your efforts at contributing are appreciated!

G'luck,
Peter

-- 
I am the meaning of this sentence.

Index: src/usr.bin/whois/whois.1
===================================================================
RCS file: /home/ncvs/src/usr.bin/whois/whois.1,v
retrieving revision 1.16
diff -u -r1.16 whois.1
--- src/usr.bin/whois/whois.1	2000/11/20 19:21:19	1.16
+++ src/usr.bin/whois/whois.1	2001/05/21 07:09:58
@@ -40,7 +40,7 @@
 .Nd Internet domain name and network number directory service
 .Sh SYNOPSIS
 .Nm
-.Op Fl adgimpQrR6
+.Op Fl adgimpQrRs6
 .Op Fl h Ar host
 .Ar name ...
 .Sh DESCRIPTION
@@ -54,8 +54,8 @@
 .It Fl a
 Use the American Registry for Internet Numbers
 .Pq Tn ARIN
-database.  It contains network numbers used in those parts of the world
-covered neither by
+database.
+It contains network numbers used in those parts of the world covered neither by
 .Tn APNIC nor by
 .Tn RIPE .
 Contact (handle) information should be looked up by appending "-ARIN" to the
@@ -65,7 +65,8 @@
 .Pp
 .It Fl d
 Use the US Department of Defense
-database.  It contains points of contact for subdomains of
+database.
+It contains points of contact for subdomains of
 .Tn \&.MIL .
 .It Fl g
 Use the US non-military federal government database, which contains points of
@@ -87,22 +88,28 @@
 .It Fl i
 Use the Network Solutions Registry for Internet Numbers
 .Pq Tn whois.networksolutions.com
-database.  It contains network numbers and domain contact information
-for most of
+database.
+It contains network numbers and domain contact information for most of
 .Tn \&.COM ,
 .Tn \&.NET ,
 .Tn \&.ORG
 and
 .Tn \&.EDU
 domains.
-NOTE! The registration of these domains is now done by a number of
+.Pp
+.Sy NOTE!
+The registration of these domains 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
+on the domains registered by organizations other than Network Solutions, Inc.
+Also, note that the
+.Tn InterNIC
+database
 .Pq Tn whois.internic.net
-is no longer handled by Network Solutions, Inc.
-For details, see:
-http://www.internic.net/.
+is no longer handled by
+.Tn Network Solutions, Inc .
+For details, see
+.Pa http://www.internic.net/ .
+.Pp
 Contact (handle) information should be looked up by prefixing "handle " to the
 NIC handle in the querry:
 .Pp
@@ -117,29 +124,40 @@
 .It Fl p
 Use the Asia/Pacific Network Information Center
 .Pq Tn APNIC
-database.  It contains network numbers used in East Asia, Australia,
+database.
+It contains network numbers used in East Asia, Australia,
 New Zealand, and the Pacific islands.
 .It Fl Q
 Do a quick lookup.  This means that
 .Nm
 will not attempt to lookup the name in the authoritative whois
 server (if one is listed) nor will it contact InterNic if a lookup
-fails.  This flag has no effect when combined with any other flag.
+fails.
+This flag has no effect when combined with any other flag.
 .It Fl r
 Use the R\(aaeseaux IP Europ\(aaeens
 .Pq Tn RIPE
-database.  It contains network numbers and domain contact information
+database.
+It contains network numbers and domain contact information
 for Europe.
 .It Fl R
 Use the Russia Network Information Center
 .Pq Tn RIPN
-database.  It contains network numbers and domain contact information
+database.
+It contains network numbers and domain contact information
 for subdomains of
 .Tn \&.RU .
+.It Fl s
+Use the Network Information Center Sweden AB
+.Pq Tn NIC-SE
+database.
+It contains network numbers and domain contact information for subdomains of
+.Tn \&.SE .
 .It Fl 6
 Use the IPv6 Resource Center
 .Pq Tn 6bone
-database.  It contains network names and addresses for the IPv6 network.
+database.
+It contains network names and addresses for the IPv6 network.
 .El
 .Pp
 The operands specified to
Index: src/usr.bin/whois/whois.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/whois/whois.c,v
retrieving revision 1.16
diff -u -r1.16 whois.c
--- src/usr.bin/whois/whois.c	2000/07/07 07:52:21	1.16
+++ src/usr.bin/whois/whois.c	2001/05/21 07:09:58
@@ -67,6 +67,7 @@
 #define	RUNICHOST	"whois.ripn.net"
 #define	MNICHOST	"whois.ra.net"
 #define	QNICHOST_TAIL	".whois-servers.net"
+#define	SENICHOST       "whois.nic-se.se"
 #define	SNICHOST	"whois.6bone.net"
 #define	WHOIS_PORT	43
 
@@ -96,7 +97,7 @@
 	qnichost = NULL;
 	flags = 0;
 	use_qnichost = 0;
-	while ((ch = getopt(argc, argv, "adgh:impQrR6")) != -1) {
+	while ((ch = getopt(argc, argv, "adghi:mpQrRs6")) != -1) {
 		switch((char)ch) {
 		case 'a':
 			host = ANICHOST;
@@ -128,6 +129,9 @@
 		case 'R':
 			host = RUNICHOST;
 			break;
+		case 's':
+			host = SENICHOST;
+			break;
 		case '6':
 			host = SNICHOST;
 			break;
@@ -292,6 +296,6 @@
 usage()
 {
 	(void)fprintf(stderr,
-	    "usage: whois [-adgimpQrR6] [-h hostname] name ...\n");
+	    "usage: whois [-adgimpQrRs6] [-h hostname] name ...\n");
 	exit(EX_USAGE);
 }

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




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