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

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

Issue 9190031: DnsClient refactoring + features (timeout, suffix search, server rotation). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Delinted. Created 8 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « net/dns/dns_config_service_win.cc ('k') | net/dns/dns_query.cc » ('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) 2011 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 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "net/base/net_export.h" 10 #include "net/base/net_export.h"
11 11
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // / / 68 // / /
69 // +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 69 // +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
70 70
71 #pragma pack(push) 71 #pragma pack(push)
72 #pragma pack(1) 72 #pragma pack(1)
73 73
74 // On-the-wire header. All uint16 are in network order. 74 // On-the-wire header. All uint16 are in network order.
75 // Used internally in DnsQuery and DnsResponseParser. 75 // Used internally in DnsQuery and DnsResponseParser.
76 struct NET_EXPORT_PRIVATE Header { 76 struct NET_EXPORT_PRIVATE Header {
77 uint16 id; 77 uint16 id;
78 uint8 flags[2]; 78 uint16 flags;
79 uint16 qdcount; 79 uint16 qdcount;
80 uint16 ancount; 80 uint16 ancount;
81 uint16 nscount; 81 uint16 nscount;
82 uint16 arcount; 82 uint16 arcount;
83 }; 83 };
84 84
85 #pragma pack(pop) 85 #pragma pack(pop)
86 86
87 static const uint8 kLabelMask = 0xc0; 87 static const uint8 kLabelMask = 0xc0;
88 static const uint8 kLabelPointer = 0xc0; 88 static const uint8 kLabelPointer = 0xc0;
(...skipping 18 matching lines...) Expand all
107 107
108 // DNS rcode values. 108 // DNS rcode values.
109 static const uint8 kRcodeMask = 0xf; 109 static const uint8 kRcodeMask = 0xf;
110 static const uint8 kRcodeNOERROR = 0; 110 static const uint8 kRcodeNOERROR = 0;
111 static const uint8 kRcodeFORMERR = 1; 111 static const uint8 kRcodeFORMERR = 1;
112 static const uint8 kRcodeSERVFAIL = 2; 112 static const uint8 kRcodeSERVFAIL = 2;
113 static const uint8 kRcodeNXDOMAIN = 3; 113 static const uint8 kRcodeNXDOMAIN = 3;
114 static const uint8 kRcodeNOTIMP = 4; 114 static const uint8 kRcodeNOTIMP = 4;
115 static const uint8 kRcodeREFUSED = 5; 115 static const uint8 kRcodeREFUSED = 5;
116 116
117 // DNS flags.
118 static const uint16 kFlagResponse = 0x8000;
119 static const uint16 kFlagRA = 0x80;
120 static const uint16 kFlagRD = 0x100;
121 static const uint16 kFlagTC = 0x200;
122 static const uint16 kFlagAA = 0x400;
123
117 } // namespace dns_protocol 124 } // namespace dns_protocol
118 125
119 } // namespace net 126 } // namespace net
120 127
121 #endif // NET_DNS_DNS_PROTOCOL_H_ 128 #endif // NET_DNS_DNS_PROTOCOL_H_
122 129
OLDNEW
« no previous file with comments | « net/dns/dns_config_service_win.cc ('k') | net/dns/dns_query.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698