summaryrefslogtreecommitdiffstats
path: root/contrib/bind/doc/notes/data
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bind/doc/notes/data')
-rw-r--r--contrib/bind/doc/notes/data51
1 files changed, 51 insertions, 0 deletions
diff --git a/contrib/bind/doc/notes/data b/contrib/bind/doc/notes/data
new file mode 100644
index 0000000..e522392
--- /dev/null
+++ b/contrib/bind/doc/notes/data
@@ -0,0 +1,51 @@
+/*
+ * We need a registy of name server addresses. For each, we retain an RTT
+ * and a list of name server names which have used this address.
+ */
+tree_t *by_nsaddr;
+struct by_nsaddr {
+ u_int32_t rtt; /* measured. */
+ char **names; /* NULL terminated array; strdup'd. */
+};
+
+/*
+ * "struct server" is a name server, which can have many addresses. There
+ * is no central registry of servers, since each creator can have a different
+ * idea of what the addresses are.
+ */
+struct server {
+ char *name; /* made with strdup. */
+ struct sockaddr_in *addrs; /* counted array. */
+ int n_addrs; /* array size. */
+};
+
+/*
+ * "struct zone" is a zone cut.
+ */
+tree_t *by_class; /* zone[class]. */
+struct zone {
+ enum {master, slave, cache, boot}
+ type;
+
+ /* Servers learned from boot cache, a parent zone, or !auth answer. */
+ struct server *servers_notauth;
+
+ /* Servers learned from authoritative answer or local zone. */
+ struct server *servers_auth;
+
+ /* Root node of zone. */
+ struct node *root;
+};
+
+struct node {
+ char *label; /* made with strdup. */
+ tree_t *subs; /* subdomains (node[label]). */
+ /* really this is "data" since for the zone cut tree we have no sets.*/
+ tree_t *rrsets; /* rr sets (rrset[type]). */
+};
+
+struct rrset {
+ rrtype type;
+ u_int32_t ttl;
+ u_char data[1]; /* struct size constrains this. */
+};
OpenPOWER on IntegriCloud