From owner-freebsd-ports Tue May 7 23:19:17 2002 Delivered-To: freebsd-ports@freebsd.org Received: from mail.hq.newdream.net (mail.hq.newdream.net [216.246.35.10]) by hub.freebsd.org (Postfix) with ESMTP id D93ED37B4F0 for ; Tue, 7 May 2002 23:18:26 -0700 (PDT) Received: from 127.0.0.1 (zugzug.hq.newdream.net [127.0.0.1]) by drama.hq.newdream.net (Postfix) with SMTP id 9E55D3B33B for ; Tue, 7 May 2002 23:18:26 -0700 (PDT) Received: by mail.hq.newdream.net (Postfix, from userid 1012) id 4ABE93B309; Tue, 7 May 2002 23:18:26 -0700 (PDT) Date: Tue, 7 May 2002 23:18:26 -0700 From: william@hq.newdream.net (Will Yardley) To: ports@freebsd.org Subject: IPW man page Message-ID: <20020508061826.GF27473@hq.newdream.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="JYK4vJDZwFMowpUq" Content-Disposition: inline User-Agent: Mutt/1.5.0i Organization: New Dream Network Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --JYK4vJDZwFMowpUq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline not sure if this is useful, but i used 'txt2man' to make a (sort of) man page for ipw (in ports/net/ipw/). i had to do some cleaning up by hand... -- Will Yardley input: william < @ hq . newdream . net . > --JYK4vJDZwFMowpUq Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ipw.1" .TH IPW 1 "2002 May 07" .SH NAME \fBipw \fP- get IP address whois information \fB .SH SYNOPSIS .nf .fam C \fBipw\fP [\fB-a\fP] [\fB-n\fP] [\fB-c\fP] [\fB-C\fP] [\fB-t\fP] [\fB-v\fP] [\fB-T\fP \fIsecs\fP] \fIaddress\fP \fBipw\fP [\fB-a\fP] [\fB-n\fP] [\fB-c\fP] [\fB-C\fP] [\fB-t\fP] [\fB-v\fP] [\fB-T\fP \fIsecs\fP] \fIhost\fP \fBipw\fP [\fB-a\fP] [\fB-n\fP] [\fB-c\fP] [\fB-C\fP] [\fB-t\fP] [\fB-v\fP] [\fB-T\fP \fIsecs\fP] \fIhandle\fP .fam T .fi .SH DESCRIPTION The \fBipw\fP program attempts to obtain the most relevant IP address registration record for a given IP address. .PP It does so by trying each of several major WHOIS servers, in turn, until it finds a relevant record. .PP The WHOIS servers that are consulted for IP address registration records are: .PP .nf .fam C whois.arin.net whois.ripe.net whois.apnic.net whois.aunic.net .fam T .fi If any of these contains a relevant registration record for the given IP address, that record will be printed to stdout. .PP By default, the entire registration record is printed to stdout, unless any combination of the \fB-a\fP, \fB-n\fP, or \fB-t\fP options are given; in which case only the specific information requested is displayed. .PP If the case of ARIN registration records, if there are multiple registration records covering address ranges which include the given IP address, then the record relating to the numerically smallest such IP address range is selected and then printed to stdout. .PP Note that ``\fIhandle\fP'' may be prefixed with "ARIN:", "RIPE:", "APNIC:", or "AUNIC:" (case sensitive) in order to manually select a whois server when searching by nic \fIhandle\fP. Normally, each of the whois servers is consulted consecutively until a match is found for a given nic \fIhandle\fP, because a \fIhandle\fP by itself does not include enough information to automatically select the most appropriate server. These prefixes are included in the output generated by the \fB-n\fP option. .PP The \fB-a\fP option selects IP address range mode. In this mode, the smallest enclosing address range is printed to stdout, rather than the entire registration record. .PP The \fB-n\fP option selects nic-\fIhandle\fP mode, where the "\fIhandle\fP", or name, for the specified netblock is printed to stdout. .PP The \fB-N\fP option also selects nic-\fIhandle\fP mode, but generates a prefix to the \fIhandle\fP that indicates which registry the \fIhandle\fP belongs to (see above). .PP The \fB-c\fP option selects contacts mode. In this mode, the relevant contact E-mail addresses are printed to stdout, rather than the entire registration record. .PP If there is more than one contact E-mail address in the relevant registration record, then sequential addresses will be separated by a comma and a space on stdout. .PP The \fB-C\fP option is just like the \fB-c\fP option, except that the block contact E-mail addresses are output one per line, rather than all on a single line separated by commas. .PP The \fB-t\fP option is present only for reasons of backward compatability. It has the exact same effect as the \fB-c\fP option described above. .PP The \fB-T\fP option may be used to adjust the timeout period (in seconds) used when attempting to connect to the various WHOIS servers. .PP The default timeout used when no \fB-t\fP option is specified is 0, which is treated as actually representing infinity (i.e. no timeout). Note however that the underlying TCP protocol may generate a timeout in some cases. .SH NOTES A valid Internet hostname may be given in place of the IP address argument, in which case that hostname will be looked-up using DNS and the registration record search will be applied to the first registered IP address associated with that hostname. .PP There are many valid IP addresses for which no relevant registration records exist. For example, addresses in the 10.0.0.0/8 address block and addresses in the 192.168/16 address block have no relevant registration records. There are many other such ranges. .PP Ideally, when the input is an ARIN, RIPE, or APNIC \fIhandle\fP, we should check to see if it has a prefix or suffix that might tip us off as to which of these three registries we should look up the \fIhandle\fP in first. Normally, we will attempt lookups in ARIN, then RIPE, and then APNIC, but the following \fIhandle\fP suffixes and prefixes could help us to avoid many pointless lookups: .PP RIPE suffixes and prefixes: .PP .nf .fam C *-RIPE *-NO AT-* SE-* FR-* DE-* IT-* RU-* SK-* .fam T .fi APNIC suffixes: .PP .nf .fam C *-AP *-JP *-AU (Data actually in the AUNIC!) *-TW *-CN *-NZ *-TH *-MY *-MN *-ID *-HK *-SG .fam T .fi .SH RETURN VALUE Ipw will exit with a zero (0) status code if all goes well, or with a one (1) if no relevant registration records for the given IP address were found, or two (2) if there were any sort of internal or communications errors. .SH VERSION 3.3a .SH AUTHOR Ronald F. Guilmette .PP Contributions by Marty Bower .PP mjhb $Id: ipw.c,v 1.13.2.9 1999/02/04 06:41:13 marty Exp $ .SH COPYRIGHT Copyright (c) 1998 Ronald F. Guilmette; All rights reserved. --JYK4vJDZwFMowpUq-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message