idnlookup

Langue: en

Version: 12 Jan 2006 (mandriva - 01/05/08)

Section: 1 (Commandes utilisateur)

NAME

idnlookup - ICMP domain name resolver

SYNOPSIS

idnlookup [ -ahT ] [ -t timeout ] hostname

DESCRIPTION

idnlookup is a utility to ask an Internet host for its fully qualified domain name over ICMP. If successful, it will print the host's domain name to standard output.

hostname is the address of the Internet host to query. It can be either a symbolic hostname, an IPv4 address in decimal notation, or an IPv6 address in hexadecimal notation. If a symbolic hostname is specified, all its addresses are looked up and tried in order.

The remote host must be running software which can respond to the requests for hostname. To the knowledge of the author, current BSD-based systems can do this in the kernel. Linux systems must, as of this writing, be running icmpdnd(8).

EXIT STATUS

idnlookup will return 0 if the specified host was succesfully queried. If illegal arguments were given, or if the host could, for any reason, not be queried, or if another error occurred, it will return 1.

OPTIONS

-a
Normally, idnlookup will only print the first name that the host returns. This option will cause all names to be printed, one per line.
-h
Print a brief usage message and exit.
-T
Write the time-to-live in seconds that the remote host suggests on the first line, before any names.
-t
Print an error message and exit if the remote host does not reply in timeout milliseconds. The default is 3 seconds. Note that this timeout will apply to all addresses, in case a symbolic hostname resolves to more than one address.

SECURITY

Since idnlookup uses ICMP, it needs to run as root. Normally, it should be installed set-uid root in order for any user to be able to ask hosts for their names. Although the author believes idnlookup to be safe to install as set-uid root, he makes no guarantees.

BUGS

idnlookup does not yet implement domain name decompression, and as such will scream and die at the sight of such names. This is because the author is not sure from which point in the ICMP datagrams the offsets specified in compressed domain names is to be counted. If you have information on this, please mail the author. Until then, this bug will hopefully not pose any large problems, since probably only very few hosts will return more than one name, and then there is little chance to compress it.

Some GNU/Linux distributions still ship with a GNU C library implementation that has a bug in the implementation of getaddrinfo(3), which may cause addresses resolved from a symbolic hostname to be returned in the wrong order (i.e. not consistent with RFC 3484). This will in turn cause idnlookup to try addresses in the wrong order, if the hostname in question triggers the getaddrinfo(3) bug. This will normally not pose a problem, but not too uncommonly, this will cause IPv4 addresses to be sorted before IPv6 addresses. If the remote host listens for ICMP hostname requests only on IPv6 (or if the Internet service provider for the remote host blocks ICMP packets, which is wrong, but unfortunately not all too uncommon), idnlookup will have to time out on the IPv4 address before being able to query the IPv6 address. This bug has been fixed since, but as of this writing, only a few systems run the fixed version of glibc.

NOTES

The ICMP hostname tools also ship with a nameswitch module for ICMP hostname lookups, which can be used to automatically look up hostnames over ICMP when a program calls gethostbyaddr(3) or any related function. See the nss-icmp(7) man page for more information.

AUTHOR

Fredrik Tolf <fredrik@dolda2000.com>

SEE ALSO

icmpdnd(8), nss-icmp(7), RFC 1788