Reason for separate libdns and libisc "export libraries"

Danny Mayer mayer at
Sat Nov 20 14:03:30 UTC 2010

On 10/11/2010 8:01 AM, Adam Tkac wrote:
> Hello all,
> I would like to ask you for the reason why there are separate versions
> of libdns, libisc & friends, called "export libraries" in BIND 9.7
> series.
> If I understand correctly those export libs are supposed to be used
> from non-BIND9 applications and some methods are lightweight compared
> to full-featured BIND9 versions. In my opinion it's good idea to offer
> two versions of certain methods. However I don't understand why those
> methods need to be in separate library and, which is even worse, this
> library has the same name as full featured BIND9 lib. It is the best
> way to various run-time issues, like unresolved symbols. Another issue
> is that utility (which is used to determine CFLAGS,
> LDFLAGS etc) has no support for this dual-library setup.
> In my opinion export libs and standard libs should be merged together
> or should be renamed (for example to I must note
> rename is probably worse case because dynamic linker can randomly
> pick methods with same name from or from
> I think the best solution is to merge two libs into one and select
> methods via preprocessor flag (-DBIND9). The merged library will
> look like:
> isc/namespace.h:
> #ifdef BIND9
> #define isc_something isc__something
> #endif
> isc_something
> isc__something
> So there will be no runtime issues. May I ask you if you can change
> current dynamic libraries setup somehow? I can prepare the patches,
> if you are interested.
> Regards, Adam

Noone seems to have responded to you on this, so I thought I should.

Contrary to what you think, these libraries are really designed for
BIND9 usage. The libraries are designed to separate different functional
areas. The libisc library are basically a generic set of functions which
operate as a layer between BIND9 and the O/S and allow almost all of the
O/S specific behaviors to reside there but are not meant to have
anything to do with handling dns-specific areas. That's in the libdns
library and is specifically designed to deal with managing dns. The only
library that might be used with a non-BIND9 implementation is the
liblwres library but that's the only one. We have pulled some of the
libisc library into NTP because it's helpful in a number of areas. The
libraries are pulled into building different binaries, named, dig,
dnssec-keygen, etc. as needed. It would be a really bad idea to merge
everything in one library.

I really don't expect the libraries to be used outside of BIND9 with the
possible exception of libisc and liblwres. What would you expect to use
them for? The library that is usually used for linking with external
applications is libbind and that has now been packaged separately.

BTW, this question really belongs in bind-workers rather than bind-users.


More information about the bind-users mailing list