hldsfw
Barry Alcock <alcockba@educk.globalnet.co.uk>
18/Jul/2000

================================================================================
This software is distributed under the GNU Public License V2 and comes with
no warranty what so ever.
================================================================================


Release History
===============
v2.00 - 18/Jul/2000
-------------------
Re-wrote the whole thing from scratch with many improvements. See below
for a full feature list.

v1.00 - 12/Oct/1999
-------------------
First release. Just did blind packet forwarding between the clients and
the servers.


Overview
========
This simple program listens for a "what games are running?" broadcast by
the HalfLife client when starting a LAN game. Using the details in the
config file it sends out resplies telling the client which servers are
running and the address/port that each can be found on. 


Features
========
* Listens for a request and sends the replies based on the config file
* Better config file format
* Builds the reply packets itself
* Keeps stats on requests serviced
* Puts messages in the syslog
* Hopefully fixes a non-responsiveness bug when under heavy load


Quick Installation
==================
1. Copy hldsfw into your hlds directory
2. Make a config file (described below)
3. Run it


Details
=======
Under normal conditions you'll probably be running just the one HalfLife
server. In this case the server listens on all available interfaces
(0.0.0.0) on port 27015. When the client broadcasts to 255.255.255.255
on port 27015 it all works ok since 0.0.0.0 will pick up the request.

What about when we run multiple servers on the same box? There are a few
ways of doing this. Each with problems that have to be overcome.

Method 1: Change the listening port number
------------------------------------------
hlds_run -nomaster -game g -port p +sv_lan 1 +maxplayers m

This has the problem that only a game running on port 27015 will be
detected by the client.

Method 2: Change the IP address
-------------------------------
hlds_run -nomaster -game g +ip n.n.n.n +sv_lan 1 +maxplayers m

Ok, this is listening on port 27015, but only servers with an IP address
of 0.0.0.0 or 255.255.255.255 will receive the broadcast. 

Method 3: Change the IP address and the port
--------------------------------------------
hlds_run -nomaster -game g -port p +ip n.n.n.n +sv_lan 1 +maxplayers m

This has the problems of both methods 1 and 2.

Solutions
---------
The two solutions to these are to:
1) Setup gamespy on every client. Hmmm, bags of fun to be had there.
or
2) Use this util. A quick one-off installation.


Config File
===========
Since v1.00 both the format of the file and its default location have
changed. The default location is now "/usr/local/halflife/hldsfw.conf".
Quite a few people mentioned the location of the config file in the
e-mails I received. As well as relocating the file the -c command line
option has been added. The parameter to -c specifies the config file to
use. If you'd rather not use the -c option. the location can be changed
as before with the CONFIG_FILE define in "hldsfw.h".

The format of the file is pretty much like 'C'. For descriptions of the
possible values see the example config file "hldsfw.conf".


RedHat Users
============
I would suggest installing the "hlds" script into /etc/rc.d/init.d/ and
making a symbolic link to it in /etc/rc.d/rc3.d/.

Change the HLDS_HOME and HLDS_CONF environment variables to suit your
installation.

Make the directory /var/log/hlds for the server logs or change the LOGS
environment variable in the script for no logs.


Known Bugs
==========
None at present. Please let me know if you find any.


Future Plans
============
It was supposed to be in this release but I ran into problems and don't
have the time to go through my code right now. Anyhow in the next
release hldsfw will be able to execute hlds_run and re-execute it when
it crashes.


Credits
=======
Matt D	- Useful comments and load testing. If you're in Oz check out
	  http://lanparty.com/valhalla.


================================================================================
This software is distributed under the GNU Public License V2 and comes with
no warranty what so ever.
================================================================================
