Chromium Code Reviews| 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_NET_UTIL_H_ | 5 #ifndef NET_BASE_NET_UTIL_H_ |
| 6 #define NET_BASE_NET_UTIL_H_ | 6 #define NET_BASE_NET_UTIL_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 431 | 431 |
| 432 // Returns true if it can determine that only loopback addresses are configured. | 432 // Returns true if it can determine that only loopback addresses are configured. |
| 433 // i.e. if only 127.0.0.1 and ::1 are routable. | 433 // i.e. if only 127.0.0.1 and ::1 are routable. |
| 434 // Also returns false if it cannot determine this. | 434 // Also returns false if it cannot determine this. |
| 435 bool HaveOnlyLoopbackAddresses(); | 435 bool HaveOnlyLoopbackAddresses(); |
| 436 | 436 |
| 437 // Returns AddressFamily of the address. | 437 // Returns AddressFamily of the address. |
| 438 NET_EXPORT_PRIVATE AddressFamily GetAddressFamily( | 438 NET_EXPORT_PRIVATE AddressFamily GetAddressFamily( |
| 439 const IPAddressNumber& address); | 439 const IPAddressNumber& address); |
| 440 | 440 |
| 441 // Converts AddressFamily to socket family, AF_INET, AF_INET6 or AF_UNSPEC. | |
|
akalin
2013/08/29 23:54:36
how about:
// Maps the given AddressFamily to eit
yzshen1
2013/08/30 00:12:08
Done.
| |
| 442 int ConvertAddressFamily(AddressFamily address_family); | |
| 443 | |
| 441 // Parses an IP address literal (either IPv4 or IPv6) to its numeric value. | 444 // Parses an IP address literal (either IPv4 or IPv6) to its numeric value. |
| 442 // Returns true on success and fills |ip_number| with the numeric value. | 445 // Returns true on success and fills |ip_number| with the numeric value. |
| 443 NET_EXPORT_PRIVATE bool ParseIPLiteralToNumber(const std::string& ip_literal, | 446 NET_EXPORT_PRIVATE bool ParseIPLiteralToNumber(const std::string& ip_literal, |
| 444 IPAddressNumber* ip_number); | 447 IPAddressNumber* ip_number); |
| 445 | 448 |
| 446 // Converts an IPv4 address to an IPv4-mapped IPv6 address. | 449 // Converts an IPv4 address to an IPv4-mapped IPv6 address. |
| 447 // For example 192.168.0.1 would be converted to ::ffff:192.168.0.1. | 450 // For example 192.168.0.1 would be converted to ::ffff:192.168.0.1. |
| 448 NET_EXPORT_PRIVATE IPAddressNumber ConvertIPv4NumberToIPv6Number( | 451 NET_EXPORT_PRIVATE IPAddressNumber ConvertIPv4NumberToIPv6Number( |
| 449 const IPAddressNumber& ipv4_number); | 452 const IPAddressNumber& ipv4_number); |
| 450 | 453 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 536 WIFI_PHY_LAYER_PROTOCOL_UNKNOWN | 539 WIFI_PHY_LAYER_PROTOCOL_UNKNOWN |
| 537 }; | 540 }; |
| 538 | 541 |
| 539 // Characterize the PHY mode of the currently associated access point. | 542 // Characterize the PHY mode of the currently associated access point. |
| 540 // Currently only available on OS_WIN. | 543 // Currently only available on OS_WIN. |
| 541 NET_EXPORT WifiPHYLayerProtocol GetWifiPHYLayerProtocol(); | 544 NET_EXPORT WifiPHYLayerProtocol GetWifiPHYLayerProtocol(); |
| 542 | 545 |
| 543 } // namespace net | 546 } // namespace net |
| 544 | 547 |
| 545 #endif // NET_BASE_NET_UTIL_H_ | 548 #endif // NET_BASE_NET_UTIL_H_ |
| OLD | NEW |