Commit graph

24 commits

Author SHA1 Message Date
Mike Barcroft eade81c941 o Move APNIC flag from -p to -A. Since, -p is usually associated
with specifying a port.
o Add the -p flag for specifying a port.  (PR: 28790)  This is
  useful for querying rwhois servers.  Example:
    whois -h rwhois.exodus.net -p rwhois 216.136.180.0
o Add the -c flag which allows one to get the same whois server
  that would normally be determined if no arguments were specified.
  (Concept based on work by phantom, requested by ache)  Example:
    whois -c ru TCNET-MNT-RIPN
o Deprecate -R flag in favour of -c ru.

PR:		28790
Reviewed by:	-audit, ache, phantom
2001-08-05 19:37:12 +00:00
Mike Barcroft 2c69b9a13e Fix a bug I introduced in Rev. 1.21 that prevented 'whois test' from
working.

Reviewed by:	des
Approved by:	des
2001-07-22 18:23:24 +00:00
Mike Barcroft 197bca2ccf o Add phantom's gethostinfo() function to reduce duplicated code.
o Increase readability by creating a wrapper for asprintf(3).
o Cast isdigit(3) argument to unsigned char for future locale
  changes.

Submitted by:	phantom
Reviewed by:	-audit, des
Approved by:	des
2001-07-20 16:44:44 +00:00
Mike Barcroft 6c56da4a27 Re-write the logic that finds the whois server to query.
[This fixes a bug where one would type 'whois foo.bar.'
and get an error because of the trailing period.]

PR:		28880
Approved by:	des
2001-07-17 20:40:41 +00:00
Dima Dorfman 40682bea9a Implement recursive IP address searches based on the results of a
query to ARIN.

PR:		28426
Submitted by:	Mike Barcroft <mike@q9media.com>
2001-06-27 23:06:47 +00:00
Dag-Erling Smørgrav 9b07a06672 Stylify, ANSIfy, silence warnings, plug a memory leak, don't assume the
server is well-behaved wrt. line endings.

PR:		bin/28082
Submitted by:	Mike Barcroft <mike@q9media.com>
2001-06-22 01:52:37 +00:00
Hajimu UMEMOTO 2c5958aa51 Do retry next entry in addrinfo during connect.
MFC after:	1 week
2001-06-01 13:43:20 +00:00
Poul-Henning Kamp 861c52f1c4 Direct queries for IP numbers to ARIN. It would be nice if we could
send them to APNIC/RIPE intelligently, but we can't at this time so
fallback to ARIN and depend on them telling the user where to look.

Maybe we need a .whoisrc file...

PR:		24707
Submitted by:	Mike Barcroft mike@q9media.com
MFC after:	1 week
2001-05-28 21:37:29 +00:00
Kris Kennaway ad59157a75 Enable whois queries over IPv6
Obtained from:	KAME
2000-07-07 07:52:21 +00:00
Josef Karthauser 4fb3772628 Add braces ({}) to all the places that they're missing. 1999-12-06 21:18:32 +00:00
Josef Karthauser 50bfc34c13 Added a -6 option to lookup information using the whois.6bone.net
database.

PR:		misc/10803 misc/10804
1999-12-05 22:43:36 +00:00
Andrey A. Chernov e64b191d27 Change -i host to whois.networksolutions.com 1999-12-03 16:56:57 +00:00
Andrey A. Chernov 0e98576f36 purity change for name length checking code 1999-11-17 20:51:35 +00:00
Andrey A. Chernov 2053e9a314 Merge with OpenBSD whois (with bugfixes missed there)
New features are:
Automatic lookup using *.whois-servers.net
Recursive lookup using Registrar's name
Fallback to InterNIC for non-domains
-m for RADB database
-Q to turn recursion/fallback off

Obtained from:	OpenBSD
1999-11-17 19:11:51 +00:00
Andrey A. Chernov 036cc89feb Change default to whois.crsnic.net - new Central Shared Registry for domains
Move InterNIC to -i option
1999-11-09 09:01:38 +00:00
Peter Wemm c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Andrey A. Chernov 04d04825cc Add -R for .RU domains 1999-02-02 01:49:14 +00:00
Garrett Wollman 2712c396cb Update the -d flag to use the new .MIL NIC address (from PR 9802)
and add a -g flag to use the new .GOV NIC.  Also convert the
SEE ALSO reference into a proper bibliographic one.

PR:	9802 (in part)
1999-02-01 19:22:27 +00:00
Peter Wemm a60c62a3c0 #include <arpa/inet.h> 1998-06-12 12:55:46 +00:00
Garrett Wollman a00fe97d5a Make it more convenient to query NICs other than InterNIC. Explain in the
man page what each database contains.
1998-02-19 19:07:50 +00:00
Philippe Charnier 741d304e2d Use err(3). 1997-08-26 11:16:08 +00:00
Warner Losh 1c8af87873 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 04:34:07 +00:00
Paul Traina d9fd44dd79 Add support for SOCKS if enabled.
Remove a useless bind() call (why did that ever get in there?)
1996-04-23 06:01:10 +00:00
Rodney W. Grimes 9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00