entry.port = pr.d_udp->uh_sport;
entry.id=dh->id;
- // ecount[entry]++;
- string::size_type pos = 0;
- for(pos = 0; pos < mdp.d_qname.size() ; ++pos ) {
- char c=mdp.d_qname[pos] ;
- if(!isalnum(c) && c!='-' && c!='.')
- break;
- }
- if(pos ==mdp.d_qname.size()) {
- cout << "insert into dnsstats (source, port, id, query, qtype, tstampSec, tstampUsec, arcount) values ('" << entry.ip.toString() <<"', "<< ntohs(entry.port) <<", "<< ntohs(dh->id);
- cout <<", '"<<mdp.d_qname<<"', "<<mdp.d_qtype<<", " << pr.d_pheader.ts.tv_sec <<", " << pr.d_pheader.ts.tv_usec;
- cout <<", "<< ntohs(dh->arcount) <<");\n";
- }
+ cout << "insert into dnsstats (source, port, id, query, qtype, tstampSec, tstampUsec, arcount) values ('" << entry.ip.toString() <<"', "<< ntohs(entry.port) <<", "<< ntohs(dh->id);
+ cout <<", '"<<mdp.d_qname.toString()<<"', "<<mdp.d_qtype<<", " << pr.d_pheader.ts.tv_sec <<", " << pr.d_pheader.ts.tv_usec;
+ cout <<", "<< ntohs(dh->arcount) <<");\n";
}
catch(MOADNSException& mde) {