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

NAME

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, de‐
8       struction and printing
9
10

SYNOPSIS

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 *de‐
25       fault_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

DESCRIPTION

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 &lt;space&gt; TTL
40              &lt;space&gt; CLASS &lt;space&gt; TYPE &lt;space&gt; 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

AUTHOR

78       The ldns team at NLnet Labs.
79
80

REPORTING BUGS

82       Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at
83       http://www.nlnetlabs.nl/bugs/index.html
84
85
87       Copyright (c) 2004 - 2006 NLnet Labs.
88
89       Licensed under the BSD License. There is NO warranty; not even for MER‐
90       CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
91
92

SEE ALSO

94       ldns_rr, ldns_rr_list.  And perldoc Net::DNS, RFC1034, RFC1035,
95       RFC4033, RFC4034  and RFC4035.
96

REMARKS

98       This manpage was automatically generated from the ldns source code.
99
100
101
102                                  30 May 2006                          ldns(3)
Impressum