host2wire.h
Go to the documentation of this file.
/*
* host2wire.h - 2wire conversion routines
*
* a Net::DNS like library for C
*
* (c) NLnet Labs, 2005-2006
*
* See the file LICENSE for the license
*/
#ifndef LDNS_HOST2WIRE_H
#define LDNS_HOST2WIRE_H
#include <ldns/common.h>
#include <ldns/error.h>
#include <ldns/rr.h>
#include <ldns/rdata.h>
#include <ldns/packet.h>
#include <ldns/buffer.h>
#include <ctype.h>
#include "ldns/util.h"
#ifdef __cplusplus
extern "C" {
#endif
ldns_status ldns_dname2buffer_wire(ldns_buffer *buffer, const ldns_rdf *name);
ldns_status ldns_dname2buffer_wire_compress(ldns_buffer *buffer, const ldns_rdf *name, ldns_rbtree_t *compression_data);
ldns_status ldns_rdf2buffer_wire(ldns_buffer *output, const ldns_rdf *rdf);
ldns_status ldns_rdf2buffer_wire_compress(ldns_buffer *output, const ldns_rdf *rdf, ldns_rbtree_t *compression_data);
ldns_status ldns_rdf2buffer_wire_canonical(ldns_buffer *output,
const ldns_rdf *rdf);
ldns_status ldns_rr2buffer_wire(ldns_buffer *output,
const ldns_rr *rr,
int section);
ldns_status ldns_rr2buffer_wire_compress(ldns_buffer *output,
const ldns_rr *rr,
int section,
ldns_rbtree_t *compression_data);
ldns_status ldns_rr2buffer_wire_canonical(ldns_buffer *output,
const ldns_rr *rr,
int section);
ldns_status ldns_rrsig2buffer_wire(ldns_buffer *output, const ldns_rr *sigrr);
ldns_status ldns_rr_rdata2buffer_wire(ldns_buffer *output, const ldns_rr *rr);
ldns_status ldns_pkt2buffer_wire(ldns_buffer *output, const ldns_pkt *pkt);
ldns_status ldns_pkt2buffer_wire_compress(ldns_buffer *output, const ldns_pkt *pkt, ldns_rbtree_t *compression_data);
ldns_status ldns_rr_list2buffer_wire(ldns_buffer *output, const ldns_rr_list *rrlist);
ldns_status ldns_rdf2wire(uint8_t **dest, const ldns_rdf *rdf, size_t *size);
ldns_status ldns_rr2wire(uint8_t **dest, const ldns_rr *rr, int section, size_t *size);
ldns_status ldns_pkt2wire(uint8_t **dest, const ldns_pkt *p, size_t *size);
#ifdef __cplusplus
}
#endif
#endif /* LDNS_HOST2WIRE_H */
buffer.h
This file contains the definition of ldns_buffer, and functions to manipulate those.
ldns_buffer
struct ldns_struct_buffer ldns_buffer
Definition buffer.h:72
common.h
Common definitions for LDNS.
error.h
Defines error numbers and functions to translate those to a readable string.
ldns_status
enum ldns_enum_status ldns_status
Definition error.h:148
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:244
ldns_rr2wire
ldns_status ldns_rr2wire(uint8_t **dest, const ldns_rr *rr, int section, 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:494
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:512
ldns_rr2buffer_wire_compress
ldns_status ldns_rr2buffer_wire_compress(ldns_buffer *output, const ldns_rr *rr, int section, ldns_rbtree_t *compression_data)
Copies the rr data to the buffer in wire format while doing DNAME compression.
Definition host2wire.c:250
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:476
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:130
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:294
ldns_dname2buffer_wire_compress
ldns_status ldns_dname2buffer_wire_compress(ldns_buffer *buffer, const ldns_rdf *name, ldns_rbtree_t *compression_data)
Copies the dname data to the buffer in wire format.
Definition host2wire.c:26
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:109
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:376
ldns_rr_rdata2buffer_wire
ldns_status ldns_rr_rdata2buffer_wire(ldns_buffer *output, const ldns_rr *rr)
Converts an rr's rdata to wireformat, while excluding the ownername and all the stuff before the rdat...
Definition host2wire.c:314
ldns_pkt2buffer_wire_compress
ldns_status ldns_pkt2buffer_wire_compress(ldns_buffer *output, const ldns_pkt *pkt, ldns_rbtree_t *compression_data)
Copies the packet data to the buffer in wire format.
Definition host2wire.c:390
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:20
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:171
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:156
ldns_rdf2buffer_wire_compress
ldns_status ldns_rdf2buffer_wire_compress(ldns_buffer *output, const ldns_rdf *rdf, ldns_rbtree_t *compression_data)
Copies the rdata data to the buffer in wire format.
Definition host2wire.c:115
packet.h
Contains the definition of ldns_pkt and its parts, as well as functions to manipulate those.
ldns_pkt
struct ldns_struct_pkt ldns_pkt
Definition packet.h:272
rdata.h
Defines ldns_rdf and functions to manipulate those.
ldns_rdf
struct ldns_struct_rdf ldns_rdf
Definition rdata.h:205
rr.h
Contains the definition of ldns_rr and functions to manipulate those.
ldns_rr
struct ldns_struct_rr ldns_rr
Definition rr.h:337
ldns_rr_list
struct ldns_struct_rr_list ldns_rr_list
Definition rr.h:351
ldns_rbtree_t
definition for tree struct
Definition rbtree.h:83
util.h