Changes to UDP Netrek client to support trekhopd (and gw)
Updated 16-Mar-94

*** NOTE: BRM3, BRMH, and COW clients already have the correct trekhopd
stuff included (but you should check to see if its the latest version).  In
that case all you need to do is compile it with the appropriate flags
(add -DGATEWAY -DTREKHOPD to the configuration, in whatever manner is
appropriate) and drop the .trekgwrc in your home directory.  The BRMH v1.7
stuff was a bit old; see the patch here.

The Berkeley client (a/k/a Mehlhaff client) appears to have the trekhopd
stuff installed, but it's both out of date and broken.  Replace it with
the stuff here.

*** IMPORTANT: if you build a client with trekhopd stuff included and you
want it to be RSA-blessed, you MUST include "trekhopd" in the client
description.

Basically, you need to add -DGATEWAY and -DTREKHOPD to your Makefile (or just
-DGATEWAY if you're only using a simple program like "gw") make some changes
to socket.c, and use a new copy of netrek/main.c.  If you want to use a
blessed client, you will also need a modified copy of netrek/reserved.c,
which I'm not going to provide.  Changing the RSA reserved.c is easy enough,
and rsa_key.c is included.

You will need a host definitions file called .trekgwrc; there's a sample
one included.  It should go in /usr/local/games and/or in your home directory.

In netrek/socket.c, you need to add the code that appears between the TREKHOPD
#ifdefs into the routine callServer().

In netrek/reserved.c and netrek/rsa_key.c, you need to replace the server
addr with "netaddr".  A sample rsa_key.c is included.  This one will work with
RSA v2.0.  The changes you'll have to make to reserved.c are trivial; see
the "reserved.c.changes" file.

Finally, you will need the replacement netrek/main.c.  I have supplied them
for bronco, BRMH, and Berkeley clients.  Besides the stuff in the obvious
#ifdefs, you need to move the part which retrieves the login information up
above the part which connects to the server; otherwise, trekhopd won't get
a login name.

[ The code in these sample files is rather old, since I don't use these
clients anymore and can't test changes.  If you want to add it to a
different client, start with the "brmh.main.c", which is fairly recent. ]

