[Opalvoip-svn] SF.net SVN: opalvoip: [18751] opal/trunk
Brought to you by:
csoutheren,
rjongbloed
From: <rjo...@us...> - 2007-10-23 05:36:37
|
Revision: 18751 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18751&view=rev Author: rjongbloed Date: 2007-10-22 22:36:42 -0700 (Mon, 22 Oct 2007) Log Message: ----------- Applied patch 1532406 Binding based on remote address interface selection. Thanks Drazen Dimoti (jimbosimo) Modified Paths: -------------- opal/trunk/include/opal/transports.h opal/trunk/src/opal/transports.cxx Modified: opal/trunk/include/opal/transports.h =================================================================== --- opal/trunk/include/opal/transports.h 2007-10-23 05:10:09 UTC (rev 18750) +++ opal/trunk/include/opal/transports.h 2007-10-23 05:36:42 UTC (rev 18751) @@ -242,6 +242,7 @@ FullTSAP, Streamed, Datagram, + RouteInterface, NumBindOptions }; @@ -269,6 +270,10 @@ binding is made. This is equivalent to translating the address to "tcp$*:0" so that only the overall protocol type is used. + With RouteInterface, the address is considered a remote address and the + created transport is bound only to the address associated with the + interface that would be used to get to that address. + Also note that if the address has a trailing '+' character then the socket will be bound using the REUSEADDR option, where relevant. */ Modified: opal/trunk/src/opal/transports.cxx =================================================================== --- opal/trunk/src/opal/transports.cxx 2007-10-23 05:10:09 UTC (rev 18750) +++ opal/trunk/src/opal/transports.cxx 2007-10-23 05:36:42 UTC (rev 18751) @@ -935,6 +935,14 @@ port = 0; return address.GetIpAddress(ip); + case OpalTransportAddress::RouteInterface : + if (address.GetIpAndPort(ip, port)) + ip = PIPSocket::GetRouteInterfaceAddress(ip); + else + ip = PIPSocket::GetDefaultIpAny(); + port = 0; + return TRUE; + default : port = endpoint.GetDefaultSignalPort(); return address.GetIpAndPort(ip, port); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |