# /** Seen
#print "Comment seen! [$_]\n";
$state = 1;
+ undef $description;
+ undef $struct_description;
next;
}
if (/\*\// and $state == 1) {
undef $description;
undef $struct_description;
$state = 0;
- } elsif (/^typedef\sstruct\s(\w+)\s(\w+);/ and $state == 2) {
+ } elsif ($state == 2 and (
+ /^typedef\sstruct\s(\w+)\s(\w+);/ or
+ /^typedef\senum\s(\w+)\s(\w+);/)
+ ) {
$struct_description .= "\n.br\n" . $_;
$key = $2;
$description{$key} = $struct_description;
ldns_str_remove_comment
# rdata.h
-ldns_rdf_set_size, ldns_rdf_set_type, ldns_rdf_set_data
-ldns_rdf_size, ldns_rdf_get_type, ldns_rdf_data
-ldns_rdf_new, ldns_rdf_new_frm_data, ldns_rdf_new_frm_str,ldns_rdf_new_frm_fp, ldns_rdf_free, ldns_rdf_free_data, ldns_rdf_print
-ldns_native2rdf_int8, ldns_native2rdf_int16, ldns_native2rdf_int32
-ldns_native2rdf_int16_data, ldns_rdf2native_int8, ldns_rdf2native_int16, ldns_rdf2native_int32, ldns_rdf2native_sockaddr_storage
-ldns_rdf_address_reverse
-ldns_octet
+ldns_rdf, ldns_rdf_type | ldns_rdf_set_size, ldns_rdf_size, ldns_rdf_new, ldns_native2rdf_int8, ldns_rdf_address_reverse, ldns_octet
+ldns_rdf_set_size, ldns_rdf_set_type, ldns_rdf_set_data | ldns_rdf
+ldns_rdf_size, ldns_rdf_get_type, ldns_rdf_data | ldns_rdf
+ldns_rdf_new, ldns_rdf_new_frm_data, ldns_rdf_new_frm_str,ldns_rdf_new_frm_fp, ldns_rdf_free, ldns_rdf_free_data, ldns_rdf_print | ldns_rdf
+ldns_native2rdf_int8, ldns_native2rdf_int16, ldns_native2rdf_int32,ldns_native2rdf_int16_data, ldns_rdf2native_int8, ldns_rdf2native_int16, ldns_rdf2native_int32, ldns_rdf2native_sockaddr_storage | ldns_rdf
+ldns_rdf_address_reverse | ldns_rdf
+ldns_octet | ldns_rdf
# why is this in rdata.h?
ldns_str2period
ldns_rdf_deep_clone
ldns_rdf_compare
# rr.h and other general rr funcs
-ldns_rr_new, ldns_rr_new_frm_type, ldns_rr_new_frm_str, ldns_rr_new_frm_fp, ldns_rr_free, ldns_rr_print
+ldns_rr, ldns_rr_new, ldns_rr_new_frm_type, ldns_rr_new_frm_str, ldns_rr_new_frm_fp, ldns_rr_free, ldns_rr_print
ldns_rr_set_owner, ldns_rr_set_ttl, ldns_rr_set_type, ldns_rr_set_rd_count, ldns_rr_set_class, ldns_rr_set_rdf
ldns_rr_push_rdf, ldns_rr_pop_rdf
ldns_rr_rdf, ldns_rr_owner, ldns_rr_rd_count, ldns_rr_ttl, ldns_rr_get_class
typedef enum ldns_enum_rdf_type ldns_rdf_type;
/**
- * \brief Resource record data
+ * Resource record data
*
* The data is a network ordered array of bytes, which size is specified by
* the (16-bit) size field. To correctly parse it, use the type
*/
struct ldns_struct_rdf
{
- /** \brief The size of the data (in bytes) */
+ /** The size of the data (in bytes) */
uint16_t _size;
- /** \brief The type of the data */
+ /** The type of the data */
ldns_rdf_type _type;
- /** \brief Pointer to the data (byte buffer) */
+ /** Pointer to the data (byte buffer) */
void *_data;
};
typedef struct ldns_struct_rdf ldns_rdf;
#define ARCOUNT(wirebuf) (read_uint16(wirebuf+ARCOUNT_OFF))
/**
- * Converts the data on the uint8_t bytearray (in wire format) to a DNS packet
+ * 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
+ * structure.
*
* \param[in] packet pointer to the structure to hold the packet
* \param[in] data pointer to the buffer with the data
ldns_status ldns_wire2pkt(ldns_pkt **packet, const uint8_t *data, size_t len);
/**
- * Converts the data on the uint8_t bytearray (in wire format) to a DNS
+ * converts the data on the uint8_t bytearray (in wire format) to a DNS
* dname rdata field. This function will initialize and allocate memory
* space for the dname structure. The length of the wiredata of this rdf
* is added to the *pos value.
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
- * rdata field, and adds it to the list of rdfs in the given rr
+ * converts the data on the uint8_t bytearray (in wire format) to a DNS
+ * rdata field, and adds it to the list of rdfs in the given rr.
* This function will initialize and allocate memory space for the dname
- * structure
+ * structure.
* The length of the wiredata of this rdf is added to the *pos value.
*
* \param[in] rr pointer to the ldns_rr structure to hold the rdata value
ldns_status ldns_wire2rdf(ldns_rr *rr, const uint8_t *wire, size_t max, size_t *pos);
/**
- * Converts the data on the uint8_t bytearray (in wire format) to a DNS
- * resource records
+ * converts the data on the uint8_t bytearray (in wire format) to a DNS
+ * resource record.
* This function will initialize and allocate memory space for the rr
- * structure
+ * structure.
* The length of the wiredata of this rr is added to the *pos value.
*
* \param[in] rr pointer to the structure to hold the rdata value