Chromium Code Reviews| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 uint16 arcount; | 83 uint16 arcount; |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 #pragma pack(pop) | 86 #pragma pack(pop) |
| 87 | 87 |
| 88 static const uint8 kLabelMask = 0xc0; | 88 static const uint8 kLabelMask = 0xc0; |
| 89 static const uint8 kLabelPointer = 0xc0; | 89 static const uint8 kLabelPointer = 0xc0; |
| 90 static const uint8 kLabelDirect = 0x0; | 90 static const uint8 kLabelDirect = 0x0; |
| 91 static const uint16 kOffsetMask = 0x3fff; | 91 static const uint16 kOffsetMask = 0x3fff; |
| 92 | 92 |
| 93 // The top bit of the MDns class is the cache flush bit. | |
|
szym
2013/05/14 18:14:27
I'm confused by this comment. What is MDns class?
Noam Samuel
2013/05/14 19:28:01
Sorry about that, the comment is rather vague. I w
| |
| 94 static const uint16 kMDnsClassMask = 0x7FFF; | |
| 95 | |
| 93 static const int kMaxNameLength = 255; | 96 static const int kMaxNameLength = 255; |
| 94 | 97 |
| 95 // RFC 1035, section 4.2.1: Messages carried by UDP are restricted to 512 | 98 // RFC 1035, section 4.2.1: Messages carried by UDP are restricted to 512 |
| 96 // bytes (not counting the IP nor UDP headers). | 99 // bytes (not counting the IP nor UDP headers). |
| 97 static const int kMaxUDPSize = 512; | 100 static const int kMaxUDPSize = 512; |
| 98 | 101 |
| 99 // DNS class types. | 102 // DNS class types. |
| 100 static const uint16 kClassIN = 1; | 103 static const uint16 kClassIN = 1; |
| 101 | 104 |
| 102 // DNS resource record types. See | 105 // DNS resource record types. See |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 122 static const uint16 kFlagRA = 0x80; | 125 static const uint16 kFlagRA = 0x80; |
| 123 static const uint16 kFlagRD = 0x100; | 126 static const uint16 kFlagRD = 0x100; |
| 124 static const uint16 kFlagTC = 0x200; | 127 static const uint16 kFlagTC = 0x200; |
| 125 static const uint16 kFlagAA = 0x400; | 128 static const uint16 kFlagAA = 0x400; |
| 126 | 129 |
| 127 } // namespace dns_protocol | 130 } // namespace dns_protocol |
| 128 | 131 |
| 129 } // namespace net | 132 } // namespace net |
| 130 | 133 |
| 131 #endif // NET_DNS_DNS_PROTOCOL_H_ | 134 #endif // NET_DNS_DNS_PROTOCOL_H_ |
| 132 | |
| OLD | NEW |