ot::Dns::Header::ResponseCodeToError() method
Converts a Response Code into a related `Error`. - kResponseSuccess (0) : Success (no error condition) -> kErrorNone - kResponseFormatError (1) : Server unable to interpret due to format error -> kErrorParse - kResponseServerFailure (2) : Server encountered an internal failure -> kErrorFailed - kResponseNameError (3) : Name that ought to exist, does not exists -> kErrorNotFound - kResponseNotImplemented (4) : Server does not support the query type (OpCode) -> kErrorNotImplemented - kResponseRefused (5) : Server refused for policy/security reasons -> kErrorSecurity - kResponseNameExists (6) : Some name that ought not to exist, does exist -> kErrorDuplicated - kResponseRecordExists (7) : Some RRset that ought not to exist, does exist -> kErrorDuplicated - kResponseRecordNotExists (8) : Some RRset that ought to exist, does not exist -> kErrorNotFound - kResponseNotAuth (9) : Service is not authoritative for zone -> kErrorSecurity - kResponseNotZone (10) : A name is not in the zone -> kErrorParse - kDsoTypeNotImplemented (11) : DSO TLV Type is not implemented -> kErrorNotImplemented - kResponseBadName (20) : Bad name -> kErrorParse - kResponseBadAlg (21) : Bad algorithm -> kErrorSecurity - kResponseBadTruncation (22) : Bad truncation -> kErrorParse - Other error -> kErrorFailed
Arguments
aResponse
The response code to convert.
ot::Dns::Header::ResponseCodeToError() is called by 2 functions:
![]()
ot::Dns::Header::ResponseCodeToError()
ot::Dns::Header::ResponseCodeToError() reads 23 variables:
![]()
ot::Dns::Header::ResponseCodeToError()