statzone

DNS zone file analyzer targeted at TLD zones
Log | Files | Refs | README | LICENSE

commit 7bfcdf04f196646d14f8f5f167fd4915251e7c17
parent 0983d96324ecdf918a72efa63341c74f7b16c738
Author: Frederic Cambus <fred@statdns.com>
Date:   Sat,  5 Jan 2019 23:15:35 +0100

Print analysis results as CVS values. We still need to count unique NS.

Diffstat:
Msrc/statzone.c | 13++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/statzone.c b/src/statzone.c @@ -180,7 +180,18 @@ main(int argc, char *argv[]) { results.runtime = elapsed.tv_sec + elapsed.tv_nsec / 1E9; /* Printing results */ - fprintf(stderr, "Processed %" PRIu64 " lines in %f seconds\n", results.processedLines, results.runtime); + fprintf(stderr, "Processed %" PRIu64 " lines in %f seconds\n\n", results.processedLines, results.runtime); + + /* Printing CVS values */ + fprintf(stderr, "---[ CSV values ]--------------------------------------------------------------\n"); + fprintf(stderr, "IPv4 Glue ; IPv6 Glue ; NS ; Unique NS ; DS ; Signed ; IDNs ; Domains\n"); + fprintf(stderr, "%" PRIu64 " ; ", results.a); + fprintf(stderr, "%" PRIu64 " ; ", results.aaaa); + fprintf(stderr, "%" PRIu64 " ; ", results.ns); + fprintf(stderr, "%" PRIu64 " ; ", results.ds); + fprintf(stderr, "%" PRIu64 " ; ", HASH_COUNT(signedDomains)); + fprintf(stderr, "%" PRIu64 " ; ", results.idn); + fprintf(stderr, "%" PRIu64, results.domains); /* Clean up */ fclose(zoneFile);