Skip site navigation (1)Skip section navigation (2)
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>

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

--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 <rfg@monkeys.com>
.PP
Contributions by Marty Bower <marty@mjhb.marina-del-rey.ca.us>
.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




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