ldns documentation

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

host2wire.h
Go to the documentation of this file.
1 /*
2 * host2wire.h - 2wire conversion routines
3 *
4 * a Net::DNS like library for C
5 *
6 * (c) NLnet Labs, 2005-2006
7 *
8 * See the file LICENSE for the license
9 */
10
17 #ifndef LDNS_HOST2WIRE_H
18 #define LDNS_HOST2WIRE_H
19
20 #include <ldns/common.h>
21 #include <ldns/error.h>
22 #include <ldns/rr.h>
23 #include <ldns/rdata.h>
24 #include <ldns/packet.h>
25 #include <ldns/buffer.h>
26 #include <ctype.h>
27
28 #include "ldns/util.h"
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
40 ldns_status ldns_dname2buffer_wire(ldns_buffer *buffer, const ldns_rdf *name);
41
48 ldns_status ldns_rdf2buffer_wire(ldns_buffer *output, const ldns_rdf *rdf);
49
58 ldns_status ldns_rdf2buffer_wire_canonical(ldns_buffer *output,
59 const ldns_rdf *rdf);
60
69 ldns_status ldns_rr2buffer_wire(ldns_buffer *output,
70 const ldns_rr *rr,
71 int section);
72
83 ldns_status ldns_rr2buffer_wire_canonical(ldns_buffer *output,
84 const ldns_rr *rr,
85 int section);
86
87
95 ldns_status ldns_rrsig2buffer_wire(ldns_buffer *output, const ldns_rr *sigrr);
96
107 ldns_status ldns_rr_rdata2buffer_wire(ldns_buffer *output, const ldns_rr *rr);
108
115 ldns_status ldns_pkt2buffer_wire(ldns_buffer *output, const ldns_pkt *pkt);
116
123 ldns_status ldns_rr_list2buffer_wire(ldns_buffer *output, const ldns_rr_list *rrlist);
124
135 ldns_status ldns_rdf2wire(uint8_t **dest, const ldns_rdf *rdf, size_t *size);
136
150 ldns_status ldns_rr2wire(uint8_t **dest, const ldns_rr *rr, int, size_t *size);
151
158 ldns_status ldns_pkt2wire(uint8_t **dest, const ldns_pkt *p, size_t *size);
159
160 #ifdef __cplusplus
161 }
162 #endif
163
164 #endif /* LDNS_HOST2WIRE_H */
ldns_struct_buffer
implementation of buffers to ease operations
Definition: buffer.h:50
ldns_rr2wire
ldns_status ldns_rr2wire(uint8_t **dest, const ldns_rr *rr, int, size_t *size)
Allocates an array of uint8_t at dest, and puts the wireformat of the given rr in that array...
Definition: host2wire.c:357
rdata.h
Defines ldns_rdf and functions to manipulate those.
ldns_struct_rr_list
List or Set of Resource Records.
Definition: rr.h:327
rr.h
Contains the definition of ldns_rr and functions to manipulate those.
ldns_struct_rr
Resource Record.
Definition: rr.h:299
ldns_pkt2buffer_wire
ldns_status ldns_pkt2buffer_wire(ldns_buffer *output, const ldns_pkt *pkt)
Copies the packet data to the buffer in wire format.
Definition: host2wire.c:267
error.h
Defines error numbers and functions to translate those to a readable string.
ldns_dname2buffer_wire
ldns_status ldns_dname2buffer_wire(ldns_buffer *buffer, const ldns_rdf *name)
Copies the dname data to the buffer in wire format.
Definition: host2wire.c:27
ldns_rdf2buffer_wire
ldns_status ldns_rdf2buffer_wire(ldns_buffer *output, const ldns_rdf *rdf)
Copies the rdata data to the buffer in wire format.
Definition: host2wire.c:36
util.h
ldns_rrsig2buffer_wire
ldns_status ldns_rrsig2buffer_wire(ldns_buffer *output, const ldns_rr *sigrr)
Converts a rrsig to wireformat BUT EXCLUDE the rrsig rdata This is needed in DNSSEC verification...
Definition: host2wire.c:194
ldns_struct_pkt
DNS packet.
Definition: packet.h:233
ldns_rr2buffer_wire
ldns_status ldns_rr2buffer_wire(ldns_buffer *output, const ldns_rr *rr, int section)
Copies the rr data to the buffer in wire format.
Definition: host2wire.c:159
ldns_status
enum ldns_enum_status ldns_status
Definition: error.h:131
buffer.h
This file contains the definition of ldns_buffer, and functions to manipulate those.
ldns_pkt2wire
ldns_status ldns_pkt2wire(uint8_t **dest, const ldns_pkt *p, size_t *size)
Allocates an array of uint8_t at dest, and puts the wireformat of the given packet in that array...
Definition: host2wire.c:375
packet.h
Contains the definition of ldns_pkt and its parts, as well as functions to manipulate those...
ldns_struct_rdf
Resource record data field.
Definition: rdata.h:166
common.h
Common definitions for LDNS.
ldns_rdf2wire
ldns_status ldns_rdf2wire(uint8_t **dest, const ldns_rdf *rdf, size_t *size)
Allocates an array of uint8_t at dest, and puts the wireformat of the given rdf in that array...
Definition: host2wire.c:339
ldns_rdf2buffer_wire_canonical
ldns_status ldns_rdf2buffer_wire_canonical(ldns_buffer *output, const ldns_rdf *rdf)
Copies the rdata data to the buffer in wire format If the rdata is a dname, the letters will be lower...
Definition: host2wire.c:45
ldns_rr_list2buffer_wire
ldns_status ldns_rr_list2buffer_wire(ldns_buffer *output, const ldns_rr_list *rrlist)
Copies the rr_list data to the buffer in wire format.
Definition: host2wire.c:71
ldns_rr_rdata2buffer_wire
ldns_status ldns_rr_rdata2buffer_wire(ldns_buffer *output, const ldns_rr *rr)
Converts an rr&#39;s rdata to wireformat, while excluding the ownername and all the stuff before the rdat...
Definition: host2wire.c:214
ldns_rr2buffer_wire_canonical
ldns_status ldns_rr2buffer_wire_canonical(ldns_buffer *output, const ldns_rr *rr, int section)
Copies the rr data to the buffer in wire format, in canonical format according to RFC3597 (every dnam...
Definition: host2wire.c:86