diff -Naur dsc-200706121022.orig/collector/dsc/dns_message.c dsc-200706121022/collector/dsc/dns_message.c
--- dsc-200706121022.orig/collector/dsc/dns_message.c	2007-05-15 20:14:01.000000000 +0200
+++ dsc-200706121022/collector/dsc/dns_message.c	2007-12-18 15:12:40.490887000 +0100
@@ -36,6 +36,7 @@
 #include "rd_bit_index.h"
 #include "opcode_index.h"
 #include "transport_index.h"
+#include "dns_ip_version_index.h"
 #include "syslog_debug.h"
 
 extern md_array_printer xml_printer;
@@ -173,6 +174,19 @@
     return (0 == regexec(r, m->qname, 0, NULL, 0));
 }
 
+static int
+ipv4_filter(const void *vp, const void *ctx)
+{
+    const dns_message *m = vp;
+    return inXaddr_version(&m->tm->src_ip_addr) == 4 ? 1 : 0;
+}
+
+static int
+ipv6_filter(const void *vp, const void *ctx)
+{
+    const dns_message *m = vp;
+    return inXaddr_version(&m->tm->src_ip_addr) == 6 ? 1 : 0;
+}
 
 static int
 dns_message_find_indexer(const char *in, IDXR ** ix, HITR ** it)
@@ -282,6 +296,11 @@
 	*it = transport_iterator;
 	return 1;
     }
+    if (0 == strcmp(in, "dns_ip_version")) {
+	*ix = dns_ip_version_indexer;
+	*it = dns_ip_version_iterator;
+	return 1;
+    }
     syslog(LOG_ERR, "unknown indexer '%s'", in);
     return 0;
 }
@@ -416,4 +435,8 @@
 	md_array_create_filter("root-servers-net-only", root_servers_net_filter, 0));
     fl = md_array_filter_list_append(fl,
 	md_array_create_filter("chaos-class", chaos_class_filter, 0));
+    fl = md_array_filter_list_append(fl,
+	md_array_create_filter("ipv4", ipv4_filter, 0));
+    fl = md_array_filter_list_append(fl,
+	md_array_create_filter("ipv6", ipv6_filter, 0));
 }
