Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2003:
[Freeciv-Dev] Re: (PR#6707) Announce server on LAN
Home

[Freeciv-Dev] Re: (PR#6707) Announce server on LAN

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: andrearo@xxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#6707) Announce server on LAN
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Sun, 2 Nov 2003 12:47:56 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Sun, Nov 02, 2003 at 10:48:29AM -0800, andrearo@xxxxxxxxxxxx wrote:
> On Sun, 2 Nov 2003, Raimar Falke wrote:
> > On Fri, Oct 31, 2003 at 01:04:05PM -0800, andrearo@xxxxxxxxxxxx wrote:
> > >
> > > Hi everyone,
> > > One of the features I miss in Freeciv is to get a list of servers on the
> > > LAN that the client can connect to, when setting up local games. So I just
> > > had to implement it :)
> > >
> > > It works as follows: The client multicasts an UDP packet to the LAN, with
> > > TTL=4 so that the packet doesn't leave the LAN. The server then get's the
> > > packet, and send a response with it's info. The list of LAN servers in the
> > > connect dialog is updated, just like the list of Metaservers.
> >
> > Nice idea. I have a problem however with the constants. Why TTL=4? Why
> > not 3 or 5?
> 
> Good question.. It depends about how far you want the packet to reach,
> since TTL is decremented every time a packet goes through a router.

> It could probably also be 3 or 5, depending about how you define
> "LAN".

And that is the point. If we hardcode it in the code we have to choose
a good value. A not hardcoded solution would be better. Is this
possible?

> TTL is typically over 100 for global packets.

More in the range of <40.

> > Why a SERVER_LAN_GROUP of 225.0.0.1? Can't this be
> > autodetected somehow?
> 
> The server and client have to be in the same multicast group.

Uhh I overlooked this. I assumed that the patch uses a broadcast. So
what requirements are needed to use multicast? What setup must be done
to enable it? Where do I have to set 225.0.0.1 to join this multicast
group?

> As long as it's a class D IP address, it should be ok. right?

I would agree for a "classical" broadcast. But I have no idea about
multicast.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Reality? That's where the pizza delivery guy comes from!"



[Prev in Thread] Current Thread [Next in Thread]