mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-04 17:24:47 -04:00
BIND's rdataset structure is a view of some DNS records. It is polymorphic, so the details of how the records are stored can vary. For instance, the records can be held in an rdatalist, or in an rdataslab in the rbtdb. The dns_rdataset structure previously had a number of fields called `private1` up to `private7`, which were used by the various rdataset implementations. It was not at all clear what these fields were for, without reading the code and working it out from context. This change makes the rdataset inheritance hierarchy more clear. The polymorphic part of a `struct dns_rdataset` is now a union of structs, each of which is named for the class of implementation using it. The fields of these structs replace the old `privateN` fields. (Note: the term "inheritance hierarchy" refers to the fact that the builtin and SDLZ implementations are based on and inherit from the rdatalist implementation, which in turn inherits from the generic rdataset. Most of this change is mechanical, but there are a few extras. In keynode.c there were a number of REQUIRE()ments that were not necessary: they had already been checked by the rdataset method dispatch code. On the other hand, In ncache.c there was a public function which needed to REQUIRE() that an rdataset was valid. I have removed lots of "reset iterator state" comments, because it should now be clear from `target->iter = NULL` where before `target->private5 = NULL` could have been doing anything. Initialization is a bit neater in a few places, using C structure literals where appropriate. The pointer arithmetic for translating between an rdataslab header and its raw contents is now fractionally safer. |
||
|---|---|---|
| .. | ||
| include | ||
| .gitignore | ||
| bind9.xsl | ||
| builtin.c | ||
| config.c | ||
| control.c | ||
| controlconf.c | ||
| dlz_dlopen_driver.c | ||
| fuzz.c | ||
| geoip.c | ||
| log.c | ||
| logconf.c | ||
| main.c | ||
| Makefile.am | ||
| named.conf.rst | ||
| named.rst | ||
| os.c | ||
| server.c | ||
| statschannel.c | ||
| tkeyconf.c | ||
| transportconf.c | ||
| tsigconf.c | ||
| xsl_p.h | ||
| zoneconf.c | ||