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_BASE_DNS_UTIL_H_ | 5 #ifndef NET_BASE_DNS_UTIL_H_ |
6 #define NET_BASE_DNS_UTIL_H_ | 6 #define NET_BASE_DNS_UTIL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 static const uint16 kDNS_RRSIG = 46; | 53 static const uint16 kDNS_RRSIG = 46; |
54 static const uint16 kDNS_DNSKEY = 48; | 54 static const uint16 kDNS_DNSKEY = 48; |
55 static const uint16 kDNS_ANY = 0xff; | 55 static const uint16 kDNS_ANY = 0xff; |
56 static const uint16 kDNS_CAA = 257; | 56 static const uint16 kDNS_CAA = 257; |
57 static const uint16 kDNS_TESTING = 0xfffe; // in private use area. | 57 static const uint16 kDNS_TESTING = 0xfffe; // in private use area. |
58 | 58 |
59 // http://www.iana.org/assignments/dns-sec-alg-numbers/dns-sec-alg-numbers.xhtml | 59 // http://www.iana.org/assignments/dns-sec-alg-numbers/dns-sec-alg-numbers.xhtml |
60 static const uint8 kDNSSEC_RSA_SHA1 = 5; | 60 static const uint8 kDNSSEC_RSA_SHA1 = 5; |
61 static const uint8 kDNSSEC_RSA_SHA1_NSEC3 = 7; | 61 static const uint8 kDNSSEC_RSA_SHA1_NSEC3 = 7; |
62 static const uint8 kDNSSEC_RSA_SHA256 = 8; | 62 static const uint8 kDNSSEC_RSA_SHA256 = 8; |
| 63 static const uint8 kDNSSEC_RSA_SHA512 = 10; |
63 | 64 |
64 // RFC 4509 | 65 // RFC 4509 |
65 static const uint8 kDNSSEC_SHA1 = 1; | 66 static const uint8 kDNSSEC_SHA1 = 1; |
66 static const uint8 kDNSSEC_SHA256 = 2; | 67 static const uint8 kDNSSEC_SHA256 = 2; |
67 | 68 |
68 // A Buffer is used for walking over a DNS response packet. | 69 // A Buffer is used for walking over a DNS response packet. |
69 class DnsResponseBuffer { | 70 class DnsResponseBuffer { |
70 public: | 71 public: |
71 DnsResponseBuffer(const uint8* p, unsigned len) | 72 DnsResponseBuffer(const uint8* p, unsigned len) |
72 : p_(p), | 73 : p_(p), |
(...skipping 19 matching lines...) Expand all Loading... |
92 unsigned len_; | 93 unsigned len_; |
93 const unsigned packet_len_; | 94 const unsigned packet_len_; |
94 | 95 |
95 DISALLOW_COPY_AND_ASSIGN(DnsResponseBuffer); | 96 DISALLOW_COPY_AND_ASSIGN(DnsResponseBuffer); |
96 }; | 97 }; |
97 | 98 |
98 | 99 |
99 } // namespace net | 100 } // namespace net |
100 | 101 |
101 #endif // NET_BASE_DNS_UTIL_H_ | 102 #endif // NET_BASE_DNS_UTIL_H_ |
OLD | NEW |