ldns_rr_new(3) ldns_rr_print-


#include <stdint.h>
#include <stdbool.h>

#include <ldns/ldns.h>

ldns_rr* ldns_rr_new(void);

ldns_rr* ldns_rr_new_frm_type(ldns_rr_type t);

ldns_status ldns_rr_new_frm_str(ldns_rr **n, const char *str, uint32_t default_ttl, ldns_rdf *origin, ldns_rdf **prev);

ldns_status ldns_rr_new_frm_fp(ldns_rr **rr, FILE *fp, uint32_t *default_ttl, ldns_rdf **origin, ldns_rdf **prev);

void ldns_rr_free(ldns_rr *rr);

void ldns_rr_print(FILE *output, const ldns_rr *rr);


creates a new rr structure. .br Returns ldns_rr *

creates a new rr structure, based on the given type. alloc enough space to hold all the rdf's

creates an rr from a string. The string should be a fully filled-in rr, like ownername &lt;space&gt; TTL &lt;space&gt; CLASS &lt;space&gt; TYPE &lt;space&gt; RDATA. .br n: the rr to return .br str: the string to convert .br default_ttl: default ttl value for the rr. If 0 DEF_TTL will be used .br origin: when the owner is relative add this. The caller must ldns_rdf_deep_free it. .br prev: the previous ownername. if this value is not NULL, the function overwrites this with the ownername found in this string. The caller must then ldns_rdf_deep_free it. .br Returns a status msg describing an error or LDNS_STATUS_OK

creates a new rr from a file containing a string. .br rr: the new rr .br fp: the file pointer to use .br default_ttl: pointer to a default ttl for the rr. If NULL DEF_TTL will be used the pointer will be updated if the file contains a $TTL directive .br origin: when the owner is relative add this the pointer will be updated if the file contains a $ORIGIN directive The caller must ldns_rdf_deep_free it. .br prev: when the owner is whitespaces use this as the * ownername the pointer will be updated after the call The caller must ldns_rdf_deep_free it. .br Returns a ldns_status with an error or LDNS_STATUS_OK

frees an RR structure .br *rr: the RR to be freed .br Returns void

Prints the data in the resource record to the given file stream (in presentation format)

.br output: the file stream to print to .br rr: the resource record to print .br Returns void


The ldns team at NLnet Labs. Which consists out of Jelte Jansen and Miek Gieben.


Please report bugs to [email protected] or in our bugzilla at http://www.nlnetlabs.nl/bugs/index.html


Copyright (c) 2004 - 2006 NLnet Labs.

Licensed under the BSD License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


This manpage was automaticly generated from the ldns source code by use of Doxygen and some perl.