1ldns(3) Library Functions Manual ldns(3)
2
3
4
6 ldns_rr_new, ldns_rr_new_frm_type, ldns_rr_new_frm_str,
7 ldns_rr_new_frm_fp, ldns_rr_free, ldns_rr_print - ldns_rr creation,
8 destruction and printing
9
10
12 #include <stdint.h>
13 #include <stdbool.h>
14
15 #include <ldns/ldns.h>
16
17 ldns_rr* ldns_rr_new(void);
18
19 ldns_rr* ldns_rr_new_frm_type(ldns_rr_type t);
20
21 ldns_status ldns_rr_new_frm_str(ldns_rr **n, const char *str, uint32_t
22 default_ttl, const ldns_rdf *origin, ldns_rdf **prev);
23
24 ldns_status ldns_rr_new_frm_fp(ldns_rr **rr, FILE *fp, uint32_t
25 *default_ttl, ldns_rdf **origin, ldns_rdf **prev);
26
27 void ldns_rr_free(ldns_rr *rr);
28
29 void ldns_rr_print(FILE *output, const ldns_rr *rr);
30
32 ldns_rr_new() creates a new rr structure.
33 Returns ldns_rr *
34
35 ldns_rr_new_frm_type() creates a new rr structure, based on the given
36 type. alloc enough space to hold all the rdf's
37
38 ldns_rr_new_frm_str() creates an rr from a string. The string should
39 be a fully filled-in rr, like ownername <space> TTL
40 <space> CLASS <space> TYPE <space> RDATA.
41 n: the rr to return
42 str: the string to convert
43 default_ttl: default ttl value for the rr. If 0 DEF_TTL will be
44 used
45 origin: when the owner is relative add this. The caller must
46 ldns_rdf_deep_free it.
47 prev: the previous ownername. if this value is not NULL, the
48 function overwrites this with the ownername found in this
49 string. The caller must then ldns_rdf_deep_free it.
50 Returns a status msg describing an error or LDNS_STATUS_OK
51
52 ldns_rr_new_frm_fp() creates a new rr from a file containing a string.
53 rr: the new rr
54 fp: the file pointer to use
55 default_ttl: pointer to a default ttl for the rr. If NULL
56 DEF_TTL will be used the pointer will be updated if the file
57 contains a $TTL directive
58 origin: when the owner is relative add this the pointer will be
59 updated if the file contains a $ORIGIN directive The caller must
60 ldns_rdf_deep_free it.
61 prev: when the owner is whitespaces use this as the * ownername
62 the pointer will be updated after the call The caller must
63 ldns_rdf_deep_free it.
64 Returns a ldns_status with an error or LDNS_STATUS_OK
65
66 ldns_rr_free() frees an RR structure
67 *rr: the RR to be freed
68 Returns void
69
70 ldns_rr_print() Prints the data in the resource record to the given
71 file stream (in presentation format)
72
73 output: the file stream to print to
74 rr: the resource record to print
75 Returns void
76
78 The ldns team at NLnet Labs. Which consists out of Jelte Jansen and
79 Miek Gieben.
80
81
83 Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at
84 http://www.nlnetlabs.nl/bugs/index.html
85
86
88 Copyright (c) 2004 - 2006 NLnet Labs.
89
90 Licensed under the BSD License. There is NO warranty; not even for MER‐
91 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
92
93
95 ldns_rr, ldns_rr_list. And perldoc Net::DNS, RFC1034, RFC1035,
96 RFC4033, RFC4034 and RFC4035.
97
99 This manpage was automatically generated from the ldns source code by
100 use of Doxygen and some perl.
101
102
103
104 30 May 2006 ldns(3)