tlf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tlf-devel] change ip addres tlf binds to?


From: Eric Tamme
Subject: Re: [Tlf-devel] change ip addres tlf binds to?
Date: Wed, 26 Sep 2018 13:40:05 -0400 (EDT)

I've done a quick change which I think will add the ability to configure the IP via a config directive.  Can you guys eyeball the diff and see if it makes sense, or if I have missed anything major?


https://gist.github.com/etamme/5fab0f3c13717322b3abb85e8acea28f


-Eric / KK0ECT

On September 26, 2018 at 1:04 PM Hegedüs Ervin <address@hidden> wrote:


Hi Eric,


On Wed, Sep 26, 2018 at 12:16:57PM -0400, Eric Tamme wrote:
Hi Tom,

I guess my confusion lies in the fact that, there is no way to
specify the bind ip for the socket server to listen on.

you're right.

Tlf (and nothing more) can't run more services on same ip:port.

You can check the source:

src/lancode.c:

106 int lanrecv_init(void) {
107 if (lan_active == 0)
108 return (1);
109
110 bzero(&lan_sin, sizeof(lan_sin));
111 lan_sin.sin_family = AF_INET;
112 lan_sin.sin_addr.s_addr = htonl(INADDR_ANY);
113 lan_sin.sin_port = htons(resolveService(default_lan_service));
114 lan_sin_len = sizeof(lan_sin);

only one receiver exists in one Tlf instance, and the receiver
socket is unconfigurable, as you can see. The address will be
0.0.0.0 (INADDR_ANY), port will be the default_lan_service (which
declared above of this part of code:

66 /* default port to listen for incomming packets and to send packet to */
67 char default_lan_service[16] = "6788";


so, I'm afraid you can't use more Tlf instances on same node
_if_you_want_ to connect the nodes. I think there isn't other
restriction.


73, Ervin

reply via email to

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