dlz dlopen driver

[email protected] Mon, 6 Dec 2010 17:58:10 +1100
Newsgroups gmane.network.dns.bind9.dlz
Message-ID <[email protected]>
Hi All,

I've been working with the bind9 developers on better integration
between Samba4 and bind9. As part of that I have proposed a set of
patches:

  http://samba.org/tridge/bind9-patches/

Included in the patches is a new dlz driver which allows for an
externally build dlz module to be used, like this:

dlz "example zone" {
	database "dlopen /some/path/module.so OPTIONS";
};

I'm hoping this driver will be integrated into a future release of
bind9.

Samba4 can make use of this patch using a new dlz_bind9.so module. The
code for that module is here:

  http://git.samba.org/?p=tridge/samba.git;a=blob;f=source4/dns_server/dlz_bind9.c

That module uses the Samba4 AD database to export a full AD DNS
database via bind9.

A dlopen dlz driver is very similar to a in-tree dlz driver, except
for the following differences:

 1) the functions are found using dlsym(). The symbol names are:
     dlz_version, dlz_create, dlz_destroy, dlz_loopup, dlz_findzonedb,
     dlz_allowzonexfr, dlz_allnodes

 2) most of these functions are just the familiar ones from other dlz
    drives. There is one new function, dlz_version(). That new
    function allows for the dlopen dlz driver to check that the module
    has the same API version. It also allows the module to set the
    THREADSAFE flag if applicable (the flags can't be set at init
    time, as the module is not loaded at that point).

 3) the dlz_create() function also takes additional va_arg arguments
    that give named helper functions, which is how the driver avoids
    linking issues, and allows the external drivers to be built
    without access to the bind9 source tree. There are currently 3
    helper functions passed:
       log:  a logging function
       putrr: the dns_sdlz_putrr() function
       putnamedrr: the dns_sdlz_putnamedrr() function

One of the main aims for this driver was to allow external modules to
be built without access to the bind9 sources. This is important for
us as it will allow Samba to have a separate release schedule to
bind9, while incorporating improvements in the dlz module.

What I'm looking at now is extending dlz to suppory dynamic
updates. I'll send a message to the list if I get that working.

Cheers, Tridge



------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d