.\" ################################################################## .\" ############# Copyright (C) 1996-2001 Stenio Brunetta ############ .\" #################### See COPYRIGHT for details ################### .\" ################################################################## .\" .\" Process this file with: .\" groff -man -Tascii asp.1 .\" .\" $Id: asp.1,v 1.31 2001/01/23 11:20:01 ste Exp $ .TH ASP 1 "February 1997" Linux "User Manual" .SH NAME asp \- find an host .SM IP address by its name .SH SYNOPSIS .BR "asp " [ "-uv" "] [" "-f" " | [" "-d " .IR dir ] .RB [ "-e" .IR ext ]] .RB [ "-a " .IR addresses ] .RB [ "-r " .IR repetitions ] .RB [ "-s " .IR send_delay ] .RB [ "-w " .IR wait_time ] .RB [ "-p " .IR port ] .I hostname .br .B "asp -V" .SH DESCRIPTION .B Asp finds the .SM IP address of an Internet connected host. In order to find it, the peer .I hostname (not the FQDN), and the range of its possible .SM IP addresses need to be specified. Those .SM IP addresses could be simple .SM IP addresses as 127.0.0.1 or "metaip" addresses as 127.0.0.1-20 or 127.0.0.*: the former is a simple way to avoid to type a lot of consecutive addresses, the latter is short for 127.0.0.1-254. .PP In order to simplify the management of the associations between hostnames and addresses, .B asp searches in a specified directory a text file containing the possible .SM IP addresses of the looked for host. The name of the text file has to be formed by the .I hostname followed by an optional extension of your choice. .PP For example to find the author's dynamic .SM IP address, obviously if I am on line, you can provide my metaip address on standard input with the command: .PP .RS echo "195.31.186.1-62 .br 194.166.58.2-18" | asp -f atomic .RE .PP or you can put my metaip address in a file called .I atomic in your .I ~/.asp directory, like this: .RS .PP echo "195.31.186.1-62 .br 194.166.58.2-18" > ~/.asp/atomic .RE .PP and then you can simply do: .RS .PP asp atomic .RE .SH OPTIONS .TP .B -u Update the file .I /etc/hosts with the .SM IP address of .I hostname or delete the possible old entry if the address is not found. Obviously the file have to by writable by the user. .TP .B -v Include more verbiage to make output readable by humans. Default consists only of dotted quad .SM IP address, which is intended for output substitution in scripts. .TP .B "-f" Force the reading of addresses from standard input instead that from the .IR hostname 's file. .TP .BI "-d " dir .br Set the directory containing the addresses file referred by .I hostname to .IR dir . Default is .IR ~/.asp . .TP .BI "-e " ext .br Set addresses files extension to .IR ext . Default is no extension. .TP .BI "-a " addresses .br Set the number of queries to send before make a pause of .I send_delay seconds. Default is 12 queries. .TP .BI "-r " repetitions .br Set the number of times to try the same address. Default is 3 times. .TP .BI "-s " send_delay .br Delay the sending of the next group of .I addresses .I send_delay seconds. Default is 2 seconds. .TP .BI "-w " wait_time .br Wait the peer reply for .I wait_time seconds. Default is 5 seconds. .TP .BI "-p " port .br Specify an alternative .I port number. For default the port number is obtained searching the asp entry in .IR /etc/services . .TP .B -V Show version information. .SH ENVIRONMENT .TP .B ASPCMD This variable could be used to store your preferred settings. An option set in this environment variable could be overridden or toggled from command line. .SH BUGS .SM UDP is an unreliable protocol, therefore there is a chance you will not find the host even if it is on line. Anyway, if you are sure that the peer is on line and asp aware, you could adjust the various parameters until you get a reply. At last you will find the correct settings for your particular needs. This until the .SM RDM communication style will be implemented under Linux. .P Obviously the .I hostname has to be unique among the possible .SM IP addresses: .B asp will hook to the first correct reply. .SH AUTHOR Stenio Brunetta .RE .PP Comments and suggestions are welcome. .SH ACKNOWLEDGMENTS Steven N. Hirsch for v1.3 bug fix and for the verbose option. .br Colin Phipps for the tmpnam security issue. .SH "SEE ALSO" .BR aspd (8).