[Top][All Lists]

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

[Linphone-developers] [patch] better local ip detection routine in LAN c

From: Mike Frysinger
Subject: [Linphone-developers] [patch] better local ip detection routine in LAN cases
Date: Fri, 26 Oct 2007 15:04:53 -0400

if you run linphone on a LAN that has no sort of routing set up, then
the attempt to autodetect the outgoing IP address will fail miserably
and linphone falls back to just "" which is pretty useless.
the attached code uses the POSIX function if_nameindex() to enumerate
the available interfaces on the machine and then the Linux ioctl
SIOCGIFADDR to get the ip address associated with the specified
interface.  if someone knows of a POSIX equivalent to this ioctl, i'm
all ears ;).  so now linphone defaults to the first non-loopback
interface that contains a valid ip address in the case of autodetect
enabled and running on a non-external routable network.

the patch was tested against linphone-1.6.0 but it applies cleanly to 1.7.1.

Attachment: linphone-1.7.1-network-detect.patch
Description: Text Data

reply via email to

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