Hi Francisco, we basically do what you suggest for RTP. But for TCP, we can't do a listen on 0.0.0.0, because it would also include the well known signaling ports. If GnuGk would always listen eg. on 1720 for all IPs, you couldn't run a 2nd GnuGk or not even another endpoint on the same host. Regards, Jan -- Jan Willamowius, Founder of the GNU Gatekeeper Project EMail : jan@xxxxxxxxxxxxxx Website: http://www.gnugk.org Support: http://www.willamowius.com/gnugk-support.html Relaxed Communications GmbH Frahmredder 91 22393 Hamburg Geschäftsführer: Jan Willamowius HRB 125261 (Amtsgericht Hamburg) USt-IdNr: DE286003584 Francisco Olarte wrote: > Hi Jan: > > On Sun, Mar 27, 2016 at 4:38 PM, Jan Willamowius <jan@xxxxxxxxxxxxxx> wrote: > > the technical reason why GnuGk doesn't automatically recognize new > > interfaces is that it listens to each IP bound to your interfaces > > individually instead of listening to inaddr_any (0.0.0.0). GnuGk needs > > to do so to get full control over the IP address used for sending > > messages. > > IIRC there is a trick ( I think I first saw it on ntpd, so UDP, > although I think it works in TCP too ) to react to IP changes and hava > control of the source address. You start with a socket bound to the > wildcard address ( i.e., 0.0.0.0:1719 ), and, when a packet is > received you look at the destination address ( which is your local > address ) and bind another socket to this if needed ( let's say to > 192.168.1.1:1719 ) and use it for replies, and from there to receive > packets. setsockopt(IP_PKTINFO) and recvmsg where needed in the socket > used at the wildcard address, normally with a little layer to hide the > fact that the first acket for a transport address did not come from > the same socket which later was associated with it, and some flags > where needed to have the binding survive interfaces coming up/down, > but the nice thing was that it totally abstracted the details of > interfaces and let you work with just transport addresses. I think > this works in linux, not sure about the other os though. > > Francisco Olarte. ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140 _______________________________________________________ Posting: mailto:Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx Archive: http://sourceforge.net/mailarchive/forum.php?forum_name=openh323gk-users Unsubscribe: http://lists.sourceforge.net/lists/listinfo/openh323gk-users Homepage: http://www.gnugk.org/