On Sat, 23 Apr 2016, Andreas Klausmann wrote:

Hi,
how can I resolve hostnames in a local (private) network under linux?
Both gethostbyname() and THostResolver work fine for google.com etc, but
not for local hostnames like testhost.local.
Testhost is reachable from console by hostname: ping testhost.local ->
success (resolved in background by avahi)

gethostbyname() works fine under Windows even for LAN resolution
(resolved in background by Netbios name service).

Currently I'm working on Ubuntu 15.10 on a raspberry, fpc 3.0.

You will need to use the C library routines for this.
The FPC native implementation does not work with avahi or local DNS caches.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to