Changeset 2200

Show
Ignore:
Timestamp:
05/29/11 10:07:59 (2 years ago)
Author:
ahu
Message:

make dnsgram typename output a bit more useful

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pdns/pdns/dnsgram.cc

    r1976 r2200  
    22#include "statbag.hh" 
    33#include "dnspcap.hh" 
     4#include "dnsrecords.hh" 
    45#include "dnsparser.hh" 
    56#include <boost/tuple/tuple.hpp> 
     
    8182try 
    8283{ 
     84  reportAllTypes(); 
    8385  for(int n=1 ; n < argc; ++n) { 
    8486    cout<<argv[n]<<endl; 
     
    153155            makeReport(pr.d_pheader.ts); 
    154156            lastreport = pr.d_pheader.ts; 
    155  
    156157          } 
    157158           
     
    180181    ofstream failed("failed"); 
    181182    for(diff_t::const_iterator i = diff.begin(); i != diff.end() ; ++i) { 
    182       failed << i->first << "\t" << i->second << "\t"<< counts[make_pair(i->first, i->second)]<<"\n"; 
     183      failed << i->first << "\t" << DNSRecordContent::NumberToType(i->second) << "\t"<< counts[make_pair(i->first, i->second)]<<"\n"; 
    183184    } 
    184185 
     
    191192    ofstream succeeded("succeeded"); 
    192193    for(queries_t::const_iterator i = answers.begin(); i != answers.end() ; ++i) { 
    193       succeeded << i->first << "\t" << i->second << counts[make_pair(i->first, i->second)]<<"\n"; 
     194      succeeded << i->first << "\t" <<DNSRecordContent::NumberToType(i->second) << "\t" << counts[make_pair(i->first, i->second)]<<"\n"; 
    194195    } 
    195196  }