Netdb

Overview

edit

Netdb is an unit DNS resolving under *nix, grouped in the larger fcl-net package. It forms the basis of FCL level DNS resolving which is truly platform independent.

After being broken for a while, after 1.9.8 some serious fixes were made, and the IPV4 calls should be in at least usable form for FreeBSD/Linux/Darwin on x86 and PowerPC.

The most common misconception about netdb is that gethostbyname is a direct alternative for the libc call with the same name (which resolves a host). However, the netdb call gethostbyname really only checks /etc/hosts, and netdb resolvename only checks the DNS servers listed in /etc/resolv.conf.

This has the following consequences:

Note that fcl-net also contains a straight libc using resolve header, cnetdb since FPC 2.2.4.