1ldns(3) Library Functions Manual ldns(3)
2
3
4
6 ldns_rr2wire, ldns_pkt2wire, ldns_rdf2wire - conversion functions
7
8
10 #include <stdint.h>
11 #include <stdbool.h>
12
13 #include <ldns/ldns.h>
14
15 ldns_status ldns_rr2wire(uint8_t **dest, const ldns_rr *rr, int sec‐
16 tion, size_t *size);
17
18 ldns_status ldns_pkt2wire(uint8_t **dest, const ldns_pkt *p, size_t
19 *size);
20
21 ldns_status ldns_rdf2wire(uint8_t **dest, const ldns_rdf *rdf, size_t
22 *size);
23
25 ldns_rr2wire() Allocates an array of uint8_t at dest, and puts the
26 wireformat of the given rr in that array. The result_size value
27 contains the length of the array, if it succeeds, and 0 other‐
28 wise (in which case the function also returns NULL)
29
30 If the section argument is LDNS_SECTION_QUESTION, data like ttl
31 and rdata are not put into the result
32
33 dest: pointer to the array of bytes to be created
34 rr: the rr to convert
35 section: the rr section, determines how the rr is written.
36 size: the size of the converted result
37
38 ldns_pkt2wire() Allocates an array of uint8_t at dest, and puts the
39 wireformat of the given packet in that array. The result_size
40 value contains the length of the array, if it succeeds, and 0
41 otherwise (in which case the function also returns NULL)
42
43 ldns_rdf2wire() Allocates an array of uint8_t at dest, and puts the
44 wireformat of the given rdf in that array. The result_size value
45 contains the length of the array, if it succeeds, and 0 other‐
46 wise (in which case the function also returns NULL)
47
48 dest: pointer to the array of bytes to be created
49 rdf: the rdata field to convert
50 size: the size of the converted result
51
53 The ldns team at NLnet Labs.
54
55
57 Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at
58 http://www.nlnetlabs.nl/bugs/index.html
59
60
62 Copyright (c) 2004 - 2006 NLnet Labs.
63
64 Licensed under the BSD License. There is NO warranty; not even for MER‐
65 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
66
67
69 ldns_wire2rr, ldns_wire2pkt, ldns_wire2rdf. And perldoc Net::DNS,
70 RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035.
71
73 This manpage was automatically generated from the ldns source code.
74
75
76
77 30 May 2006 ldns(3)