Performing DDNS updates from C programs

Joshua Shagam jshagam at rowdytop.com
Tue Apr 27 21:06:50 UTC 2004


Hello, for a while I have been struggling to find any documentation for the 
various BIND libraries, particularly for performing dynamic DNS updates.
Specifically, I have a C-based application which I am trying to add DDNS
functionality into (specifically pushing NAPTR records around for a 
distributed client registration mechanism), and I am constantly hitting dead
ends.

As a proof-of-concept I had it simply spawn an external nsupdate instance, 
which worked perfectly for what I'm trying to do, but the amount of overhead
this incurred was rather undesirable.

For quite some time I've been trying to wade through the source to ISC dhcpd
and nsupdate, in order to attempt to figure out how to make DDNS updates
myself, but both of those programs appear to have their own specific
monolithic functionality which can't simply be linked in from 
libresolv/libbind/liblwresl (particularly with dhcpd containing its own
specific-purpose libresolv implementation and so on).  The only DDNS-specific
library I could find was a Perl module, and for the purposes of this project
it is also major overkill to link in libperl just for a single function call,
so I'd rather avoid that route as well if at all possible.  (Obviously,
calling Perl as an external process is an even worse solution than my
previous nsupdate kludge.)

And, of course, I've searched the web and this mailing list archive
exhaustively and have come up empty-handed.

So, are there any existing libraries for pushing out DDNS updates
 (preferrably which support NAPTR records and TSIG and so on), or any example 
code for doing this with the existing broken-out BIND libraries?

Many thanks in advance.


More information about the bind-users mailing list