1ldns(3) Library Functions Manual ldns(3)
2
3
4
6 ldns_wire2rr, ldns_wire2pkt, ldns_wire2rdf, ldns_wire2dname
7
8
10 #include <stdint.h>
11 #include <stdbool.h>
12
13 #include <ldns/ldns.h>
14
15 ldns_status ldns_wire2rr(ldns_rr **rr, const uint8_t *wire, size_t max,
16 size_t *pos, ldns_pkt_section section);
17
18 ldns_status ldns_wire2pkt(ldns_pkt **packet, const uint8_t *data,
19 size_t len);
20
21 ldns_status ldns_wire2rdf(ldns_rr *rr, const uint8_t *wire, size_t max,
22 size_t *pos);
23
24 ldns_status ldns_wire2dname(ldns_rdf **dname, const uint8_t *wire,
25 size_t max, size_t *pos);
26
28 ldns_wire2rr() converts the data on the uint8_t bytearray (in wire for‐
29 mat) to a DNS resource record. This function will initialize
30 and allocate memory space for the rr structure. The length of
31 the wiredata of this rr is added to the *pos value.
32
33 rr: pointer to the structure to hold the rdata value
34 wire: pointer to the buffer with the data
35 max: the length of the data buffer (in bytes)
36 pos: the position of the rr in the buffer (ie. the number of
37 bytes from the start of the buffer)
38 section: the section in the packet the rr is meant for
39 Returns LDNS_STATUS_OK if everything succeeds, error otherwise
40
41 ldns_wire2pkt() converts the data on the uint8_t bytearray (in wire
42 format) to a DNS packet. This function will initialize and
43 allocate memory space for the packet structure.
44
45 packet: pointer to the structure to hold the packet
46 data: pointer to the buffer with the data
47 len: the length of the data buffer (in bytes)
48 Returns LDNS_STATUS_OK if everything succeeds, error otherwise
49
50 ldns_wire2rdf() converts the data on the uint8_t bytearray (in wire
51 format) to DNS rdata fields, and adds them to the list of rdfs
52 of the given rr. This function will initialize and allocate
53 memory space for the dname structures. The length of the wire‐
54 data of these rdfs is added to the *pos value.
55
56 All rdfs belonging to the RR are read; the rr should have no
57 rdfs yet. An error is returned if the format cannot be parsed.
58
59 rr: pointer to the ldns_rr structure to hold the rdata value
60 wire: pointer to the buffer with the data
61 max: the length of the data buffer (in bytes)
62 pos: the position of the rdf in the buffer (ie. the number of
63 bytes from the start of the buffer)
64 Returns LDNS_STATUS_OK if everything succeeds, error otherwise
65
66 ldns_wire2dname() converts the data on the uint8_t bytearray (in wire
67 format) to a DNS dname rdata field. This function will initial‐
68 ize and allocate memory space for the dname structure. The
69 length of the wiredata of this rdf is added to the *pos value.
70
71 dname: pointer to the structure to hold the rdata value
72 wire: pointer to the buffer with the data
73 max: the length of the data buffer (in bytes)
74 pos: the position of the rdf in the buffer (ie. the number of
75 bytes from the start of the buffer)
76 Returns LDNS_STATUS_OK if everything succeeds, error otherwise
77
79 The ldns team at NLnet Labs. Which consists out of Jelte Jansen and
80 Miek Gieben.
81
82
84 Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at
85 http://www.nlnetlabs.nl/bugs/index.html
86
87
89 Copyright (c) 2004 - 2006 NLnet Labs.
90
91 Licensed under the BSD License. There is NO warranty; not even for MER‐
92 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
93
94
96 ldns_rr2wire, ldns_pkt2wire, ldns_rdf2wire, ldns_dname2wire. And perl‐
97 doc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035.
98
100 This manpage was automaticly generated from the ldns source code by use
101 of Doxygen and some perl.
102
103
104
105 30 May 2006 ldns(3)