62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Huntdlz-bdbhpt-dynamic
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt==================
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan HuntA Bind 9 Dynamically Loadable BerkeleyDB High Performance Text Driver
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan HuntSummary
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt-------
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan HuntThis is an attempt to port the original Bind 9 DLZ bdbhpt_driver.c as
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Huntfound in the Bind 9 source tree into the new DLZ dlopen driver API.
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan HuntThe goals of this project are as follows:
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt* Provide DLZ facilities to OEM-supported Bind distributions
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt* Support both v1 (Bind 9.8) and v2 (Bind 9.9) of the dlopen() DLZ API
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan HuntRequirements
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt------------
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan HuntYou will need the following:
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt * Bind 9.8 or higher with the DLZ dlopen driver enabled
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt * BerkeleyDB libraries and header files
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt * A C compiler
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan HuntThis distribution have been successfully installed and tested on
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan HuntUbuntu 12.04.
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan HuntInstallation
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt------------
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan HuntWith the above requirements satisfied perform the following steps:
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt1. Ensure the symlink for dlz_minimal.h points at the correct header
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt file matching your Bind version
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt2. Run: make
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt3. Run: sudo make install # this will install dlz_bdbhpt_dynamic.so
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt into /usr/lib/bind9/
ff7cc592b7b733ef095e67ad78db15e28dc52367Evan Hunt4. Add a DLZ statement similar to the example below into your
ff7cc592b7b733ef095e67ad78db15e28dc52367Evan Hunt Bind configuration
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt5. Ensure your BerkeleyDB home-directory exists and can be written to
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt by the bind user
ff7cc592b7b733ef095e67ad78db15e28dc52367Evan Hunt6. Use the included testing/bdbhpt-populate.pl script to provide some
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt data for initial testing
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan HuntUsage
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt-----
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan HuntExample usage is as follows:
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt```
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Huntdlz "bdbhpt_dynamic" {
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt database "dlopen /usr/lib/bind9/dlz_bdbhpt_dynamic.so T /var/cache/bind/dlz dnsdata.db";
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt};
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt```
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan HuntThe arguments for the "database" line above are as follows:
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt1. dlopen - Use the dlopen DLZ driver to dynamically load our compiled
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt driver
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt2. The full path to your built dlz_bdbhpt_dynamic.so
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt3. Single character specifying the mode to open your BerkeleyDB
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt environment:
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt * T - Transactional Mode - Highest safety, lowest speed.
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt * C - Concurrent Mode - Lower safety (no rollback), higher speed.
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt * P - Private Mode - No interprocess communication & no locking.
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt Lowest safety, highest speed.
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt4. Directory containing your BerkeleyDB - this is where the BerkeleyDB
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt environment will be created.
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt5. Filename within this directory containing your BerkeleyDB tables.
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan HuntA copy of the above Bind configuration is included within
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Huntexample/dlz.conf.
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan HuntAuthor
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt------
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan HuntThe person responsible for this is:
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt Mark Goldfinch <g@g.org.nz>
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan HuntThe code is maintained at:
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt https://github.com/goldie80/dlz-bdbhpt-dynamic
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunt
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan HuntThere is very little in the way of original code in this work,
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Hunthowever, original license conditions from both bdbhpt_driver.c and
62d63e5f02a5e7fcda59cf361149e3d7c78477beEvan Huntdlz_example.c are maintained in the dlz_bdbhpt_dynamic.c.