| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_DNS_DNS_PROTOCOL_H_ | 5 #ifndef NET_DNS_DNS_PROTOCOL_H_ |
| 6 #define NET_DNS_DNS_PROTOCOL_H_ | 6 #define NET_DNS_DNS_PROTOCOL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "net/base/net_export.h" | 10 #include "net/base/net_export.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 static const uint16_t kTypeCNAME = 5; | 121 static const uint16_t kTypeCNAME = 5; |
| 122 static const uint16_t kTypePTR = 12; | 122 static const uint16_t kTypePTR = 12; |
| 123 static const uint16_t kTypeTXT = 16; | 123 static const uint16_t kTypeTXT = 16; |
| 124 static const uint16_t kTypeAAAA = 28; | 124 static const uint16_t kTypeAAAA = 28; |
| 125 static const uint16_t kTypeSRV = 33; | 125 static const uint16_t kTypeSRV = 33; |
| 126 static const uint16_t kTypeNSEC = 47; | 126 static const uint16_t kTypeNSEC = 47; |
| 127 | 127 |
| 128 // DNS reply codes (RCODEs). | 128 // DNS reply codes (RCODEs). |
| 129 // | 129 // |
| 130 // https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-para
meters-6 | 130 // https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-para
meters-6 |
| 131 static const uint8_t kRcodeMask = 0xf; | |
| 132 static const uint8_t kRcodeNOERROR = 0; | 131 static const uint8_t kRcodeNOERROR = 0; |
| 133 static const uint8_t kRcodeFORMERR = 1; | 132 static const uint8_t kRcodeFORMERR = 1; |
| 134 static const uint8_t kRcodeSERVFAIL = 2; | 133 static const uint8_t kRcodeSERVFAIL = 2; |
| 135 static const uint8_t kRcodeNXDOMAIN = 3; | 134 static const uint8_t kRcodeNXDOMAIN = 3; |
| 136 static const uint8_t kRcodeNOTIMP = 4; | 135 static const uint8_t kRcodeNOTIMP = 4; |
| 137 static const uint8_t kRcodeREFUSED = 5; | 136 static const uint8_t kRcodeREFUSED = 5; |
| 138 | 137 |
| 139 // DNS flags. | 138 // DNS flags. |
| 140 static const uint16_t kFlagResponse = 0x8000; | 139 static const uint16_t kFlagResponse = 0x8000; |
| 141 static const uint16_t kFlagRA = 0x80; | 140 static const uint16_t kFlagRA = 0x80; |
| 142 static const uint16_t kFlagRD = 0x100; | 141 static const uint16_t kFlagRD = 0x100; |
| 143 static const uint16_t kFlagTC = 0x200; | 142 static const uint16_t kFlagTC = 0x200; |
| 144 static const uint16_t kFlagAA = 0x400; | 143 static const uint16_t kFlagAA = 0x400; |
| 145 | 144 |
| 146 } // namespace dns_protocol | 145 } // namespace dns_protocol |
| 147 | 146 |
| 148 } // namespace net | 147 } // namespace net |
| 149 | 148 |
| 150 #endif // NET_DNS_DNS_PROTOCOL_H_ | 149 #endif // NET_DNS_DNS_PROTOCOL_H_ |
| OLD | NEW |