d_qtype = d_qclass = 0; // sometimes replies come in with no question, don't present garbage then
for(n=0;n < d_header.qdcount; ++n) {
- d_qname=pr.getLabel();
+ d_qname=pr.getName();
d_qtype=pr.get16BitInt();
d_qclass=pr.get16BitInt();
}
unsigned int recordStartPos=pr.d_pos;
- string label=pr.getLabel();
+ string label=pr.getName();
pr.getDnsrecordheader(ah);
dr.d_ttl=ah.d_ttl;
return d_content.at(d_pos++);
}
-string PacketReader::getLabel()
+string PacketReader::getName()
{
unsigned int consumed;
vector<uint8_t> content(d_content);
string simpleCompress(const string& elabel, const string& root)
{
string label=elabel;
- // FIXME: this relies on the semi-canonical escaped output from getLabel
+ // FIXME: this relies on the semi-canonical escaped output from getName
if(strchr(label.c_str(), '\\')) {
boost::replace_all(label, "\\.", ".");
boost::replace_all(label, "\\032", " ");
void xfrName(string &label, bool compress=false)
{
- label=getLabel();
+ label=getName();
}
void xfrText(string &text, bool multi=false)
void copyRecord(vector<unsigned char>& dest, uint16_t len);
void copyRecord(unsigned char* dest, uint16_t len);
- string getLabel();
+ string getName();
string getText(bool multi);
uint16_t d_pos;
if(unescaped) {
string part(label.c_str() + i -> first, i->second - i->first);
- // FIXME: this relies on the semi-canonical escaped output from getLabel
+ // FIXME: this relies on the semi-canonical escaped output from getName
boost::replace_all(part, "\\.", ".");
boost::replace_all(part, "\\032", " ");
boost::replace_all(part, "\\\\", "\\");