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 dest: pointer to the array of bytes to be created
44 p: the packet to convert
45 size: the size of the converted result
46
47 ldns_rdf2wire() Allocates an array of uint8_t at dest, and puts the
48 wireformat of the given rdf in that array. The result_size value
49 contains the length of the array, if it succeeds, and 0 other‐
50 wise (in which case the function also returns NULL)
51
52 dest: pointer to the array of bytes to be created
53 rdf: the rdata field to convert
54 size: the size of the converted result
55
57 The ldns team at NLnet Labs.
58
59
61 Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at
62 http://www.nlnetlabs.nl/bugs/index.html
63
64
66 Copyright (c) 2004 - 2006 NLnet Labs.
67
68 Licensed under the BSD License. There is NO warranty; not even for MER‐
69 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
70
71
73 ldns_wire2rr, ldns_wire2pkt, ldns_wire2rdf. And perldoc Net::DNS,
74 RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035.
75
77 This manpage was automatically generated from the ldns source code.
78
79
80
81 30 May 2006 ldns(3)