The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: xplSettings




---- Original Message ----
From: Tom Van den Panhuyzen <tomvdp@xxxxxxx>
Sent: Wed, 8 Dec 2004 19:39:16 +0100
To: ukha_xpl@xxxxxxx

>
> Hi Mal,
>
> On Wed, 8 Dec 2004 17:08:19 -0000, Mal Lansell
<mlansell@xxxxxxx> wrote:
> > I'm refining my C++ lib at the moment, and want to include the
support for
> > multiple network cards and IP filtering that's been discussed
recently.
> >
> > I took a look at the xplSettings app, and have some questions:
> >
> > 1) Why is there a configurable broadcast address?  I though the
broadcast
> > address was always 255.255.255.255
>
> There must have been a demand for this, because it was already present
> in the xplhub for .net V2.5.  Probably John can answer this.

There are a couple of reasons for this:

1. If you have no network interfaces in your PC at all (e.g. you use
dial-up or something) and your only IP interface is the loopback one, then
broadcasting to 255.255.255.255 doesn't work, so you need to broadcast to
127.0.0.1.

2. If you have several networks on your PC that use different subnets, you
may wish to broadcast to a limited address, e.g. 192.168.1.255, rather than
to all subnets as would otherwise be the case if you were using
255.255.255.255.

> > 2) How are multiple listen-to addresses set?  Is it a comma
separated list?
> > I presume this will eventually be a more sophisticated type of
GUI to
> > prevent format errors?

Yes, it's a comma-separated list, and yes, I do intend to refine the UI to
make it more user-friendly.

You can also use special values of "ANY" and
"ANY_LOCAL".

> >
> > 3) What is the third item for (to me the description means the
same thing as
> > item two)

2. "Listen for xPL messages on these IP addresses" determines
which IP addresses your app should bind.
Either ANY_LOCAL, or a specific address.

3. "Listen to xPL messages from these addresses" determines which
hosts on the network you should listen to traffic from.
Values are either ANY, ANY_LOCAL, or a comma-separated listo f IP
addresses.
I don't think partial addresses are supported, e.g. 192.168.*... though I'm
sure Tom can confirm this.

>
> I don't have nor could find "xplSettings" but I guess your
talking
> about ListenOn and ListenTo addresses.
> ListenTo restricts which source IPs the app should accept packets
from.
> ListenOn is the IP address the app should listen on for incoming
traffic.
>
> ListenOn and ListenTo are configurable via registry settings in
> [HKLM]/Software/xPL/ListenOnAddress
> [HKLM]/Software/xPL/ListenToAddresses
>
> Possible values are:
> ListenOnAddress: "ANY_LOCAL" or a specific IP address.
> ListenToAddresses: "ANY", "ANY_LOCAL"  or a list
of specific
> comma-separated IP addresses.

xPLSettings.exe is the GUI for setting these values - available from:
http://www.xpl.myby.co.uk/downloads/utils/xplsettings.zip

Though as indicated earlier, it's in need of some refinement to prevent
user errors.

> > 4) Don't we also need an option for specifying which local IP to
use in
> > heartbeat messages?
>
> This is how I have currently implemented it:
>
> if (ListenOn = ANY_LOCAL) or (ListenOn is not a local IP)
>  then take the first local IP (but not the loopback)
> else
>   take the ListenOn address

This seems to work fine for me.

> > 5) Have we agreed that the default is to listen to messages on
all IPs, as
> > we do now?
>
> That is how I understood it...

Yep, me too.

> > Finally, Tom, what is the name of the mutex your V3 hub uses?
>
> The mutex is named "xPLHub".
>
> But before you start implementing this, maybe we should first have a
> poll about this "hub in the lib" thing.  (I leave that up to
John who
> has taken the lead in this.)

OK... I'll post in a separate thread shortly.

Regards,

John




xPL Main Index | xPL Thread Index | xPL Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.