]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bind/doc/notes/data
This commit was generated by cvs2svn to compensate for changes in r54359,
[FreeBSD/FreeBSD.git] / contrib / bind / doc / notes / data
1 /*
2  * We need a registy of name server addresses.  For each, we retain an RTT
3  * and a list of name server names which have used this address.
4  */
5 tree_t  *by_nsaddr;
6 struct by_nsaddr {
7         u_int32_t       rtt;            /* measured. */
8         char            **names;        /* NULL terminated array; strdup'd. */
9 };
10
11 /*
12  * "struct server" is a name server, which can have many addresses.  There
13  * is no central registry of servers, since each creator can have a different
14  * idea of what the addresses are.
15  */
16 struct server {
17         char            *name;          /* made with strdup. */
18         struct sockaddr_in *addrs;      /* counted array. */
19         int             n_addrs;        /* array size. */
20 };
21
22 /*
23  * "struct zone" is a zone cut.
24  */
25 tree_t  *by_class;      /* zone[class]. */
26 struct zone {
27         enum {master, slave, cache, boot}
28                         type;
29
30         /* Servers learned from boot cache, a parent zone, or !auth answer. */
31         struct server   *servers_notauth;
32
33         /* Servers learned from authoritative answer or local zone. */
34         struct server   *servers_auth;
35
36         /* Root node of zone. */
37         struct node     *root;
38 };
39
40 struct node {
41         char            *label;         /* made with strdup. */
42         tree_t          *subs;          /* subdomains (node[label]). */
43         /* really this is "data" since for the zone cut tree we have no sets.*/
44         tree_t          *rrsets;        /* rr sets (rrset[type]). */
45 };
46
47 struct rrset {
48         rrtype          type;
49         u_int32_t       ttl;
50         u_char          data[1];        /* struct size constrains this. */
51 };