]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
doxygen comments -> .h + tweaking
authorJelte Jansen <jeltejan@NLnetLabs.nl>
Wed, 23 Mar 2005 12:39:01 +0000 (12:39 +0000)
committerJelte Jansen <jeltejan@NLnetLabs.nl>
Wed, 23 Mar 2005 12:39:01 +0000 (12:39 +0000)
host2str.c
host2wire.c
ldns/dnssec.h
ldns/host2str.h
ldns/host2wire.h

index 969e818a8d93ec996792530329a3298694e9d941..134450840f56adb97cd4cd7e1ebb57ce91793742 100644 (file)
@@ -165,9 +165,6 @@ ldns_rdf2buffer_str_time(ldns_buffer *output, ldns_rdf *rdf)
        return ldns_buffer_status(output);
 }
 
-/** 
- * Converts A address 
- */
 ldns_status
 ldns_rdf2buffer_str_a(ldns_buffer *output, ldns_rdf *rdf)
 {
@@ -179,9 +176,6 @@ ldns_rdf2buffer_str_a(ldns_buffer *output, ldns_rdf *rdf)
        return ldns_buffer_status(output);
 }
 
-/** 
- * converts AAAA address 
- */
 ldns_status
 ldns_rdf2buffer_str_aaaa(ldns_buffer *output, ldns_rdf *rdf)
 {
@@ -194,9 +188,6 @@ ldns_rdf2buffer_str_aaaa(ldns_buffer *output, ldns_rdf *rdf)
        return ldns_buffer_status(output);
 }
 
-/**
- * Converts TXT rdata
- */
 ldns_status
 ldns_rdf2buffer_str_str(ldns_buffer *output, ldns_rdf *rdf)
 {
@@ -220,9 +211,6 @@ ldns_rdf2buffer_str_str(ldns_buffer *output, ldns_rdf *rdf)
        return ldns_buffer_status(output);
 }
 
-/**
- * Converts Base 64 encoded data
- */
 ldns_status
 ldns_rdf2buffer_str_b64(ldns_buffer *output, ldns_rdf *rdf)
 {
@@ -235,10 +223,6 @@ ldns_rdf2buffer_str_b64(ldns_buffer *output, ldns_rdf *rdf)
        return ldns_buffer_status(output);
 }      
 
-/**
- * Converts Hex encoded data
- * move this to general func?
- */
 ldns_status
 ldns_rdf2buffer_str_hex(ldns_buffer *output, ldns_rdf *rdf)
 {
@@ -261,9 +245,6 @@ ldns_buffer_printf(output, "HEX: ");
        return ldns_buffer_status(output);
 }      
 
-/**
- * Converts type encoded data
- */
 ldns_status
 ldns_rdf2buffer_str_type(ldns_buffer *output, ldns_rdf *rdf)
 {
@@ -279,9 +260,6 @@ ldns_rdf2buffer_str_type(ldns_buffer *output, ldns_rdf *rdf)
        return ldns_buffer_status(output);
 }      
 
-/**
- * Converts class encoded data
- */
 ldns_status
 ldns_rdf2buffer_str_class(ldns_buffer *output, ldns_rdf *rdf)
 {
@@ -722,10 +700,6 @@ ldns_status ldns_rdf2buffer_str_tsig(ldns_buffer *output, ldns_rdf *rdf)
 }
 
 
-/**
- * Returns string representation of the specified rdf
- * Data is not static
- */
 ldns_status
 ldns_rdf2buffer_str(ldns_buffer *buffer, ldns_rdf *rdf)
 {
@@ -880,12 +854,6 @@ ldns_rr2buffer_str(ldns_buffer *output, ldns_rr *rr)
        return ldns_buffer_status(output);
 }
 
-/**
- * convert a rr_list
- * \param[in] output the buffer to output to
- * \param[in] list the list to print
- * \return ldns_status
- */
 ldns_status
 ldns_rr_list2buffer_str(ldns_buffer *output, ldns_rr_list *list)
 {
@@ -898,9 +866,6 @@ ldns_rr_list2buffer_str(ldns_buffer *output, ldns_rr_list *list)
        return ldns_buffer_status(output);
 }
 
-/**
- * Prints the header in default format in the given buffer
- */
 ldns_status
 ldns_pktheader2buffer_str(ldns_buffer *output, ldns_pkt *pkt)
 {
index 5c5cee7bff7002b486b2323b806f0f2a31077a35..f3eccee48a861984b10f49be3f22ec960a5db77d 100644 (file)
@@ -98,12 +98,6 @@ ldns_rr2buffer_wire(ldns_buffer *buffer, const ldns_rr *rr, int section)
        return ldns_buffer_status(buffer);
 }
 
-/**
- * convert a rrsig to wireformat BUT EXCLUDE the rrsig rdata
- * This is needed in DNSSEC verification
- * \param[out] *buffer buffer where to put the result
- * \param[in] *rr sigrr to operate on
- */
 ldns_status
 ldns_rrsig2buffer_wire(ldns_buffer *buffer, ldns_rr *rr)
 {
@@ -123,15 +117,6 @@ ldns_rrsig2buffer_wire(ldns_buffer *buffer, ldns_rr *rr)
        return ldns_buffer_status(buffer);
 }
 
-/**
- * convert a rr's rdata to wireformat, while excluding
- * the ownername and all the crap before the rdata.
- * This is needed in DNSSEC keytag calculation, the ds
- * calcalution from the key and maybe elsewhere.
- *
- * \param[out] *buffer buffer where to put the result
- * \param[in] *rr rr to operate on
- */
 ldns_status
 ldns_rr_rdata2buffer_wire(ldns_buffer *buffer, ldns_rr *rr)
 {
@@ -163,7 +148,7 @@ ldns_rr_rdata2buffer_wire(ldns_buffer *buffer, ldns_rr *rr)
 }
 
 /**
- * Copy the packet header data to the buffer in wire format
+ * Copies the packet header data to the buffer in wire format
  */
 static ldns_status
 ldns_hdr2buffer_wire(ldns_buffer *buffer, const ldns_pkt *packet)
@@ -203,9 +188,6 @@ ldns_hdr2buffer_wire(ldns_buffer *buffer, const ldns_pkt *packet)
        return ldns_buffer_status(buffer);
 }
 
-/**
- * Copy the packet data to the buffer in wire format
- */
 ldns_status
 ldns_pkt2buffer_wire(ldns_buffer *buffer, const ldns_pkt *packet)
 {
@@ -275,12 +257,6 @@ ldns_pkt2buffer_wire(ldns_buffer *buffer, const ldns_pkt *packet)
        return LDNS_STATUS_OK;
 }
 
-/**
- * Allocates an array of uint8_t, and puts the wireformat of the
- * given rdf in that array. The result_size value contains the
- * length of the array, if it succeeds, and 0 otherwise (in which case
- * the function also returns NULL)
- */
 uint8_t *
 ldns_rdf2wire(const ldns_rdf *rdf, size_t *result_size)
 {
@@ -297,15 +273,6 @@ ldns_rdf2wire(const ldns_rdf *rdf, size_t *result_size)
        return result;
 }
 
-/**
- * Allocates an array of uint8_t, and puts the wireformat of the
- * given rr in that array. The result_size value contains the
- * length of the array, if it succeeds, and 0 otherwise (in which case
- * the function also returns NULL)
- *
- * If the section argument is LDNS_SECTION_QUESTION, data like ttl and rdata
- * are not put into the result
- */
 uint8_t *
 ldns_rr2wire(const ldns_rr *rr, int section, size_t *result_size)
 {
@@ -322,12 +289,6 @@ ldns_rr2wire(const ldns_rr *rr, int section, size_t *result_size)
        return result;
 }
 
-/**
- * Allocates an array of uint8_t, and puts the wireformat of the
- * given packet in that array. The result_size value contains the
- * length of the array, if it succeeds, and 0 otherwise (in which case
- * the function also returns NULL)
- */
 uint8_t *
 ldns_pkt2wire(const ldns_pkt *packet, size_t *result_size)
 {
index e582f1a188916b208064be721dc315babad6cdf7..17ee51f53bcecdb31e84b879f9d53ed0708bdf19 100644 (file)
 #ifndef _DNSSEC_H_
 #define _DNSSEC_H_
 
-#include <openssl/ssl.h>
 #include <ldns/common.h>
 #include <ldns/dns.h>
 #include <ldns/buffer.h>
 #include <ldns/packet.h>
+#include <openssl/ssl.h>
 
 #define MAX_KEYLEN     2048
 #define DNSSEC_KEYPROTO        3
index 9b0361cacf67eb89f992b044c50a0796145901a6..f79221fc1f9b6b1f252b026dafb26462e7a6eac5 100644 (file)
 
 #include "util.h"
 
+/** 
+ * Converts an LDNS_RDF_TYPE_A rdata element to string format and adds it to the output buffer 
+ * @param *rdf The rdata to convert
+ * @param *output The buffer to add the data to
+ * @return LDNS_STATUS_OK on success, and error status on failure
+ */
+ldns_status ldns_rdf2buffer_str_a(ldns_buffer *output, ldns_rdf *rdf);
+
+/** 
+ * Converts an LDNS_RDF_TYPE_AAAA rdata element to string format and adds it to the output buffer 
+ * @param *rdf The rdata to convert
+ * @param *output The buffer to add the data to
+ * @return 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_STR rdata element to string format and adds it to the output buffer 
+ * @param *rdf The rdata to convert
+ * @param *output The buffer to add the data to
+ * @return 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_B64 rdata element to string format and adds it to the output buffer 
+ * @param *rdf The rdata to convert
+ * @param *output The buffer to add the data to
+ * @return 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_HEX rdata element to string format and adds it to the output buffer 
+ * @param *rdf The rdata to convert
+ * @param *output The buffer to add the data to
+ * @return 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_TYPE rdata element to string format and adds it to the output buffer 
+ * @param *rdf The rdata to convert
+ * @param *output The buffer to add the data to
+ * @return 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_CLASS rdata element to string format and adds it to the output buffer 
+ * @param *rdf The rdata to convert
+ * @param *output The buffer to add the data to
+ * @return 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_ALG rdata element to string format and adds it to the output buffer 
+ * @param *rdf The rdata to convert
+ * @param *output The buffer to add the data to
+ * @return 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_CERT rdata element to string format and adds it to the output buffer 
+ * @param *rdf The rdata to convert
+ * @param *output The buffer to add the data to
+ * @return LDNS_STATUS_OK on success, and error status on failure
+ */
+ldns_status ldns_rdf2buffer_str_cert(ldns_buffer *output, ldns_rdf *rdf);
+
+/** 
+ * Converts an LDNS_RDF_TYPE_LOC rdata element to string format and adds it to the output buffer 
+ * @param *rdf The rdata to convert
+ * @param *output The buffer to add the data to
+ * @return 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_UNKNOWN rdata element to string format and adds it to the output buffer 
+ * @param *rdf The rdata to convert
+ * @param *output The buffer to add the data to
+ * @return 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_NSAP rdata element to string format and adds it to the output buffer 
+ * @param *rdf The rdata to convert
+ * @param *output The buffer to add the data to
+ * @return 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_WKS rdata element to string format and adds it to the output buffer 
+ * @param *rdf The rdata to convert
+ * @param *output The buffer to add the data to
+ * @return 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_NSEC rdata element to string format and adds it to the output buffer 
+ * @param *rdf The rdata to convert
+ * @param *output The buffer to add the data to
+ * @return 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_PERIOD rdata element to string format and adds it to the output buffer 
+ * @param *rdf The rdata to convert
+ * @param *output The buffer to add the data to
+ * @return 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_TSIGTIME rdata element to string format and adds it to the output buffer 
+ * @param *rdf The rdata to convert
+ * @param *output The buffer to add the data to
+ * @return 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_APL rdata element to string format and adds it to the output buffer 
+ * @param *rdf The rdata to convert
+ * @param *output The buffer to add the data to
+ * @return 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_TODO rdata element to string format and adds it to the output buffer 
+ * @param *rdf The rdata to convert
+ * @param *output The buffer to add the data to
+ * @return LDNS_STATUS_OK on success, and error status on failure
+ */
+ldns_status ldns_rdf2buffer_str_todo(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 
+ * @param *rdf The rdata to convert
+ * @param *output The buffer to add the data to
+ * @return LDNS_STATUS_OK on success, and error status on failure
+ */
+ldns_status ldns_rdf2buffer_str_int16_data(ldns_buffer *output, ldns_rdf *rdf);
+
+/** 
+ * Converts an LDNS_RDF_TYPE_IPSECKEY rdata element to string format and adds it to the output buffer 
+ * @param *rdf The rdata to convert
+ * @param *output The buffer to add the data to
+ * @return 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_TSIG rdata element to string format and adds it to the output buffer 
+ * @param *rdf The rdata to convert
+ * @param *output The buffer to add the data to
+ * @return LDNS_STATUS_OK on success, and error status on failure
+ */
+ldns_status ldns_rdf2buffer_str_tsig(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
@@ -119,7 +288,24 @@ void ldns_rr_print(FILE *output, ldns_rr *rr);
  */
 void ldns_pkt_print(FILE *output, ldns_pkt *pkt);
 
-ldns_status ldns_rr_list2buffer_str(ldns_buffer *, ldns_rr_list *);
+/**
+ * Converts a rr_list to presentation format and appends it to
+ * the output buffer
+ * \param[in] output the buffer to append output to
+ * \param[in] list the ldns_rr_list to print
+ * \return ldns_status
+ */
+ldns_status ldns_rr_list2buffer_str(ldns_buffer *output, ldns_rr_list *list);
+
+/**
+ * Converts the header of a packet to presentation format and appends it to
+ * the output buffer
+ * \param[in] output the buffer to append output to
+ * \param[in] pkt the packet to convert the header of
+ * \return ldns_status
+ */
+ldns_status ldns_pktheader2buffer_str(ldns_buffer *output, ldns_pkt *pkt);
+
 void ldns_rr_list_print(FILE *, ldns_rr_list *);
 
 void ldns_resolver_print(FILE *, ldns_resolver *);
index f4b128668b3426d58612646744131fecad7d8adc..9da8c9f085bf8559444d7c110fbe681cc0b0663c 100644 (file)
 
 ldns_status ldns_rdf2buffer_wire(ldns_buffer *, const ldns_rdf *);
 ldns_status ldns_rr2buffer_wire(ldns_buffer *, const ldns_rr *, int);
-ldns_status ldns_pkt2buffer_wire(ldns_buffer *, const ldns_pkt *);
-ldns_status ldns_rr_rdata2buffer_wire(ldns_buffer *, ldns_rr *);
-ldns_status ldns_rrsig2buffer_wire(ldns_buffer *, ldns_rr *);
+
+/**
+ * Converts a rrsig to wireformat BUT EXCLUDE the rrsig rdata
+ * This is needed in DNSSEC verification
+ * \param[out] output buffer to append the result to
+ * \param[in] sigrr signature rr to operate on
+ * \return ldns_status
+ */
+ldns_status ldns_rrsig2buffer_wire(ldns_buffer *output, ldns_rr *sigrr);
+
+/**
+ * Converts an rr's rdata to wireformat, while excluding
+ * the ownername and all the crap before the rdata.
+ * This is needed in DNSSEC keytag calculation, the ds
+ * calcalution from the key and maybe elsewhere.
+ *
+ * \param[out] *output buffer where to put the result
+ * \param[in] *rr rr to operate on
+ * \return ldns_status
+ */
+ldns_status ldns_rr_rdata2buffer_wire(ldns_buffer *output, ldns_rr *rr);
+
+/**
+ * Copies the packet data to the buffer in wire format
+ * \param[out] *output buffer to append the result to
+ * \param[in] *pkt packet to convert
+ * \return ldns_status
+ */
+ldns_status ldns_pkt2buffer_wire(ldns_buffer *output, const ldns_pkt *pkt);
 ldns_status ldns_rr_list2buffer_wire(ldns_buffer *, ldns_rr_list *);
+
+/**
+ * Allocates an array of uint8_t, and puts the wireformat of the
+ * given rdf in that array. The result_size value contains the
+ * length of the array, if it succeeds, and 0 otherwise (in which case
+ * the function also returns NULL)
+ */
 uint8_t *ldns_rdf2wire(const ldns_rdf *, size_t *);
+
+/**
+ * Allocates an array of uint8_t, and puts the wireformat of the
+ * given rr in that array. The result_size value contains the
+ * length of the array, if it succeeds, and 0 otherwise (in which case
+ * the function also returns NULL)
+ *
+ * If the section argument is LDNS_SECTION_QUESTION, data like ttl and rdata
+ * are not put into the result
+ */
 uint8_t *ldns_rr2wire(const ldns_rr *, int, size_t *);
+
+/**
+ * Allocates an array of uint8_t, and puts the wireformat of the
+ * given packet in that array. The result_size value contains the
+ * length of the array, if it succeeds, and 0 otherwise (in which case
+ * the function also returns NULL)
+ */
 uint8_t *ldns_pkt2wire(const ldns_pkt *, size_t *);