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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
440 | 440 |
441 // struct that is used by GetNetworkList() to represent a network | 441 // struct that is used by GetNetworkList() to represent a network |
442 // interface. | 442 // interface. |
443 struct NET_EXPORT NetworkInterface { | 443 struct NET_EXPORT NetworkInterface { |
444 NetworkInterface(); | 444 NetworkInterface(); |
445 NetworkInterface(const std::string& name, | 445 NetworkInterface(const std::string& name, |
446 const std::string& friendly_name, | 446 const std::string& friendly_name, |
447 uint32 interface_index, | 447 uint32 interface_index, |
448 NetworkChangeNotifier::ConnectionType type, | 448 NetworkChangeNotifier::ConnectionType type, |
449 const IPAddressNumber& address, | 449 const IPAddressNumber& address, |
450 size_t network_prefix); | 450 unsigned int network_prefix); |
451 ~NetworkInterface(); | 451 ~NetworkInterface(); |
452 | 452 |
453 std::string name; | 453 std::string name; |
454 std::string friendly_name; // Same as |name| on non-Windows. | 454 std::string friendly_name; // Same as |name| on non-Windows. |
455 uint32 interface_index; // Always 0 on Android. | 455 uint32 interface_index; // Always 0 on Android. |
456 NetworkChangeNotifier::ConnectionType type; | 456 NetworkChangeNotifier::ConnectionType type; |
457 IPAddressNumber address; | 457 IPAddressNumber address; |
458 size_t network_prefix; | 458 unsigned int network_prefix; |
Will Harris
2014/09/13 00:09:10
nit: could use uint32 like interface_index
davidben
2014/09/15 17:27:43
+1. If the goal is to avoid implicitly sized types
guoweis2
2014/09/15 18:10:10
Done.
| |
459 }; | 459 }; |
460 | 460 |
461 typedef std::vector<NetworkInterface> NetworkInterfaceList; | 461 typedef std::vector<NetworkInterface> NetworkInterfaceList; |
462 | 462 |
463 // Policy settings to include/exclude network interfaces. | 463 // Policy settings to include/exclude network interfaces. |
464 enum HostAddressSelectionPolicy { | 464 enum HostAddressSelectionPolicy { |
465 INCLUDE_HOST_SCOPE_VIRTUAL_INTERFACES = 0x0, | 465 INCLUDE_HOST_SCOPE_VIRTUAL_INTERFACES = 0x0, |
466 EXCLUDE_HOST_SCOPE_VIRTUAL_INTERFACES = 0x1, | 466 EXCLUDE_HOST_SCOPE_VIRTUAL_INTERFACES = 0x1, |
467 // Include temp address only when interface has both permanent and | 467 // Include temp address only when interface has both permanent and |
468 // temp addresses. | 468 // temp addresses. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
531 DSCP_CS5 = 40, // Video | 531 DSCP_CS5 = 40, // Video |
532 DSCP_EF = 46, // Voice | 532 DSCP_EF = 46, // Voice |
533 DSCP_CS6 = 48, // Voice | 533 DSCP_CS6 = 48, // Voice |
534 DSCP_CS7 = 56, // Control messages | 534 DSCP_CS7 = 56, // Control messages |
535 DSCP_LAST = DSCP_CS7 | 535 DSCP_LAST = DSCP_CS7 |
536 }; | 536 }; |
537 | 537 |
538 } // namespace net | 538 } // namespace net |
539 | 539 |
540 #endif // NET_BASE_NET_UTIL_H_ | 540 #endif // NET_BASE_NET_UTIL_H_ |
OLD | NEW |