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

NAME

6       ldns_pkt2buffer_str, ldns_pktheader2buffer_str, ldns_rr2buffer_str,
7       ldns_rr_list2buffer_str, ldns_rdf2buffer_str, ldns_key2buffer_str,
8       ldns_pkt2buffer_wire, ldns_rr2buffer_wire, ldns_rdf2buffer_wire,
9       ldns_rrsig2buffer_wire, ldns_rr_rdata2buffer_wire - lower level conver‐
10       sions
11
12

SYNOPSIS

14       #include <stdint.h>
15       #include <stdbool.h>
16
17       #include <ldns/ldns.h>
18
19       ldns_status ldns_pkt2buffer_str(ldns_buffer *output, const ldns_pkt
20       *pkt);
21
22       ldns_status ldns_pktheader2buffer_str(ldns_buffer *output, const
23       ldns_pkt *pkt);
24
25       ldns_status ldns_rr2buffer_str(ldns_buffer *output, const ldns_rr *rr);
26
27       ldns_status ldns_rr_list2buffer_str(ldns_buffer *output, const
28       ldns_rr_list *list);
29
30       ldns_status ldns_rdf2buffer_str(ldns_buffer *output, const ldns_rdf
31       *rdf);
32
33       ldns_status ldns_key2buffer_str(ldns_buffer *output, const ldns_key
34       *k);
35
36       ldns_status ldns_pkt2buffer_wire(ldns_buffer *output, const ldns_pkt
37       *pkt);
38
39       ldns_status ldns_rr2buffer_wire(ldns_buffer *output, const ldns_rr *rr,
40       int section);
41
42       ldns_status ldns_rdf2buffer_wire(ldns_buffer *output, const ldns_rdf
43       *rdf);
44
45       ldns_status ldns_rrsig2buffer_wire(ldns_buffer *output, const ldns_rr
46       *sigrr);
47
48       ldns_status ldns_rr_rdata2buffer_wire(ldns_buffer *output, const
49       ldns_rr *rr);
50

DESCRIPTION

52       ldns_pkt2buffer_str() Converts the data in the DNS packet to presenta‐
53              tion format (as char *) and appends it to the given buffer
54
55              output: pointer to the buffer to append the data to
56              pkt: the pointer to the packet to convert
57              Returns status
58
59       ldns_pktheader2buffer_str() Converts the header of a packet to presen‐
60              tation format and appends it to the output buffer
61              output: the buffer to append output to
62              pkt: the packet to convert the header of
63              Returns ldns_status
64
65       ldns_rr2buffer_str() Converts the data in the resource record to pre‐
66              sentation format (as char *) and appends it to the given buffer.
67              The presentation format of DNSKEY record is annotated with com‐
68              ments giving the id, type and size of the key.
69
70              output: pointer to the buffer to append the data to
71              rr: the pointer to the rr field to convert
72              Returns status
73
74       ldns_rr_list2buffer_str() Converts a rr_list to presentation format and
75              appends it to the output buffer
76              output: the buffer to append output to
77              list: the ldns_rr_list to print
78              Returns ldns_status
79
80       ldns_rdf2buffer_str() Converts the data in the rdata field to presenta‐
81              tion format (as char *) and appends it to the given buffer
82
83              output: pointer to the buffer to append the data to
84              rdf: the pointer to the rdafa field containing the data
85              Returns status
86
87       ldns_key2buffer_str() Converts the data in the DNS packet to presenta‐
88              tion format (as char *) and appends it to the given buffer
89
90              output: pointer to the buffer to append the data to
91              k: the pointer to the private key to convert
92              Returns status
93
94       ldns_pkt2buffer_wire() Copies the packet data to the buffer in wire
95              format
96              *output: buffer to append the result to
97              *pkt: packet to convert
98              Returns ldns_status
99
100       ldns_rr2buffer_wire() Copies the rr data to the buffer in wire format
101              *output: buffer to append the result to
102              *rr: resource record to convert
103              section: the section in the packet this rr is supposed to be in
104              (to determine whether to add rdata or not)
105              Returns ldns_status
106
107       ldns_rdf2buffer_wire() Copies the rdata data to the buffer in wire for‐
108              mat
109              *output: buffer to append the result to
110              *rdf: rdata to convert
111              Returns ldns_status
112
113       ldns_rrsig2buffer_wire() Converts a rrsig to wireformat BUT EXCLUDE the
114              rrsig rdata This is needed in DNSSEC verification
115              output: buffer to append the result to
116              sigrr: signature rr to operate on
117              Returns ldns_status
118
119       ldns_rr_rdata2buffer_wire() Converts an rr's rdata to wireformat, while
120              excluding the ownername and all the stuff before the rdata.
121              This is needed in DNSSEC keytag calculation, the ds calculation
122              from the key and maybe elsewhere.
123
124              *output: buffer where to put the result
125              *rr: rr to operate on
126              Returns ldns_status
127

AUTHOR

129       The ldns team at NLnet Labs.
130
131

REPORTING BUGS

133       Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at
134       http://www.nlnetlabs.nl/bugs/index.html
135
136
138       Copyright (c) 2004 - 2006 NLnet Labs.
139
140       Licensed under the BSD License. There is NO warranty; not even for MER‐
141       CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
142
143

SEE ALSO

145       ldns_pkt2str, ldns_rr2str, ldns_rdf2str, ldns_rr_list2str,
146       ldns_key2str.  And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034
147       and RFC4035.
148

REMARKS

150       This manpage was automatically generated from the ldns source code.
151
152
153
154                                  30 May 2006                          ldns(3)
Impressum