1ldns(3)                    Library Functions Manual                    ldns(3)
2
3
4

NAME

6       ldns_zone, ldns_zone_new, ldns_zone_free, ldns_zone_deep_free,
7       ldns_zone_new_frm_fp, ldns_zone_new_frm_fp_l, ldns_zone_print,
8       ldns_zone_print_fmt - ldns_zone creation, destruction and printing
9
10

SYNOPSIS

12       #include <stdint.h>
13       #include <stdbool.h>
14
15       #include <ldns/ldns.h>
16
17       ldns_zone * ldns_zone_new(void);
18
19       void ldns_zone_free(ldns_zone *zone);
20
21       void ldns_zone_deep_free(ldns_zone *zone);
22
23       ldns_status ldns_zone_new_frm_fp(ldns_zone **z, FILE *fp, const
24       ldns_rdf *origin, uint32_t ttl, ldns_rr_class c);
25
26       ldns_status ldns_zone_new_frm_fp_l(ldns_zone **z, FILE *fp, const
27       ldns_rdf *origin, uint32_t ttl, ldns_rr_class c, int *line_nr);
28
29       void ldns_zone_print(FILE *output, const ldns_zone *z);
30
31       void ldns_zone_print_fmt(FILE *output, const ldns_output_format *fmt,
32       const ldns_zone *z);
33

DESCRIPTION

35       ldns_zone
36              DNS Zone
37
38              A list of RR's with some
39              extra information which comes from the SOA RR
40              Note: nothing has been done to make this efficient (yet).
41              struct ldns_struct_zone
42              {
43                   the soa defines a zone:
44                   ldns_rr   *_soa;
45                   /* basically a zone is a list of rr's */
46                   ldns_rr_list   *_rrs;
47                   /* we could change this to be a b-tree etc etc todo */
48              };
49              typedef struct ldns_struct_zone ldns_zone;
50
51       ldns_zone_new() create a new ldns_zone structure
52              Returns a pointer to a ldns_zone structure
53
54       ldns_zone_free() Frees the allocated memory for the zone, and the
55              rr_list structure in it
56              zone: the zone to free
57
58       ldns_zone_deep_free() Frees the allocated memory for the zone, the soa
59              rr in it, and the rr_list structure in it, including the rr's in
60              that. etc.
61              zone: the zone to free
62
63       ldns_zone_new_frm_fp() Create a new zone from a file
64              z: the new zone
65              *fp: the filepointer to use
66              *origin: the zones' origin
67              ttl: default ttl to use
68              c: default class to use (IN)
69
70              Returns ldns_status mesg with an error or LDNS_STATUS_OK
71
72       ldns_zone_new_frm_fp_l() Create a new zone from a file, keep track of
73              the line numbering
74              z: the new zone
75              *fp: the filepointer to use
76              *origin: the zones' origin
77              ttl: default ttl to use
78              c: default class to use (IN)
79              line_nr: used for error msg, to get to the line number
80
81              Returns ldns_status mesg with an error or LDNS_STATUS_OK
82
83       ldns_zone_print() Print a zone structure * to output. Note the SOA
84              record is included in this output
85              output: the fd to print to
86              z: the zone to print
87
88       ldns_zone_print_fmt() Print a zone structure * to output. Note the SOA
89              record is included in this output
90              output: the fd to print to
91              fmt: format of the textual representation
92              z: the zone to print
93

AUTHOR

95       The ldns team at NLnet Labs.
96
97

REPORTING BUGS

99       Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at
100       http://www.nlnetlabs.nl/bugs/index.html
101
102
104       Copyright (c) 2004 - 2006 NLnet Labs.
105
106       Licensed under the BSD License. There is NO warranty; not even for MER‐
107       CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
108

SEE ALSO

110       perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035.
111

REMARKS

113       This manpage was automatically generated from the ldns source code.
114
115
116
117                                  30 May 2006                          ldns(3)
Impressum