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

ldns_rdf_type ldns_rr_descriptor_field_type ( const ldns_rr_descriptor descriptor,
size_t  field 
)

returns the rdf type for the given rdata field number of the rr type for the given descriptor.

Parameters:
[in] descriptor for an rr type
[in] field the field number
Returns:
the rdf type for the field

Definition at line 2023 of file rr.c.

References ldns_struct_rr_descriptor::_variable, ldns_struct_rr_descriptor::_wireformat, LDNS_RDF_TYPE_NONE, and ldns_rr_descriptor_field_type().

Referenced by ldns_rr_descriptor_field_type(), ldns_rr_new_frm_str(), and ldns_wire2rdf().

{
      assert(descriptor != NULL);
      assert(index < descriptor->_maximum
             || descriptor->_variable != LDNS_RDF_TYPE_NONE);
      if (index < descriptor->_maximum) {
            return descriptor->_wireformat[index];
      } else {
            return descriptor->_variable;
      }
}


Generated by  Doxygen 1.6.0   Back to index