QuakePing 1.1
by Len Norton (len@cc.gatech.edu)

I started this little program so I could identify computers on our campus
network running Quake servers.  I realized that other people might find it
useful, so I cleaned it up a bit and added more options.

To use this program you need to be using some version of unix.  So far, I
know it works on SunOS, Solaris, and Linux.  You need to have gunzip to to
uncompress the tar file.  It will only work on TCP/IP networks, ie. Internet. 
It won't work on IPX networks.  There is a think called qsniff for that.

To install this program...
First, type "gunzip qping11.tar.gz"
Then type "tar xof qping11.tar"
Then type "make"
If you get errors, edit the Makefile, and remove the comment symbol "#"
at the part that starts with "LIB="   Now type "make" again.
Hopefully you got a program called "qping" in your directory.

Usage:
qping [-h] | [-r retries] [-t timeout] [-f serverlist | [host [port]]]
-h   displays more detailed description of options
-r   sets the number of retries, or how many server query packets are sent to
     the prospective Quake server.  3 is the default.
-t   sets the timeout, or how long the program waits for a response after all
     the query packets are sent.  3 seconds is the default.  Setting it
     to 0 seconds will cause the program to wait indefinitely.

-f   reads a file containing a list of server hostnames.  Each server should
     take one line, starting with the server name, followed by the port,
     which is optional.  Comments can appear anywhere but must start with
     the `;' or '#' characters.  Example of a valid server list:
     quakeserver1.here.com 
     quakeserver2.there.com 26001  ; this one uses a non-default port
     quakeserver3.anywhere.com ; uses the default port

host is the hostname.  If left out, qping reads hostnames from standard 
     input, in the same format as used with the -f option.
port an optional parameter to host, it is used for Quake servers that aren't
     running on the default port of 26000.

qping returns 0 on success (at least one server was found), 1 on failure
(no servers were found), and 2 on an error

ToDo list:
Right now it only supports integer seconds for the timeout.  I'd like to 
be able to use fractional seconds.
Clean up ugly code.
Port to DOS.

You may freely distribute this program, provided you include this text 
file and the source with any compiled binaries.  You may use this code as 
well, but if you distribute any derivative works, I must get some credit for 
it in both the applicable source files and the documentation.

Oh yea, I got the format for the server query request and response from
Damian Frank's qsniff program.  It is sort of like this program, but it
works over IPX networks.  You can get it on ftp.cdrom.com in the directory
containing Quake utilities.  Thanks Damian! 

I've compiled this program on SunOS 4.1 and Solaris 2.4 using gcc.  I've
heard it will work on Linux.  I'd appreciate any comments or bug reports. 
Mail to len@cc.gatech.edu

Note that this program was written for the test version of Quake released
in March 1996.  It may not necessarily work with future releases.
