ldns documentation

- Main Page
- Related Pages
- Data Structures
- Files

LDNS Documentation

# Introduction

The goal of ldns is to simplify DNS programming, it supports recent RFCs like the DNSSEC documents, and allow developers to easily create software conforming to current RFCs, and experimental software for current Internet drafts. A secondary benefit of using ldns is speed, because ldns is written in C, and although it is not optimized for performance, it should be a lot faster than Perl.

The first main tool to use ldns is Drill, from which part of the library was derived. From version 1.0.0 on, drill is included in the ldns release and will not be distributed separately anymore. The library also includes some other examples and tools to show how it can be used. These can be found in the examples/ directory in the tarball.

ldns depends on OpenSSL for it's cryptographic functions. Feature list

- Transparent IPv4 and IPv6 support (overridable if necessary),
- TSIG support,
- DNSSEC support; signing and verification,
- small size,
- online documentation as well as manual pages.

If you want to send us patches please use the code from git.

# Using ldns

Almost all interaction between an application and ldns goes through the ldns data structures (ldns_rr, ldns_pkt, etc.). These are input or output to the functions of ldns. For example, ldns_zone_new_frm_fp reads a zone from a `FILE` pointer, and returns an ldns_zone structure.

Let's use Drill as an example. Drill is a tool much like dig, whose most basic function is to send 1 query to a nameserver and print the response.

To be able to do this, drill uses the resolver module of ldns, which acts as a stub resolver. The resolver module uses the net module to actually send the query that drill requested. It then uses the wire2host module to translate the response and place it in ldns' internal structures. These are passed back to drill, which then uses the host2str module to print the response in presentation format.

# Getting Started

See the Design page for a very high level description of the design choices made for ldns.

For an overview of the functions and types ldns provides, you can check out the ldns ldns header file descriptions.

If you want to see some libdns action, you can read our tutorials:

- Tutorial 1: Querying for MX records
- Tutorial 2: Reading a zone file
- Tutorial 3: Signing a zone file

Or you can just use the menu above to browse through the API docs.