Re: [fpc-pascal] Linux: resolving hostnames in local network

2016-04-23 Thread Andreas Klausmann
Thanks, cnetdb.gethostbyname() works fine (at least on my raspberry). :) Creating a wrapper function is recently my work-around for an actual ping component (since linux doesn't seem to have a corresponding component like ping.dll and I want to ping as non-root) Am 23.04.2016 um 12:42 schrieb

Re: [fpc-pascal] Linux: resolving hostnames in local network

2016-04-23 Thread Graeme Geldenhuys
On 2016-04-23 10:23, Andreas Klausmann wrote: > Testhost is reachable from console by hostname: ping testhost.local -> > success (resolved in background by avahi) Not sure, but you could always create a wrapper function or class around the OS 'ping' command, or nslookup. Read the program results

Re: [fpc-pascal] Linux: resolving hostnames in local network

2016-04-23 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: > You will need to use the C library routines for this. (which is in unit cnetdb in somewhat recent FPC's) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Linux: resolving hostnames in local network

2016-04-23 Thread Michael Van Canneyt
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

[fpc-pascal] Linux: resolving hostnames in local network

2016-04-23 Thread Andreas Klausmann
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