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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "net/base/net_export.h" | 9 #include "net/base/net_export.h" |
10 | 10 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // DNS resource record types. See | 112 // DNS resource record types. See |
113 // http://www.iana.org/assignments/dns-parameters | 113 // http://www.iana.org/assignments/dns-parameters |
114 static const uint16 kTypeA = 1; | 114 static const uint16 kTypeA = 1; |
115 static const uint16 kTypeCNAME = 5; | 115 static const uint16 kTypeCNAME = 5; |
116 static const uint16 kTypePTR = 12; | 116 static const uint16 kTypePTR = 12; |
117 static const uint16 kTypeTXT = 16; | 117 static const uint16 kTypeTXT = 16; |
118 static const uint16 kTypeAAAA = 28; | 118 static const uint16 kTypeAAAA = 28; |
119 static const uint16 kTypeSRV = 33; | 119 static const uint16 kTypeSRV = 33; |
120 static const uint16 kTypeNSEC = 47; | 120 static const uint16 kTypeNSEC = 47; |
121 | 121 |
122 | |
123 // DNS rcode values. | 122 // DNS rcode values. |
124 static const uint8 kRcodeMask = 0xf; | 123 static const uint8 kRcodeMask = 0xf; |
125 static const uint8 kRcodeNOERROR = 0; | 124 static const uint8 kRcodeNOERROR = 0; |
126 static const uint8 kRcodeFORMERR = 1; | 125 static const uint8 kRcodeFORMERR = 1; |
127 static const uint8 kRcodeSERVFAIL = 2; | 126 static const uint8 kRcodeSERVFAIL = 2; |
128 static const uint8 kRcodeNXDOMAIN = 3; | 127 static const uint8 kRcodeNXDOMAIN = 3; |
129 static const uint8 kRcodeNOTIMP = 4; | 128 static const uint8 kRcodeNOTIMP = 4; |
130 static const uint8 kRcodeREFUSED = 5; | 129 static const uint8 kRcodeREFUSED = 5; |
131 | 130 |
132 // DNS flags. | 131 // DNS flags. |
133 static const uint16 kFlagResponse = 0x8000; | 132 static const uint16 kFlagResponse = 0x8000; |
134 static const uint16 kFlagRA = 0x80; | 133 static const uint16 kFlagRA = 0x80; |
135 static const uint16 kFlagRD = 0x100; | 134 static const uint16 kFlagRD = 0x100; |
136 static const uint16 kFlagTC = 0x200; | 135 static const uint16 kFlagTC = 0x200; |
137 static const uint16 kFlagAA = 0x400; | 136 static const uint16 kFlagAA = 0x400; |
138 | 137 |
139 } // namespace dns_protocol | 138 } // namespace dns_protocol |
140 | 139 |
141 } // namespace net | 140 } // namespace net |
142 | 141 |
143 #endif // NET_DNS_DNS_PROTOCOL_H_ | 142 #endif // NET_DNS_DNS_PROTOCOL_H_ |
OLD | NEW |