api level docs?
Aaron Aston
aaston at gotwisted.com
Tue Jun 8 14:01:23 UTC 2004
> I'm almost there ... it's not that hard. All I need to figure out now
> is how to remove a resource definition while I'm iterating. There is
> a handy library function called 'dns_db_dump()' that will let me write
> the filtered db back out to disk.
In the end I had to use the routines invoked by the DDNS side of BIND
to edit out the resource records that I determine to be internal. In
particular I had to use the stuff from diff.h/.c (dns_diff_init,
dns_difftuple_create, dns_diff_append, dns_diff_apply).
I was trying to manipulate the rbt tree directly, but the code that
manages rdata structs is just not pretty (or is, perhaps, very pretty,
as in the same prettiness as a wasp. Fiddle with the wrong thing in
there and you're going to get 'stung').
I thought I might have trouble removing records as I iterate, but the
iterators seem to remain valid even though the 'current' record has
been removed. If this does end up being a problem I will just collect
my diffs as I iterate and then apply one large diff after processing
the zone file.
More information about the bind-users
mailing list