: d_packet(packet), d_length(length), d_notyouroffset(12), d_offset(d_notyouroffset)
{}
- void skipLabel()
+ void skipDomainName()
{
uint8_t len;
while((len=get8BitInt())) {
uint64_t n;
for(n=0; n < ntohs(dh.qdcount) ; ++n) {
- dpm.skipLabel();
+ dpm.skipDomainName();
/* type and class */
dpm.skipBytes(4);
}
for(n=0; n < numrecords; ++n) {
- dpm.skipLabel();
+ dpm.skipDomainName();
uint8_t section = n < ntohs(dh.ancount) ? 1 : (n < (ntohs(dh.ancount) + ntohs(dh.nscount)) ? 2 : 3);
uint16_t dnstype = dpm.get16BitInt();
uint64_t n;
for(n=0; n < dqcount; ++n) {
- dpm.skipLabel();
+ dpm.skipDomainName();
/* type and class */
dpm.skipBytes(4);
}
// cerr<<"Skipped "<<n<<" questions, now parsing "<<numrecords<<" records"<<endl;
for(n=0; n < numrecords; ++n) {
- dpm.skipLabel();
+ dpm.skipDomainName();
uint16_t dnstype = dpm.get16BitInt();
/* class */
const uint16_t qdcount = ntohs(dh->qdcount);
for(size_t n = 0; n < qdcount; ++n) {
- dpm.skipLabel();
+ dpm.skipDomainName();
/* type and class */
dpm.skipBytes(4);
}
const size_t numrecords = ntohs(dh->ancount) + ntohs(dh->nscount) + ntohs(dh->arcount);
for(size_t n = 0; n < numrecords; ++n) {
- dpm.skipLabel();
+ dpm.skipDomainName();
const uint16_t dnstype = dpm.get16BitInt();
/* class */
const uint16_t dnsclass = dpm.get16BitInt();
const uint16_t qdcount = ntohs(dh->qdcount);
for(size_t n = 0; n < qdcount; ++n) {
- dpm.skipLabel();
+ dpm.skipDomainName();
/* type and class */
dpm.skipBytes(4);
}
const size_t numrecords = ntohs(dh->ancount) + ntohs(dh->nscount) + ntohs(dh->arcount);
for(size_t n = 0; n < numrecords; ++n) {
- dpm.skipLabel();
+ dpm.skipDomainName();
/* type (2), class (2) and ttl (4) */
dpm.skipBytes(8);
dpm.skipRData();
const uint16_t qdcount = ntohs(dh->qdcount);
for(size_t n = 0; n < qdcount; ++n) {
- dpm.skipLabel();
+ dpm.skipDomainName();
if (section == 0) {
uint16_t dnstype = dpm.get16BitInt();
if (dnstype == type) {
}
const uint16_t ancount = ntohs(dh->ancount);
for(size_t n = 0; n < ancount; ++n) {
- dpm.skipLabel();
+ dpm.skipDomainName();
if (section == 1) {
uint16_t dnstype = dpm.get16BitInt();
if (dnstype == type) {
}
const uint16_t nscount = ntohs(dh->nscount);
for(size_t n = 0; n < nscount; ++n) {
- dpm.skipLabel();
+ dpm.skipDomainName();
if (section == 2) {
uint16_t dnstype = dpm.get16BitInt();
if (dnstype == type) {
}
const uint16_t arcount = ntohs(dh->arcount);
for(size_t n = 0; n < arcount; ++n) {
- dpm.skipLabel();
+ dpm.skipDomainName();
if (section == 3) {
uint16_t dnstype = dpm.get16BitInt();
if (dnstype == type) {
const uint16_t qdcount = ntohs(dh->qdcount);
for(size_t n = 0; n < qdcount; ++n) {
- dpm.skipLabel();
+ dpm.skipDomainName();
/* type and class */
dpm.skipBytes(4);
}
const size_t numrecords = ntohs(dh->ancount) + ntohs(dh->nscount) + ntohs(dh->arcount);
for(size_t n = 0; n < numrecords; ++n) {
- dpm.skipLabel();
+ dpm.skipDomainName();
const uint16_t dnstype = dpm.get16BitInt();
const uint16_t dnsclass = dpm.get16BitInt();