host2str.h File Reference

Go to the source code of this file.

Defines

#define LDNS_APL_IP4   1
 host2str.h - txt presentation of RRs
#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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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 (ldns_rdf *rdf)
 Converts the data in the rdata field to presentation format and returns that as a char *.
char * ldns_rr2str (ldns_rr *rr)
 Converts the data in the resource record to presentation format and returns that as a char *.
char * ldns_pkt2str (ldns_pkt *pkt)
 Converts the data in the DNS packet to presentation format and returns that as a char *.
char * ldns_key2str (ldns_key *k)
 Converts a private key to the test presentation fmt 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, ldns_rdf *rdf)
 Prints the data in the rdata field to the given file stream (in presentation format).
void ldns_rr_print (FILE *output, ldns_rr *rr)
 Prints the data in the resource record to the given file stream (in presentation format).
void ldns_pkt_print (FILE *output, 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, 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, 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, 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, ldns_resolver *r)
 Print a resolver (in sofar that is possible) state to output.
void ldns_zone_print (FILE *output, ldns_zone *z)
 Print a zone structure * to output.


Define Documentation

#define LDNS_APL_IP4   1
 

host2str.h - txt presentation of RRs

a Net::DNS like library for C

(c) NLnet Labs, 2004, 2005

See the file LICENSE for the license

Definition at line 26 of file host2str.h.

#define LDNS_APL_IP6   2
 

Definition at line 27 of file host2str.h.

#define LDNS_APL_MASK   0x7f
 

Definition at line 28 of file host2str.h.

#define LDNS_APL_NEGATION   0x80
 

Definition at line 29 of file host2str.h.


Function Documentation

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

ldns_status ldns_key2buffer_str ldns_buffer output,
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

char* ldns_key2str 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

ldns_status ldns_pkt2buffer_str ldns_buffer output,
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

char* ldns_pkt2str 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

void ldns_pkt_print FILE *  output,
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

ldns_status ldns_pktheader2buffer_str ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str_a ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str_aaaa ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str_alg ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str_apl ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str_b64 ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str_cert_alg ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str_class ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str_hex ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str_int16 ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str_int16_data ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str_ipseckey ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str_loc ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str_nsap ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str_nsec ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str_period ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str_str ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str_tsig ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str_tsigtime ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str_type ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str_unknown ldns_buffer output,
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

ldns_status ldns_rdf2buffer_str_wks ldns_buffer output,
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

char* ldns_rdf2str 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

void ldns_rdf_print FILE *  output,
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

void ldns_resolver_print FILE *  output,
ldns_resolver r
 

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

Parameters:
[in] output the fd to print to
[in] r the resolver to print

ldns_status ldns_rr2buffer_str ldns_buffer output,
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

char* ldns_rr2str 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

ldns_status ldns_rr_list2buffer_str ldns_buffer output,
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

void ldns_rr_list_print FILE *  output,
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_rr_print FILE *  output,
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

void ldns_zone_print FILE *  output,
ldns_zone z
 

Print a zone structure * to output.

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


Generated on Mon Feb 20 15:49:56 2006 for ldns by  doxygen 1.4.6