fix: populate ldns submodule and add autotools to LDNS build stage

- Re-cloned zonemaster-ldns with --recurse-submodules so the bundled
  ldns C library source (including Changelog and configure.ac) is present
- Added autoconf, automake, libtool to Dockerfile.backend ldns-build stage
  so libtoolize + autoreconf can generate ldns/configure during make

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-21 08:33:38 +02:00
parent 8d4eaa1489
commit eaaa8f6a11
541 changed files with 138189 additions and 0 deletions

View File

@@ -0,0 +1,109 @@
<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<!-- $Id -->
<?rfc toc="yes" ?>
<?rfc compact="yes" ?>
<?rfc editing="no" ?>
<?rfc iprnotified="no" ?>
<?rfc private="LibDNS API" ?>
<rfc ipr="none" category="info" docName="API-00.txt">
<front>
<title>LibDNS API</title>
<author initials="R." surname="Gieben" fullname="Miek Gieben">
<organization>NLnet Labs</organization>
<address>
<postal>
<street>Kruislaan 419</street>
<city>Amsterdam</city>
<code>1098 VA</code>
<country>The Netherlands</country>
</postal>
<email>miek@nlnetlabs.nl</email>
<uri>http://www.nlnetlabs.nl</uri>
</address>
</author>
<author initials="J." surname="Jansen" fullname="Jelte Jansen">
<organization>NLnet Labs</organization>
<address>
<postal>
<street>Kruislaan 419</street>
<city>Amsterdam</city>
<code>1098 VA</code>
<country>The Netherlands</country>
</postal>
<email>jelte@nlnetlabs.nl</email>
<uri>http://www.nlnetlabs.nl</uri>
</address>
</author>
<author initials="E." surname="Rozendaal" fullname="Erik Rozendaal">
<organization>NLnet Labs</organization>
<address>
<postal>
<street>Kruislaan 419</street>
<city>Amsterdam</city>
<code>1098 VA</code>
<country>The Netherlands</country>
</postal>
<email>erik@nlnetlabs.nl</email>
<uri>http://www.nlnetlabs.nl</uri>
</address>
</author>
<date month="January" year="2005" />
<keyword>DNS</keyword>
<keyword>Elite</keyword>
<keyword>Hacking</keyword>
<abstract>
<t>
A small abstract will come here, TBD.
</t>
</abstract>
</front>
<middle>
<section title="Introduction">
<t>
LibDNS (or lDNS) is modelled after the Net::DNS perl library. It has
been shown that Net::DNS can be used efficiently for
programming DNS aware applications. We want to bring the same
level of efficiency to C programmers.
</t>
<t>
The lDNS API consist of two layers. The top-layer, this is
what is actually exported to the application via the library. And the
bottom-layer, this is what lDNS needs to compile and function.
</t>
</section> <!-- "Introduction" -->
<section title="Differences With Other Libraries">
<t>
Short intermezzo detailing differences with other libraries. Most important
ones are the libc resolver interface (from BIND8) and the lwres_ interface
from BIND9.
</t>
</section> <!-- "Differences with other libraries" -->
<section title="Interfaces">
<t>
At its lowest level lDNS is only dependent on libc. It uses a
few networking systems calls; socket, bind, send/recv and friends.
</t>
<t>
Further more it is to be expected that lDNS will depend on OpenSSL for
its cryptography.
</t>
<t>
As said, lDNS is modelled after Net::DNS, therefore its application API
looks very much like the one used for Net::DNS. Some modification are made
of course, because not all functionality of Perl can be caught in C.
</t>
<t>
This API document was written by carefully looking at the documentation
contained in the Net::DNS Perl module.
</t>
</section> <!-- "Interfaces" -->

View File

@@ -0,0 +1,462 @@
<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<!-- $Id -->
<?rfc toc="yes" ?>
<?rfc compact="yes" ?>
<?rfc editing="no" ?>
<?rfc iprnotified="no" ?>
<?rfc private="LibDNS API" ?>
<rfc ipr="none" category="info" docName="libdns-api-00.txt">
<front>
<title>LibDNS API</title>
<author initials="R." surname="Gieben" fullname="Miek Gieben">
<organization>NLnet Labs</organization>
<address>
<postal>
<street>Kruislaan 419</street>
<city>Amsterdam</city>
<code>1098 VA</code>
<country>The Netherlands</country>
</postal>
<email>miek@nlnetlabs.nl</email>
<uri>http://www.nlnetlabs.nl</uri>
</address>
</author>
<author initials="J." surname="Jansen" fullname="Jelte Jansen">
<organization>NLnet Labs</organization>
<address>
<postal>
<street>Kruislaan 419</street>
<city>Amsterdam</city>
<code>1098 VA</code>
<country>The Netherlands</country>
</postal>
<email>jelte@nlnetlabs.nl</email>
<uri>http://www.nlnetlabs.nl</uri>
</address>
</author>
<author initials="E." surname="Rozendaal" fullname="Erik Rozendaal">
<organization>NLnet Labs</organization>
<address>
<postal>
<street>Kruislaan 419</street>
<city>Amsterdam</city>
<code>1098 VA</code>
<country>The Netherlands</country>
</postal>
<email>erik@nlnetlabs.nl</email>
<uri>http://www.nlnetlabs.nl</uri>
</address>
</author>
<date month="January" year="2005" />
<keyword>DNS</keyword>
<keyword>Elite</keyword>
<keyword>Hacking</keyword>
<abstract>
<t>
A small abstract will come here, TBD.
</t>
</abstract>
</front>
<middle>
<section title="Introduction">
<t>
LibDNS (or lDNS) is modelled after the Net::DNS perl library. It has
been shown that Net::DNS can be used efficiently for
programming DNS aware applications. We want to bring the same
level of efficiency to C programmers.
</t>
<t>
The lDNS API consist of two layers. The top-layer, this is
what is actually exported to the application via the library. And the
bottom-layer, this is what lDNS needs to compile and function.
</t>
</section> <!-- "Introduction" -->
<section title="Differences With Other Libraries">
<t>
Short intermezzo detailing differences with other libraries. Most important
ones are the libc resolver interface (from BIND8) and the lwres_ interface
from BIND9.
</t>
</section> <!-- "Differences with other libraries" -->
<section title="Interfaces">
<t>
At its lowest level lDNS is only dependent on libc. It uses a
few networking systems calls; socket, bind, send/recv and friends.
</t>
<t>
Further more it is to be expected that lDNS will depend on OpenSSL for
its cryptography.
</t>
<t>
As said, lDNS is modelled after Net::DNS, therefore its application API
looks very much like the one used for Net::DNS. Some modification are made
of course, because not all functionality of Perl can be caught in C.
</t>
<t>
This API document was written by carefully looking at the documentation
contained in the Net::DNS Perl module.
</t>
</section> <!-- "Interfaces" -->
<section title="RDF Structure">
<t>
The rdf structure, the RData Field, is a type that contains the different
types in the rdata of an RR. Consider the following example:
<artwork>
example.com. IN MX 10 mx.example.com.
</artwork>
The "10 mx.example.com." is the rdata in this case. It consists of two
fields, "10" and "mx.example.com". These have the types (in this case)
LDNS_RDF_TYPE_INT8 and LDNS_RDF_TYPE_DNAME.
</t>
<t>
The following functions operate on this structure.
</t>
<t>
<list style="hanging">
<t hangText="dns_rdf *ldns_rdf_new(uint16_t s, ldns_rdf_type t, uint8_t *d):">
Create a new rdf structure. Return a pointer to it.
</t>
<t hangText="uint16_t ldns_rdf_size(ldns_rdf *r):">
Get the size of a rdf structure.
</t>
<t hangText="void ldns_rdf_set_size(ldns_rdf *r, uint16_t):">
Set the size of a rdf structure.
</t>
<t hangText="void ldns_rdf_set_type(ldns_rdf *r, ldns_rdf_type t):">
Set the type of a rdf structure.
</t>
<t hangText="ldns_rdf_type ldns_rdf_get_type(ldns_rdf *r):">
Get the type of a rdf structure.
</t>
<t hangText="void ldns_rdf_set_data(ldns_rdf *r, uint8_t *n):">
Set the (binary/network order) data of a rdf structure.
</t>
<t hangText="uint8_t *ldns_rdf_data(ldns_rdf *r):">
Get a pointer to the data in a rdf structure.
</t>
<t hangText="void ldns_rdf_free(ldns_rdf *r):">
Free a rdf structure.
</t>
<t hangText="ldns_rdf_new_frm_str(uint8_t *s, ldns_rdf_type t):">
Create a new rdf structure from a string and a specific rdf_type.
The type is needed to perform the correct conversion.
</t>
</list>
</t>
</section> <!-- "RDF Structure" -->
<section title="RR Structure">
<t>
These functions operate on ldns_rr structures.
</t>
<t>
<list style="hanging">
<t hangText="ldns_rr *ldns_rr_new(void):">
Returns a pointer to the newly created ldns_rr structure.
</t>
<t hangText="void ldns_rr_print(FILE *s, ldns_rr *r):">
Prints the record to the stream s.
</t>
<t hangText="ldns_buffer ldns_rr_rdatastr(ldns_rr *r):">
Returns a pointer to a ldns_buffer containing with string containing
RR-specific data.
</t>
<t hangText="ldns_rdf *ldns_rr_name(ldns_rr *r):">
Returns the record's owner name as a ldns_rdf type.
</t>
<t hangText="ldns_rdf_rr_type ldns_rr_get_type(ldns_rr *r):">
Returns the record's type.
</t>
<t hangText="ldns_rr_class ldns_rr_get_class(ldns_rr *r):">
Returns the record's class.
</t>
<t hangText="uint32_t ldns_rr_get_ttl(ldns_rr *r):">
Returns the record's time-to-live (TTL).
</t>
</list>
</t>
<t>
TODO the 'set' functions of the 'get'
</t>
</section> <!-- "RR Structure" -->
<section title="RR list Structure">
<t>
In the DNS the atomic data type is an RRset. This is a list
of RRs with the same ownername, type and class. Net::DNS doesn't
have rrsets as a separate object.
</t>
<t>
In lDNS we have the ldns_rr_list, which just holds a bunch of RR's.
No specific check are made on the RRs that can be put in such a list.
Special wrapper functions exist which allow the usage of ldns_rr_list
of real (RFC compliant) RR sets.
</t>
<t>
TODO: See rr.c
</t>
</section> <!-- "RR list Structure" -->
<section title="Resolver Structure">
<t>
<list style="hanging">
<t hangText="ldns_resolver* ldns_resolver_new(void):">
Create a new resolver structure and return the pointer to that.
</t>
<t hangText="uint8_t ldns_version(resolver *res):">
Returns the version of lDNS.
</t>
<t hangText="ldns_pkt *ldns_mx(ldns_resolver *res, ldns_rdf_type *dname):">
Returns a ldns_pkt representing the MX records
for the specified dname. Function is documented differently in Net::DNS.
Do we need stuff like this?? XXX
</t>
<t hangText="ldns_status ldns_resolver_domain(resolver *res, ldns_rdf
*domain):">
Set the default domain for this resolver. This domain is added
when a query is made with a name without a trailing dot.
</t>
<t hangText="ldns_status ldns_resolver_nameserver_push(resolver *res,
ldns_rdf *ip):">
Add a new nameserver to the resolver. These nameservers are queried
when a search() or query() is done.
</t>
<t hangText="ldns_status ldns_resolver_searchlist_push(resolver *res,
ldns_rdf *domain):">
Add a domain to the searchlist of a resolver.
</t>
<t hangText=" ldns_pkt * ldns_resolver_search(ldns_resolver *res,
ldns_rdf *domain,
ldns_rr_type *type,
ldns_class *class):">
Perform a query. Try all the nameservers in the *res structure. Apply
the search list. And default domain.
If type is NULL it defaults to 'A',
If class is NULL it default to 'IN'.
</t>
<t hangText="ldns_pkt * ldns_resolver_query(ldns_resolver *res,
ldns_rdf *dom,
ldns_type *t,
ldns_class *cl):">
Perform a query. Only the default domain is added.
If type is NULL it defaults to 'A',
If class is NULL it default to 'IN'.
</t>
<t hangText=" ldns_pkt * ldns_resolver_send(ldns_resolver *res,
ldns_rdf *domain,
ldns_type *type,
ldns_class *class):">
No search list nor default domain is applied. Return a pointer to a ldns_pkt
structure with the information from the nameserver.
If type is NULL it defaults to 'A',
If class is NULL it default to 'IN'.
</t>
</list>
</t>
<t>
TODO XX Gazillion helper functions to set port, src-port, etc. etc.
</t>
</section> <!-- "Resolver Structure" -->
<section title="Packet Structure">
<t>
A packet structure (ldns_pkt) has five sections:
<list style="numbers">
<t>The header section, a ldns_hdr structure.</t>
<t>The question section, a ldns_rr_list structure.</t>
<t>The answer section, a ldns_rr_list structure.</t>
<t>The authority section, a ldns_rr_list structure.</t>
<t>The additional section, a ldns_rr_list structure.</t>
</list>
</t>
<t>
<list style="hanging">
<t hangText="Header Structure (ldns_hdr):">
ldns_hdr represents the header section of a DNS packet.
</t>
<t hangText="Question Section (ldns_rr_list):">
A list of RRs in the Question section of a DNS packet.
</t>
<t hangText="Answer Section (ldns_rr_list):">
A list of RRs in the Question section of a DNS packet.
</t>
<t hangText="Authority Section (ldns_rr_list):">
A list of RRs in the Question section of a DNS packet.
</t>
<t hangText="Additional Section (ldns_rr_list):">
A list of RRs in the Question section of a DNS packet.
</t>
</list>
</t>
<t>
<list style="hanging">
<t hangText="ldns_pkt * ldns_pkt_new(void):">
Creates a new empty packet.
</t>
<t hangText="ldns_buffer* ldns_pkt_data(ldns_pkt *pkt):">
Returns the packet data in binary format, suitable for sending to a
nameserver. [XXX, suitable for sending to a NS?]
</t>
<t hangText="ldns_hdr *ldns_header(ldn_pkt *pkt):">
Returns a ldns_hdr structure representing the header section of
the packet.
</t>
<t hangText="ldns_rr_list *ldns_question(ldns_pkt *pkt):">
Returns a pointer to a ldns_rr_list representing the question section
of the packet.
</t>
<t hangText="ldns_rr_list *ldns_answer(ldns_pkt *pkt):">
Returns a pointer to a ldns_rr_list representing the answer section of
the packet.
</t>
<t hangText=" ldns_rr_list *ldns_authority(ldns_pkt *pkt):">
Returns a pointer to a ldns_rr_list representing the authority section
of the packet.
</t>
<t hangText=" ldns_rr_list *ldns_additional(ldns_pkt *pkt):">
Returns a pointer to a ldns_rr_list of representing the additional
section of the packet.
</t>
<t hangText=" void ldns_pkt_print(ldns_pkt *pkt):">
Prints the packet data on the standard output in an ASCII format similar
to that used in DNS zone files. See RFC1035.
</t>
<t hangText="ldns_buffer *ldns_pkt_string(ldns_pkt *pkt):">
Returns a ldns_buffer containing the string representation of the packet.
</t>
<t hangText="ldns_rdf* ldns_pkt_answerfrom(ldns_pkt *pkt):">
Returns the IP address from which we received this packet. User-created
packets will return NULL.
</t>
<t hangText="uint16_t ldns_pkt_answersize(ldns_pkt *pkt):">
Returns the size of the packet in bytes as it was received from a
nameserver. User-created packets will return 0. [XXX
user-created??]
</t>
<t hangText="ldns_status ldns_push(ldns_pkt *pkt, ldns_pkt_section section,
ldns_rr *rr):">
Adds *rr to the specified section of the packet. Return LDNS_STATUS_OK
on success, LDNS_STATUS_ERR otherwise.
</t>
<t hangText="ldns_status ldns_unique_push(ldns_pkt *pkt, ldns_pkt_section
section, ldns_rr *rr):">
Adds *rr to the specified section of the packet provided that the RR
does not already exist in the packet. Return LDNS_STATUS_OK
on success, LDNS_STATUS_ERR otherwise.
</t>
<t hangText="ldns_rr *ldns_pop(ldns_pkt, ldns_pkt_section):">
Removes a RR from the specified section of the packet. Returns NULL if
no RR's could be popped.
</t>
<t hangText="ldns_rr_list *ldns_pkt_rrset(ldns_pkt *pkt,...):">
Retrieve all RRs in a packet matching certain criteria. XXX function needs
to be specified better.
</t>
<t hangText="void *ldns_pkt_print(FILE *s, ldns_pkt *p):">
Print packet p to stream s.
</t>
</list>
</t>
</section> <!-- "Packet Structure" -->
<section title="Specific RR Structures">
<t>
Some resource records can have special access function no other RR has.
Those are detailed here. XXX TODO don't exist (yet?).
</t>
</section> <!-- "Specific RR Structures" -->
<section title="Exported Defines and Macros">
<t>
insert your long list here.
</t>
</section> <!-- "Exported defines and macros" -->
<section title="Examples">
<t>
A small example, which queries a nameserver on localhost
to display the MX records for miek.nl.
</t>
<t>
<figure>
<artwork>
/**
* An example ldns program
* In semi-C code
*
* Setup a resolver
* Query a nameserver
* Print the result
*/
#include &lt;ldns.h&gt;
int
main(void)
{
ldns_resolver *res;
ldns_rdf *default_dom;
ldns_rdf *nameserver;
ldns_rdf *qname;
ldns_pkt *pkt;
/* init */
res = ldns_resolver_new();
if (!res)
return 1;
/* create a default domain and add it */
default_dom = ldns_rdf_new_frm_str("miek.nl.", LDNS_RDF_TYPE_DNAME);
nameserver = ldns_rdf_new_frm_str("127.0.0.1", LDNS_RDF_TYPE_A);
if (ldns_resolver_domain(res, default_dom) != LDNS_STATUS_OK)
return 1;
if (ldns_resolver_nameserver_push(res, nameserver) != LDNS_STATUS_OK)
return 1;
/* setup the question */
qname = ldns_rdf_new_frm_str("www", LDNS_RDF_TYPE_DNAME);
/* fire it off. "miek.nl." will be added */
pkt = ldns_resolver_query(res, qname, LDNS_RR_TYPE_MX, NULL);
/* print the resulting pkt to stdout */
ldns_pkt_print(stdout, pkt);
return 0;
}
</artwork>
</figure>
</t>
</section> <!-- title="Short Example" -->
</middle>
<back>
</back>
</rfc>

View File

@@ -0,0 +1,64 @@
The libdns coding style guide
* Use of tabs (real tabs, 8 positions long)
* Spaces only after comma's, and in between operators.
And after keywords (if, while, for)
* Underscores to make long names readable
* prefix (exported) identifiers with 'ldns_'
* no unneeded parentheses after 'return'
* always curly brackets in if-statements
* use defines for (weird) constants, and masks
* type 'bool', constants 'true'/'false'. Don't compare bools for
equality.
* always use LDNS_MALLOC/FREE etc, or the new/free/deep_free functions
* buffer can scale, so don't alloc the max size, but the min size
* make lint (uses splint) is your friend
* Return values:
- status code (structure to fill is usually passed as a first argument)
- new/pointer: return pointer or NULL on error
- 'read' functions: ldns_status wire2thing(uint8_t *p, size_t max,
size_t pos, *thing);
- void functions like ldns_rr_free
- bool functions
* Parameter sequence: (dest, [dest_meta, ] src, [src_meta] etc)
* structure/union field names start with _ when "private"
* enum for rcode, opcode, types etc,
example:
enum ldns_rcode {
LDNS_RCODE_OK = 0,
... = .,
LDNS_RCODE_FIRST = LDNS_RCODE_OK,
LDNS_RCODE_LAST = 15,
LDNS_RCODE_COUNT = LDNS_RCODE_LAST + 1
}
* Everything by reference, all data structures an optional _clone() function
* arrays: ps[] with size_t p_count for the number of elements
* _size for size in bytes
* _free and _clone copies perform deep free/copy.
* Standard abbreviations, don't abbreviate other names:
id = identity
rr = resource record
rrset = resource record set
rdata = resource data
rdf = resource data field
rcode = result code
qr = query/resource bit
aa = authoritative answer
tc = truncated
rd = recursion disabled
cd = checking disabled
ra = recursion available
ad = authentic data
qdcount = question section count
ancount = answer section count
nscount = authority section count
arcount = additional section count
ldns-<tools>
* use exit(EXIT_FAILURE)/ exit(EXIT_SUCCESS)
*

View File

@@ -0,0 +1,14 @@
TODO
Features:
* Drill: print appropriate DS RRs (relates to Bug #355)
* ldns-signzone optout to be really optout
* Compression when generating wireformat. Preferably with a configurable
policy: refer only backwards, case sensitivity, only refer to other owner
names, etc.
Bugfixes:
* Bug #279: fix return values for net.h functions, and related: make return
values for functions that cannot return memory-failure today. Needs medium
version increase because of API change.
* Lazy ABI

View File

@@ -0,0 +1,124 @@
/** \page design Design
The following image shows the various modules of libdns and their
functionality.
\image html libdnsoverview.png
\section central_structures Central structures
- \ref ldns_pkt A DNS Packet, which can contain a query, 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
- \ref ldns_zone A representation of a DNS Zone.
The actual structure definitions are named \c ldns_struct_<name> which are all typedeffed to \c ldns_<name>
A DNS Resource record looks like this:
<pre>
nlnetlabs.nl. 600 IN MX 10 open.nlnetlabs.nl.
\ \ \ \ \ /
owner ttl class type \ rdf[] /
(rdf) (uint32_t) (rr_class) (rr_type)
10 := rdf[0]
open.nlnetlabs.nl. := rdf[1]
</pre>
* 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 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).
The entire resource record is put in a RR structure, which has
the fields described above (under the RR):
- owner (nlnetlabs.nl.)
- ttl (600)
- class (LDNS_RR_CLASS_IN: 'IN')
- type (LDNS_RR_TYPE_MX: 'MX')
- rd_count (2)
- rdata_fields[rd_count]
- rdf[0] (10)
- rdf[1] (open.nlnetlabs.nl.)
* RR list structure:
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.
* 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
- have the same ownername
This is the RFC definition of an RRset.
* pkt structure:
A pkt structure consists out of a header structure where
packet specific flags are kept, TC, RD, IP from the server which
sent the packet, etc.
Further more it is divided in 4 sections: question, authority, answer
and additional.
All four sections have the type RRlist that simply hold a list of RR's
\section wire_module Wire module and central structures Interface
As the WIRE module takes care of the compression/decompression
it needs a buffer which holds all the binary DNS data.
All functions will operate on such a buffer to extract specific
information which is then stored in RR structures.
\section resolver_module Resolver module and central structures Interface
The resolver module always returns a pkt structure. Either with
the answer or a SERVFAIL pkt.
The exact function-call parameters have not yet been
decided on.
Also the resolver module will need to access some of the
to_wire and from_wire function to creates ldn_pkt's from
the data it receives (arrow not drawn).
\section str_module str module and central structures Interface
Convert to and from strings. This module could be used
to read in a zone file (list of RRs) and convert the text strings to
the format used by ldns. Or the other way around.
\section net_module Net module and resolver module interface
The resolver module will get a packet and will mold it so that
it can be sent off to a nameserver.
It might need to interface with the wire module (arrow not drawn).
\section Net module and OS/libc interface
OS/network calls will be used here. The Net module is the only part of
the library where the underlying OS matters.
\section Client program ldns interface
Any client program will have access to
- Wire module
- Central structures
- Resolver module
- str module (arrow not drawn in the above figure)
\section dnssec_module DNSSEC module
The DNSSEC types are handled in the RR module, but the crypto
routines are contained in this module. This module will depend
on OpenSSL for the crypto routines.
*/

View File

@@ -0,0 +1,56 @@
http://www.posadis.org/projects/poslib.php
Poslib DNS library - Default branch
http://www.posadis.org/poslib?DokuWiki=2b00f9da090fb9d4ad3d6e98b9c2f61f
Poslib is the C++ library for applications using the Domain Name System
that is used by all Posadis tools, including the Posadis DNS server and the
Zoneedit and Dnsquery tools. It consists of a library for creating client
applications using DNS, and a server library for DNS servers.
FireDNS Library
http://firestuff.org/projects/firedns
FireDNS Library
---------------
(c) 2002 Ian Gulliver under the GNU Public License, Version 2.
See GPL for more details.
From libfiredns(3):
libfiredns is a library for handling asynchronous DNS
requests. It provides a very simple interface for sending
requests and parsing responses, as well as low-timeout
blocking functions. libfiredns functions have much lower
timeouts than the stock functions and tend to be faster
because they send requests to all configured system
nameservers at the same time.
If you have questions or comments, you can reach me at
ian@penguinhosting.net.
skadns
Skadns is Kind of an Asynchronous DNS client software.
* Kind of: it's small. Really small. But it just works.
* Asynchronous: all DNS operations are non-blocking.
* DNS client software: it's a DNS client, what you may know as a "stub resolver". To perform full DNS resolution, you will still need a full resolver like dnscache.
Similar work
* ares is an asynchronous DNS resolver library with a nice interface
* and more configuration options than skadns (and a very reasonable
* size). Use it if you find that skadns lacks configurability (you
* shouldn't need more than it provides, but well, you're the user).
* Yet it doesn't hide the DNS internals as opaquely as skadns does,
* giving you a bunch of fds to select() on instead of just one.
* adns works fine, and is small for a GNU project. Impressive. But
* the interface is still too complex and much too generic - the
* usual problems with GNU software.
ADNS; documentation scares - is it still active
simular aims - different ways

View File

@@ -0,0 +1,341 @@
#!/usr/bin/env perl
# Doxygen is useful for html documentation, but sucks
# in making manual pages. Still tool also parses the .h
# files with the doxygen documentation and creates
# the man page we want
#
# 2 way process
# 1. All the .h files are processed to create in file in which:
# filename | API | description | return values
# are documented
# 2. Another file is parsed which states which function should
# be grouped together in which manpage. Symlinks are also created.
#
# With this all in place, all documentation should be autogenerated
# from the doxydoc.
use Getopt::Std;
my $state;
my $description;
my $struct_description;
my $key;
my $return;
my $param;
my $api;
my $const;
my %description;
my %api;
my %return;
my %options;
my %manpages;
my %see_also;
my $BASE="doc/man";
my $MAN_SECTION = "3";
my $MAN_HEADER = ".ad l\n.TH ldns $MAN_SECTION \"30 May 2006\"\n";
my $MAN_MIDDLE = ".SH AUTHOR
The ldns team at NLnet Labs.
.SH REPORTING BUGS
Please report bugs to dns-team\@nlnetlabs.nl or on
GitHub at https://github.com/NLnetLabs/ldns/issues
.SH COPYRIGHT
Copyright (c) 2004 - 2006 NLnet Labs.
.PP
Licensed under the BSD License. There is NO warranty; not even for
MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
";
my $MAN_FOOTER = ".SH REMARKS
This manpage was automatically generated from the ldns source code.
";
getopts("em:",\%options);
# if -m manpage file is given process that file
# parse the file which tells us what manpages go together
my $functions, $see_also, $shorts;
my $i = 0;
my $report_errors = defined $options{'e'};
my $errors = 0;
my %unique;
if (defined $options{'m'}) {
# process
open(MAN, "<$options{'m'}") or die "Cannot open $options{'m'}";
# it's line based:
# func1, func2, .. | see_also1, see_also2, ...
while(<MAN>) {
chomp;
$i += 1;
if (/^#/) { next; }
if (/^$/) { next; }
my @parts = split /[\t ]*\|[\t ]*/, $_;
$functions = shift @parts;
@parts = split /[\t ]*-[\t ]*/, join ', ', @parts;
$see_also = shift @parts;
if (! $see_also) {
@parts = split /[\t ]*-[\t ]*/, $_;
$functions = shift @parts;
}
#print "{$functions}\n";
#print "{$see_also}\n";
my @funcs = split /[\t ]*,[\t ]*/, $functions;
my @also = split /[\t ]*,[\t ]*/, $see_also;
$manpages{$funcs[0]} = \@funcs;
$see_also{$funcs[0]} = \@also;
$shorts{$funcs[0]} = join '', @parts;
foreach (@funcs) {
if ($unique{$_}) {
push @{$unique{$_}}, ($i,);
} else {
$unique{$_} = [$i];
}
}
#print "[", $funcs[0], "]\n";
}
close(MAN);
while (($func, $lines) = each %unique ) {
if (scalar @$lines > 1) {
print STDERR "$func in function_manpages on lines: "
. join(", ",@$lines) . "\n" if $report_errors;
$errors += 1;
}
}
} else {
print "Need -m file to process the .h files\n";
exit 1;
}
# 0 - somewhere in the file
# 1 - in a doxygen par
# 2 - after doxygen, expect function
# create our pwd
mkdir "doc";
mkdir "doc/man";
mkdir "doc/man/man$MAN_SECTION";
$state = 0;
$i = 0;
my @lines = <STDIN>;
my $max = @lines;
while($i < $max) {
$typedef = "";
if ($lines[$i] =~ /^typedef struct/ and $lines[$i + 1] =~ /^struct/) {
# move typedef to below struct
$typedef = $lines[$i];
$j = $i;
while ($lines[$j] !~ /}/) {
$lines[$j] = $lines[$j+1];
$j++;
}
$lines[$j] = $lines[$j+1];
$lines[$j + 1] = $typedef;
}
$cur_line = $lines[$i];
chomp($cur_line);
if ($cur_line =~ /^\/\*\*[\t ]*$/) {
# /** Seen
#print "Comment seen! [$cur_line]\n";
$state = 1;
undef $description;
undef $struct_description;
$i++;
next;
}
if ($cur_line =~ /\*\// and $state == 1) {
#print "END Comment seen!\n";
if ($description =~ /^\\\\file/mg) {
# Doxygen text for the file, do not expect
# a function coming.
#
$state = 0;
} else {
$state = 2;
}
$i++;
next;
}
if ($state == 1) {
# inside doxygen
$cur_line =~ s/\\/\\\\/g;
$cur_line =~ s/^[ \t]*\* ?//;
$description = $description . "\n" . $cur_line;
#$description = $description . "\n.br\n" . $cur_line;
}
if ($state == 2 and $cur_line =~ /const/) {
# the const word exists in the function call
#$const = "const";
#s/[\t ]*const[\t ]*//;
} else {
#undef $const;
}
if ($cur_line =~ /^INLINE/) {
$cur_line =~ s/^INLINE\s*//;
while ($cur_line !~ /{/) {
$i++;
$cur_line .= " ".$lines[$i];
$cur_line =~ s/\n//;
}
$cur_line =~ s/{/;/;
}
if ($cur_line =~ /^[^#*\/ ]([\w\*]+)[\t ]+(.*?)[({](.*)\s*/ and $state == 2) {
while ($cur_line !~ /\)\s*;/) {
$i++;
$cur_line .= $lines[$i];
chomp($cur_line);
$cur_line =~ s/\n/ /g;
$cur_line =~ s/\s\s*/ /g;
}
$cur_line =~ /([\w\* ]+)[\t ]+(.*?)\((.*)\)\s*;/;
# this should also end the current comment parsing
$return = $1;
$key = $2;
$api = $3;
# sometimes the * is stuck to the function
# name instead to the return type
if ($key =~ /^\*/) {
#print"Name starts with *\n";
$key =~ s/^\*//;
if (defined($const)) {
$return = $const . " " . $return . '*';
} else {
$return = $return . '*';
}
}
$description =~ s/\\param\[in\][ \t]*([\*\w]+)[ \t]+/.br\n\\fB$1\\fR: /g;
$description =~ s/\\param\[out\][ \t]*([\*\w]+)[ \t]+/.br\n\\fB$1\\fR: /g;
$description =~ s/\\return[ \t]*/.br\nReturns /g;
# Delete leading spaces to prevent manpages to be ascii format-
# ted and enable justification of text.
#
$description =~ s/^[ \t]*//mg;
# Prevent hyphening of all caps and underscore words
$description =~ s/\b([A-Z_]+)\b/\\%$1/g;
$description{$key} = $description;
$api{$key} = $api;
$return{$key} = $return;
undef $description;
undef $struct_description;
$state = 0;
} elsif ($state == 2 and (
$cur_line =~ /^typedef\sstruct\s(\w+)\s(\w+);/ or
$cur_line =~ /^typedef\senum\s(\w+)\s(\w+);/)) {
$struct_description .= "\n.br\n" . $cur_line;
$key = $2;
$struct_description =~ s/\/\*\*\s*(.*?)\s*\*\//\\fB$1:\\fR/g;
$description{$key} = $struct_description;
$api{$key} = "struct";
$return{$key} = $1;
undef $description;
undef $struct_description;
$state = 0;
} else {
$struct_description .= "\n.br\n" . $cur_line;
}
$i++;
}
# create the manpages
foreach (keys %manpages) {
$name = $manpages{$_};
$also = $see_also{$_};
my $shrt = $shorts{$_};
$filename = @$name[0];
$filename = "$BASE/man$MAN_SECTION/$filename.$MAN_SECTION";
my $symlink_file = @$name[0] . "." . $MAN_SECTION;
# print STDOUT $filename,"\n";
open (MAN, ">$filename") or die "Can not open $filename";
print MAN $MAN_HEADER;
print MAN ".SH NAME\n";
print MAN join ", ", @$name;
if ($shrt) {
print MAN " \\- $shrt";
}
print MAN "\n\n";
print MAN ".SH SYNOPSIS\n";
print MAN "#include <stdint.h>\n.br\n";
print MAN "#include <stdbool.h>\n.br\n";
print MAN ".PP\n";
print MAN "#include <ldns/ldns.h>\n";
print MAN ".PP\n";
foreach (@$name) {
$b = $return{$_};
$b =~ s/\s+$//;
if ($api{$_} ne "struct") {
print MAN $b, " ", $_;
print MAN "(", $api{$_},");\n";
print MAN ".PP\n";
}
}
print MAN "\n.SH DESCRIPTION\n";
foreach (@$name) {
print MAN ".HP\n";
print MAN "\\fI", $_, "\\fR";
if ($api{$_} ne "struct") {
print MAN "()";
}
# print MAN ".br\n";
print MAN $description{$_};
print MAN "\n.PP\n";
}
print MAN $MAN_MIDDLE;
if (@$also) {
print MAN "\n.SH SEE ALSO\n\\fI";
print MAN join "\\fR, \\fI", @$also;
print MAN "\\fR.\nAnd ";
print MAN "\\fBperldoc Net::DNS\\fR, \\fBRFC1034\\fR,
\\fBRFC1035\\fR, \\fBRFC4033\\fR, \\fBRFC4034\\fR and \\fBRFC4035\\fR.\n";
} else {
print MAN ".SH SEE ALSO
\\fBperldoc Net::DNS\\fR, \\fBRFC1034\\fR,
\\fBRFC1035\\fR, \\fBRFC4033\\fR, \\fBRFC4034\\fR and \\fBRFC4035\\fR.\n";
}
print MAN $MAN_FOOTER;
# create symlinks
chdir("$BASE/man$MAN_SECTION");
foreach (@$name) {
print STDOUT $_,"\n";
my $new_file = $_ . "." . $MAN_SECTION;
if ($new_file eq $symlink_file) {
next;
}
#print STDOUT "\t", $new_file, " -> ", $symlink_file, "\n";
symlink $symlink_file, $new_file;
}
chdir("../../.."); # and back, tricky and fragile...
close(MAN);
}
foreach (keys %api) {
next if (/ / || /^$/);
if (not $unique{$_}) {
print STDERR "no man page for $_\n" if $report_errors;
#$errors += 1;
}
}
exit ($report_errors and $errors != 0);

View File

@@ -0,0 +1,220 @@
# first function name will be the real name of the manpage
# other names are aliases (symlinks)
# all functions specified on the same line are included in the
# same manual page. We cannot deal with linebreaks!
# function named after the pipe `|' are put in the "see also" section
# functions that must be included, separated by commas
### host2wire.h
# conversion functions
ldns_rr2wire, ldns_pkt2wire, ldns_rdf2wire | ldns_wire2rr, ldns_wire2pkt, ldns_wire2rdf - conversion functions
# lower level conversions, some are from host2str.h
ldns_pkt2buffer_str, ldns_pktheader2buffer_str, ldns_rr2buffer_str, ldns_rr_list2buffer_str, ldns_rdf2buffer_str, ldns_key2buffer_str, ldns_pkt2buffer_wire, ldns_rr2buffer_wire, ldns_rdf2buffer_wire, ldns_rrsig2buffer_wire, ldns_rr_rdata2buffer_wire | ldns_pkt2str, ldns_rr2str, ldns_rdf2str, ldns_rr_list2str, ldns_key2str - lower level conversions
### /host2wire.h
### host2str.h
ldns_rr2str, ldns_pkt2str, ldns_rdf2str, ldns_rr_list2str, ldns_key2str | ldns_rr_print, ldns_rdf_print, ldns_pkt_print, ldns_rr_list_print, ldns_resolver_print, ldns_zone_print - functions for conversions to string
### /host2str.h
### host2str.h
# and even lower
ldns_rdf2buffer_str_a, ldns_rdf2buffer_str_aaaa, ldns_rdf2buffer_str_str, ldns_rdf2buffer_str_b64, ldns_rdf2buffer_str_hex, ldns_rdf2buffer_str_type, ldns_rdf2buffer_str_class, ldns_rdf2buffer_str_alg, ldns_rdf2buffer_str_loc, ldns_rdf2buffer_str_unknown, ldns_rdf2buffer_str_nsap, ldns_rdf2buffer_str_wks, ldns_rdf2buffer_str_nsec, ldns_rdf2buffer_str_period, ldns_rdf2buffer_str_tsigtime, ldns_rdf2buffer_str_apl, ldns_rdf2buffer_str_int16_data, ldns_rdf2buffer_str_int16, ldns_rdf2buffer_str_ipseckey - lower level to string conversion functions
### /host2str.h
### wire2host.h
# wirefunctions
ldns_wire2rr, ldns_wire2pkt, ldns_wire2rdf, ldns_wire2dname | ldns_rr2wire, ldns_pkt2wire, ldns_rdf2wire, ldns_dname2wire - convert from wire format to host type
ldns_buffer2pkt_wire - convert buffer/wire format to ldns_pkt
### /wire2host.h
### dname.h
ldns_dname_left_chop, ldns_dname_label_count - dname label functions
ldns_dname2canonical - canonicalize dname
ldns_dname_cat_clone, ldns_dname_cat - concatenate two dnames
ldns_dname_new, ldns_dname_new_frm_str, ldns_dname_new_frm_data | ldns_pkt_query_new_frm_str, ldns_rdf_new_frm_str, ldns_rr_new_frm_str - create a dname
ldns_dname_is_subdomain, ldns_dname_str_absolute, ldns_dname_label - check properties of dnames
ldns_dname_compare, ldns_dname_interval | ldns_dname_is_subdomain - compare two dnames
### /dname.h
### dane.h
ldns_dane_create_tlsa_rr, ldns_dane_create_tlsa_owner, ldns_dane_cert2rdf, ldns_dane_select_certificate | ldns_dane_verify, ldns_dane_verify_rr - TLSA RR creation functions
ldns_dane_verify, ldns_dane_verify_rr | ldns_dane_create_tlsa_owner, ldns_dane_cert2rdf, ldns_dane_select_certificate, ldns_dane_create_tlsa_rr - TLSA RR verification functions
### /dane.h
### rdata.h
ldns_rdf, ldns_rdf_type | ldns_rdf_set_size, ldns_rdf_set_type, ldns_rdf_set_data, ldns_rdf_size, ldns_rdf_get_type, ldns_rdf_data, ldns_rdf_compare, ldns_rdf_new, ldns_rdf_clone, ldns_rdf_new_frm_data, ldns_rdf_new_frm_str, ldns_rdf_new_frm_fp, ldns_rdf_free, ldns_rdf_deep_free, ldns_rdf_print, ldns_native2rdf_int8, ldns_native2rdf_int16, ldns_native2rdf_int32, ldns_native2rdf_int16_data, ldns_rdf2native_int8, ldns_rdf2native_int16, ldns_rdf2native_int32, ldns_rdf2native_sockaddr_storage, ldns_rdf2native_time_t, ldns_native2rdf_int8, ldns_native2rdf_int16, ldns_native2rdf_int32, ldns_native2rdf_int16_data, ldns_rdf2native_int8, ldns_rdf2native_int16, ldns_rdf2native_int32, ldns_rdf2native_sockaddr_storage, ldns_rdf2native_time_t, ldns_native2rdf_int8, ldns_native2rdf_int16, ldns_native2rdf_int32, ldns_native2rdf_int16_data, ldns_rdf2native_int8, ldns_rdf2native_int16, ldns_rdf2native_int32, ldns_rdf2native_sockaddr_storage, ldns_rdf2native_time_t - rdata field type
ldns_rdf_set_size, ldns_rdf_set_type, ldns_rdf_set_data | ldns_rdf - set rdf attributes
ldns_rdf_size, ldns_rdf_get_type, ldns_rdf_data, ldns_rdf_compare | ldns_rdf - get rdf attributes
ldns_rdf_new, ldns_rdf_clone, ldns_rdf_new_frm_data, ldns_rdf_new_frm_str, ldns_rdf_new_frm_fp, ldns_rdf_free, ldns_rdf_deep_free, ldns_rdf_print | ldns_rdf - ldns_rdf creation, destruction and printing
ldns_native2rdf_int8, ldns_native2rdf_int16, ldns_native2rdf_int32, ldns_native2rdf_int16_data, ldns_rdf2native_int8, ldns_rdf2native_int16, ldns_rdf2native_int32, ldns_rdf2native_sockaddr_storage, ldns_rdf2native_time_t | ldns_rdf - rdf numeric conversion functions
ldns_rdf_address_reverse | ldns_rdf - reverse an address rdf
ldns_octet | ldns_rdf - removes escaped from the input
# why is this in rdata.h?
ldns_str2period - converts a ttl value (like 5d2h) to a long
### /rdata.h
### higher.h
ldns_get_rr_list_addr_by_name, ldns_get_rr_list_name_by_addr | ldns_rr_list, ldns_rr - get addresses by name or names by address
ldns_get_rr_list_hosts_frm_file, ldns_get_rr_list_hosts_frm_fp, ldns_get_rr_list_hosts_frm_fp_l | ldns_rr_list, ldns_rr - parse /etc/hosts file
ldns_getaddrinfo - mimic libc getaddrinfo
### /higher.h
#
### dnssec.h
#
# algs
ldns_verify_rrsig_dsa, ldns_verify_rrsig_rsasha1, ldns_verify_rrsig_rsamd5 | ldns_key, ldns_sign_public, ldns_zone_sign, ldns_verify, ldns_verify_rrsig - verify signature data buffers
# tsig
ldns_pkt_tsig_verify, ldns_pkt_tsig_sign | ldns_key - tsig signing and verification
# verify
ldns_verify, ldns_verify_rrsig, ldns_verify_rrsig_keylist, ldns_verify_rrsig_keylist_notime, ldns_verify_notime | ldns_verify_rrsig_evp | ldns_verify_rrsig_dsa, ldns_verify_rrsig_rsasha1, ldns_verify_rrsig_rsamd5, ldns_sign_public, ldns_zone_sign, ldns_key - verify rrsigs
# convert
ldns_key_buf2dsa, ldns_key_buf2rsa | ldns_key_rr2ds - convert buffer to openssl key
ldns_key_rr2ds | ldns_key - create DS rr from DNSKEY rr
ldns_create_nsec | ldns_sign_public - Create a NSEC record
# signing
ldns_sign_public | ldns_sign_public_dsa, ldns_sign_public_rsamd5, ldns_sign_public_rsasha1, ldns_verify, ldns_verify_rrsig, ldns_key - sign an rrset
ldns_sign_public_dsa, ldns_sign_public_rsamd5, ldns_sign_public_rsasha1 | ldns_sign_public - sign buffer
ldns_init_random | ldns_sign_public, ldns_key - seed the random function
ldns_pkt_verify | ldns_verify, ldns_sign_public, ldns_zone_sign - verify a packet
ldns_zone_sign, ldns_zone_sign_nsec3 - dnssec sign a zone
# new family of dnssec functions
ldns_dnssec_zone, ldns_dnssec_name, ldns_dnssec_rrs, ldns_dnssec_rrsets | ldns_dnssec_zone_new, ldns_dnssec_name_new, ldns_dnssec_rrs_new, ldns_dnssec_rrsets_new - data structures
ldns_dnssec_zone_find_rrset, ldns_dnssec_zone_new, ldns_dnssec_zone_free, ldns_dnssec_zone_add_rr, ldns_dnssec_zone_names_print, ldns_dnssec_zone_print, ldns_dnssec_zone_add_empty_nonterminals | ldns_dnssec_zone - functions for ldns_dnssec_zone
ldns_dnssec_name_new, ldns_dnssec_name_new_frm_rr, ldns_dnssec_name_free, ldns_dnssec_name_name, ldns_dnssec_name_set_name, ldns_dnssec_name_set_nsec, ldns_dnssec_name_cmp, ldns_dnssec_name_add_rr, ldns_dnssec_name_find_rrset, ldns_dnssec_name_print | ldns_dnssec_zone - functions for ldns_dnssec_name
ldns_dnssec_rrsets_new, ldns_dnssec_rrsets_free, ldns_dnssec_rrsets_type, ldns_dnssec_rrsets_set_type, ldns_dnssec_rrsets_add_rr, ldns_dnssec_rrsets_print | ldns_dnssec_zone - functions for ldns_dnssec_rrsets
ldns_dnssec_rrs_new, ldns_dnssec_rrs_free, ldns_dnssec_rrs_add_rr, ldns_dnssec_rrs_print | ldns_dnssec_zone - functions for ldns_dnssec-rrs
# verification
ldns_dnssec_data_chain, ldns_dnssec_data_chain_struct, ldns_dnssec_trust_tree | ldns_dnssec_data_chain_new, ldns_dnssec_trust_tree_new, ldns_dnssec_verify_denial - data structures for validation chains
ldns_dnssec_data_chain_new, ldns_dnssec_data_chain_free, ldns_dnssec_data_chain_deep_free, ldns_dnssec_build_data_chain, ldns_dnssec_data_chain_print | ldns_dnssec_data_chain - ldns_chain creation, destruction and printing
ldns_dnssec_trust_tree_new, ldns_dnssec_trust_tree_free, ldns_dnssec_trust_tree_depth, ldns_dnssec_derive_trust_tree, ldns_dnssec_trust_tree_contains_keys, ldns_dnssec_trust_tree_print, ldns_dnssec_trust_tree_print_sm, ldns_dnssec_trust_tree_add_parent, ldns_dnssec_derive_trust_tree_normal_rrset, ldns_dnssec_derive_trust_tree_dnskey_rrset, ldns_dnssec_derive_trust_tree_ds_rrset, ldns_dnssec_derive_trust_tree_no_sig | ldns_dnssec_data_chain, ldns_dnssec_trust_tree - functions for ldns_dnssec_trust_tree
ldns_dnssec_verify_denial, ldns_dnssec_verify_denial_nsec3 | ldns_dnssec_trust_tree, ldns_dnssec_data_chain - verify denial of existence
# new signing functions
ldns_dnssec_zone_sign, ldns_dnssec_zone_sign_nsec3, ldns_dnssec_zone_mark_glue, ldns_dnssec_name_node_next_nonglue, ldns_dnssec_zone_create_nsecs, ldns_dnssec_remove_signatures, ldns_dnssec_zone_create_rrsigs | ldns_dnssec_zone - sign ldns_dnssec_zone
### /dnssec.h
### dnskey.h
ldns_key_new, ldns_key_new_frm_algorithm, ldns_key_new_frm_fp, ldns_key_new_frm_fp_l, ldns_key_new_frm_fp_rsa, ldns_key_new_frm_fp_rsa_l, ldns_key_new_frm_fp_dsa, ldns_key_new_frm_fp_dsa_l | ldns_key - create a ldns_key
ldns_key_list_new - create a ldns_key_list
# access, write
ldns_key_set_algorithm, ldns_key_set_rsa_key, ldns_key_set_dsa_key, ldns_key_set_hmac_key, ldns_key_set_origttl, ldns_key_set_inception, ldns_key_set_expiration, ldns_key_set_pubkey_owner, ldns_key_set_keytag, ldns_key_set_flags, ldns_key_list_set_key_count, ldns_key_algo_supported | ldns_key_push_key, ldns_key - set ldns_key attributes
ldns_key_list_push_key, ldns_key_list_pop_key | ldns_key - manipulate ldns_key_list
# access, read
ldns_key_list_key_count, ldns_key_list_key, ldns_key_rsa_key, ldns_key_dsa_key, ldns_key_algorithm, ldns_key_hmac_key, ldns_key_origttl, ldns_key_inception, ldns_key_expiration, ldns_key_keytag, ldns_key_pubkey_owner, ldns_key_flags | ldns_key - read ldns_keys
# convert
ldns_key2rr | ldns_key - convert ldns_key to rr
ldns_key_free, ldns_key_deep_free, ldns_key_list_free | ldns_key - free a ldns_key
#
ldns_key_print | ldns_key_new, ldns_key - print a ldns_key
ldns_calc_keytag, ldns_calc_keytag_raw | ldns_key - calculate ldns keytag
ldns_key | ldns_key_new, ldns_key_new_frm_algorithm,ldns_key_new_frm_fp,ldns_key_new_frm_fp_l, ldns_key_new_frm_fp_rsa, ldns_key_new_frm_fp_rsa_l, ldns_key_new_frm_fp_dsa, ldns_key_new_frm_fp_dsa_l, ldns_key_list_new, ldns_key_set_algorithm, ldns_key_set_rsa_key, ldns_key_set_dsa_key, ldns_key_set_hmac_key, ldns_key_set_origttl, ldns_key_set_inception, ldns_key_set_expiration, ldns_key_set_pubkey_owner, ldns_key_set_keytag, ldns_key_set_flags, ldns_key_list_set_key_count, ldns_key_list_push_key, ldns_key_list_pop_key, ldns_key_list_key_count, ldns_key_list_key, ldns_key_rsa_key, ldns_key_dsa_key, ldns_key_algorithm, ldns_key_hmac_key, ldns_key_origttl, ldns_key_inception, ldns_key_expiration, ldns_key_keytag, ldns_key_pubkey_owner, ldns_key_flags, ldns_key2rr, ldns_key_free, ldns_key_deep_free, ldns_key_list_free, ldns_key_print - ldns_key data structure
### /dnskey.h
### MIEK TOT HIER TOT HIER
# error.h
ldns_get_errorstr_by_id, ldns_status - errors
### net.h
ldns_send | ldns_pkt, ldns_resolver - send a packet
ldns_tcp_send_query, ldns_tcp_read_wire, ldns_tcp_connect | ldns_send, ldns_pkt, ldns_resolver - tcp queries
### /net.h
### buffer.h
# general
ldns_buffer, ldns_buffer_new, ldns_buffer_new_frm_data, ldns_buffer_clear, ldns_buffer_printf, ldns_buffer_free, ldns_buffer_copy, ldns_buffer_export, ldns_buffer_export2str, ldns_buffer2str | ldns_buffer_flip, ldns_buffer_rewind, ldns_buffer_position, ldns_buffer_set_position, ldns_buffer_skip, ldns_buffer_limit, ldns_buffer_set_limit, ldns_buffer_capacity, ldns_buffer_set_capacity, ldns_buffer_reserve, ldns_buffer_at, ldns_buffer_begin, ldns_buffer_end, ldns_buffer_current, ldns_buffer_remaining_at, ldns_buffer_remaining, ldns_buffer_available_at, ldns_buffer_available, ldns_buffer_status, ldns_buffer_status_ok, ldns_buffer_write_at, ldns_buffer_write, ldns_buffer_write_string_at, ldns_buffer_write_string, ldns_buffer_write_u8_at, ldns_buffer_write_u8, ldns_buffer_write_u16_at, ldns_buffer_write_u16, ldns_buffer_read_at, ldns_buffer_read, ldns_buffer_read_u8_at, ldns_buffer_read_u8, ldns_buffer_read_u16_at, ldns_buffer_read_u16, ldns_buffer_read_u32_at, ldns_buffer_read_u32, ldns_buffer_write_u32, ldns_buffer_write_u32_at - buffers
# position
ldns_buffer_flip, ldns_buffer_rewind, ldns_buffer_position, ldns_buffer_set_position, ldns_buffer_skip | ldns_buffer - buffer positioning
# values and pointers
ldns_buffer_limit, ldns_buffer_set_limit, ldns_buffer_capacity, ldns_buffer_set_capacity, ldns_buffer_reserve, ldns_buffer_at, ldns_buffer_begin, ldns_buffer_end, ldns_buffer_current | ldns_buffer - buffer limits and pointers
# info
ldns_buffer_remaining_at, ldns_buffer_remaining, ldns_buffer_available_at, ldns_buffer_available, ldns_buffer_status, ldns_buffer_status_ok | ldns_buffer - check buffer status
# read and write
ldns_buffer_write_at, ldns_buffer_write, ldns_buffer_write_string_at, ldns_buffer_write_string, ldns_buffer_write_u8_at, ldns_buffer_write_u8, ldns_buffer_write_u16_at, ldns_buffer_write_u16, ldns_buffer_read_at, ldns_buffer_read, ldns_buffer_read_u8_at, ldns_buffer_read_u8, ldns_buffer_read_u16_at, ldns_buffer_read_u16, ldns_buffer_read_u32_at, ldns_buffer_read_u32, ldns_buffer_write_u32, ldns_buffer_write_u32_at | ldns_buffer - reading and writing buffers
### /buffer.h
# parse.h
ldns_bget_token, ldns_bgetc, ldns_bskipcs | ldns_buffer - get tokens from buffers
ldns_fget_token, ldns_fskipcs | ldns_buffer - get tokens from files
# rr.h and other general rr funcs
ldns_rr, ldns_rr_class, ldns_rr_type, ldns_rr_compress, ldns_rr_list | ldns_rr_new, ldns_rr_new_frm_type, ldns_rr_new_frm_str, ldns_rr_new_frm_fp, ldns_rr_free, ldns_rr_print, ldns_rr_set_owner, ldns_rr_set_ttl, ldns_rr_set_type, ldns_rr_set_rd_count, ldns_rr_set_class, ldns_rr_set_rdf, ldns_rr_push_rdf, ldns_rr_pop_rdf, ldns_rr_rdf, ldns_rr_owner, ldns_rr_rd_count, ldns_rr_ttl, ldns_rr_get_class, ldns_rr_list_rr_count, ldns_rr_list_set_rr_count, ldns_rr_list_new, ldns_rr_list_free, ldns_rr_list_cat, ldns_rr_list_push_rr, ldns_rr_list_pop_rr, ldns_is_rrset, ldns_rr_set_push_rr, ldns_rr_set_pop_rr, ldns_get_rr_class_by_name, ldns_get_rr_type_by_name, ldns_rr_list_clone, ldns_rr_list_sort, ldns_rr_compare, ldns_rr_compare_ds, ldns_rr_uncompressed_size, ldns_rr2canonical, ldns_rr_label_count, ldns_is_rrset, ldns_rr_descriptor, ldns_rr_descript - types representing dns resource records
ldns_rr_new, ldns_rr_new_frm_type, ldns_rr_new_frm_str, ldns_rr_new_frm_fp, ldns_rr_free, ldns_rr_print | ldns_rr, ldns_rr_list - ldns_rr creation, destruction and printing
ldns_rr_set_owner, ldns_rr_set_ttl, ldns_rr_set_type, ldns_rr_set_rd_count, ldns_rr_set_class, ldns_rr_set_rdf | ldns_rr, ldns_rr_list - set ldns_rr attributes
ldns_rr_push_rdf, ldns_rr_pop_rdf | ldns_rr, ldns_rr_list - push and pop rdata fields
ldns_rr_rdf, ldns_rr_owner, ldns_rr_rd_count, ldns_rr_ttl, ldns_rr_get_class | ldns_rr, ldns_rr_list - access rdata fields on ldns_rr
ldns_rr_list_rr_count, ldns_rr_list_set_rr_count | ldns_rr, ldns_rr_list - get and set ldns_rr_list length
ldns_rr_list_new, ldns_rr_list_free | ldns_rr, ldns_rr_list - ldns_rr_list creation and destruction
ldns_rr_list_cat, ldns_rr_list_push_rr, ldns_rr_list_pop_rr | ldns_rr, ldns_rr_list - ldns_rr_list manipulation
ldns_is_rrset | ldns_rr, ldns_rr_list - is rr_list a rrset
ldns_rr_set_push_rr, ldns_rr_set_pop_rr | ldns_rr, ldns_rr_list - push and pop rr on a rrset
ldns_get_rr_class_by_name, ldns_get_rr_type_by_name | ldns_rr, ldns_rr_list - lookup class or type by name
ldns_rr_list_clone | ldns_rr, ldns_rr_list - clone a ldns_rr_list
ldns_rr_list_sort | ldns_rr, ldns_rr_list - sort a ldns_rr_list
ldns_rr_compare, ldns_rr_compare_ds | ldns_rr, ldns_rr_list - compare a ldns_rr
ldns_rr_uncompressed_size | ldns_rr, ldns_rr_list - calculates the uncompressed size of an RR
ldns_rr2canonical | ldns_rr, ldns_rr_list - canonicalize a RR
ldns_rr_label_count | ldns_rr, ldns_rr_list - return ownername label count
# rr descriptors
ldns_rr_descriptor, ldns_rr_descript, ldns_rr_descriptor_minimum, ldns_rr_descriptor_maximum, ldns_rr_descriptor_field_type | ldns_rr, ldns_rdf - rdata field descriptors
# packet.h
ldns_pkt, ldns_pkt_section, ldns_pkt_type | ldns_pkt_new, ldns_pkt_free, ldns_pkt_print, ldns_pkt_query_new, ldns_pkt_query_new_frm_str, ldns_pkt_reply_type, ldns_pkt_id, ldns_pkt_qr, ldns_pkt_aa, ldns_pkt_tc, ldns_pkt_rd, ldns_pkt_cd, ldns_pkt_ra, ldns_pkt_ad, ldns_pkt_get_opcode, ldns_pkt_get_rcode, ldns_pkt_qdcount, ldns_pkt_ancount, ldns_pkt_nscount, ldns_pkt_arcount, ldns_pkt_answerfrom, ldns_pkt_querytime, ldns_pkt_size, ldns_pkt_tsig, ldns_pkt_question, ldns_pkt_answer, ldns_pkt_authority, ldns_pkt_additional, ldns_pkt_get_section_clone, ldns_pkt_rr_list_by_name, ldns_pkt_rr_list_by_type, ldns_pkt_rr_list_by_name_and_type, ldns_pkt_set_flags, ldns_pkt_set_id, ldns_pkt_set_qr, ldns_pkt_set_aa, ldns_pkt_set_tc, ldns_pkt_set_rd, ldns_pkt_set_cd, ldns_pkt_set_ra, ldns_pkt_set_ad, ldns_pkt_set_opcode, ldns_pkt_set_rcode, ldns_pkt_set_qdcount, ldns_pkt_set_ancount, ldns_pkt_set_nscount, ldns_pkt_set_arcount, ldns_pkt_set_answerfrom, ldns_pkt_set_querytime, ldns_pkt_set_size, ldns_pkt_set_section_count, ldns_pkt_set_tsig, ldns_pkt_edns, ldns_pkt_edns_udp_size, ldns_pkt_edns_extended_rcode, ldns_pkt_edns_version, ldns_pkt_edns_z, ldns_pkt_edns_unassigned, ldns_pkt_edns_data, ldns_pkt_set_edns_udp_size, ldns_pkt_set_edns_extended_rcode, ldns_pkt_set_edns_version, ldns_pkt_set_edns_z, ldns_pkt_set_edns_unassigned, ldns_pkt_set_edns_data - request or answer packets types
ldns_pkt_new, ldns_pkt_free, ldns_pkt_print, ldns_pkt_query_new, ldns_pkt_query_new_frm_str, ldns_pkt_reply_type | ldns_pkt - ldns_pkt creation, destruction and printing
# gets
ldns_pkt_id, ldns_pkt_qr, ldns_pkt_aa, ldns_pkt_tc, ldns_pkt_rd, ldns_pkt_cd, ldns_pkt_ra, ldns_pkt_ad, ldns_pkt_get_opcode, ldns_pkt_get_rcode, ldns_pkt_qdcount, ldns_pkt_ancount, ldns_pkt_nscount, ldns_pkt_arcount, ldns_pkt_answerfrom, ldns_pkt_querytime, ldns_pkt_size, ldns_pkt_tsig, ldns_pkt_question, ldns_pkt_answer, ldns_pkt_authority, ldns_pkt_additional, ldns_pkt_get_section_clone, ldns_pkt_rr_list_by_name, ldns_pkt_rr_list_by_type, ldns_pkt_rr_list_by_name_and_type | ldns_pkt - get ldns_pkt attributes
# sets
ldns_pkt_set_flags, ldns_pkt_set_id, ldns_pkt_set_qr, ldns_pkt_set_aa, ldns_pkt_set_tc, ldns_pkt_set_rd, ldns_pkt_set_cd, ldns_pkt_set_ra, ldns_pkt_set_ad, ldns_pkt_set_opcode, ldns_pkt_set_rcode, ldns_pkt_set_qdcount, ldns_pkt_set_ancount, ldns_pkt_set_nscount, ldns_pkt_set_arcount, ldns_pkt_set_answerfrom, ldns_pkt_set_querytime, ldns_pkt_set_size, ldns_pkt_set_section_count, ldns_pkt_set_tsig | ldns_pkt - set ldns_pkt attributes
# EDNS0
ldns_pkt_edns, ldns_pkt_edns_udp_size, ldns_pkt_edns_extended_rcode, ldns_pkt_edns_version, ldns_pkt_edns_z, ldns_pkt_edns_data, ldns_pkt_set_edns_udp_size, ldns_pkt_set_edns_extended_rcode, ldns_pkt_set_edns_version, ldns_pkt_set_edns_z, ldns_pkt_set_edns_data | ldns_pkt - ldns_pkt ends0 related functions
# rr_functions.h
ldns_rr_ns_nsdname - get dname rdata field from NS RR
#
ldns_rr_mx_preference, ldns_rr_mx_exchange - get MX RR rdata fields
#
ldns_rr_rrsig_typecovered, ldns_rr_rrsig_set_typecovered, ldns_rr_rrsig_algorithm, ldns_rr_rrsig_set_algorithm, ldns_rr_rrsig_labels, ldns_rr_rrsig_set_labels, ldns_rr_rrsig_origttl, ldns_rr_rrsig_set_origttl, ldns_rr_rrsig_expiration, ldns_rr_rrsig_set_expiration, ldns_rr_rrsig_inception, ldns_rr_rrsig_set_inception, ldns_rr_rrsig_keytag, ldns_rr_rrsig_set_keytag, ldns_rr_rrsig_signame, ldns_rr_rrsig_set_signame, ldns_rr_rrsig_sig, ldns_rr_rrsig_set_sig - get and set RRSIG RR rdata fields
#
ldns_rr_dnskey_flags, ldns_rr_dnskey_set_flags, ldns_rr_dnskey_protocol, ldns_rr_dnskey_set_protocol, ldns_rr_dnskey_algorithm, ldns_rr_dnskey_set_algorithm, ldns_rr_dnskey_key, ldns_rr_dnskey_set_key | ldns_rr - get and set DNSKEY RR rdata fields
### zone.h
ldns_zone, ldns_zone_new, ldns_zone_free, ldns_zone_deep_free, ldns_zone_new_frm_fp, ldns_zone_new_frm_fp_l, ldns_zone_print, ldns_zone_print_fmt - ldns_zone creation, destruction and printing
ldns_zone_sort, ldns_zone_glue_rr_list | ldns_zone - sort a zone and get the glue records
ldns_zone_push_rr, ldns_zone_push_rr_list | ldns_zone - add rr's to a ldns_zone
ldns_zone_set_rrs, ldns_zone_set_soa | ldns_zone, ldns_zone_rrs, ldns_zone_soa - ldns_zone set content
ldns_zone_rrs, ldns_zone_soa | ldns_zone ldns_zone_set_rrs - ldns_zone get content
ldns_zone_rr_count | ldns_zone - get ldns_zone size
### update.h
ldns_update_pkt_new | ldns_update_pkt_tsig_add, ldns_update_pkt_tsig_add, ldns_update_zocount, ldns_update_prcount, ldns_update_upcount, ldns_update_adcount, ldns_update_set_zocount, ldns_update_set_prcount, ldns_update_set_upcount, ldns_update_set_adcount - create an update packet
ldns_update_pkt_tsig_add | ldns_update_pkt_new - add resolver's tsig credentials to an ldns_pkt
ldns_update_zocount, ldns_update_prcount, ldns_update_upcount, ldns_update_adcount | ldns_update_pkt_new - return update packet counters
ldns_update_set_zocount, ldns_update_set_prcount, ldns_update_set_upcount, ldns_update_set_adcount | ldns_update_pkt_new - set the update packet counters
### keys.h
ldns_algorithm - numbers assigned to algorithms used in dns
ldns_axfr_start, ldns_axfr_next, ldns_axfr_abort, ldns_axfr_complete, ldns_axfr_last_pkt - functions for full zone transfer
ldns_b32_ntop_calculate_size, ldns_b32_pton_calculate_size, ldns_b64_ntop_calculate_size, ldns_b64_pton_calculate_size - return size needed for b32 or b64 encoded or decoded data
ldns_duration_type, ldns_duration_create, ldns_duration_create_from_string, ldns_duration_cleanup, ldns_duration_compare, ldns_duration2string, ldns_duration2time - duration type and related functions
ldns_bubblebabble - encode data as BubbleBabble
ldns_version - return library version

View File

@@ -0,0 +1,55 @@
<!-- HTML header for doxygen 1.8.11-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen $doxygenversion"/>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="$relpath^jquery.js"></script>
<script type="text/javascript" src="$relpath^dynsections.js"></script>
$treeview
$search
$mathjax
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
$extrastylesheet
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!--BEGIN TITLEAREA-->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<!--BEGIN PROJECT_LOGO-->
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"/></td>
<!--END PROJECT_LOGO-->
<!--BEGIN PROJECT_NAME-->
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">$projectname
<!--BEGIN PROJECT_NUMBER-->&#160;<span id="projectnumber">$projectnumber</span><!--END PROJECT_NUMBER-->
</div>
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
</td>
<!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME-->
<!--BEGIN PROJECT_BRIEF-->
<td style="padding-left: 0.5em;">
<div id="projectbrief">$projectbrief</div>
</td>
<!--END PROJECT_BRIEF-->
<!--END !PROJECT_NAME-->
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN SEARCHENGINE-->
<td>$searchbox</td>
<!--END SEARCHENGINE-->
<!--END DISABLE_INDEX-->
</tr>
</tbody>
</table>
</div>
<!--END TITLEAREA-->
<!-- end header part -->

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@@ -0,0 +1,475 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="744.09448819"
height="1052.3622047"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.43"
sodipodi:docbase="/home/jeltejan/Desktop"
sodipodi:docname="libdnsoverview.svg">
<defs
id="defs4">
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow1Lend"
style="overflow:visible;">
<path
id="path6471"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
transform="scale(0.8) rotate(180)" />
</marker>
<marker
inkscape:stockid="Arrow2Lstart"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow2Lstart"
style="overflow:visible">
<path
id="path6456"
style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="scale(1.1) translate(-5,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lstart"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow1Lstart"
style="overflow:visible">
<path
id="path6474"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
transform="scale(0.8)" />
</marker>
<linearGradient
inkscape:collect="always"
id="linearGradient6293">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop6295" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop6297" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6293"
id="radialGradient6299"
cx="247.14285"
cy="314.14789"
fx="247.14285"
fy="314.14789"
r="53.357145"
gradientTransform="matrix(0.360193,0.932878,-0.364659,0.140798,328.3948,67.21935)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6293"
id="radialGradient6487"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.533404,-0.663938,0.262021,0.206525,-65.56892,208.3559)"
cx="247.14285"
cy="314.14789"
fx="247.14285"
fy="314.14789"
r="53.357145" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6293"
id="radialGradient6491"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.700682,8.366694e-2,-3.154009e-2,0.264153,261.3825,-3.441503)"
cx="247.14285"
cy="314.14789"
fx="247.14285"
fy="314.14789"
r="53.357145" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6293"
id="radialGradient6495"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.304578,-0.203794,0.310458,-3.225552e-2,282.7444,163.9328)"
cx="247.14285"
cy="314.14789"
fx="247.14285"
fy="314.14789"
r="53.357145" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6293"
id="radialGradient7376"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.304578,-0.390833,0.310458,-6.185918e-2,472.4645,371.958)"
cx="247.14285"
cy="314.14789"
fx="247.14285"
fy="314.14789"
r="53.357145" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6293"
id="radialGradient7384"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-9.134252e-2,-1.242432,0.752705,0.765448,-7.814871,371.0985)"
cx="247.14285"
cy="314.14789"
fx="247.14285"
fy="314.14789"
r="53.357145" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4"
inkscape:cx="321.73243"
inkscape:cy="789.1913"
inkscape:document-units="px"
inkscape:current-layer="layer1"
inkscape:window-width="1184"
inkscape:window-height="910"
inkscape:window-x="10"
inkscape:window-y="61"
showguides="true" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g1350"
transform="translate(6.428571,-50)">
<text
id="text1307"
y="104.24736"
x="271.21109"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
id="tspan1311"
y="104.24736"
x="271.21109"
sodipodi:role="line">- CLIENT -</tspan></text>
<text
id="text1315"
y="123.79076"
x="204.28571"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="123.79076"
x="204.28571"
id="tspan1317"
sodipodi:role="line">any program making use of ldns</tspan></text>
</g>
<g
id="g1339"
transform="translate(-78.57144,-104.2857)">
<text
id="text1319"
y="269.50504"
x="132.85713"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="269.50504"
x="132.85713"
id="tspan1321"
sodipodi:role="line">- WIRE module -</tspan><tspan
id="tspan1323"
y="284.50504"
x="132.85713"
sodipodi:role="line" /></text>
<text
id="text1325"
y="288.07648"
x="79.999992"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="288.07648"
x="79.999992"
id="tspan1327"
sodipodi:role="line"> from_wire</tspan><tspan
id="tspan1329"
y="303.07648"
x="79.999992"
sodipodi:role="line"> to_wire</tspan><tspan
id="tspan1331"
y="318.07648"
x="79.999992"
sodipodi:role="line">- convert to and from wireformat</tspan><tspan
id="tspan1333"
y="333.07648"
x="79.999992"
sodipodi:role="line">- all name encoding and decoding</tspan><tspan
id="tspan1335"
y="348.07648"
x="79.999992"
sodipodi:role="line"> is contained in these functions</tspan></text>
</g>
<g
id="g1384"
transform="translate(1.428571,-235.7143)">
<text
id="text1356"
y="374.50507"
x="248.57143"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="374.50507"
x="248.57143"
id="tspan1358"
sodipodi:role="line">- central structures -</tspan></text>
<text
id="text1360"
y="393.79074"
x="260"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="393.79074"
x="260"
id="tspan1362"
sodipodi:role="line">pkt structure</tspan><tspan
id="tspan1368"
y="408.79074"
x="260"
sodipodi:role="line">rdf structure</tspan><tspan
id="tspan1374"
y="423.79074"
x="260"
sodipodi:role="line">dname structure</tspan><tspan
id="tspan1376"
y="438.79074"
x="260"
sodipodi:role="line">rr structure</tspan><tspan
id="tspan1378"
y="453.79074"
x="260"
sodipodi:role="line">rrlist structure</tspan><tspan
id="tspan1380"
y="468.79074"
x="260"
sodipodi:role="line">rrset structure</tspan><tspan
id="tspan1382"
y="483.79074"
x="260"
sodipodi:role="line">pkt structure</tspan><tspan
y="498.79074"
x="260"
sodipodi:role="line"
id="tspan1466">zone structure</tspan></text>
</g>
<g
id="g1440"
transform="translate(146.5289,-247.1429)">
<text
id="text1396"
y="384.50504"
x="291.42856"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="384.50504"
x="291.42856"
id="tspan1398"
sodipodi:role="line">- resolver module -</tspan><tspan
id="tspan1400"
y="399.50504"
x="291.42856"
sodipodi:role="line" /></text>
<text
id="text1402"
y="403.79077"
x="308.57141"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="403.79077"
x="308.57141"
id="tspan1404"
sodipodi:role="line">stub resolver</tspan><tspan
id="tspan1406"
y="418.79077"
x="308.57141"
sodipodi:role="line">send</tspan><tspan
id="tspan1408"
y="433.79077"
x="308.57141"
sodipodi:role="line">query</tspan><tspan
id="tspan1410"
y="448.79077"
x="308.57141"
sodipodi:role="line">bgsend</tspan><tspan
id="tspan1412"
y="463.79077"
x="308.57141"
sodipodi:role="line">axfr</tspan><tspan
id="tspan1414"
y="478.79077"
x="308.57141"
sodipodi:role="line" /></text>
</g>
<g
id="g1452"
transform="translate(338.5714,-85.71429)">
<text
id="text1416"
y="390.93359"
x="114.28572"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="390.93359"
x="114.28572"
id="tspan1418"
sodipodi:role="line">- net module -</tspan><tspan
id="tspan1420"
y="405.93359"
x="114.28572"
sodipodi:role="line" /></text>
<text
id="text1422"
y="409.50507"
x="72.142853"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="409.50507"
x="72.142853"
id="tspan1424"
sodipodi:role="line">all network interfacing code</tspan></text>
</g>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="448.59805"
y="386.64789"
id="text1426"><tspan
sodipodi:role="line"
id="tspan1428"
x="448.59805"
y="386.64789">- OS/libc layer -</tspan></text>
<g
id="g1484"
transform="translate(-26.42857,-10)">
<text
id="text1468"
y="371.64789"
x="105"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="371.64789"
x="105"
id="tspan1470"
sodipodi:role="line">str module</tspan></text>
<text
id="text1472"
y="390.93362"
x="53.57143"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="390.93362"
x="53.57143"
id="tspan1474"
sodipodi:role="line"> from_str</tspan><tspan
id="tspan1476"
y="405.93362"
x="53.57143"
sodipodi:role="line"> to_str</tspan><tspan
id="tspan1478"
y="420.93362"
x="53.57143"
sodipodi:role="line">- convert from and to string</tspan><tspan
id="tspan1480"
y="435.93362"
x="53.57143"
sodipodi:role="line">- dig-style formatted output</tspan><tspan
id="tspan1482"
y="450.93362"
x="53.57143"
sodipodi:role="line" /></text>
</g>
<g
id="g1459"
transform="translate(-198.5714,9.285712)">
<text
id="text1430"
y="426.64789"
x="454.28574"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="426.64789"
x="454.28574"
id="tspan1432"
sodipodi:role="line">DNSSEC module</tspan></text>
<text
id="text1434"
y="445.93359"
x="486.42859"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
xml:space="preserve"><tspan
y="445.93359"
x="486.42859"
id="tspan1436"
sodipodi:role="line">sign</tspan><tspan
id="tspan1438"
y="460.93359"
x="486.42859"
sodipodi:role="line">verify</tspan></text>
</g>
<path
style="opacity:1;color:#000000;fill:url(#radialGradient6299);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:url(#Arrow1Lstart);marker-mid:none;marker-end:url(#Arrow1Lend);stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M 302.80907,285.36328 C 302.9052,398.64679 302.9052,398.64679 302.9052,398.64679"
id="path5410" />
<path
style="opacity:1;color:#000000;fill:url(#radialGradient6487);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:url(#Arrow1Lstart);marker-mid:none;marker-end:url(#Arrow1Lend);stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M 106.73167,133.48635 C 190.41118,84.809439 190.41118,84.809439 190.41118,84.809439"
id="path6485" />
<path
style="opacity:1;color:#000000;fill:url(#radialGradient6491);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:url(#Arrow1Lstart);marker-mid:none;marker-end:url(#Arrow1Lend);stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M 389.24933,82.040347 C 460.03637,118.39829 460.03637,118.39829 460.03637,118.39829"
id="path6489" />
<path
style="opacity:1;color:#000000;fill:url(#radialGradient6495);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:url(#Arrow1Lstart);marker-mid:none;marker-end:url(#Arrow1Lend);stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M 304.93106,115.88536 C 305.06893,90.981858 305.06893,90.981858 305.06893,90.981858"
id="path6493" />
<path
style="opacity:1;color:#000000;fill:url(#radialGradient7376);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:url(#Arrow1Lstart);marker-mid:none;marker-end:url(#Arrow1Lend);stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M 494.65118,279.81341 C 494.78905,232.0538 494.78905,232.0538 494.78905,232.0538"
id="path7374" />
<path
style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:url(#Arrow1Lstart);marker-mid:none;marker-end:url(#Arrow1Lend);stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M 494.65118,364.09965 C 494.78905,339.19615 494.78905,339.19615 494.78905,339.19615"
id="path7378"
transform="matrix(1,0,1e-2,1,0,0)" />
<path
style="opacity:1;color:#000000;fill:url(#radialGradient7384);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:url(#Arrow1Lstart);marker-mid:none;marker-end:url(#Arrow1Lend);stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M 171.70014,330.31326 C 240.44271,278.69682 240.44271,278.69682 240.44271,278.69682"
id="path7382" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -0,0 +1,425 @@
BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
font-family: Geneva, Arial, Helvetica, sans-serif;
}
BODY,TD {
font-size: 90%;
}
H1 {
text-align: center;
font-size: 160%;
}
H2 {
font-size: 120%;
}
H3 {
font-size: 100%;
}
CAPTION { font-weight: bold }
DIV.qindex {
width: 100%;
background-color: #e8eef2;
border: 1px solid #84c7b0;
text-align: center;
margin: 2px;
padding: 2px;
line-height: 140%;
}
DIV.nav {
width: 100%;
background-color: #e8eef2;
border: 1px solid #84c7b0;
text-align: center;
margin: 2px;
padding: 2px;
line-height: 140%;
}
DIV.navtab {
background-color: #e8eef2;
border: 1px solid #84c7b0;
text-align: center;
margin: 2px;
margin-right: 15px;
padding: 2px;
}
TD.navtab {
font-size: 70%;
}
A {
text-decoration: none;
font-weight: bold;
color: #1ba159;
}
A.qindex {
text-decoration: none;
font-weight: bold;
color: #1ba159;
}
A.qindex:visited {
text-decoration: none;
font-weight: bold;
color: #1b7159;
}
A.qindex:hover {
text-decoration: none;
background-color: #ddffdd;
}
A.qindexHL {
text-decoration: none;
font-weight: bold;
background-color: #6666cc;
color: #ffffff;
border: 1px double #9295C2;
}
A.qindexHL:hover {
text-decoration: none;
background-color: #6666cc;
color: #ffffff;
}
A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
A.el { text-decoration: none; font-weight: bold }
A.elRef { font-weight: bold }
A.code:link { text-decoration: none; font-weight: normal; color: #1ba159}
A.code:visited { text-decoration: none; font-weight: normal; color: #1b7159}
A.codeRef:link { font-weight: normal; color: #1ba159}
A.codeRef:visited { font-weight: normal; color: #1b7159}
A:hover { text-decoration: none; background-color: #c0c0c0 }
DL.el { margin-left: -1cm }
.fragment {
font-family: monospace;
font-size: 100%;
}
PRE.fragment {
border: 1px solid #CCCCCC;
background-color: #f5f5f5;
margin-top: 4px;
margin-bottom: 4px;
margin-left: 2px;
margin-right: 8px;
padding-left: 6px;
padding-right: 6px;
padding-top: 4px;
padding-bottom: 4px;
}
DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
TD.md { background-color: #F4F4FB; font-weight: bold; }
TD.mdPrefix {
background-color: #F4F4FB;
color: #606060;
font-size: 80%;
}
TD.mdname1 { background-color: #F4FBF4; font-weight: bold; color: #602020; }
TD.mdname { background-color: #F4FBF4; font-weight: bold; color: #602020; width: 600px; }
DIV.groupHeader {
margin-left: 16px;
margin-top: 12px;
margin-bottom: 6px;
font-weight: bold;
}
DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% }
BODY {
background: white;
color: black;
margin-right: 20px;
margin-left: 20px;
}
TD.indexkey {
background-color: #e8eef2;
font-weight: bold;
padding-right : 10px;
padding-top : 2px;
padding-left : 10px;
padding-bottom : 2px;
margin-left : 0px;
margin-right : 0px;
margin-top : 2px;
margin-bottom : 2px;
border: 1px solid #CCCCCC;
}
TD.indexvalue {
background-color: #e8eef2;
font-style: italic;
padding-right : 10px;
padding-top : 2px;
padding-left : 10px;
padding-bottom : 2px;
margin-left : 0px;
margin-right : 0px;
margin-top : 2px;
margin-bottom : 2px;
border: 1px solid #CCCCCC;
}
TR.memlist {
background-color: #f0f0f0;
}
P.formulaDsp { text-align: center; }
IMG.formulaDsp { }
IMG.formulaInl { vertical-align: middle; }
SPAN.keyword { color: #008000 }
SPAN.keywordtype { color: #604020 }
SPAN.keywordflow { color: #e08000 }
SPAN.comment { color: #800000 }
SPAN.preprocessor { color: #806020 }
SPAN.stringliteral { color: #002080 }
SPAN.charliteral { color: #008080 }
.mdTable {
border: 1px solid #868686;
background-color: #F4F4FB;
}
.mdRow {
padding: 8px 10px;
}
.mdescLeft {
padding: 0px 8px 4px 8px;
font-size: 80%;
font-style: italic;
background-color: #FAFAFA;
border-top: 1px none #E0E0E0;
border-right: 1px none #E0E0E0;
border-bottom: 1px none #E0E0E0;
border-left: 1px none #E0E0E0;
margin: 0px;
}
.mdescRight {
padding: 0px 8px 4px 8px;
font-size: 80%;
font-style: italic;
background-color: #FAFAFA;
border-top: 1px none #E0E0E0;
border-right: 1px none #E0E0E0;
border-bottom: 1px none #E0E0E0;
border-left: 1px none #E0E0E0;
margin: 0px;
}
.memItemLeft {
padding: 1px 0px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-top-style: solid;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
background-color: #FAFAFA;
font-size: 80%;
}
.memItemRight {
padding: 1px 8px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-top-style: solid;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
background-color: #FAFAFA;
font-size: 80%;
}
.memTemplItemLeft {
padding: 1px 0px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
background-color: #FAFAFA;
font-size: 80%;
}
.memTemplItemRight {
padding: 1px 8px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
background-color: #FAFAFA;
font-size: 80%;
}
.memTemplParams {
padding: 1px 0px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-top-style: solid;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
color: #606060;
background-color: #FAFAFA;
font-size: 80%;
}
.search { color: #009933;
font-weight: bold;
}
FORM.search {
margin-bottom: 0px;
margin-top: 0px;
}
INPUT.search { font-size: 75%;
color: #008000;
font-weight: normal;
background-color: #e8eef2;
}
TD.tiny { font-size: 75%;
}
a {
color: #1ba159;
}
a:visited {
color: #1b7159;
}
.dirtab { padding: 4px;
border-collapse: collapse;
border: 1px solid #84b0c7;
}
TH.dirtab { background: #e8eef2;
font-weight: bold;
}
HR { height: 1px;
border: none;
border-top: 1px solid black;
}
/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */
DIV.tabs
{
float : left;
width : 100%;
background : url("tab_b.gif") repeat-x bottom;
margin-bottom : 4px;
}
DIV.tabs UL
{
margin : 0px;
padding-left : 10px;
list-style : none;
}
DIV.tabs LI, DIV.tabs FORM
{
display : inline;
margin : 0px;
padding : 0px;
}
DIV.tabs FORM
{
float : right;
}
DIV.tabs A
{
float : left;
background : url("tab_r.gif") no-repeat right top;
border-bottom : 1px solid #84C7B0;
font-size : x-small;
font-weight : bold;
text-decoration : none;
}
DIV.tabs A:hover
{
background-position: 100% -150px;
}
DIV.tabs A:link, DIV.tabs A:visited,
DIV.tabs A:active, DIV.tabs A:hover
{
color: #1b7159;
}
DIV.tabs SPAN
{
float : left;
display : block;
background : url("tab_l.gif") no-repeat left top;
padding : 5px 9px;
white-space : nowrap;
}
DIV.tabs INPUT
{
float : right;
display : inline;
font-size : 1em;
}
DIV.tabs TD
{
font-size : x-small;
font-weight : bold;
text-decoration : none;
}
/* Commented Backslash Hack hides rule from IE5-Mac \*/
DIV.tabs SPAN {float : none;}
/* End IE5-Mac hack */
DIV.tabs A:hover SPAN
{
background-position: 0% -150px;
}
DIV.tabs LI#current A
{
background-position: 100% -150px;
border-width : 0px;
}
DIV.tabs LI#current SPAN
{
background-position: 0% -150px;
padding-bottom : 6px;
}
DIV.nav
{
background : none;
border : none;
border-bottom : 1px solid #84C7B0;
}
.logo
{
text-align: right;
}

View File

@@ -0,0 +1,98 @@
/**
\page tutorial1_mx Tutorial 1: Querying for MX records
\dontinclude ldns-mx.c
The full source code can be found in \link examples/ldns-mx.c \endlink
ldns-mx is a simple tool that queries your default caching forwarder for
the MX (Mail exchange) record of the given domain.
<pre>
% ldns-mx nlnetlabs.nl
nlnetlabs.nl. 86400 IN MX 100 omval.tednet.nl.
nlnetlabs.nl. 86400 IN MX 50 open.nlnetlabs.nl.
</pre>
First of all, we need to include the correct header files, so
that all functions are available to us:
\skip include
\until dns.h
In this case we have used a configure script to generate a config.h file
that does all our inclusions for us, so that it can be compiled on
multiple platforms. If your platform supports the include files \c
stdint.h and \c stdlib.h, you can include these instead of using a
configure script.
The first included files are prerequisites that ldns needs to function.
The last one, of course, includes the functions of ldns itself.
In our main function, we declare some variables that we are going to use:
\skipline ldns_resolver
\until ldns_status
- 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 design for a description about the building blocks of DNS.
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.
First, we parse the command line argument (checks omitted on this page, see full source code), and store it in our \c domain variable:
\skipline ldns_dname_new_frm_str
This function takes a string containing a domain name (like
"nlnetlabs.nl") and returns an \c ldns_rdf representing that name. If
somehow the given string can not be parsed it returns NULL.
Then, we create the resolver structure:
\skipline ldns_resolver_new
Most of the functions work like this, the first argument is a pointer to
the structure where ldns should store its results (which is also a
pointer). The function returns a status code indicating success
(\ref LDNS_STATUS_OK) or an error number. Remember that these types of
functions allocate memory that you should free later (using the
ldns_free_<type> functions).
The second argument is the filename that contains information about the
resolver structure that is to be created. If this argument is NULL,
/etc/resolv.conf is used. The syntax of the file is like that of
/etc/resolv.conf.
We tell the resolver to query for our domain, type MX, of class IN:
\skipline ldns_resolver_search
\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:
\skipline ldns_pkt_rr_list_by_type
\until )
If this list is not empty, we sort and print it:
\skipline ldns_rr_list_sort
\skipline ldns_rr_list_print
And finally, just to be proper, we free our allocated data:
\skipline free(
\until resolver_deep_free
For structures that can contain other ldns structures, there are two types of free() function available
- \c ldns_free_<type> frees only the allocated data for the structure itself.
- \c ldns_deep_free_<type> frees the structure, and ALL structures that
are nested in it. For example, of you \c deep_free an ldns_rr_list,
all \c ldns_rr structures that were present in the list are also
freed.
*/

View File

@@ -0,0 +1,111 @@
/**
\page tutorial2_zone Tutorial 2: Reading a zone file
\dontinclude ldns-read-zone.c
The full source code can be found in \link examples/ldns-read-zone.c \endlink
ldns-read-zone reads a zone file, and prints it to stdout, with 1 resource record per line.
<pre>
% cat example.zone
$ORIGIN example.
$TTL 600
example. IN SOA example. op.example. (
2004022501 ; serial
28800 ; refresh (8 hours)
7200 ; retry (2 hours)
604800 ; expire (1 week)
18000 ; minimum (5 hours)
)
@ IN MX 10 mail.example.
@ IN NS ns1
@ IN NS ns2
@ IN A 123.123.123.123
% ldns-read-zone example.zone
example. 600 IN SOA example. op.example. 2004022501 28800 7200 604800 18000
example. 600 IN MX 10 mail.example.
example. 600 IN NS ns1.example.
example. 600 IN NS ns2.example.
example. 600 IN A 123.123.123.123
</pre>
Again, let's start with including some necessary header files:
\skipline include
\until errno
In this example, we are going to open a file, if that fails, we'll need errno.h to display an error message.
Okay, let's declare the variables we are going to need today:
\skipline filename
\until ldns_status
The only two ldns-specific types here are \c ldns_zone and \c ldns_status.
- \c ldns_zone is the structure that can contain a complete zone
- \c ldns_status again is used to check return values of ldns functions
If we get no filename, we'll read standard input, otherwise, we'll try to
open the given filename:
\skipline if (argc == 0)
\until exit(EXIT_FAILURE)
\until }
\until }
With the \c FILE pointer in our hands, we visit ldns to pour it into a zone
structure:
\skipline ldns_zone_new_frm_fp_l
There is also a \c ldns_zone_new_frm_fp, but this one also remembers the
line number it was on, so we can use that if we encounter a parse error.
Just like in \ref tutorial1_mx, the first argument is a pointer
to the place ldns should store its creation in, and again, the return value
is the status code.
The second argument is the file pointer where our zone data should reside.
The third argument, if not NULL, is a \c dname that contains the zones
origin. It will place this dname after every name in the file that is not a
fully qualified domain name.
The fourth argument, if not 0, is the default TTL to use.
Both these values can be specified in the zone file by setting \c $ORIGIN and \c $TTL.
The fifth argument specifies the default class, which defaults to IN (\ref LDNS_RR_CLASS_IN).
And finally, every time \c ldns_zone_new_frm_fp_l reads a line from the
input file pointer, it will increment the value pointed to by the last
argument with 1.
Okay, with that, we should have a nice zone structure. Of course we need to
check whether it has succeeded.
\skipline LDNS_STATUS_OK
\until deep_free
If everything went well, we sort the zone if necessary, print it, and free it.
Since \c ldns_zone contains other ldns structures, we use \c ldns_deep_free
so that every \c ldns_rr_list, \c ldns_rr et cetera are freed too.
\until line_nr);
\until }
If something went wrong, we use \c ldns_get_errorstr_by_id() to get a nice
error string instead of just a status integer.
And of course, we should play nice and close the file:
\skipline fclose
\until exit
*/

View File

@@ -0,0 +1,206 @@
/**
\page tutorial3_signzone Tutorial 3: Signing a zone file
\dontinclude ldns-signzone.c
The full source code can be found in \link examples/ldns-signzone.c \endlink
Of course, we start by the usual includes. Since we need a bit more here,
we'll add those right away.
\skipline include
\until define
Let's skip the boring usage() and sanity check functions, and dive right
into main().
\skipline main(int argc
\skipline {
We'll be reading another zone file, so let's prepare some variables for that.
\skipline zone
\until argi
We will create a separate zone structure for the signed zone, so let's have a clear name for the original one.
\skipline zone
\until zone
To sign a zone, we need keys, so we need some variables to read and store it;
\skipline key
\until status
The \ref ldns_key structure holds (private) keys. These can be of any
supported algorithm type; you can put an RSA key in it, an DSA key, or an
HMAC key. Public keys can simply be put in an \ref ldns_rr structure with
type \ref LDNS_RR_TYPE_DNSKEY.
The \ref ldns_key_list type is much like the \ref ldns_rr_list, only, you
guessed it, for \c ldns_key entries.
The signed zone will be stored in a new file.
\skipline file
\until file
And we have some command line options for the output zone.
\skipline tm
\until class
\c origin is a domain name, so it can be stored in an \ref ldns_rdf
variable with type \ref LDNS_RDF_TYPE_DNAME.
The next part is option parsing, which is pretty straightforward using \c
getopt(), so we'll skip this too. U can always look to the source of the
file to check it out.
Okay that's it for the variables, let's get to work!
First we'll try to read in the zone that is to be signed.
\skipline fopen(zone
\until } else {
If the file exists and can be read, we'll let ldns mold it into a zone
structure:
\skipline zone_new
This creates a new (\c new) zone from (\c frm) a filepointer (\c fp),
while remembering the current line (\c l) in the input file (for error
messages).
A pointer to the zone structure to be filled is passed as the first
argument, like in most \c new_frm functions.
Like a lot of ldns functions, this one returns a \c ldns_status
indicating success or the type of failure, so let us check that.
\skipline STATUS
\until } else {
If everything is ok so far, we check if the zone has a SOA record and contains actual data.
\skipline orig_soa
\until }
\until }
\until }
Now that we have the complete zone in our memory, we won't be needing the file anymore.
\skipline fclose
\until }
If there was no origin given, we'll use the one derived from the original zone file.
\skipline origin
\until }
No signing party can be complete without keys to sign with, let's fetch those.
Multiple key files can be specified on the command line, by using the
base names of the .key/.private file pairs.
\skipline key
\until fopen
As you can see, we append ".private" to the name, which should result in
the complete file name of the private key. Later we'll also form the
".key" file name, which will be directly included in the signed zone.
If the file exists, we'll read it and create a \c ldns_key from its
contents, much like the way we read the zone earlier.
\skipline line_nr
\until STATUS
If this went ok, we need to set the inception and expiration times, which
are set in the keys, but will eventually end up in the RRSIGs generated
by those keys.
\skipline expiration
\until }
\skipline inception
\until }
And now that we have read the private keys, we read the public keys and
add them to the zone.
Reading them from the files works roughly the same as reading private
keys, but public keys are normal Resource Records, and they can be stored
in general \c ldns_rr structures.
\skipline FREE
\until }
\until }
With \c push() we add them to our key list and our zone. This function
clones the data, so we can safely free it after that.
\skipline push
\until free
And if we're done, we free the allocated memory for the file name.
\until FREE
If the reading did not work, we print an error. Finally, we move on to
the next key in the argument list.
\skipline } else {
\until }
\until }
\until }
Just to be sure, we add a little check to see if we actually have any keys now.
\skipline count
\until }
So, we have our zone, we have our keys, let's do some signing!
\skipline sign
Yes. That's it. We now have a completely signed zone, \c ldns_zone_sign
checks the keys, and uses the zone signing keys to sign the data resource
records. NSEC and RRSIG resource records are generated and added to the
new zone.
So now that we have a signed zone, all that is left is to store it somewhere.
If no explicit output file name was given, we'll just append ".signed" to
the original zone file name.
\skipline outputfile
\until }
\c ldns_zone_sign returns NULL if the signing did not work, so we must check that.
\skipline signed_zone
\until } else {
Writing to a file is no different than normal printing, so we'll print to
the file and close it.
\skipline print
\until }
And of course, give an error if the signing failed.
\skipline } else {
\until }
Just to be nice, let's free the rest of the data we allocated, and exit
with the right return value.
\skipline free
\until }
*/