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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 kRcodeNOERROR = 0; | 131 static const uint8_t kRcodeNOERROR = 0; |
132 static const uint8_t kRcodeFORMERR = 1; | 132 static const uint8_t kRcodeFORMERR = 1; |
133 static const uint8_t kRcodeSERVFAIL = 2; | 133 static const uint8_t kRcodeSERVFAIL = 2; |
134 static const uint8_t kRcodeNXDOMAIN = 3; | 134 static const uint8_t kRcodeNXDOMAIN = 3; |
135 static const uint8_t kRcodeNOTIMP = 4; | 135 static const uint8_t kRcodeNOTIMP = 4; |
136 static const uint8_t kRcodeREFUSED = 5; | 136 static const uint8_t kRcodeREFUSED = 5; |
137 | 137 |
138 // DNS flags. | 138 // DNS header flags. |
| 139 // |
| 140 // https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-para
meters-12 |
139 static const uint16_t kFlagResponse = 0x8000; | 141 static const uint16_t kFlagResponse = 0x8000; |
140 static const uint16_t kFlagRA = 0x80; | 142 static const uint16_t kFlagRD = 0x100; // Recursion Desired - query flag. |
141 static const uint16_t kFlagRD = 0x100; | 143 static const uint16_t kFlagTC = 0x200; // Truncated - server flag. |
142 static const uint16_t kFlagTC = 0x200; | |
143 static const uint16_t kFlagAA = 0x400; | |
144 | 144 |
145 } // namespace dns_protocol | 145 } // namespace dns_protocol |
146 | 146 |
147 } // namespace net | 147 } // namespace net |
148 | 148 |
149 #endif // NET_DNS_DNS_PROTOCOL_H_ | 149 #endif // NET_DNS_DNS_PROTOCOL_H_ |
OLD | NEW |