1ldns(3) Library Functions Manual ldns(3)
2
3
4
6 ldns_rdf_new, ldns_rdf_clone, ldns_rdf_new_frm_data,
7 ldns_rdf_new_frm_str, ldns_rdf_new_frm_fp, ldns_rdf_free,
8 ldns_rdf_deep_free, ldns_rdf_print - ldns_rdf creation, destruction and
9 printing
10
11
13 #include <stdint.h>
14 #include <stdbool.h>
15
16 #include <ldns/ldns.h>
17
18 ldns_rdf* ldns_rdf_new(ldns_rdf_type type, size_t size, void *data);
19
20 ldns_rdf* ldns_rdf_clone(const ldns_rdf *rd);
21
22 ldns_rdf* ldns_rdf_new_frm_data(ldns_rdf_type type, size_t size, const
23 void *data);
24
25 ldns_rdf* ldns_rdf_new_frm_str(ldns_rdf_type type, const char *str);
26
27 ldns_status ldns_rdf_new_frm_fp(ldns_rdf **r, ldns_rdf_type type, FILE
28 *fp);
29
30 void ldns_rdf_free(ldns_rdf *rd);
31
32 void ldns_rdf_deep_free(ldns_rdf *rd);
33
34 void ldns_rdf_print(FILE *output, const ldns_rdf *rdf);
35
37 ldns_rdf_new() allocates a new rdf structure and fills it. This func‐
38 tion DOES NOT copy the contents from the buffer, unlinke
39 ldns_rdf_new_frm_data()
40 type: type of the rdf
41 size: size of the buffer
42 data: pointer to the buffer to be copied
43 Returns the new rdf structure or NULL on failure
44
45 ldns_rdf_clone() clones a rdf structure. The data is copied.
46 rd: rdf to be copied
47 Returns a new rdf structure
48
49 ldns_rdf_new_frm_data() allocates a new rdf structure and fills it.
50 This function _does_ copy the contents from the buffer, unlinke
51 ldns_rdf_new()
52 type: type of the rdf
53 size: size of the buffer
54 data: pointer to the buffer to be copied
55 Returns the new rdf structure or NULL on failure
56
57 ldns_rdf_new_frm_str() creates a new rdf from a string.
58 type: type to use
59 str: string to use
60 Returns ldns_rdf* or NULL in case of an error
61
62 ldns_rdf_new_frm_fp() creates a new rdf from a file containing a
63 string.
64 r: the new rdf
65 type: type to use
66 fp: the file pointer to use
67 Returns LDNS_STATUS_OK or the error
68
69 ldns_rdf_free() frees a rdf structure, leaving the data pointer intact.
70 rd: the pointer to be freed
71 Returns void
72
73 ldns_rdf_deep_free() frees a rdf structure _and_ frees the data. rdf
74 should be created with _new_frm_data
75 rd: the rdf structure to be freed
76 Returns void
77
78 ldns_rdf_print() Prints the data in the rdata field to the given file
79 stream (in presentation format)
80
81 output: the file stream to print to
82 rdf: the rdata field to print
83 Returns void
84
86 The ldns team at NLnet Labs.
87
88
90 Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at
91 http://www.nlnetlabs.nl/bugs/index.html
92
93
95 Copyright (c) 2004 - 2006 NLnet Labs.
96
97 Licensed under the BSD License. There is NO warranty; not even for MER‐
98 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
99
100
102 ldns_rdf. And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034
103 and RFC4035.
104
106 This manpage was automatically generated from the ldns source code.
107
108
109
110 30 May 2006 ldns(3)