If you are interested in generic API for DNS then you may want to consider get-dns which defines a thorough (read complex) DNS api set with a number of language bindings.
Many users especially those with a substantial number of zones or zones which are very dynamic find the process of updating text zone files a little tedious. Further, for updates to take effect BIND must be stopped/started - a slightly arcane process - or rndc used to reload the zone. What if we could update BIND on the fly?
Well you kinda can if you are prepared to do some fairly serious hacking.
You have basically three choices, two from BIND and one third party add-on to BIND:
The documentation for the last of the three seems fairly complete and may be obtained from the web site above. It will not be discussed further but its dynamic zone addition make it both unique and compelling. The downside is that it is not currently integrated with BIND 9 - but the web site makes a number of reference to attempts to integrate with the BIND project and the project sponsor is a also a sponsor of BIND which may increase the chances of success.
Finally, documentation on either of BINDs APIs is as rare as hen's teeth. You have been warned.
BIND provides two APIs. A high function API (we'll call it the hfdb) that allows the 'plug-in' to replace BIND's internal database function for nominated zones and, from BIND verion 9.1 onward, a Simple Database API (sdb) that allows BIND to read files from alternate sources.
It is important to note before contemplating using either of these APIs that they are statically linked, simply put this means that you will need to edit the BIND source files and makefile.in and then re-build BIND including your source and header files. If anything goes wrong in your routines its your problem and your fault. There is no supervisory functionality provided by BIND. This is unlike, say, Apache where modules can be dynamically loaded and some supervisory functions are provided.
The definitive reference for the hfdb is the commented C header file db.h which is located in the directory bind-release/lib/dns/include/dns/db.h where bind-release should be replaced with the location and version number where you unpacked the source distribution e.g. /usr/src/bind/9.2.2.
The definitive reference for the sdb is the commented C header file sdb.h which is located in the directory bind-release/lib/dns/include/dns/sdb.h where bind-release should be replaced with the location and version number where you unpacked the source distribution e.g. /usr/src/bind/9.2.2.
The simple database API provides the following functionality
Problems, comments, suggestions, corrections (including broken links) or something to add? Please take the time from a busy life to 'mail us' (at top of screen), the webmaster (below) or info-support at zytrax. You will have a warm inner glow for the rest of the day.
3 reverse map
4 dns types
5 install bind
8 zone records
12 bind api's
13 dns security
bits & bytes
notes & tips
This work is licensed under a Creative Commons License.
If you are happy it's OK - but your browser is giving a less than optimal experience on our site. You could, at no charge, upgrade to a W3C STANDARDS COMPLIANT browser such as Firefox
GNU-Free SW Foundation
Open Source Initiative
Ibiblio - Library
Open Book Project
Copyright © 1994 - 2023 ZyTrax, Inc.
All rights reserved. Legal and Privacy
|site by zytrax
web-master at zytrax
Page modified: January 20 2022.