Logo Search packages:      
Sourcecode: ldns version File versions  Download package

size_t ldns_rr_uncompressed_size ( const ldns_rr r  ) 

calculates the uncompressed size of an RR.

[in] r the rr to operate on
size of the rr

Definition at line 1468 of file rr.c.

References ldns_rdf_size(), LDNS_RR_OVERHEAD, ldns_rr_owner(), ldns_rr_rd_count(), ldns_rr_rdf(), and ldns_rr_uncompressed_size().

Referenced by ldns_rr_compare(), ldns_rr_compare_no_rdata(), and ldns_rr_uncompressed_size().

      size_t rrsize;
      size_t i;

      rrsize = 0;
      /* add all the rdf sizes */
      for(i = 0; i < ldns_rr_rd_count(r); i++) {
            rrsize += ldns_rdf_size(ldns_rr_rdf(r, i));
      /* ownername */
      rrsize += ldns_rdf_size(ldns_rr_owner(r));
      rrsize += LDNS_RR_OVERHEAD;
      return rrsize;

Generated by  Doxygen 1.6.0   Back to index