OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "net/dns/dns_response.h" | 5 #include "net/dns/dns_response.h" |
6 | 6 |
| 7 #include "base/sys_byteorder.h" |
7 #include "net/base/big_endian.h" | 8 #include "net/base/big_endian.h" |
8 #include "net/base/io_buffer.h" | 9 #include "net/base/io_buffer.h" |
9 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
10 #include "net/base/sys_byteorder.h" | |
11 #include "net/dns/dns_protocol.h" | 11 #include "net/dns/dns_protocol.h" |
12 #include "net/dns/dns_query.h" | 12 #include "net/dns/dns_query.h" |
13 | 13 |
14 namespace net { | 14 namespace net { |
15 | 15 |
16 DnsRecordParser::DnsRecordParser() : packet_(NULL), length_(0), cur_(0) { | 16 DnsRecordParser::DnsRecordParser() : packet_(NULL), length_(0), cur_(0) { |
17 } | 17 } |
18 | 18 |
19 DnsRecordParser::DnsRecordParser(const void* packet, | 19 DnsRecordParser::DnsRecordParser(const void* packet, |
20 size_t length, | 20 size_t length, |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 DnsRecordParser DnsResponse::Parser() const { | 179 DnsRecordParser DnsResponse::Parser() const { |
180 DCHECK(parser_.IsValid()); | 180 DCHECK(parser_.IsValid()); |
181 return parser_; | 181 return parser_; |
182 } | 182 } |
183 | 183 |
184 const dns_protocol::Header* DnsResponse::header() const { | 184 const dns_protocol::Header* DnsResponse::header() const { |
185 return reinterpret_cast<const dns_protocol::Header*>(io_buffer_->data()); | 185 return reinterpret_cast<const dns_protocol::Header*>(io_buffer_->data()); |
186 } | 186 } |
187 | 187 |
188 } // namespace net | 188 } // namespace net |
OLD | NEW |