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_NETWORK_INTERFACES_H_ | 5 #ifndef NET_BASE_NETWORK_INTERFACES_H_ |
6 #define NET_BASE_NETWORK_INTERFACES_H_ | 6 #define NET_BASE_NETWORK_INTERFACES_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 28 matching lines...) Expand all Loading... |
39 } | 39 } |
40 | 40 |
41 namespace net { | 41 namespace net { |
42 | 42 |
43 // struct that is used by GetNetworkList() to represent a network | 43 // struct that is used by GetNetworkList() to represent a network |
44 // interface. | 44 // interface. |
45 struct NET_EXPORT NetworkInterface { | 45 struct NET_EXPORT NetworkInterface { |
46 NetworkInterface(); | 46 NetworkInterface(); |
47 NetworkInterface(const std::string& name, | 47 NetworkInterface(const std::string& name, |
48 const std::string& friendly_name, | 48 const std::string& friendly_name, |
49 uint32 interface_index, | 49 uint32_t interface_index, |
50 NetworkChangeNotifier::ConnectionType type, | 50 NetworkChangeNotifier::ConnectionType type, |
51 const IPAddressNumber& address, | 51 const IPAddressNumber& address, |
52 uint32 prefix_length, | 52 uint32_t prefix_length, |
53 int ip_address_attributes); | 53 int ip_address_attributes); |
54 ~NetworkInterface(); | 54 ~NetworkInterface(); |
55 | 55 |
56 std::string name; | 56 std::string name; |
57 std::string friendly_name; // Same as |name| on non-Windows. | 57 std::string friendly_name; // Same as |name| on non-Windows. |
58 uint32 interface_index; // Always 0 on Android. | 58 uint32_t interface_index; // Always 0 on Android. |
59 NetworkChangeNotifier::ConnectionType type; | 59 NetworkChangeNotifier::ConnectionType type; |
60 IPAddressNumber address; | 60 IPAddressNumber address; |
61 uint32 prefix_length; | 61 uint32_t prefix_length; |
62 int ip_address_attributes; // Combination of |IPAddressAttributes|. | 62 int ip_address_attributes; // Combination of |IPAddressAttributes|. |
63 }; | 63 }; |
64 | 64 |
65 typedef std::vector<NetworkInterface> NetworkInterfaceList; | 65 typedef std::vector<NetworkInterface> NetworkInterfaceList; |
66 | 66 |
67 // Policy settings to include/exclude network interfaces. | 67 // Policy settings to include/exclude network interfaces. |
68 enum HostAddressSelectionPolicy { | 68 enum HostAddressSelectionPolicy { |
69 INCLUDE_HOST_SCOPE_VIRTUAL_INTERFACES = 0x0, | 69 INCLUDE_HOST_SCOPE_VIRTUAL_INTERFACES = 0x0, |
70 EXCLUDE_HOST_SCOPE_VIRTUAL_INTERFACES = 0x1, | 70 EXCLUDE_HOST_SCOPE_VIRTUAL_INTERFACES = 0x1, |
71 }; | 71 }; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 // Set temporary options on all wifi interfaces. | 123 // Set temporary options on all wifi interfaces. |
124 // |options| is an ORed bitfield of WifiOptions. | 124 // |options| is an ORed bitfield of WifiOptions. |
125 // Options are automatically disabled when the scoped pointer | 125 // Options are automatically disabled when the scoped pointer |
126 // is freed. Currently only available on OS_WIN. | 126 // is freed. Currently only available on OS_WIN. |
127 NET_EXPORT scoped_ptr<ScopedWifiOptions> SetWifiOptions(int options); | 127 NET_EXPORT scoped_ptr<ScopedWifiOptions> SetWifiOptions(int options); |
128 | 128 |
129 } // namespace net | 129 } // namespace net |
130 | 130 |
131 #endif // NET_BASE_NETWORK_INTERFACES_H_ | 131 #endif // NET_BASE_NETWORK_INTERFACES_H_ |
OLD | NEW |