Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: net/dns/dns_protocol.h

Issue 14697022: Cache for mDNS records (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@record_parsed_klassbit
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | net/dns/mdns_cache.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 // In MDns the most significant bit of the rrclass is designated as the
94 // "cache-flush bit", as described in http://www.rfc-editor.org/rfc/rfc6762.txt
95 // section 10.2.
96 static const uint16 kMDnsClassMask = 0x7FFF;
97
93 static const int kMaxNameLength = 255; 98 static const int kMaxNameLength = 255;
94 99
95 // RFC 1035, section 4.2.1: Messages carried by UDP are restricted to 512 100 // RFC 1035, section 4.2.1: Messages carried by UDP are restricted to 512
96 // bytes (not counting the IP nor UDP headers). 101 // bytes (not counting the IP nor UDP headers).
97 static const int kMaxUDPSize = 512; 102 static const int kMaxUDPSize = 512;
98 103
99 // DNS class types. 104 // DNS class types.
100 static const uint16 kClassIN = 1; 105 static const uint16 kClassIN = 1;
101 106
102 // DNS resource record types. See 107 // DNS resource record types. See
(...skipping 19 matching lines...) Expand all
122 static const uint16 kFlagRA = 0x80; 127 static const uint16 kFlagRA = 0x80;
123 static const uint16 kFlagRD = 0x100; 128 static const uint16 kFlagRD = 0x100;
124 static const uint16 kFlagTC = 0x200; 129 static const uint16 kFlagTC = 0x200;
125 static const uint16 kFlagAA = 0x400; 130 static const uint16 kFlagAA = 0x400;
126 131
127 } // namespace dns_protocol 132 } // namespace dns_protocol
128 133
129 } // namespace net 134 } // namespace net
130 135
131 #endif // NET_DNS_DNS_PROTOCOL_H_ 136 #endif // NET_DNS_DNS_PROTOCOL_H_
132
OLDNEW
« no previous file with comments | « no previous file | net/dns/mdns_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698