host2str.h File Reference

host2str.h - txt presentation of RRs More...

Go to the source code of this file.

Defines

#define LDNS_APL_IP4   1
#define LDNS_APL_IP6   2
#define LDNS_APL_MASK   0x7f
#define LDNS_APL_NEGATION   0x80

Functions

ldns_status ldns_rdf2buffer_str_a (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_A rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_aaaa (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_AAAA rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_str (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_STR rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_b64 (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_B64 rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_hex (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_HEX rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_type (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_TYPE rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_class (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_CLASS rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_alg (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_ALG rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_cert_alg (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_CERT rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_loc (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_LOC rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_unknown (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_UNKNOWN rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_nsap (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_NSAP rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_wks (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_WKS rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_nsec (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_NSEC rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_period (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_PERIOD rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_tsigtime (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_TSIGTIME rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_apl (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_APL rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_int16_data (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_INT16_DATA rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_ipseckey (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_IPSECKEY rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_tsig (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_TSIG rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str (ldns_buffer *output, const ldns_rdf *rdf)
 Converts the data in the rdata field to presentation format (as char *) and appends it to the given buffer.
ldns_status ldns_rr2buffer_str (ldns_buffer *output, const ldns_rr *rr)
 Converts the data in the resource record to presentation format (as char *) and appends it to the given buffer.
ldns_status ldns_pkt2buffer_str (ldns_buffer *output, const ldns_pkt *pkt)
 Converts the data in the DNS packet to presentation format (as char *) and appends it to the given buffer.
ldns_status ldns_key2buffer_str (ldns_buffer *output, const ldns_key *k)
 Converts the data in the DNS packet to presentation format (as char *) and appends it to the given buffer.
ldns_status ldns_rdf2buffer_str_int16 (ldns_buffer *output, const ldns_rdf *rdf)
 Converts the data in the int16 typed rdata field to presentation format (as char *) and appends it to the given buffer.
char * ldns_rdf2str (const ldns_rdf *rdf)
 Converts the data in the rdata field to presentation format and returns that as a char *.
char * ldns_rr2str (const ldns_rr *rr)
 Converts the data in the resource record to presentation format and returns that as a char *.
char * ldns_pkt2str (const ldns_pkt *pkt)
 Converts the data in the DNS packet to presentation format and returns that as a char *.
char * ldns_key2str (const ldns_key *k)
 Converts a private key to the test presentation fmt and returns that as a char *.
char * ldns_rr_list2str (const ldns_rr_list *rr_list)
 Converts a list of resource records to presentation format and returns that as a char *.
char * buffer2str (ldns_buffer *buffer)
 Returns the data in the buffer as a null terminated char * string Buffer data must be char * type.
void ldns_rdf_print (FILE *output, const ldns_rdf *rdf)
 Prints the data in the rdata field to the given file stream (in presentation format).
void ldns_rr_print (FILE *output, const ldns_rr *rr)
 Prints the data in the resource record to the given file stream (in presentation format).
void ldns_pkt_print (FILE *output, const ldns_pkt *pkt)
 Prints the data in the DNS packet to the given file stream (in presentation format).
ldns_status ldns_rr_list2buffer_str (ldns_buffer *output, const ldns_rr_list *list)
 Converts a rr_list to presentation format and appends it to the output buffer.
ldns_status ldns_pktheader2buffer_str (ldns_buffer *output, const ldns_pkt *pkt)
 Converts the header of a packet to presentation format and appends it to the output buffer.
void ldns_rr_list_print (FILE *output, const ldns_rr_list *list)
 print a rr_list to output param[in] output the fd to print to param[in] list the rr_list to print
void ldns_resolver_print (FILE *output, const ldns_resolver *r)
 Print a resolver (in sofar that is possible) state to output.
void ldns_zone_print (FILE *output, const ldns_zone *z)
 Print a zone structure * to output.
ldns_status ldns_rdf2buffer_str_dname (ldns_buffer *output, const ldns_rdf *dname)
 Print the ldns_rdf containing a dname to the buffer.


Detailed Description

host2str.h - txt presentation of RRs

a Net::DNS like library for C

(c) NLnet Labs, 2005-2006

See the file LICENSE for the license

Contains functions to translate the main structures to their text representation, as well as functions to print them.

Definition in file host2str.h.


Define Documentation

#define LDNS_APL_IP4   1

Definition at line 33 of file host2str.h.

#define LDNS_APL_IP6   2

Definition at line 34 of file host2str.h.

#define LDNS_APL_MASK   0x7f

Definition at line 35 of file host2str.h.

#define LDNS_APL_NEGATION   0x80

Definition at line 36 of file host2str.h.


Function Documentation

ldns_status ldns_rdf2buffer_str_a ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts an LDNS_RDF_TYPE_A rdata element to string format and adds it to the output buffer.

Parameters:
[in] *rdf The rdata to convert
[in] *output The buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 185 of file host2str.c.

References INET_ADDRSTRLEN, ldns_buffer_printf(), and ldns_rdf_data().

ldns_status ldns_rdf2buffer_str_aaaa ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts an LDNS_RDF_TYPE_AAAA rdata element to string format and adds it to the output buffer.

Parameters:
[in] *rdf The rdata to convert
[in] *output The buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 196 of file host2str.c.

References INET6_ADDRSTRLEN, ldns_buffer_printf(), and ldns_rdf_data().

ldns_status ldns_rdf2buffer_str_str ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts an LDNS_RDF_TYPE_STR rdata element to string format and adds it to the output buffer.

Parameters:
[in] *rdf The rdata to convert
[in] *output The buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 208 of file host2str.c.

References ldns_buffer_printf(), and ldns_rdf_data().

ldns_status ldns_rdf2buffer_str_b64 ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts an LDNS_RDF_TYPE_B64 rdata element to string format and adds it to the output buffer.

Parameters:
[in] *rdf The rdata to convert
[in] *output The buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 231 of file host2str.c.

References b64_ntop(), ldns_buffer_printf(), LDNS_FREE, ldns_rdf_data(), ldns_rdf_size(), and LDNS_XMALLOC.

ldns_status ldns_rdf2buffer_str_hex ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts an LDNS_RDF_TYPE_HEX rdata element to string format and adds it to the output buffer.

Parameters:
[in] *rdf The rdata to convert
[in] *output The buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 243 of file host2str.c.

References ldns_buffer_printf(), ldns_rdf_data(), and ldns_rdf_size().

ldns_status ldns_rdf2buffer_str_type ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts an LDNS_RDF_TYPE_TYPE rdata element to string format and adds it to the output buffer.

Parameters:
[in] *rdf The rdata to convert
[in] *output The buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 254 of file host2str.c.

References ldns_struct_rr_descriptor::_name, ldns_buffer_printf(), ldns_rdf_data(), and ldns_rr_descript().

ldns_status ldns_rdf2buffer_str_class ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts an LDNS_RDF_TYPE_CLASS rdata element to string format and adds it to the output buffer.

Parameters:
[in] *rdf The rdata to convert
[in] *output The buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 269 of file host2str.c.

References ldns_buffer_printf(), ldns_lookup_by_id(), ldns_rdf_data(), and ldns_struct_lookup_table::name.

ldns_status ldns_rdf2buffer_str_alg ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts an LDNS_RDF_TYPE_ALG rdata element to string format and adds it to the output buffer.

Parameters:
[in] *rdf The rdata to convert
[in] *output The buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 298 of file host2str.c.

References ldns_buffer_printf(), and ldns_rdf_data().

ldns_status ldns_rdf2buffer_str_cert_alg ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts an LDNS_RDF_TYPE_CERT rdata element to string format and adds it to the output buffer.

Parameters:
[in] *rdf The rdata to convert
[in] *output The buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 284 of file host2str.c.

References ldns_buffer_printf(), ldns_lookup_by_id(), ldns_rdf_data(), and ldns_struct_lookup_table::name.

ldns_status ldns_rdf2buffer_str_loc ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts an LDNS_RDF_TYPE_LOC rdata element to string format and adds it to the output buffer.

Parameters:
[in] *rdf The rdata to convert
[in] *output The buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 334 of file host2str.c.

References ldns_buffer_printf(), ldns_rdf2buffer_str_hex(), and ldns_rdf_data().

ldns_status ldns_rdf2buffer_str_unknown ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts an LDNS_RDF_TYPE_UNKNOWN rdata element to string format and adds it to the output buffer.

Parameters:
[in] *rdf The rdata to convert
[in] *output The buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 414 of file host2str.c.

References ldns_buffer_printf(), ldns_rdf2buffer_str_hex(), and ldns_rdf_size().

ldns_status ldns_rdf2buffer_str_nsap ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts an LDNS_RDF_TYPE_NSAP rdata element to string format and adds it to the output buffer.

Parameters:
[in] *rdf The rdata to convert
[in] *output The buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 421 of file host2str.c.

References ldns_buffer_printf(), and ldns_rdf2buffer_str_hex().

ldns_status ldns_rdf2buffer_str_wks ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts an LDNS_RDF_TYPE_WKS rdata element to string format and adds it to the output buffer.

Parameters:
[in] *rdf The rdata to convert
[in] *output The buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 428 of file host2str.c.

References ldns_buffer_printf(), ldns_get_bit(), ldns_rdf_data(), and ldns_rdf_size().

ldns_status ldns_rdf2buffer_str_nsec ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts an LDNS_RDF_TYPE_NSEC rdata element to string format and adds it to the output buffer.

Parameters:
[in] *rdf The rdata to convert
[in] *output The buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 465 of file host2str.c.

References ldns_struct_rr_descriptor::_name, ldns_buffer_printf(), ldns_get_bit(), ldns_rdf_data(), ldns_rdf_size(), and ldns_rr_descript().

ldns_status ldns_rdf2buffer_str_period ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts an LDNS_RDF_TYPE_PERIOD rdata element to string format and adds it to the output buffer.

Parameters:
[in] *rdf The rdata to convert
[in] *output The buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 504 of file host2str.c.

References ldns_buffer_printf(), and ldns_rdf_data().

ldns_status ldns_rdf2buffer_str_tsigtime ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts an LDNS_RDF_TYPE_TSIGTIME rdata element to string format and adds it to the output buffer.

Parameters:
[in] *rdf The rdata to convert
[in] *output The buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 513 of file host2str.c.

References ldns_buffer_printf(), ldns_rdf_data(), ldns_rdf_size(), and LDNS_STATUS_ERR.

ldns_status ldns_rdf2buffer_str_apl ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts an LDNS_RDF_TYPE_APL rdata element to string format and adds it to the output buffer.

Parameters:
[in] *rdf The rdata to convert
[in] *output The buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 534 of file host2str.c.

References LDNS_APL_IP4, LDNS_APL_IP6, LDNS_APL_MASK, LDNS_APL_NEGATION, ldns_buffer_printf(), ldns_rdf_data(), and ldns_rdf_size().

ldns_status ldns_rdf2buffer_str_int16_data ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts an LDNS_RDF_TYPE_INT16_DATA rdata element to string format and adds it to the output buffer.

Parameters:
[in] *rdf The rdata to convert
[in] *output The buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 602 of file host2str.c.

References b64_ntop(), ldns_buffer_printf(), LDNS_FREE, ldns_rdf_data(), ldns_rdf_size(), and LDNS_XMALLOC.

ldns_status ldns_rdf2buffer_str_ipseckey ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts an LDNS_RDF_TYPE_IPSECKEY rdata element to string format and adds it to the output buffer.

Parameters:
[in] *rdf The rdata to convert
[in] *output The buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 619 of file host2str.c.

References ldns_buffer_printf(), LDNS_IP4ADDRLEN, LDNS_IP6ADDRLEN, ldns_rdf2buffer_str(), ldns_rdf_data(), ldns_rdf_free(), ldns_rdf_new(), ldns_rdf_size(), LDNS_RDF_TYPE_A, LDNS_RDF_TYPE_AAAA, LDNS_RDF_TYPE_B64, ldns_wire2dname(), and LDNS_XMALLOC.

ldns_status ldns_rdf2buffer_str_tsig ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts an LDNS_RDF_TYPE_TSIG rdata element to string format and adds it to the output buffer.

Parameters:
[in] *rdf The rdata to convert
[in] *output The buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 685 of file host2str.c.

References ldns_rdf2buffer_str_unknown().

ldns_status ldns_rdf2buffer_str ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts the data in the rdata field to presentation format (as char *) and appends it to the given buffer.

Parameters:
[in] output pointer to the buffer to append the data to
[in] rdf the pointer to the rdafa field containing the data
Returns:
status

Definition at line 693 of file host2str.c.

References ldns_buffer_printf(), ldns_rdf2buffer_str_a(), ldns_rdf2buffer_str_aaaa(), ldns_rdf2buffer_str_alg(), ldns_rdf2buffer_str_apl(), ldns_rdf2buffer_str_b64(), ldns_rdf2buffer_str_cert_alg(), ldns_rdf2buffer_str_class(), ldns_rdf2buffer_str_dname(), ldns_rdf2buffer_str_hex(), ldns_rdf2buffer_str_int16(), ldns_rdf2buffer_str_int16_data(), ldns_rdf2buffer_str_int32(), ldns_rdf2buffer_str_int8(), ldns_rdf2buffer_str_ipseckey(), ldns_rdf2buffer_str_loc(), ldns_rdf2buffer_str_nsap(), ldns_rdf2buffer_str_nsec(), ldns_rdf2buffer_str_period(), ldns_rdf2buffer_str_str(), ldns_rdf2buffer_str_time(), ldns_rdf2buffer_str_tsig(), ldns_rdf2buffer_str_tsigtime(), ldns_rdf2buffer_str_type(), ldns_rdf2buffer_str_unknown(), ldns_rdf2buffer_str_wks(), ldns_rdf_get_type(), LDNS_RDF_TYPE_A, LDNS_RDF_TYPE_AAAA, LDNS_RDF_TYPE_ALG, LDNS_RDF_TYPE_APL, LDNS_RDF_TYPE_B64, LDNS_RDF_TYPE_CERT_ALG, LDNS_RDF_TYPE_CLASS, LDNS_RDF_TYPE_DNAME, LDNS_RDF_TYPE_HEX, LDNS_RDF_TYPE_INT16, LDNS_RDF_TYPE_INT16_DATA, LDNS_RDF_TYPE_INT32, LDNS_RDF_TYPE_INT8, LDNS_RDF_TYPE_IPSECKEY, LDNS_RDF_TYPE_LOC, LDNS_RDF_TYPE_NONE, LDNS_RDF_TYPE_NSAP, LDNS_RDF_TYPE_NSEC, LDNS_RDF_TYPE_PERIOD, LDNS_RDF_TYPE_SERVICE, LDNS_RDF_TYPE_STR, LDNS_RDF_TYPE_TIME, LDNS_RDF_TYPE_TSIG, LDNS_RDF_TYPE_TSIGTIME, LDNS_RDF_TYPE_TYPE, LDNS_RDF_TYPE_UNKNOWN, LDNS_RDF_TYPE_WKS, and LDNS_STATUS_OK.

ldns_status ldns_rr2buffer_str ( ldns_buffer output,
const ldns_rr rr 
)

Converts the data in the resource record to presentation format (as char *) and appends it to the given buffer.

Parameters:
[in] output pointer to the buffer to append the data to
[in] rr the pointer to the rr field to convert
Returns:
status

Definition at line 786 of file host2str.c.

References ldns_struct_rr_descriptor::_name, ldns_buffer_printf(), ldns_calc_keytag(), ldns_lookup_by_id(), ldns_rdf2buffer_str(), ldns_rdf2buffer_str_dname(), ldns_rdf2native_int16(), ldns_rr_descript(), ldns_rr_dnskey_key_size(), ldns_rr_get_class(), ldns_rr_get_type(), ldns_rr_owner(), ldns_rr_rd_count(), ldns_rr_rdf(), ldns_rr_ttl(), LDNS_RR_TYPE_DNSKEY, LDNS_RR_TYPE_RRSIG, LDNS_STATUS_OK, and ldns_struct_lookup_table::name.

ldns_status ldns_pkt2buffer_str ( ldns_buffer output,
const ldns_pkt pkt 
)

Converts the data in the DNS packet to presentation format (as char *) and appends it to the given buffer.

Parameters:
[in] output pointer to the buffer to append the data to
[in] pkt the pointer to the packet to convert
Returns:
status

Definition at line 955 of file host2str.c.

References ldns_buffer_printf(), LDNS_FREE, ldns_pkt_additional(), ldns_pkt_ancount(), ldns_pkt_answer(), ldns_pkt_answerfrom(), ldns_pkt_arcount(), ldns_pkt_authority(), ldns_pkt_edns(), ldns_pkt_edns_data(), ldns_pkt_edns_do(), ldns_pkt_edns_udp_size(), ldns_pkt_edns_version(), ldns_pkt_nscount(), ldns_pkt_qdcount(), ldns_pkt_querytime(), ldns_pkt_question(), ldns_pkt_size(), ldns_pkt_timestamp(), ldns_pkt_tsig(), ldns_pktheader2buffer_str(), ldns_rdf2buffer_str(), ldns_rdf2str(), ldns_rr2buffer_str(), ldns_rr_list_rr(), and LDNS_STATUS_OK.

ldns_status ldns_key2buffer_str ( ldns_buffer output,
const ldns_key k 
)

Converts the data in the DNS packet to presentation format (as char *) and appends it to the given buffer.

Parameters:
[in] output pointer to the buffer to append the data to
[in] k the pointer to the private key to convert
Returns:
status

Definition at line 1064 of file host2str.c.

References ldns_buffer_printf(), LDNS_FREE, ldns_key_algorithm(), ldns_key_dsa_key(), ldns_key_hmac_key(), ldns_key_hmac_size(), ldns_key_rsa_key(), LDNS_MAX_KEYLEN, ldns_rdf2buffer_str(), ldns_rdf_deep_free(), ldns_rdf_new_frm_data(), LDNS_RDF_TYPE_B64, LDNS_SIGN_DSA, LDNS_SIGN_HMACMD5, LDNS_SIGN_RSAMD5, LDNS_SIGN_RSASHA1, LDNS_STATUS_ERR, LDNS_STATUS_OK, and LDNS_XMALLOC.

ldns_status ldns_rdf2buffer_str_int16 ( ldns_buffer output,
const ldns_rdf rdf 
)

Converts the data in the int16 typed rdata field to presentation format (as char *) and appends it to the given buffer.

Parameters:
[in] output pointer to the buffer to append the data to
[in] rdf the pointer to the rdafa field containing the data
Returns:
status

Definition at line 149 of file host2str.c.

References ldns_buffer_printf(), and ldns_rdf_data().

char* ldns_rdf2str ( const ldns_rdf rdf  ) 

Converts the data in the rdata field to presentation format and returns that as a char *.

Remember to free it.

Parameters:
[in] rdf The rdata field to convert
Returns:
null terminated char * data, or NULL on error

Definition at line 1324 of file host2str.c.

References buffer2str(), ldns_buffer_free(), ldns_buffer_new(), LDNS_MIN_BUFLEN, ldns_rdf2buffer_str(), and LDNS_STATUS_OK.

char* ldns_rr2str ( const ldns_rr rr  ) 

Converts the data in the resource record to presentation format and returns that as a char *.

Remember to free it.

Parameters:
[in] rr The rdata field to convert
Returns:
null terminated char * data, or NULL on error

Definition at line 1339 of file host2str.c.

References buffer2str(), ldns_buffer_free(), ldns_buffer_new(), LDNS_MIN_BUFLEN, ldns_rr2buffer_str(), and LDNS_STATUS_OK.

char* ldns_pkt2str ( const ldns_pkt pkt  ) 

Converts the data in the DNS packet to presentation format and returns that as a char *.

Remember to free it.

Parameters:
[in] pkt The rdata field to convert
Returns:
null terminated char * data, or NULL on error

Definition at line 1354 of file host2str.c.

References buffer2str(), ldns_buffer_free(), ldns_buffer_new(), LDNS_MIN_BUFLEN, ldns_pkt2buffer_str(), and LDNS_STATUS_OK.

char* ldns_key2str ( const ldns_key k  ) 

Converts a private key to the test presentation fmt and returns that as a char *.

Remember to free it.

Parameters:
[in] k the key to convert to text
Returns:
null terminated char * data, or NULL on error

Definition at line 1369 of file host2str.c.

References buffer2str(), ldns_buffer_free(), ldns_buffer_new(), ldns_key2buffer_str(), LDNS_MIN_BUFLEN, and LDNS_STATUS_OK.

char* ldns_rr_list2str ( const ldns_rr_list rr_list  ) 

Converts a list of resource records to presentation format and returns that as a char *.

Remember to free it.

Parameters:
[in] rr_list the rr_list to convert to text
Returns:
null terminated char * data, or NULL on error

Definition at line 1382 of file host2str.c.

References buffer2str(), ldns_buffer_free(), ldns_buffer_new(), ldns_buffer_printf(), LDNS_MIN_BUFLEN, ldns_rr_list2buffer_str(), and LDNS_STATUS_OK.

char* buffer2str ( ldns_buffer buffer  ) 

Returns the data in the buffer as a null terminated char * string Buffer data must be char * type.

Parameters:
[in] buffer buffer containing char * data
Returns:
null terminated char * data, or NULL on error

Definition at line 1299 of file host2str.c.

References ldns_buffer_export(), ldns_buffer_reserve(), ldns_buffer_set_capacity(), and LDNS_XMALLOC.

void ldns_rdf_print ( FILE *  output,
const ldns_rdf rdf 
)

Prints the data in the rdata field to the given file stream (in presentation format).

Parameters:
[in] output the file stream to print to
[in] rdf the rdata field to print
Returns:
void

Definition at line 1401 of file host2str.c.

References LDNS_FREE, and ldns_rdf2str().

void ldns_rr_print ( FILE *  output,
const ldns_rr rr 
)

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

Parameters:
[in] output the file stream to print to
[in] rr the resource record to print
Returns:
void

Definition at line 1413 of file host2str.c.

References LDNS_FREE, and ldns_rr2str().

void ldns_pkt_print ( FILE *  output,
const ldns_pkt pkt 
)

Prints the data in the DNS packet to the given file stream (in presentation format).

Parameters:
[in] output the file stream to print to
[in] pkt the packet to print
Returns:
void

Definition at line 1425 of file host2str.c.

References LDNS_FREE, and ldns_pkt2str().

ldns_status ldns_rr_list2buffer_str ( ldns_buffer output,
const ldns_rr_list list 
)

Converts a rr_list to presentation format and appends it to the output buffer.

Parameters:
[in] output the buffer to append output to
[in] list the ldns_rr_list to print
Returns:
ldns_status

Definition at line 892 of file host2str.c.

References ldns_rr2buffer_str(), ldns_rr_list_rr(), and ldns_rr_list_rr_count().

ldns_status ldns_pktheader2buffer_str ( ldns_buffer output,
const ldns_pkt pkt 
)

Converts the header of a packet to presentation format and appends it to the output buffer.

Parameters:
[in] output the buffer to append output to
[in] pkt the packet to convert the header of
Returns:
ldns_status

Definition at line 903 of file host2str.c.

References ldns_buffer_printf(), ldns_lookup_by_id(), ldns_pkt_aa(), ldns_pkt_ad(), ldns_pkt_ancount(), ldns_pkt_arcount(), ldns_pkt_cd(), ldns_pkt_get_opcode(), ldns_pkt_get_rcode(), ldns_pkt_id(), ldns_pkt_nscount(), ldns_pkt_qdcount(), ldns_pkt_qr(), ldns_pkt_ra(), ldns_pkt_rd(), ldns_pkt_tc(), and ldns_struct_lookup_table::name.

void ldns_rr_list_print ( FILE *  output,
const ldns_rr_list list 
)

print a rr_list to output param[in] output the fd to print to param[in] list the rr_list to print

Definition at line 1437 of file host2str.c.

References ldns_rr_list_rr(), ldns_rr_list_rr_count(), and ldns_rr_print().

void ldns_resolver_print ( FILE *  output,
const ldns_resolver r 
)

void ldns_zone_print ( FILE *  output,
const ldns_zone z 
)

Print a zone structure * to output.

Note the SOA record is included in this output

Parameters:
[in] output the fd to print to
[in] z the zone to print

Definition at line 1498 of file host2str.c.

References ldns_rr_list_print(), ldns_rr_print(), ldns_zone_rrs(), and ldns_zone_soa().

ldns_status ldns_rdf2buffer_str_dname ( ldns_buffer output,
const ldns_rdf dname 
)

Print the ldns_rdf containing a dname to the buffer.

Parameters:
[in] output the buffer to print to
[in] dname the dname to print
Returns:
ldns_status message if the printing succeeded

Definition at line 93 of file host2str.c.

References ldns_buffer_printf(), LDNS_MAX_DOMAINLEN, ldns_rdf_data(), ldns_rdf_size(), and LDNS_STATUS_DOMAINNAME_OVERFLOW.


Generated on Wed Feb 20 20:24:23 2008 for ldns by  doxygen 1.5.5