RE: NSHost and the IP addresses ...
RE: NSHost and the IP addresses ...
- Subject: RE: NSHost and the IP addresses ...
- From: Matthew Harrison <email@hidden>
- Date: Thu, 27 Jun 2002 11:09:42 +0100
I have a similar problem. /etc/hosts has localhost/127.0.0.1,
but the network address is assigned by DHCP. Java picks this up,
but I'm not sure how to get the network address (unix code that I'm not
going to port to Cocoa,
uses gethostname() and gethostbyname() and it only returns the loopback
address)
>
-----Original Message-----
>
From: Guido Neitzer [mailto:email@hidden]
>
Sent: 27 June 2002 10:47
>
To: email@hidden
>
Subject: NSHost and the IP addresses ...
>
>
>
Hi.
>
>
I have a problem with NSHost. On one machine in our network
>
the method:
>
>
[[NSHost currentHost] addresses];
>
>
always returns 127.0.0.1 - but the box HAS a fixed IP. So,
>
what is the
>
best way to get the IP-Address of the box? I need it to
>
create a port
>
command for an ftp-client.
>
>
>
cug
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.