]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
various ldns_zone updates
authorMiek Gieben <miekg@NLnetLabs.nl>
Thu, 23 Jun 2005 10:16:16 +0000 (10:16 +0000)
committerMiek Gieben <miekg@NLnetLabs.nl>
Thu, 23 Jun 2005 10:16:16 +0000 (10:16 +0000)
host2str.c
ldns/host2str.h
libdns.vim
zone.c

index 4e8fe783bba4738e249ebf94b2ebf55c39728842..ea9dd4a7c84cf61800e28962c6a2a2d2ad9cba50 100644 (file)
@@ -1329,3 +1329,10 @@ ldns_resolver_print(FILE *output, ldns_resolver *r)
                fprintf(output, "\n");
        }
 }
+
+void
+ldns_zone_print(FILE *output, ldns_zone *z)
+{
+       ldns_rr_print(output, ldns_zone_soa(z));
+       ldns_rr_list_print(output, ldns_zone_rrs(z));
+}
index 9586d203a579346f94deae55b0216d9623739981..a38d7886d7b75b88d6a41b6e0400234981d58e0c 100644 (file)
@@ -18,6 +18,7 @@
 #include <ldns/packet.h>
 #include <ldns/buffer.h>
 #include <ldns/resolver.h>
+#include <ldns/zone.h>
 #include <ctype.h>
 
 #include "ldns/util.h"
@@ -338,8 +339,26 @@ ldns_status ldns_rr_list2buffer_str(ldns_buffer *output, ldns_rr_list *list);
  */
 ldns_status ldns_pktheader2buffer_str(ldns_buffer *output, ldns_pkt *pkt);
 
-void ldns_rr_list_print(FILE *, ldns_rr_list *);
+/**
+ * print a rr_list to output
+ * param[in] output the fd to print to
+ * param[in] list the rr_list to print
+ */
+void ldns_rr_list_print(FILE *output, ldns_rr_list *list);
 
-void ldns_resolver_print(FILE *, ldns_resolver *);
+/**
+ * Print a resolver (in sofar that is possible) state
+ * to output.
+ * \param[in] output the fd to print to
+ * \param[in] r the resolver to print
+ */
+void ldns_resolver_print(FILE *output, ldns_resolver *r);
+
+/**
+ * Print a zone structure * to output.
+ * \param[in] output the fd to print to
+ * \param[in] z the zone to print
+ */
+void ldns_zone_print(FILE *output, ldns_zone *z);
 
 #endif
index b94b9b1eaa055d639011c5db63805c40d0c72c7f..18107deb17a5d27298392177a8731c049820cb4a 100644 (file)
@@ -118,7 +118,7 @@ syn keyword ldnsMacro       LDNS_STATUS_NULL
 syn keyword  ldnsType          ldns_resolver
 
 " ldns/zone.h
-syn keyword  ldnsType          ldns_rr_zone
+syn keyword  ldnsType          ldns_zone
 
 " ldns/rr.h 
 syn keyword  ldnsType          ldns_rr_list 
diff --git a/zone.c b/zone.c
index 888cd0109b07a546a7f0bf3a1873fb59d6465e30..b04c22c80e0d89bc67dbeb67a8b762d14c76c79d 100644 (file)
--- a/zone.c
+++ b/zone.c
@@ -51,7 +51,6 @@ ldns_zone_push_rr(ldns_zone *z, ldns_rr *rr)
                        ldns_zone_rrs(z), rr);
 }
 
-
 #if 0
 /**
  * ixfr function. Work on a ldns_zone and remove and add