From: Miek Gieben Date: Tue, 26 Apr 2005 08:49:52 +0000 (+0000) Subject: doc gen finished - .h files fixes. All @param -> \param X-Git-Tag: release-0.50~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19256cb41199d31dc211173e46665ec5c71a28e5;p=thirdparty%2Fldns.git doc gen finished - .h files fixes. All @param -> \param --- diff --git a/doc/doxyparse.pl b/doc/doxyparse.pl index 1fd4c65f..4c4e18d0 100755 --- a/doc/doxyparse.pl +++ b/doc/doxyparse.pl @@ -64,7 +64,7 @@ if (defined $options{'m'}) { chomp; if (/^#/) { next; } if (/^$/) { next; } - my @funcs = split /,/, $_; + my @funcs = split /[\t ]*,[\t ]*/, $_; $manpages{$funcs[0]} = \@funcs; #print "[", $funcs[0], "]\n"; } @@ -76,6 +76,7 @@ if (defined $options{'m'}) { # 0 - somewhere in the file # 1 - in a doxygen par +# 2 - after doxygen, except funcion # create our pwd mkdir "man"; @@ -84,13 +85,15 @@ mkdir "man/man$MAN_SECTION"; $state = 0; while(<>) { chomp; - if (/\/\*\*/) { + if (/^\/\*\*[\t ]*$/) { # /** Seen + #print "Comment seen! [$_]\n"; $state = 1; next; } - if (/\*\//) { - $state = 0; + if (/\*\// and $state == 1) { + #print "END Comment seen!\n"; + $state = 2; next; } @@ -98,9 +101,11 @@ while(<>) { # inside doxygen s/^[ \t]*\*[ \t]*//; +# print $description; $description = $description . "\n.br\n" . $_; } - if (/(.*)[\t ]+(.*?)\((.*)\);/) { + if (/(.*)[\t ]+(.*?)\((.*)\);/ and $state == 2) { +# print $state, $_, "Ik kom nooit hier\n"; # this should also end the current comment parsing $return = $1; $key = $2; @@ -112,7 +117,7 @@ while(<>) { $key =~ s/^\*//; $return = '*' . $return; } - #print "$key\n"; +# print "Found one!!", "[",$key,"]\n"; $description =~ s/\\param\[in\][ \t]//g; $description =~ s/\\//g; @@ -145,6 +150,7 @@ foreach (keys %manpages) { print MAN ".PP\n"; foreach $function (@$a) { print MAN $return{$function}, " ", $function; + print $return{$function}, " ", $function; print MAN "(", $api{$function},");\n"; print MAN ".PP\n"; } @@ -152,6 +158,7 @@ foreach (keys %manpages) { foreach $function (@$a) { print MAN "\\fI", $function, "\\fR", ":"; print MAN $description{$function}; + print "{", $function, "}", $description{$function}; print MAN "\n.PP\n"; } print MAN $MAN_FOOTER; diff --git a/doc/function_manpages b/doc/function_manpages index e9dd3475..18e29bba 100644 --- a/doc/function_manpages +++ b/doc/function_manpages @@ -2,9 +2,8 @@ # other names are aliases (symlinks) # functions that must be included, separated by commas -ldns_rr2wire, ldns_pkt2wire, ldns_rdf2wire +# conversion functions +#ldns_rr2wire, ldns_pkt2wire, ldns_rdf2wire +# wirefunctions ldns_wire2rr, ldns_wire2pkt, ldns_wire2rdf, ldns_wire2dname -ldns_pkt_set_flags,ldns_pkt_set_id,ldns_pkt_set_qr,ldns_pkt_set_aa,ldns_pkt_set_tc,ldns_pkt_set_rd,ldns_pkt_set_cd,ldns_pkt_set_ra,ldns_pkt_set_ad -# - - +# the rest diff --git a/ldns/buffer.h b/ldns/buffer.h index 002dfefd..6f38b7fb 100644 --- a/ldns/buffer.h +++ b/ldns/buffer.h @@ -410,14 +410,18 @@ ldns_buffer_status_ok(ldns_buffer *buffer) int ldns_buffer_printf(ldns_buffer *buffer, const char *format, ...) ATTR_FORMAT(printf, 2, 3); -/* +/** * Frees the buffer. + * \param[in] *buffer the buffer to be freed + * \return void */ void ldns_buffer_free(ldns_buffer *buffer); -/* +/** * Makes the buffer fixed and returns a pointer to the data. The * caller is responsible for free'ing the result. + * \param[in] *buffer the buffer to be exported + * \return void */ void *ldns_buffer_export(ldns_buffer *buffer); diff --git a/ldns/dname.h b/ldns/dname.h index c33e5b13..60750a59 100644 --- a/ldns/dname.h +++ b/ldns/dname.h @@ -40,6 +40,7 @@ ldns_rdf *ldns_dname_left_chop(ldns_rdf *d); * \return the number of labels */ uint8_t ldns_dname_label_count(ldns_rdf *r); + /** * Create a new dname rdf from a string * \param[in] str string to use @@ -47,12 +48,18 @@ uint8_t ldns_dname_label_count(ldns_rdf *r); */ ldns_rdf *ldns_dname_new_frm_str(const char *str); +/** + * Create a new dname rdf from data (the data is copied) + * \param[in] size the size of the data + * \param[in] *data pointer to the actual data + * \return ldns_rdf* + */ ldns_rdf *ldns_dname_new_frm_data(uint16_t size, const void *data); /** * Put a dname into canonical fmt - ie. lowercase it * \param[in] rdf the dname to lowercase + * \return void */ void ldns_dname2canonical(const ldns_rdf *rdf); - #endif /* !_LDNS_DNAME_H */ diff --git a/ldns/dnssec.h b/ldns/dnssec.h index 9e4e382c..f47f15dc 100644 --- a/ldns/dnssec.h +++ b/ldns/dnssec.h @@ -101,6 +101,8 @@ ldns_status ldns_pkt_tsig_sign(ldns_pkt *pkt, const char *key_name, const char * /** * Returns a new DS rr that represents the given key rr + * \param[in] *key the key to convert + * \return ldns_rr* a new rr pointer to a DS */ ldns_rr *ldns_key_rr2ds(const ldns_rr *key); diff --git a/ldns/higher.h b/ldns/higher.h index f34dda91..8460a187 100644 --- a/ldns/higher.h +++ b/ldns/higher.h @@ -27,8 +27,7 @@ * \param[in] c the class to use * \param[in] flags give some optional flags to the query */ -ldns_rr_list * -ldns_get_rr_list_addr_by_name(ldns_resolver *r, ldns_rdf *name, ldns_rr_class c, uint16_t flags); +ldns_rr_list * ldns_get_rr_list_addr_by_name(ldns_resolver *r, ldns_rdf *name, ldns_rr_class c, uint16_t flags); /** * ask the resolver about the address @@ -38,9 +37,7 @@ ldns_get_rr_list_addr_by_name(ldns_resolver *r, ldns_rdf *name, ldns_rr_class c, * \param[in] c the class to use * \param[in] flags give some optional flags to the query */ -ldns_rr_list * -ldns_get_rr_list_name_by_addr(ldns_resolver *r, ldns_rdf *addr, ldns_rr_class c, uint16_t flags); -#endif /* _LDNS_HIGHER_H */ +ldns_rr_list * ldns_get_rr_list_name_by_addr(ldns_resolver *r, ldns_rdf *addr, ldns_rr_class c, uint16_t flags); /** * wade through fp (a /etc/hosts like file) @@ -59,3 +56,4 @@ ldns_rr_list * ldns_get_rr_list_hosts_frm_fp(FILE *fp); * \return ldns_rr_list * with the names */ ldns_rr_list * ldns_get_rr_list_hosts_frm_file(char *filename); +#endif /* _LDNS_HIGHER_H */ diff --git a/ldns/host2str.h b/ldns/host2str.h index f79221fc..1631feaa 100644 --- a/ldns/host2str.h +++ b/ldns/host2str.h @@ -15,169 +15,169 @@ /** * 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 + * \param[in] *rdf The rdata to convert + * \param[in] *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 + * \param[in] *rdf The rdata to convert + * \param[in] *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 + * \param[in] *rdf The rdata to convert + * \param[in] *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 + * \param[in] *rdf The rdata to convert + * \param[in] *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 + * \param[in] *rdf The rdata to convert + * \param[in] *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 + * \param[in] *rdf The rdata to convert + * \param[in] *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 + * \param[in] *rdf The rdata to convert + * \param[in] *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 + * \param[in] *rdf The rdata to convert + * \param[in] *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 + * \param[in] *rdf The rdata to convert + * \param[in] *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 + * \param[in] *rdf The rdata to convert + * \param[in] *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 + * \param[in] *rdf The rdata to convert + * \param[in] *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 + * \param[in] *rdf The rdata to convert + * \param[in] *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 + * \param[in] *rdf The rdata to convert + * \param[in] *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 + * \param[in] *rdf The rdata to convert + * \param[in] *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 + * \param[in] *rdf The rdata to convert + * \param[in] *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 + * \param[in] *rdf The rdata to convert + * \param[in] *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 + * \param[in] *rdf The rdata to convert + * \param[in] *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 + * \param[in] *rdf The rdata to convert + * \param[in] *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 + * \param[in] *rdf The rdata to convert + * \param[in] *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 + * \param[in] *rdf The rdata to convert + * \param[in] *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 + * \param[in] *rdf The rdata to convert + * \param[in] *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); @@ -186,9 +186,9 @@ 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 * - * @param output pointer to the buffer to append the data to - * @param rdf the pointer to the rdafa field containing the data - * @return status + * \param[in] output pointer to the buffer to append the data to + * \param[in] rdf the pointer to the rdafa field containing the data + * \return status */ ldns_status ldns_rdf2buffer_str(ldns_buffer *output, ldns_rdf *rdf); @@ -196,9 +196,9 @@ ldns_status ldns_rdf2buffer_str(ldns_buffer *output, ldns_rdf *rdf); * Converts the data in the resource record to presentation * format (as char *) and appends it to the given buffer * - * @param output pointer to the buffer to append the data to - * @param rr the pointer to the rr field to convert - * @return status + * \param[in] output pointer to the buffer to append the data to + * \param[in] rr the pointer to the rr field to convert + * \return status */ ldns_status ldns_rr2buffer_str(ldns_buffer *output, ldns_rr *rr); @@ -206,9 +206,9 @@ ldns_status ldns_rr2buffer_str(ldns_buffer *output, ldns_rr *rr); * Converts the data in the DNS packet to presentation * format (as char *) and appends it to the given buffer * - * @param output pointer to the buffer to append the data to - * @param pkt the pointer to the packet to convert - * @return status + * \param[in] output pointer to the buffer to append the data to + * \param[in] pkt the pointer to the packet to convert + * \return status */ ldns_status ldns_pkt2buffer_str(ldns_buffer *output, ldns_pkt *pkt); @@ -216,9 +216,9 @@ ldns_status ldns_pkt2buffer_str(ldns_buffer *output, ldns_pkt *pkt); * Converts the data in the int16 typed rdata field to presentation * format (as char *) and appends it to the given buffer * - * @param output pointer to the buffer to append the data to - * @param rdf the pointer to the rdafa field containing the data - * @return status + * \param[in] output pointer to the buffer to append the data to + * \param[in] rdf the pointer to the rdafa field containing the data + * \return status */ ldns_status ldns_rdf2buffer_str_int16(ldns_buffer *output, ldns_rdf *rdf); @@ -227,8 +227,8 @@ ldns_status ldns_rdf2buffer_str_int16(ldns_buffer *output, ldns_rdf *rdf); * returns that as a char *. * Remeber to free it * - * @param rdf The rdata field to convert - * @return null terminated char * data, or NULL on error + * \param[in] rdf The rdata field to convert + * \return null terminated char * data, or NULL on error */ char *ldns_rdf2str(ldns_rdf *rdf); @@ -237,8 +237,8 @@ char *ldns_rdf2str(ldns_rdf *rdf); * returns that as a char *. * Remeber to free it * - * @param rr The rdata field to convert - * @return null terminated char * data, or NULL on error + * \param[in] rr The rdata field to convert + * \return null terminated char * data, or NULL on error */ char *ldns_rr2str(ldns_rr *rr); @@ -247,8 +247,8 @@ char *ldns_rr2str(ldns_rr *rr); * returns that as a char *. * Remeber to free it * - * @param pkt The rdata field to convert - * @return null terminated char * data, or NULL on error + * \param[in] pkt The rdata field to convert + * \return null terminated char * data, or NULL on error */ char *ldns_pkt2str(ldns_pkt *pkt); @@ -256,8 +256,8 @@ char *ldns_pkt2str(ldns_pkt *pkt); * Returns the data in the buffer as a null terminated char * string * Buffer data must be char * type * - * @param buffer buffer containing char * data - * @return null terminated char * data, or NULL on error + * \param[in] buffer buffer containing char * data + * \return null terminated char * data, or NULL on error */ char *buffer2str(ldns_buffer *buffer); @@ -265,8 +265,9 @@ char *buffer2str(ldns_buffer *buffer); * Prints the data in the rdata field to the given file stream * (in presentation format) * - * @param output the file stream to print to - * @param rdf the rdata field to print + * \param[in] output the file stream to print to + * \param[in] rdf the rdata field to print + * \return void */ void ldns_rdf_print(FILE *output, ldns_rdf *rdf); @@ -274,8 +275,9 @@ void ldns_rdf_print(FILE *output, ldns_rdf *rdf); * Prints the data in the resource record to the given file stream * (in presentation format) * - * @param output the file stream to print to - * @param rr the resource record to print + * \param[in] output the file stream to print to + * \param[in] rr the resource record to print + * \return void */ void ldns_rr_print(FILE *output, ldns_rr *rr); @@ -283,8 +285,9 @@ void ldns_rr_print(FILE *output, ldns_rr *rr); * Prints the data in the DNS packet to the given file stream * (in presentation format) * - * @param output the file stream to print to - * @param pkt the packet to print + * \param[in] output the file stream to print to + * \param[in] pkt the packet to print + * \return void */ void ldns_pkt_print(FILE *output, ldns_pkt *pkt); @@ -310,5 +313,4 @@ void ldns_rr_list_print(FILE *, ldns_rr_list *); void ldns_resolver_print(FILE *, ldns_resolver *); - #endif diff --git a/ldns/host2wire.h b/ldns/host2wire.h index fd709782..929c1a0b 100644 --- a/ldns/host2wire.h +++ b/ldns/host2wire.h @@ -43,6 +43,8 @@ ldns_status ldns_rr_rdata2buffer_wire(ldns_buffer *output, ldns_rr *rr); * \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 *); /** @@ -80,6 +82,4 @@ ldns_status ldns_rr2wire(uint8_t **dest, const ldns_rr *rr, int, size_t *size); */ ldns_status ldns_pkt2wire(uint8_t **dest, const ldns_pkt *, size_t *); - - #endif diff --git a/ldns/parse.h b/ldns/parse.h index aba1630b..a73a3ff1 100644 --- a/ldns/parse.h +++ b/ldns/parse.h @@ -35,8 +35,7 @@ ssize_t ldns_fget_token(FILE *f, char *token, const char *delim, size_t limit); * search for keyword and delim. Give everything back * after the keyword + k_del until we hit d_del */ -ssize_t -ldns_fget_keyword_data(FILE *f, const char *keyword, const char *k_del, char *data, const char *d_del); +ssize_t ldns_fget_keyword_data(FILE *f, const char *keyword, const char *k_del, char *data, const char *d_del); /* * get a token/char from the buffer b @@ -53,8 +52,7 @@ ssize_t ldns_bget_token(ldns_buffer *b, char *token, const char *delim, size_t l * search for keyword and delim. Give everything back * after the keyword + k_del until we hit d_del */ -ssize_t -ldns_bget_keyword_data(ldns_buffer *b, const char *keyword, const char *k_del, char *data, const char *d_del); +ssize_t ldns_bget_keyword_data(ldns_buffer *b, const char *keyword, const char *k_del, char *data, const char *d_del); /* remove comments from a string. Comment = ';' until \n * replace ; until \n with spaces diff --git a/ldns/wire2host.h b/ldns/wire2host.h index 5394be35..f6180711 100644 --- a/ldns/wire2host.h +++ b/ldns/wire2host.h @@ -95,17 +95,15 @@ #define ARCOUNT_OFF 10 #define ARCOUNT(wirebuf) (read_uint16(wirebuf+ARCOUNT_OFF)) - - /** * Converts the data on the uint8_t bytearray (in wire format) to a DNS packet * This function will initialize and allocate memory space for the packet * structure * - * @param packet pointer to the structure to hold the packet - * @param data pointer to the buffer with the data - * @param len the length of the data buffer (in bytes) - * @return LDNS_STATUS_OK if everything succeeds, error otherwise + * \param[in] packet pointer to the structure to hold the packet + * \param[in] data pointer to the buffer with the data + * \param[in] len the length of the data buffer (in bytes) + * \return LDNS_STATUS_OK if everything succeeds, error otherwise */ ldns_status ldns_wire2pkt(ldns_pkt **packet, const uint8_t *data, size_t len); @@ -116,16 +114,14 @@ ldns_status ldns_wire2pkt(ldns_pkt **packet, const uint8_t *data, size_t len); * structure * The length of the wiredata of this rdf is added to the *pos value. * - * @param dname pointer to the structure to hold the rdata value - * @param wire pointer to the buffer with the data - * @param max the length of the data buffer (in bytes) - * @param pos the position of the rdf in the buffer (ie. the number of bytes + * \param[in] dname pointer to the structure to hold the rdata value + * \param[in] wire pointer to the buffer with the data + * \param[in] max the length of the data buffer (in bytes) + * \param[in] pos the position of the rdf in the buffer (ie. the number of bytes * from the start of the buffer) - * @return LDNS_STATUS_OK if everything succeeds, error otherwise + * \return LDNS_STATUS_OK if everything succeeds, error otherwise */ -ldns_status ldns_wire2dname(ldns_rdf **dname, const uint8_t *wire, size_t max, - size_t *pos); - +ldns_status ldns_wire2dname(ldns_rdf **dname, const uint8_t *wire, size_t max, size_t *pos); /** * Converts the data on the uint8_t bytearray (in wire format) to a DNS @@ -134,12 +130,12 @@ ldns_status ldns_wire2dname(ldns_rdf **dname, const uint8_t *wire, size_t max, * structure * The length of the wiredata of this rdf is added to the *pos value. * - * @param rr pointer to the ldns_rr structure to hold the rdata value - * @param wire pointer to the buffer with the data - * @param max the length of the data buffer (in bytes) - * @param pos the position of the rdf in the buffer (ie. the number of bytes + * \param[in] rr pointer to the ldns_rr structure to hold the rdata value + * \param[in]wire pointer to the buffer with the data + * \param[in] max the length of the data buffer (in bytes) + * \param[in] pos the position of the rdf in the buffer (ie. the number of bytes * from the start of the buffer) - * @return LDNS_STATUS_OK if everything succeeds, error otherwise + * \return LDNS_STATUS_OK if everything succeeds, error otherwise */ ldns_status ldns_wire2rdf(ldns_rr *rr, const uint8_t *wire, size_t max, size_t *pos); @@ -150,16 +146,14 @@ ldns_status ldns_wire2rdf(ldns_rr *rr, const uint8_t *wire, size_t max, size_t * * structure * The length of the wiredata of this rr is added to the *pos value. * - * @param rr pointer to the structure to hold the rdata value - * @param wire pointer to the buffer with the data - * @param max the length of the data buffer (in bytes) - * @param pos the position of the rr in the buffer (ie. the number of bytes + * \param[in] rr pointer to the structure to hold the rdata value + * \param[in] wire pointer to the buffer with the data + * \param[in] max the length of the data buffer (in bytes) + * \param[in] pos the position of the rr in the buffer (ie. the number of bytes * from the start of the buffer) - * @param section the section in the packet the rr is meant for - * @return LDNS_STATUS_OK if everything succeeds, error otherwise + * \param[in] section the section in the packet the rr is meant for + * \return LDNS_STATUS_OK if everything succeeds, error otherwise */ -ldns_status ldns_wire2rr(ldns_rr **rr, const uint8_t *wire, size_t max, - size_t *pos, ldns_pkt_section section); - -#endif +ldns_status ldns_wire2rr(ldns_rr **rr, const uint8_t *wire, size_t max, size_t *pos, ldns_pkt_section section); +#endif /* _LDNS_WIRE2HOST_H */