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_RESPONSE_H_ | 5 #ifndef NET_DNS_DNS_RESPONSE_H_ |
6 #define NET_DNS_DNS_RESPONSE_H_ | 6 #define NET_DNS_DNS_RESPONSE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 DNS_MALFORMED_RESPONSE, // DnsRecordParser failed before the end of | 88 DNS_MALFORMED_RESPONSE, // DnsRecordParser failed before the end of |
89 // packet. | 89 // packet. |
90 DNS_MALFORMED_CNAME, // Could not parse CNAME out of RRDATA. | 90 DNS_MALFORMED_CNAME, // Could not parse CNAME out of RRDATA. |
91 DNS_NAME_MISMATCH, // Got an address but no ordered chain of CNAMEs | 91 DNS_NAME_MISMATCH, // Got an address but no ordered chain of CNAMEs |
92 // leads there. | 92 // leads there. |
93 DNS_SIZE_MISMATCH, // Got an address but size does not match. | 93 DNS_SIZE_MISMATCH, // Got an address but size does not match. |
94 DNS_CNAME_AFTER_ADDRESS, // Found CNAME after an address record. | 94 DNS_CNAME_AFTER_ADDRESS, // Found CNAME after an address record. |
95 DNS_ADDRESS_TTL_MISMATCH, // OBSOLETE. No longer used. | 95 DNS_ADDRESS_TTL_MISMATCH, // OBSOLETE. No longer used. |
96 DNS_NO_ADDRESSES, // OBSOLETE. No longer used. | 96 DNS_NO_ADDRESSES, // OBSOLETE. No longer used. |
97 // Only add new values here. | 97 // Only add new values here. |
98 DNS_PARSE_RESULT_MAX, // Bounding value for histograms. | 98 DNS_PARSE_RESULT_MAX, // Bounding value for histograms. |
99 }; | 99 }; |
100 | 100 |
101 // Constructs a response buffer large enough to store one byte more than | 101 // Constructs a response buffer large enough to store one byte more than |
102 // largest possible response, to detect malformed responses. | 102 // largest possible response, to detect malformed responses. |
103 DnsResponse(); | 103 DnsResponse(); |
104 | 104 |
105 // Constructs a response buffer of given length. Used for TCP transactions. | 105 // Constructs a response buffer of given length. Used for TCP transactions. |
106 explicit DnsResponse(size_t length); | 106 explicit DnsResponse(size_t length); |
107 | 107 |
108 // Constructs a response from |data|. Used for testing purposes only! | 108 // Constructs a response from |data|. Used for testing purposes only! |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 // Iterator constructed after InitParse positioned at the answer section. | 160 // Iterator constructed after InitParse positioned at the answer section. |
161 // It is never updated afterwards, so can be used in accessors. | 161 // It is never updated afterwards, so can be used in accessors. |
162 DnsRecordParser parser_; | 162 DnsRecordParser parser_; |
163 | 163 |
164 DISALLOW_COPY_AND_ASSIGN(DnsResponse); | 164 DISALLOW_COPY_AND_ASSIGN(DnsResponse); |
165 }; | 165 }; |
166 | 166 |
167 } // namespace net | 167 } // namespace net |
168 | 168 |
169 #endif // NET_DNS_DNS_RESPONSE_H_ | 169 #endif // NET_DNS_DNS_RESPONSE_H_ |
OLD | NEW |