]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1210. [func] "dig axfr" now reports the number of messages
authorMark Andrews <marka@isc.org>
Wed, 29 May 2002 05:31:05 +0000 (05:31 +0000)
committerMark Andrews <marka@isc.org>
Wed, 29 May 2002 05:31:05 +0000 (05:31 +0000)
                        as well as the number of records.

CHANGES
bin/dig/dig.c
bin/dig/dighost.c
bin/dig/include/dig/dig.h

diff --git a/CHANGES b/CHANGES
index a243ec431404b0347d3b3106d041ef8053fa2458..56b1e307e77633b872af789300412c851736dbb5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+1210.  [func]          "dig axfr" now reports the number of messages
+                       as well as the number of records.
+
 1209.  [port]          See if -ldl is required for OpenSSL? [RT #2672]
 
 1208.  [bug]           Adjusted REQUIRE's in lib/dns/name.c to better
index 2f30ad821eed9ab6ad558ed7d5363ab115edea25..736bae6213d5f0e1bf2a4b7b0c58cc1836811a7a 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dig.c,v 1.177 2002/05/22 04:58:29 marka Exp $ */
+/* $Id: dig.c,v 1.178 2002/05/29 05:30:59 marka Exp $ */
 
 #include <config.h>
 #include <stdlib.h>
@@ -232,8 +232,8 @@ received(int bytes, isc_sockaddr_t *from, dig_query_t *query) {
                time(&tnow);
                printf(";; WHEN: %s", ctime(&tnow));
                if (query->lookup->doing_xfr) {
-                       printf(";; XFR size: %d records\n",
-                              query->rr_count);
+                       printf(";; XFR size: %u records (messages %u)\n",
+                              query->rr_count, query->msg_count);
                } else {
                        printf(";; MSG SIZE  rcvd: %d\n", bytes);
 
index cbd418632882dbbcd45c338c6999475b35c97d34..918c3ac2281f028588d4c9b17fa45a0a97cc5129 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dighost.c,v 1.243 2002/04/19 04:06:53 marka Exp $ */
+/* $Id: dighost.c,v 1.244 2002/05/29 05:31:02 marka Exp $ */
 
 /*
  * Notice to programmers:  Do not use this code as an example of how to
@@ -1423,6 +1423,7 @@ setup_lookup(dig_lookup_t *lookup) {
                query->second_rr_serial = 0;
                query->servname = serv->servername;
                query->rr_count = 0;
+               query->msg_count = 0;
                ISC_LINK_INIT(query, link);
                ISC_LIST_INIT(query->recvlist);
                ISC_LIST_INIT(query->lengthlist);
@@ -1988,6 +1989,7 @@ check_for_more_data(dig_query_t *query, dns_message_t *msg,
         * an SOA rr.
         */
 
+       query->msg_count++;
        result = dns_message_firstname(msg, DNS_SECTION_ANSWER);
        if (result != ISC_R_SUCCESS) {
                puts("; Transfer failed.");
index 778a353cff48127142ec41d13060ba5d3d234f08..12da24918744bd57c5584d6272af710bfa2f87c8 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dig.h,v 1.76 2001/10/04 07:02:28 halley Exp $ */
+/* $Id: dig.h,v 1.77 2002/05/29 05:31:05 marka Exp $ */
 
 #ifndef DIG_H
 #define DIG_H
@@ -155,6 +155,7 @@ struct dig_query {
                recv_made;
        isc_uint32_t first_rr_serial;
        isc_uint32_t second_rr_serial;
+       isc_uint32_t msg_count;
        isc_uint32_t rr_count;
        char *servname;
        isc_bufferlist_t sendlist,