On Wed, Oct 6, 2010 at 7:55 AM, Sven Barth <pascaldra...@googlemail.com> wrote: > You'll only find "127.0.0.1" for my computer there... I don't think that > this is a very good solution.
Oh well. That makes sense b/c these are servers that I have obtaining the same IP over DHCP. On clients when DHCP is being used with dynamic IPs the host file may not be of much use or may require more parsing for the host name. But from a file based solution you just need to read in the /etc/hostname file. That is the name of the box. With the host name, ust search the /etc/hosts file for the IP matching that name. It's similar to the ifconfig command with parsing of eth0 which by the way if there are more than 1 nick, could be problematic. Is there an Gnome or KDE API we could use to officially get NIC related info like iphlpapi.dll API under Windows? _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal