(&self)
| 113 | } |
| 114 | |
| 115 | fn rcode(&self) -> ResponseCode { |
| 116 | match self.header().get_bits(11..15) { |
| 117 | 0 => ResponseCode::NoError, |
| 118 | 1 => ResponseCode::FormatError, |
| 119 | 2 => ResponseCode::ServerFailure, |
| 120 | 3 => ResponseCode::NameError, |
| 121 | 4 => ResponseCode::NotImplemented, |
| 122 | 5 => ResponseCode::Refused, |
| 123 | _ => ResponseCode::UnknownError, |
| 124 | } |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | /// Port number to connect to on DNS server |