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