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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 // Note that this function does not check for IP addresses other than | 508 // Note that this function does not check for IP addresses other than |
509 // the above, although other IP addresses may point to the local | 509 // the above, although other IP addresses may point to the local |
510 // machine. | 510 // machine. |
511 NET_EXPORT_PRIVATE bool IsLocalhost(const std::string& host); | 511 NET_EXPORT_PRIVATE bool IsLocalhost(const std::string& host); |
512 | 512 |
513 // struct that is used by GetNetworkList() to represent a network | 513 // struct that is used by GetNetworkList() to represent a network |
514 // interface. | 514 // interface. |
515 struct NET_EXPORT NetworkInterface { | 515 struct NET_EXPORT NetworkInterface { |
516 NetworkInterface(); | 516 NetworkInterface(); |
517 NetworkInterface(const std::string& name, | 517 NetworkInterface(const std::string& name, |
| 518 uint32 interface_index, |
518 const IPAddressNumber& address, | 519 const IPAddressNumber& address, |
519 size_t network_prefix); | 520 size_t network_prefix); |
520 ~NetworkInterface(); | 521 ~NetworkInterface(); |
521 | 522 |
522 std::string name; | 523 std::string name; |
| 524 uint32 interface_index; // Always 0 on Android. |
523 IPAddressNumber address; | 525 IPAddressNumber address; |
524 size_t network_prefix; | 526 size_t network_prefix; |
525 }; | 527 }; |
526 | 528 |
527 typedef std::vector<NetworkInterface> NetworkInterfaceList; | 529 typedef std::vector<NetworkInterface> NetworkInterfaceList; |
528 | 530 |
529 // Returns list of network interfaces except loopback interface. If an | 531 // Returns list of network interfaces except loopback interface. If an |
530 // interface has more than one address, a separate entry is added to | 532 // interface has more than one address, a separate entry is added to |
531 // the list for each address. | 533 // the list for each address. |
532 // Can be called only on a thread that allows IO. | 534 // Can be called only on a thread that allows IO. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 DSCP_AF43 = 38, // Video | 587 DSCP_AF43 = 38, // Video |
586 DSCP_CS5 = 40, // Video | 588 DSCP_CS5 = 40, // Video |
587 DSCP_EF = 46, // Voice | 589 DSCP_EF = 46, // Voice |
588 DSCP_CS6 = 48, // Voice | 590 DSCP_CS6 = 48, // Voice |
589 DSCP_CS7 = 56, // Control messages | 591 DSCP_CS7 = 56, // Control messages |
590 }; | 592 }; |
591 | 593 |
592 } // namespace net | 594 } // namespace net |
593 | 595 |
594 #endif // NET_BASE_NET_UTIL_H_ | 596 #endif // NET_BASE_NET_UTIL_H_ |
OLD | NEW |