Vanilla List Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [VANILLA-LIST:2724] Metaserver howto?



Quoting Quozl <quozl@us.netrek.org>:
> On Fri, Nov 05, 1999 at 01:55:33PM -0600, Bob Tanner wrote:
> > You beg the almight people at metaserver@us.netrek.org to add you to the 
> > list. And if you are worthy they grant you the priviledge of being listed.
> 
> I think Bob is joking.

> Yes, you can be listed by the metaserver@us.netrek.org guys, but first
> the .metaservers technique should work.  In the server source, in the
> docs directory there is a Metaserver How-To.  Have you read that?

The HOWTO in the latest tarball is a bit incorrect, I believe.  The
corrected version is attached below.

> The server source won't flood the metaserver unless you list the same
> metaserver more than once in the .metaservers file.  No matter what
> timing values you place in the .metaservers file, the server source
> (if unchanged) will force it within the limits.

"Flooding" can still happen, though.  MIN_UREAD_TIME/META_MINIMUM_DELAY
is the same in both scan.c (meta) and solicit.c (ntserv) (60 seconds).
If, in a 2 packet sequence, the first packet takes longer to get to
the metaserver than the second packet, it fails the MIN_UREAD_TIME
check. I'll offset one of them by a second or two to see if it helps.

> I see netrek.flairdata.net on the metaserver.netrek.org now.

Same here.

--Carlos V.
metaserver.us.netrek.org 3521 60 900 this.host.name B 2592 2591 open
metaserver2.us.netrek.org 3521 60 900 this.host.name B 2592 2591 open
metaserver.eu.netrek.org 3521 60 900 this.host.name B 2592 2591 open
Date: Wed, 15 April 1998 09:06:09 +0000
From: James Cameron <cameron@stl.dec.com>
Subject: Metaservers File Format

This is the documentation for how to have a new server solicit the
metaserver for players.

It works like this;

	- you set up a .metaservers file with the addresses of the
	  metaservers that should be kept informed,
	
	- when new players arrive on your server, a packet is sent to
	  the metaservers informing them of the current player count,
	
	- periodically, the metaservers are told about current status.

The format of the file is a series of space delimited fields interpreted
using fscanf().  Very primitive.  The code looks for the file in the
current working directory rather than LIBDIR.  This ought to be fixed.

The order and format of the fields is described in ntserv/solicit.c

    /* data items derived from metaservers file */
    char host[32];          /* address of metaserver (DNS)          */
    int port;               /* port of metaserver                   */
    int minimum;            /* minimum update time                  */
    int maximum;            /* maximum update time                  */
    char ours[32];          /* DNS address of server                */
    char type[2];           /* server type code (B/P/C/H/?)         */
    int pport;              /* server main player port (e.g. 2592)  */
    int oport;              /* server observer player port          */
    char comment[32];       /* comment string                       */

The first address should be a numeric IP address in order to avoid DNS
lookup delay on every new player or solicitation update.  Or place a
host name in your /etc/hosts file that corresponds to the metaservers.

Here is the sample_metaservers file ...

metaserver.us.netrek.org 3521 60 120 this.host.name B 2592 2591 open
metaserver2.us.netrek.org 3521 60 120 this.host.name B 2592 2591 open
metaserver.eu.netrek.org 3521 60 120 this.host.name B 2592 2591 open

Replace "this.host.name" with the DNS host name that you want the
metaservers to list the server under.  If you have a name within the
netrek.org domain, use that.  If the metaserver already lists your
server; use the name that the metaserver has for you.

This will cause the metaservers to be updated with game status
information every minute, subject to the limits in the code.

Beware: informing the metaserver more frequently than the limits define
will cause your server to be delisted from the metaserver automatically.
This is handled by program code at the metaserver.

--
James Cameron                                    (cameron@stl.dec.com)
Digital Equipment Corporation (Australia) Pty. Ltd. A.C.N. 000 446 800