Defines | Functions | Variables
host2str.c File Reference

Go to the source code of this file.

Defines

#define INET_ADDRSTRLEN   16
#define INET6_ADDRSTRLEN   46

Functions

ldns_status ldns_pkt_opcode2buffer_str (ldns_buffer *output, ldns_pkt_opcode opcode)
 Converts an ldns packet opcode value to its mnemonic, and adds that to the output buffer.
ldns_status ldns_pkt_rcode2buffer_str (ldns_buffer *output, ldns_pkt_rcode rcode)
 Converts an ldns packet rcode value to its mnemonic, and adds that to the output buffer.
ldns_status ldns_algorithm2buffer_str (ldns_buffer *output, ldns_algorithm algorithm)
 Converts an ldns algorithm type to its mnemonic, and adds that to the output buffer.
ldns_status ldns_cert_algorithm2buffer_str (ldns_buffer *output, ldns_cert_algorithm cert_algorithm)
 Converts an ldns certificate algorithm type to its mnemonic, and adds that to the output buffer.
char * ldns_pkt_opcode2str (ldns_pkt_opcode opcode)
 Converts a packet opcode to its mnemonic and returns that as an allocated null-terminated string.
char * ldns_pkt_rcode2str (ldns_pkt_rcode rcode)
 Converts a packet rcode to its mnemonic and returns that as an allocated null-terminated string.
char * ldns_pkt_algorithm2str (ldns_algorithm algorithm)
 Converts a signing algorithms to its mnemonic and returns that as an allocated null-terminated string.
char * ldns_pkt_cert_algorithm2str (ldns_cert_algorithm cert_algorithm)
 Converts a cert algorithm to its mnemonic and returns that as an allocated null-terminated string.
ldns_status ldns_rdf2buffer_str_dname (ldns_buffer *output, const ldns_rdf *dname)
 Print the ldns_rdf containing a dname to the buffer.
ldns_status ldns_rdf2buffer_str_int8 (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_INT8 rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_int16 (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_INT16 rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_int32 (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_INT32 rdata element to string format and adds it to the output buffer.
ldns_status ldns_rdf2buffer_str_time (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_TIME rdata element to string format and adds it to the output buffer.
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_b32_ext (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_B32_EXT 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_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_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_rr_type2buffer_str (ldns_buffer *output, const ldns_rr_type type)
 Converts an ldns_rr_type value to its string representation, and places it in the given buffer.
char * ldns_rr_type2str (const ldns_rr_type type)
 Converts an ldns_rr_type value to its string representation, and returns that string.
ldns_status ldns_rr_class2buffer_str (ldns_buffer *output, const ldns_rr_class klass)
 Converts an ldns_rr_class value to its string representation, and places it in the given buffer.
char * ldns_rr_class2str (const ldns_rr_class klass)
 Converts an ldns_rr_class value to its string representation, and returns that string.
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_atma (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_ATMA 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_nsec3_salt (ldns_buffer *output, const ldns_rdf *rdf)
 Converts an LDNS_RDF_TYPE_NSEC3_SALT 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 *buffer, const ldns_rdf *rdf)
 Converts the data in the rdata field to presentation format (as char *) and appends it to the given buffer.
ldns_rdfldns_b32_ext2dname (const ldns_rdf *rdf)
ldns_status ldns_rr2buffer_str_fmt (ldns_buffer *output, const ldns_output_format *fmt, 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_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_rr_list2buffer_str_fmt (ldns_buffer *output, const ldns_output_format *fmt, const ldns_rr_list *list)
 Converts a rr_list to presentation format and appends it to the output buffer.
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.
ldns_status ldns_pkt2buffer_str_fmt (ldns_buffer *output, const ldns_output_format *fmt, 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_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.
char * ldns_buffer2str (ldns_buffer *buffer)
 Returns the data in the buffer as a null terminated char * string Buffer data must be char * type, and must be freed by the caller.
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_fmt (const ldns_output_format *fmt, const ldns_rr *rr)
 Converts the data in the resource record 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_fmt (const ldns_output_format *fmt, const ldns_pkt *pkt)
 Converts the data in the DNS packet 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_fmt (const ldns_output_format *fmt, const ldns_rr_list *list)
 Converts a list of resource records to presentation format and returns that as a char *.
char * ldns_rr_list2str (const ldns_rr_list *list)
 Converts a list of resource records to presentation format and returns that as a char *.
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_fmt (FILE *output, const ldns_output_format *fmt, const ldns_rr *rr)
 Prints the data in the resource record 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_fmt (FILE *output, const ldns_output_format *fmt, const ldns_pkt *pkt)
 Prints the data in the DNS packet 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)
void ldns_rr_list_print_fmt (FILE *output, const ldns_output_format *fmt, const ldns_rr_list *lst)
 print a rr_list to output
void ldns_rr_list_print (FILE *output, const ldns_rr_list *lst)
 print a rr_list to output
void ldns_resolver_print_fmt (FILE *output, const ldns_output_format *fmt, const ldns_resolver *r)
 Print a resolver (in sofar that is possible) state to output.
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_fmt (FILE *output, const ldns_output_format *fmt, const ldns_zone *z)
 Print a zone structure * to output.
void ldns_zone_print (FILE *output, const ldns_zone *z)
 Print a zone structure * to output.

Variables

ldns_lookup_table ldns_algorithms []
 Taken from RFC 2535, section 7.
ldns_lookup_table ldns_cert_algorithms []
 Taken from RFC 2538.
ldns_lookup_table ldns_rr_classes []
 rr types
ldns_lookup_table ldns_rcodes []
 Response codes.
ldns_lookup_table ldns_opcodes []
 Operation codes.
const ldns_output_format ldns_output_format_nocomments_record = { 0, NULL }
const ldns_output_formatldns_output_format_nocomments = &ldns_output_format_nocomments_record
 Standard output format record that disables commenting in the textual representation of Resource Records completely.
const ldns_output_format ldns_output_format_onlykeyids_record
const ldns_output_formatldns_output_format_onlykeyids = &ldns_output_format_onlykeyids_record
 Standard output format record that annotated only DNSKEY RR's with commenti text.
const ldns_output_formatldns_output_format_default = &ldns_output_format_onlykeyids_record
 The default output format record.
const ldns_output_format ldns_output_format_bubblebabble_record
const ldns_output_formatldns_output_format_bubblebabble = &ldns_output_format_bubblebabble_record
 Standard output format record that shows all DNSKEY related information in the comment text, plus the optout flag when set with NSEC3's, plus the bubblebabble representation of DS RR's.

Define Documentation

#define INET_ADDRSTRLEN   16

Definition at line 32 of file host2str.c.

#define INET6_ADDRSTRLEN   46

Definition at line 35 of file host2str.c.


Function Documentation

ldns_status ldns_pkt_opcode2buffer_str ( ldns_buffer output,
ldns_pkt_opcode  opcode 
)

Converts an ldns packet opcode value to its mnemonic, and adds that to the output buffer.

Parameters:
[in]*outputthe buffer to add the data to
[in]opcodeto find the string representation of
Returns:
LDNS_STATUS_OK on success, or a buffer failure mode on error

Definition at line 133 of file host2str.c.

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

ldns_status ldns_pkt_rcode2buffer_str ( ldns_buffer output,
ldns_pkt_rcode  rcode 
)

Converts an ldns packet rcode value to its mnemonic, and adds that to the output buffer.

Parameters:
[in]*outputthe buffer to add the data to
[in]rcodeto find the string representation of
Returns:
LDNS_STATUS_OK on success, or a buffer failure mode on error

Definition at line 145 of file host2str.c.

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

ldns_status ldns_algorithm2buffer_str ( ldns_buffer output,
ldns_algorithm  algorithm 
)

Converts an ldns algorithm type to its mnemonic, and adds that to the output buffer.

Parameters:
[in]*outputthe buffer to add the data to
[in]algorithmto find the string representation of
Returns:
LDNS_STATUS_OK on success, or a buffer failure mode on error

Definition at line 157 of file host2str.c.

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

ldns_status ldns_cert_algorithm2buffer_str ( ldns_buffer output,
ldns_cert_algorithm  cert_algorithm 
)

Converts an ldns certificate algorithm type to its mnemonic, and adds that to the output buffer.

Parameters:
[in]*outputthe buffer to add the data to
[in]cert_algorithmto find the string representation of
Returns:
LDNS_STATUS_OK on success, or a buffer failure mode on error

Definition at line 171 of file host2str.c.

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

char* ldns_pkt_opcode2str ( ldns_pkt_opcode  opcode)

Converts a packet opcode to its mnemonic and returns that as an allocated null-terminated string.

Remember to free it.

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

Definition at line 186 of file host2str.c.

References ldns_buffer_new(), ldns_pkt_opcode2buffer_str(), LDNS_STATUS_OK, ldns_buffer2str(), and ldns_buffer_free().

char* ldns_pkt_rcode2str ( ldns_pkt_rcode  rcode)

Converts a packet rcode to its mnemonic and returns that as an allocated null-terminated string.

Remember to free it.

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

Definition at line 206 of file host2str.c.

References ldns_buffer_new(), ldns_pkt_rcode2buffer_str(), LDNS_STATUS_OK, ldns_buffer2str(), and ldns_buffer_free().

char* ldns_pkt_algorithm2str ( ldns_algorithm  algorithm)

Converts a signing algorithms to its mnemonic and returns that as an allocated null-terminated string.

Remember to free it.

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

Definition at line 226 of file host2str.c.

References ldns_buffer_new(), ldns_algorithm2buffer_str(), LDNS_STATUS_OK, ldns_buffer2str(), and ldns_buffer_free().

char* ldns_pkt_cert_algorithm2str ( ldns_cert_algorithm  cert_algorithm)

Converts a cert algorithm to its mnemonic and returns that as an allocated null-terminated string.

Remember to free it.

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

Definition at line 247 of file host2str.c.

References ldns_buffer_new(), ldns_cert_algorithm2buffer_str(), LDNS_STATUS_OK, ldns_buffer2str(), and ldns_buffer_free().

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]outputthe buffer to print to
[in]dnamethe dname to print
Returns:
ldns_status message if the printing succeeded

Definition at line 270 of file host2str.c.

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

ldns_status ldns_rdf2buffer_str_int8 ( ldns_buffer output,
const ldns_rdf rdf 
)

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

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

Definition at line 322 of file host2str.c.

References ldns_rdf_data(), and ldns_buffer_printf().

ldns_status ldns_rdf2buffer_str_int16 ( ldns_buffer output,
const ldns_rdf rdf 
)

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

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

Definition at line 330 of file host2str.c.

References ldns_rdf_data(), and ldns_buffer_printf().

ldns_status ldns_rdf2buffer_str_int32 ( ldns_buffer output,
const ldns_rdf rdf 
)

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

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

Definition at line 338 of file host2str.c.

References ldns_rdf_data(), and ldns_buffer_printf().

ldns_status ldns_rdf2buffer_str_time ( ldns_buffer output,
const ldns_rdf rdf 
)

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

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

Definition at line 346 of file host2str.c.

References ldns_serial_arithmitics_gmtime_r(), ldns_rdf2native_int32(), and ldns_buffer_printf().

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]*rdfThe rdata to convert
[in]*outputThe buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 361 of file host2str.c.

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

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]*rdfThe rdata to convert
[in]*outputThe buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 372 of file host2str.c.

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

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]*rdfThe rdata to convert
[in]*outputThe buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 384 of file host2str.c.

References ldns_rdf_data(), and ldns_buffer_printf().

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]*rdfThe rdata to convert
[in]*outputThe buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 408 of file host2str.c.

References ldns_rdf_size(), LDNS_XMALLOC, LDNS_STATUS_MEM_ERR, ldns_b64_ntop(), ldns_rdf_data(), ldns_buffer_printf(), and LDNS_FREE.

ldns_status ldns_rdf2buffer_str_b32_ext ( ldns_buffer output,
const ldns_rdf rdf 
)

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

Parameters:
[in]*rdfThe rdata to convert
[in]*outputThe 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_rdf_size(), LDNS_STATUS_OK, LDNS_XMALLOC, LDNS_STATUS_MEM_ERR, ldns_b32_ntop_extended_hex(), ldns_rdf_data(), ldns_buffer_printf(), and LDNS_FREE.

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]*rdfThe rdata to convert
[in]*outputThe buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 442 of file host2str.c.

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

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]*rdfThe rdata to convert
[in]*outputThe buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 453 of file host2str.c.

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

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]*rdfThe rdata to convert
[in]*outputThe buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 468 of file host2str.c.

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

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]*rdfThe rdata to convert
[in]*outputThe buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 483 of file host2str.c.

References ldns_rdf_data(), ldns_lookup_by_id(), ldns_buffer_printf(), 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]*rdfThe rdata to convert
[in]*outputThe buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 497 of file host2str.c.

References ldns_rdf_data(), and ldns_buffer_printf().

ldns_status ldns_rr_type2buffer_str ( ldns_buffer output,
const ldns_rr_type  type 
)

Converts an ldns_rr_type value to its string representation, and places it in the given buffer.

Parameters:
[in]*outputThe buffer to add the data to
[in]typethe ldns_rr_type to convert
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 524 of file host2str.c.

References ldns_rr_descript(), ldns_struct_rr_descriptor::_name, ldns_buffer_printf(), LDNS_RR_TYPE_IXFR, LDNS_RR_TYPE_AXFR, LDNS_RR_TYPE_MAILA, LDNS_RR_TYPE_MAILB, and LDNS_RR_TYPE_ANY.

char* ldns_rr_type2str ( const ldns_rr_type  type)

Converts an ldns_rr_type value to its string representation, and returns that string.

For unknown types, the string "TYPE<id>" is returned. This function allocates data that must be freed by the caller

Parameters:
[in]typethe ldns_rr_type to convert
Returns:
a newly allocated string

Definition at line 558 of file host2str.c.

References ldns_buffer_new(), ldns_rr_type2buffer_str(), LDNS_STATUS_OK, ldns_buffer2str(), and ldns_buffer_free().

ldns_status ldns_rr_class2buffer_str ( ldns_buffer output,
const ldns_rr_class  klass 
)

Converts an ldns_rr_class value to its string representation, and places it in the given buffer.

Parameters:
[in]*outputThe buffer to add the data to
[in]klassthe ldns_rr_class to convert
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 579 of file host2str.c.

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

char* ldns_rr_class2str ( const ldns_rr_class  klass)

Converts an ldns_rr_class value to its string representation, and returns that string.

For unknown types, the string "CLASS<id>" is returned. This function allocates data that must be freed by the caller

Parameters:
[in]klassthe ldns_rr_class to convert
Returns:
a newly allocated string

Definition at line 594 of file host2str.c.

References ldns_buffer_new(), ldns_rr_class2buffer_str(), LDNS_STATUS_OK, ldns_buffer2str(), and ldns_buffer_free().

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]*rdfThe rdata to convert
[in]*outputThe buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 613 of file host2str.c.

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

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]*rdfThe rdata to convert
[in]*outputThe buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 699 of file host2str.c.

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

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]*rdfThe rdata to convert
[in]*outputThe buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 706 of file host2str.c.

References ldns_buffer_printf(), and ldns_rdf2buffer_str_hex().

ldns_status ldns_rdf2buffer_str_atma ( ldns_buffer output,
const ldns_rdf rdf 
)

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

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

Definition at line 713 of file host2str.c.

References 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]*rdfThe rdata to convert
[in]*outputThe buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 719 of file host2str.c.

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

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]*rdfThe rdata to convert
[in]*outputThe buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 760 of file host2str.c.

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

ldns_status ldns_rdf2buffer_str_nsec3_salt ( ldns_buffer output,
const ldns_rdf rdf 
)

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

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

Definition at line 799 of file host2str.c.

References ldns_rdf_data(), ldns_rdf_size(), ldns_struct_buffer::_status, LDNS_STATUS_ERR, and ldns_buffer_printf().

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]*rdfThe rdata to convert
[in]*outputThe buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 825 of file host2str.c.

References ldns_rdf_data(), and ldns_buffer_printf().

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]*rdfThe rdata to convert
[in]*outputThe buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 834 of file host2str.c.

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

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]*rdfThe rdata to convert
[in]*outputThe buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 855 of file host2str.c.

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

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]*rdfThe rdata to convert
[in]*outputThe buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 931 of file host2str.c.

References ldns_rdf_size(), LDNS_XMALLOC, LDNS_STATUS_MEM_ERR, ldns_buffer_printf(), ldns_b64_ntop(), ldns_rdf_data(), and LDNS_FREE.

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]*rdfThe rdata to convert
[in]*outputThe buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 952 of file host2str.c.

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

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]*rdfThe rdata to convert
[in]*outputThe buffer to add the data to
Returns:
LDNS_STATUS_OK on success, and error status on failure

Definition at line 1045 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]outputpointer to the buffer to append the data to
[in]rdfthe pointer to the rdafa field containing the data
Returns:
status

Definition at line 1053 of file host2str.c.

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

ldns_rdf* ldns_b32_ext2dname ( const ldns_rdf rdf)
ldns_status ldns_rr2buffer_str_fmt ( ldns_buffer output,
const ldns_output_format fmt,
const ldns_rr rr 
)
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.

The presentation format of DNSKEY record is annotated with comments giving the id, type and size of the key.

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

Definition at line 1385 of file host2str.c.

References ldns_rr2buffer_str_fmt(), and ldns_output_format_default.

ldns_status ldns_rr_list2buffer_str_fmt ( ldns_buffer output,
const ldns_output_format fmt,
const ldns_rr_list list 
)

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

Parameters:
[in]outputthe buffer to append output to
[in]fmtformat of the textual representation
[in]listthe ldns_rr_list to print
Returns:
ldns_status

Definition at line 1391 of file host2str.c.

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

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]outputthe buffer to append output to
[in]listthe ldns_rr_list to print
Returns:
ldns_status

Definition at line 1404 of file host2str.c.

References ldns_rr_list2buffer_str_fmt(), and ldns_output_format_default.

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]outputthe buffer to append output to
[in]pktthe packet to convert the header of
Returns:
ldns_status

Definition at line 1411 of file host2str.c.

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

ldns_status ldns_pkt2buffer_str_fmt ( ldns_buffer output,
const ldns_output_format fmt,
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]outputpointer to the buffer to append the data to
[in]fmthow to format the textual representation of the packet
[in]pktthe pointer to the packet to convert
Returns:
status

Definition at line 1463 of file host2str.c.

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

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]outputpointer to the buffer to append the data to
[in]pktthe pointer to the packet to convert
Returns:
status

Definition at line 1584 of file host2str.c.

References ldns_pkt2buffer_str_fmt(), and ldns_output_format_default.

ldns_status ldns_key2buffer_str ( ldns_buffer output,
const ldns_key k 
)
char* ldns_buffer2str ( ldns_buffer buffer)

Returns the data in the buffer as a null terminated char * string Buffer data must be char * type, and must be freed by the caller.

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

Definition at line 2018 of file host2str.c.

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

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]rdfThe rdata field to convert
Returns:
null terminated char * data, or NULL on error

Definition at line 2046 of file host2str.c.

References ldns_buffer_new(), LDNS_MAX_PACKETLEN, ldns_rdf2buffer_str(), LDNS_STATUS_OK, ldns_buffer2str(), and ldns_buffer_free().

char* ldns_rr2str_fmt ( const ldns_output_format fmt,
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]fmthow to format the resource record
[in]rrThe rdata field to convert
Returns:
null terminated char * data, or NULL on error

Definition at line 2063 of file host2str.c.

References ldns_buffer_new(), LDNS_MAX_PACKETLEN, ldns_rr2buffer_str_fmt(), LDNS_STATUS_OK, ldns_buffer2str(), and ldns_buffer_free().

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]rrThe rdata field to convert
Returns:
null terminated char * data, or NULL on error

Definition at line 2081 of file host2str.c.

References ldns_rr2str_fmt(), and ldns_output_format_default.

char* ldns_pkt2str_fmt ( const ldns_output_format fmt,
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]fmthow to format the packet
[in]pktThe rdata field to convert
Returns:
null terminated char * data, or NULL on error

Definition at line 2087 of file host2str.c.

References ldns_buffer_new(), LDNS_MAX_PACKETLEN, ldns_pkt2buffer_str_fmt(), LDNS_STATUS_OK, ldns_buffer2str(), and ldns_buffer_free().

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]pktThe rdata field to convert
Returns:
null terminated char * data, or NULL on error

Definition at line 2106 of file host2str.c.

References ldns_pkt2str_fmt(), and ldns_output_format_default.

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]kthe key to convert to text
Returns:
null terminated char * data, or NULL on error

Definition at line 2112 of file host2str.c.

References ldns_buffer_new(), LDNS_MAX_PACKETLEN, ldns_key2buffer_str(), LDNS_STATUS_OK, ldns_buffer2str(), and ldns_buffer_free().

char* ldns_rr_list2str_fmt ( const ldns_output_format fmt,
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]fmthow to format the list of resource records
[in]rr_listthe rr_list to convert to text
Returns:
null terminated char * data, or NULL on error

Definition at line 2129 of file host2str.c.

References ldns_buffer_new(), LDNS_MAX_PACKETLEN, ldns_rr_list2buffer_str_fmt(), LDNS_STATUS_OK, ldns_output_format_default, ldns_struct_output_format::flags, LDNS_COMMENT_NULLS, ldns_buffer_printf(), ldns_buffer2str(), and ldns_buffer_free().

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_listthe rr_list to convert to text
Returns:
null terminated char * data, or NULL on error

Definition at line 2158 of file host2str.c.

References ldns_rr_list2str_fmt(), and ldns_output_format_default.

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]outputthe file stream to print to
[in]rdfthe rdata field to print
Returns:
void

Definition at line 2164 of file host2str.c.

References ldns_rdf2str(), and LDNS_FREE.

void ldns_rr_print_fmt ( FILE *  output,
const ldns_output_format fmt,
const ldns_rr rr 
)

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

Parameters:
[in]outputthe file stream to print to
[in]fmtformat of the textual representation
[in]rrthe resource record to print
Returns:
void

Definition at line 2176 of file host2str.c.

References ldns_rr2str_fmt(), and LDNS_FREE.

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]outputthe file stream to print to
[in]rrthe resource record to print
Returns:
void

Definition at line 2189 of file host2str.c.

References ldns_rr_print_fmt(), and ldns_output_format_default.

void ldns_pkt_print_fmt ( FILE *  output,
const ldns_output_format fmt,
const ldns_pkt pkt 
)

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

Parameters:
[in]outputthe file stream to print to
[in]fmtformat of the textual representation
[in]pktthe packet to print
Returns:
void

Definition at line 2195 of file host2str.c.

References ldns_pkt2str_fmt(), and LDNS_FREE.

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]outputthe file stream to print to
[in]pktthe packet to print
Returns:
void

Definition at line 2208 of file host2str.c.

References ldns_pkt_print_fmt(), and ldns_output_format_default.

void ldns_rr_list_print_fmt ( FILE *  output,
const ldns_output_format fmt,
const ldns_rr_list list 
)

print a rr_list to output

Parameters:
[in]outputthe fd to print to
[in]fmtformat of the textual representation
[in]listthe rr_list to print

Definition at line 2214 of file host2str.c.

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

void ldns_rr_list_print ( FILE *  output,
const ldns_rr_list list 
)

print a rr_list to output

Parameters:
[in]outputthe fd to print to
[in]listthe rr_list to print

Definition at line 2224 of file host2str.c.

References ldns_rr_list_print_fmt(), and ldns_output_format_default.

void ldns_resolver_print_fmt ( FILE *  output,
const ldns_output_format fmt,
const ldns_resolver r 
)
void ldns_resolver_print ( FILE *  output,
const ldns_resolver r 
)

Print a resolver (in sofar that is possible) state to output.

Parameters:
[in]outputthe fd to print to
[in]rthe resolver to print

Definition at line 2297 of file host2str.c.

References ldns_resolver_print_fmt(), and ldns_output_format_default.

void ldns_zone_print_fmt ( FILE *  output,
const ldns_output_format fmt,
const ldns_zone z 
)

Print a zone structure * to output.

Note the SOA record is included in this output

Parameters:
[in]outputthe fd to print to
[in]fmtformat of the textual representation
[in]zthe zone to print

Definition at line 2303 of file host2str.c.

References ldns_zone_soa(), ldns_rr_print_fmt(), ldns_rr_list_print_fmt(), and ldns_zone_rrs().

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]outputthe fd to print to
[in]zthe zone to print

Definition at line 2311 of file host2str.c.

References ldns_zone_print_fmt(), and ldns_output_format_default.


Variable Documentation

Initial value:
 {
        { LDNS_RSAMD5, "RSAMD5" },
        { LDNS_DH, "DH" },
        { LDNS_DSA, "DSA" },
        { LDNS_ECC, "ECC" },
        { LDNS_RSASHA1, "RSASHA1" },
        { LDNS_DSA_NSEC3, "DSA-NSEC3-SHA1" },
        { LDNS_RSASHA1_NSEC3, "RSASHA1-NSEC3-SHA1" },

        { LDNS_RSASHA256, "RSASHA256"},
        { LDNS_RSASHA512, "RSASHA512"},








        { LDNS_INDIRECT, "INDIRECT" },
        { LDNS_PRIVATEDNS, "PRIVATEDNS" },
        { LDNS_PRIVATEOID, "PRIVATEOID" },
        { 0, NULL }
}

Taken from RFC 2535, section 7.

Definition at line 41 of file host2str.c.

Initial value:
 {
        { LDNS_CERT_PKIX, "PKIX" },
        { LDNS_CERT_SPKI, "SPKI" },
        { LDNS_CERT_PGP, "PGP" },
        { LDNS_CERT_IPKIX, "IPKIX" },
        { LDNS_CERT_ISPKI, "ISPKI" },
        { LDNS_CERT_IPGP, "IPGP" },
        { LDNS_CERT_ACPKIX, "ACPKIX" },
        { LDNS_CERT_IACPKIX, "IACPKIX" },
        { LDNS_CERT_URI, "URI" },
        { LDNS_CERT_OID, "OID" },
        { 0, NULL }
}

Taken from RFC 2538.

Definition at line 67 of file host2str.c.

Initial value:
 {
        { LDNS_RR_CLASS_IN, "IN" },
        { LDNS_RR_CLASS_CH, "CH" },
        { LDNS_RR_CLASS_HS, "HS" },
        { LDNS_RR_CLASS_NONE, "NONE" },
        { LDNS_RR_CLASS_ANY, "ANY" },
        { 0, NULL }
}

rr types

Definition at line 82 of file host2str.c.

Initial value:
 {
        { LDNS_RCODE_NOERROR, "NOERROR" },
        { LDNS_RCODE_FORMERR, "FORMERR" },
        { LDNS_RCODE_SERVFAIL, "SERVFAIL" },
        { LDNS_RCODE_NXDOMAIN, "NXDOMAIN" },
        { LDNS_RCODE_NOTIMPL, "NOTIMPL" },
        { LDNS_RCODE_REFUSED, "REFUSED" },
        { LDNS_RCODE_YXDOMAIN, "YXDOMAIN" },
        { LDNS_RCODE_YXRRSET, "YXRRSET" },
        { LDNS_RCODE_NXRRSET, "NXRRSET" },
        { LDNS_RCODE_NOTAUTH, "NOTAUTH" },
        { LDNS_RCODE_NOTZONE, "NOTZONE" },
        { 0, NULL }
}

Response codes.

Definition at line 92 of file host2str.c.

Initial value:
 {
        { LDNS_PACKET_QUERY, "QUERY" },
        { LDNS_PACKET_IQUERY, "IQUERY" },
        { LDNS_PACKET_STATUS, "STATUS" },
        { LDNS_PACKET_NOTIFY, "NOTIFY" },
        { LDNS_PACKET_UPDATE, "UPDATE" },
        { 0, NULL }
}

Operation codes.

Definition at line 107 of file host2str.c.

Definition at line 116 of file host2str.c.

Standard output format record that disables commenting in the textual representation of Resource Records completely.

Definition at line 118 of file host2str.c.

Initial value:
 {
         ( 0x0002    | 0x0004   | 0x0008 ) , NULL
}

Definition at line 119 of file host2str.c.

Standard output format record that annotated only DNSKEY RR's with commenti text.

Definition at line 123 of file host2str.c.

The default output format record.

Same as ldns_output_format_onlykeyids.

Definition at line 125 of file host2str.c.

Initial value:
 { 
         ( 0x0002    | 0x0004   | 0x0008 )  |  0x0010  |  0x0020 , NULL
}

Definition at line 126 of file host2str.c.

Standard output format record that shows all DNSKEY related information in the comment text, plus the optout flag when set with NSEC3's, plus the bubblebabble representation of DS RR's.

Definition at line 130 of file host2str.c.