("Err#12")
("Err#13")
("Err#14")
- ("Err#15")
+ ("Err#15") // Last non-extended RCode
("Bad OPT Version / TSIG Signature Failure")
("Key not recognized")
("Signature out of time window")
;
std::string RCode::to_s(uint8_t rcode) {
- if (rcode > RCode::rcodes_s.size()-1 )
- return std::string("Err#")+std::to_string(rcode);
- return RCode::rcodes_s[rcode];
+ if (rcode > 0xF)
+ return std::string("ErrOutOfRange");
+ return ERCode::to_s(rcode);
}
std::string ERCode::to_s(uint8_t rcode) {
- return RCode::to_s(rcode);
+ if (rcode > RCode::rcodes_s.size()-1)
+ return std::string("Err#")+std::to_string(rcode);
+ return RCode::rcodes_s[rcode];
}
class BoundsCheckingPointer