statzone

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

commit 4a675990c812bc3d866c2d7c0b281e1e98b809d6
parent 3a4200d462801ec8b802f43938774c056bb1d642
Author: Frederic Cambus <fred@statdns.com>
Date:   Thu,  3 Jan 2019 22:17:12 +0100

Count number of occurences for A, AAAA, DS, and NS records.

Diffstat:
Msrc/statzone.c | 16++++++++++++++++
1 file changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/statzone.c b/src/statzone.c @@ -116,6 +116,22 @@ main(int argc, char *argv[]) { continue; } + if (!strcmp(token_lc, "a")) { + results.a++; + } + + if (!strcmp(token_lc, "aaaa")) { + results.aaaa++; + } + + if (!strcmp(token_lc, "ds")) { + results.ds++; + } + + if (!strcmp(token_lc, "ns")) { + results.ns++; + } + token = strtok(NULL, " \t"); } }