cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Implementing CURLOPT_INTERFACE on Windows

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 7 Aug 2003 20:19:24 +0200 (CEST)

On Thu, 7 Aug 2003, Mike Cherepov wrote:

> Trying to bind to a particular local IP with CURLOPT_INTERFACE
> on a Win2k box I get CURLE_HTTP_PORT_FAILED upon connect.
> No mistake there: bindlocal() works only for
> #if !defined(WIN32)||defined(__CYGWIN32__).

Right. I personally have no clue on why this doesn't work on windows or what
it takes to make it work.

> I'd like to do it. Any clues on the extent and nature of Windows'
> disability in specifying a local port? Any comments on effort to implement
> this, workarounds, and such?

I would suggest that you remove the #ifdef and try compiling it. Then you take
one problem at a time and fix them. The Curl_if2ip() part (that converts from
a unix network interface name to IP adress) can probably be left as it is
today: not working on windows.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-08-07