From: Jelte Jansen Date: Tue, 13 Jun 2006 08:27:17 +0000 (+0000) Subject: docjes X-Git-Tag: release-1.1.0~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6074b06b7d2ca40a34e600e83ff0cf23ea4c7e2;p=thirdparty%2Fldns.git docjes --- diff --git a/doc/overview b/doc/overview index 9dc23364..4fd86d59 100644 --- a/doc/overview +++ b/doc/overview @@ -65,14 +65,14 @@ o TSIG functionality o Dynamic update function -3. CENTRAL structures +3. Central structures -nlnetlabs.nl. 600 IN MX 10 open.nlnetlabs.nl. - \ \ \ \ \_ _/ - _owner _ttl _klass _type \_ rdf[] _/ +nlnetlabs.nl. 600 IN MX 10 open.nlnetlabs.nl. + \ \ \ \ \_ _/ + _owner _ttl _klass _type \_ rdf[] _/ (rdf) (uint16_t) (rr_class) (rr_type) - 10 := rdf[0] - open.nlnetlabs.nl. := rdf[1] + 10 := rdf[0] + open.nlnetlabs.nl. := rdf[1] * rdf structure: The LHS is put in a rdf structure, which is a normal rdf but always has the diff --git a/doc/overview.dox b/doc/overview.dox index d7a0fb7e..8fb98b76 100644 --- a/doc/overview.dox +++ b/doc/overview.dox @@ -7,7 +7,7 @@ functionality. \section central_structures Central structures - - \ref ldns_pkt A DNS Packet, that can contain a qeury, answers, and additional information. + - \ref ldns_pkt A DNS Packet, which can contain a qeury, answers, and additional information. - \ref ldns_rr A Resource Record, which holds a bit of information about a specific domain name. - \ref ldns_rdf An RDATA field, every Resource Record contains one or more RDATA fields, depending on the type of RR. These are the 'basic types' of DNS data. - \ref ldns_rr_list A list of resource records @@ -17,19 +17,19 @@ functionality. A DNS Resource record looks like this:
-nlnetlabs.nl.   600     IN      MX      10    open.nlnetlabs.nl.
- \              \       \       \       \                     /
-  owner          ttl     class   type    \        rdf[]      /
+nlnetlabs.nl.   600     IN      MX             10    open.nlnetlabs.nl.
+ \              \       \       \              \                     /
+  owner          ttl     class   type           \        rdf[]      /
   (rdf)     (uint16_t) (rr_class) (rr_type)
-                                                10          := rdf[0]
-                                                open.nlnetlabs.nl. := rdf[1]
+                                                 10          := rdf[0]
+                                                 open.nlnetlabs.nl. := rdf[1]
 
* Owner: The owner name is put in an \c ldns_rdf structure, which is a normal rdata field but always has the type LDNS_RDF_TYPE_DNAME. -An \ref ldns_rdf structure has 3 members; the size, the type is carrying and a void * +An \ref ldns_rdf structure has 3 members; the size, the type of rdata and a void * pointer to the data. The data is always in uncompressed wireformat. The RSH (rdata) is put in an array of rdf's (in this case 2). @@ -46,12 +46,12 @@ the fields described above (under the RR): - rdf[1] (open.nlnetlabs.nl.) * RR list structure: -An RR list structure is simply structure with a counter +An RR list structure is simply a structure with a counter and an array of RR structures. Different kinds of RR's can be grouped together this way. -* RR set structure -An RR set structure is an RR list structure, but its accessor +* RRset structure +An RRset structure is an RR list structure, but its accessor function checks if the \c ldns_rr structures in there are: - from the same type - have the same TTL diff --git a/doc/tutorial1_mx.dox b/doc/tutorial1_mx.dox index 8e3e0109..42219807 100644 --- a/doc/tutorial1_mx.dox +++ b/doc/tutorial1_mx.dox @@ -29,7 +29,7 @@ - The \c ldns_resolver structure keeps a list of nameservers, and can perform queries for us - An \c ldns_rdf is a basic data type of dns, the RDATA. See \ref overview for a description about the building blocks of DNS. - \c domain will contain the name the user specifies when calling the program + In this case, \c domain will be used to store the name the user specifies when calling the program - An \c ldns_pkt is a DNS packet, for instance a complete query, or an answer - The \c ldns_rr_list structure contains a list of DNS Resource Records (RRs). In this case, we will store the MX records we find in the list. - \c ldns_status is the basic type for status messages in ldns. Most functions will return a value of this type. @@ -62,6 +62,11 @@ \skipline ldns_resolver_query \until ) + The last argument contains flags to influence the type of query the + resolver structure sends. In this case, we want the nameserver to use + recursion, so that we'll get the final answer. Therefore, we specify the + \ref LDNS_RD (Recursion Desired) flag. + This should return a packet if everything goes well. We get all RRs of type MX from the answer packet and store them in our list: diff --git a/ldns/zone.h b/ldns/zone.h index 032f06c5..a1890549 100644 --- a/ldns/zone.h +++ b/ldns/zone.h @@ -26,7 +26,7 @@ * * A list of RR's with some * extra information which comes from the SOA RR - * Note: nothing is done to make this efficient (yet). + * Note: nothing has been done to make this efficient (yet). */ struct ldns_struct_zone {