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

Unified Diff: net/base/ip_address_number.h

Issue 1860823005: Move some net::IPAddressNumber implementations to net::IPAddress. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: net/base/ip_address_number.h
diff --git a/net/base/ip_address_number.h b/net/base/ip_address_number.h
index 8c997e4efc8097890d4cbfa92839f531cb9bd010..5661648e878a15cfa6846d9069a40039f16c6a2d 100644
--- a/net/base/ip_address_number.h
+++ b/net/base/ip_address_number.h
@@ -30,11 +30,6 @@ typedef std::vector<unsigned char> IPAddressNumber;
static const size_t kIPv4AddressSize = 4;
static const size_t kIPv6AddressSize = 16;
-// Returns true if an IP address hostname is in a range reserved by the IANA.
-// Works with both IPv4 and IPv6 addresses, and only compares against a given
-// protocols's reserved ranges.
-NET_EXPORT bool IsIPAddressReserved(const IPAddressNumber& address);
-
// Returns the string representation of an IP address.
// For example: "192.168.0.1" or "::1". Returns the empty string when |address|
// is invalid.
@@ -76,20 +71,6 @@ NET_EXPORT_PRIVATE bool IsIPv4Mapped(const IPAddressNumber& address);
NET_EXPORT_PRIVATE IPAddressNumber ConvertIPv4MappedToIPv4(
const IPAddressNumber& address);
-// Compares an IP address to see if it falls within the specified IP block.
-// Returns true if it does, false otherwise.
-//
-// The IP block is given by (|ip_prefix|, |prefix_length_in_bits|) -- any
-// IP address whose |prefix_length_in_bits| most significant bits match
-// |ip_prefix| will be matched.
-//
-// In cases when an IPv4 address is being compared to an IPv6 address prefix
-// and vice versa, the IPv4 addresses will be converted to IPv4-mapped
-// (IPv6) addresses.
-NET_EXPORT_PRIVATE bool IPNumberMatchesPrefix(const IPAddressNumber& ip_number,
- const IPAddressNumber& ip_prefix,
- size_t prefix_length_in_bits);
-
// Returns number of matching initial bits between the addresses |a1| and |a2|.
unsigned CommonPrefixLength(const IPAddressNumber& a1,
const IPAddressNumber& a2);

Powered by Google App Engine
This is Rietveld 408576698