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

bool ldns_rr_push_rdf ( ldns_rr rr,
const ldns_rdf f 

sets rd_field member, it will be placed in the next available spot.

[in] *rr rr to operate on
[in] *f the data field member to set

Definition at line 602 of file rr.c.

References ldns_struct_rr::_rdata_fields, ldns_rr_push_rdf(), ldns_rr_rd_count(), and ldns_rr_set_rd_count().

Referenced by ldns_rr_clone(), ldns_rr_new_frm_str(), ldns_rr_push_rdf(), and ldns_wire2rdf().

      size_t rd_count;
      ldns_rdf **rdata_fields;
      rd_count = ldns_rr_rd_count(rr);
      /* grow the array */
      rdata_fields = LDNS_XREALLOC(
            rr->_rdata_fields, ldns_rdf *, rd_count + 1);
      if (!rdata_fields) {
            return false;
      /* add the new member */
      rr->_rdata_fields = rdata_fields;
      rr->_rdata_fields[rd_count] = (ldns_rdf*)f;

      ldns_rr_set_rd_count(rr, rd_count + 1);
      return true;

Generated by  Doxygen 1.6.0   Back to index