I need to resolve a hostname to an IP address, to pass to a minimal telnet implementation that expects that as its parameter. The reason that I'm not using something "industrial grade" like Synapse is that I'm trying to restrict myself to standard libraries so that I can ship sources to people who have no FPC experience, making the program both useful and a good demonstration of the development tools.

If I use THostResolver.NameLookup I find that it can convert a fully-qualified name but not one where the domain is omitted, I notice that the README specifically says that resolv.conf isn't fully parsed. Unfortunately I find (2.6 on Debian "Squeeze") that GetDomainName returns nothing useful- I've not yet investigated whether that's down to a particular development system but if it happens to me it might happen to others.

In short, how best should I work around this?

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to