cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: ip address for ftp-port command

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 25 Jul 2002 15:30:15 +0200 (MET DST)

On Thu, 27 Jun 2002, Guido Neitzer wrote:

> I have a problem with libcurl (v 7.9.5) on my Mac OS X box. For some
> servers I need to use non-passive ftp, so libcurl has to determine the
> ip address of my box. With '-' it gets 127.0.0.1 - not so nice. I get
> the same result when using [[NSHost currentHost] address] to get the
> ip of this box.

Probably because it uses more or less the same way of obtaining the address.

> We have only one system with this behaviour - I think it's a problem
> that this system has no FQDN and no DNS-entry, all other systems have
> this.

curl will try to figure out your system's default name and then resolve that
to an IP address to use. If that ends up 127.0.0.1, then that will be used.

> But what can I do? I found a way to get all IP addresses for all
> installed interfaces including the loopback interface - but which
> should I use? Is there any "correct" way to do this?

You should specify the proper network interface name to the option so that
it'll pick the correct one.

-- 
  Cheers,
  Daniel Stenberg
-------------------------------------------------------
This sf.net email is sponsored by: Jabber - The world's fastest growing 
real-time communications platform! Don't just IM. Build it in! 
http://www.jabber.com/osdn/xim
Received on 2002-07-25