OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef NET_BASE_IP_ADDRESS_NUMBER_H_ | |
6 #define NET_BASE_IP_ADDRESS_NUMBER_H_ | |
7 | |
8 #include <vector> | |
9 | |
10 namespace net { | |
11 | |
12 // IPAddressNumber is used to represent an IP address's numeric value as an | |
13 // array of bytes, from most significant to least significant. This is the | |
14 // network byte ordering. | |
15 // | |
16 // IPv4 addresses will have length 4, whereas IPv6 address will have length 16. | |
17 // | |
18 // TODO(Martijnc): Remove the IPAddressNumber typedef. New code should use | |
19 // IPAddress instead and existing code should be switched over. | |
20 // https://crbug.com/496258 | |
21 typedef std::vector<unsigned char> IPAddressNumber; | |
22 | |
23 static const size_t kIPv4AddressSize = 4; | |
24 static const size_t kIPv6AddressSize = 16; | |
25 | |
26 } // namespace net | |
27 | |
28 #endif // NET_BASE_IP_ADDRESS_NUMBER_H_ | |
OLD | NEW |