[Opendnssec-commits] [svn.opendnssec.org/svn/dnssec] r5453 - branches/OpenDNSSEC-adapters/signer/src/signer

Matthijs Mekking matthijs at nlnetlabs.nl
Tue Aug 23 13:51:53 CEST 2011


Author: matthijs
Date: 2011-08-23 13:51:53 +0200 (Tue, 23 Aug 2011)
New Revision: 5453

Modified:
   branches/OpenDNSSEC-adapters/signer/src/signer/rrset.c
   branches/OpenDNSSEC-adapters/signer/src/signer/rrset.h
Log:
new function rrset_type2str()



Modified: branches/OpenDNSSEC-adapters/signer/src/signer/rrset.c
===================================================================
--- branches/OpenDNSSEC-adapters/signer/src/signer/rrset.c	2011-08-23 10:33:10 UTC (rev 5452)
+++ branches/OpenDNSSEC-adapters/signer/src/signer/rrset.c	2011-08-23 11:51:53 UTC (rev 5453)
@@ -160,6 +160,22 @@
 
 
 /**
+ * Get the string-format of RRtype.
+ *
+ */
+const char*
+rrset_type2str(ldns_rr_type type)
+{
+    const ldns_rr_descriptor* descriptor;
+    descriptor = ldns_rr_descript(type);
+    if (descriptor && descriptor->_name) {
+        return descriptor->_name;
+    }
+    return "TYPE???";
+}
+
+
+/**
  * Create RRset.
  *
  */

Modified: branches/OpenDNSSEC-adapters/signer/src/signer/rrset.h
===================================================================
--- branches/OpenDNSSEC-adapters/signer/src/signer/rrset.h	2011-08-23 10:33:10 UTC (rev 5452)
+++ branches/OpenDNSSEC-adapters/signer/src/signer/rrset.h	2011-08-23 11:51:53 UTC (rev 5453)
@@ -87,6 +87,14 @@
 void log_rrset(ldns_rdf* dname, ldns_rr_type type, const char* pre, int level);
 
 /**
+ * Get the string-format of RRtype.
+ * \param[in] type RRtype
+ * \return const char* string-format of RRtype
+ *
+ */
+const char* rrset_type2str(ldns_rr_type type);
+
+/**
  * Create new RRset.
  * \param[in] rrtype RRtype
  * \return rrset_type* new RRset




More information about the Opendnssec-commits mailing list