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 #include "net/base/net_util.h" | 5 #include "net/base/net_util.h" |
6 | 6 |
7 #include <iphlpapi.h> | 7 #include <iphlpapi.h> |
8 #include <wlanapi.h> | 8 #include <wlanapi.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 } | 139 } |
140 } | 140 } |
141 } | 141 } |
142 | 142 |
143 // If the duplicate address detection (DAD) state is not changed to | 143 // If the duplicate address detection (DAD) state is not changed to |
144 // Preferred, skip this address. | 144 // Preferred, skip this address. |
145 if (address->DadState != IpDadStatePreferred) { | 145 if (address->DadState != IpDadStatePreferred) { |
146 continue; | 146 continue; |
147 } | 147 } |
148 | 148 |
149 uint32 index = | 149 uint32_t index = |
150 (family == AF_INET) ? adapter->IfIndex : adapter->Ipv6IfIndex; | 150 (family == AF_INET) ? adapter->IfIndex : adapter->Ipv6IfIndex; |
151 | 151 |
152 // From http://technet.microsoft.com/en-us/ff568768(v=vs.60).aspx, the | 152 // From http://technet.microsoft.com/en-us/ff568768(v=vs.60).aspx, the |
153 // way to identify a temporary IPv6 Address is to check if | 153 // way to identify a temporary IPv6 Address is to check if |
154 // PrefixOrigin is equal to IpPrefixOriginRouterAdvertisement and | 154 // PrefixOrigin is equal to IpPrefixOriginRouterAdvertisement and |
155 // SuffixOrigin equal to IpSuffixOriginRandom. | 155 // SuffixOrigin equal to IpSuffixOriginRandom. |
156 int ip_address_attributes = IP_ADDRESS_ATTRIBUTE_NONE; | 156 int ip_address_attributes = IP_ADDRESS_ATTRIBUTE_NONE; |
157 if (family == AF_INET6) { | 157 if (family == AF_INET6) { |
158 if (address->PrefixOrigin == IpPrefixOriginRouterAdvertisement && | 158 if (address->PrefixOrigin == IpPrefixOriginRouterAdvertisement && |
159 address->SuffixOrigin == IpSuffixOriginRandom) { | 159 address->SuffixOrigin == IpSuffixOriginRandom) { |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 scoped_ptr<ScopedWifiOptions> SetWifiOptions(int options) { | 326 scoped_ptr<ScopedWifiOptions> SetWifiOptions(int options) { |
327 return scoped_ptr<ScopedWifiOptions>(new WifiOptionSetter(options)); | 327 return scoped_ptr<ScopedWifiOptions>(new WifiOptionSetter(options)); |
328 } | 328 } |
329 | 329 |
330 std::string GetWifiSSID() { | 330 std::string GetWifiSSID() { |
331 NOTIMPLEMENTED(); | 331 NOTIMPLEMENTED(); |
332 return ""; | 332 return ""; |
333 } | 333 } |
334 | 334 |
335 } // namespace net | 335 } // namespace net |
OLD | NEW |