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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
491 // 802.11n, HT rates. | 491 // 802.11n, HT rates. |
492 WIFI_PHY_LAYER_PROTOCOL_N, | 492 WIFI_PHY_LAYER_PROTOCOL_N, |
493 // Unclassified mode or failure to identify. | 493 // Unclassified mode or failure to identify. |
494 WIFI_PHY_LAYER_PROTOCOL_UNKNOWN | 494 WIFI_PHY_LAYER_PROTOCOL_UNKNOWN |
495 }; | 495 }; |
496 | 496 |
497 // Characterize the PHY mode of the currently associated access point. | 497 // Characterize the PHY mode of the currently associated access point. |
498 // Currently only available on OS_WIN. | 498 // Currently only available on OS_WIN. |
499 NET_EXPORT WifiPHYLayerProtocol GetWifiPHYLayerProtocol(); | 499 NET_EXPORT WifiPHYLayerProtocol GetWifiPHYLayerProtocol(); |
500 | 500 |
501 enum WifiOptions { | |
502 // Disables background SSID scans. | |
503 WIFI_OPTIONS_DISABLE_SCAN = 1, | |
504 // Enables media streaming mode. | |
505 WIFI_OPTIONS_MEDIA_STREAMING_MODE = 2 | |
506 }; | |
pauljensen
2014/09/18 14:25:35
Since these should be ORed together, I suggest:
1-
hubbe
2014/09/18 18:21:05
Done.
| |
507 | |
508 class NET_EXPORT ScopedWifiOptions { | |
509 public: | |
510 virtual ~ScopedWifiOptions(); | |
511 }; | |
pauljensen
2014/09/18 14:16:50
private:
DISALLOW_COPY_AND_ASSIGN(ScopedWifiOptio
hubbe
2014/09/18 18:21:05
Done.
| |
512 | |
513 // Set temporary options on all wifi interfaces. | |
514 // |options| is an ORed bitfield of WifiOptions. | |
515 // Options are automatically disabled when the scoped pointer | |
516 // is freed. Currently only available on OS_WIN. | |
517 NET_EXPORT scoped_ptr<ScopedWifiOptions> SetWifiOptions(int options); | |
518 | |
501 // Returns number of matching initial bits between the addresses |a1| and |a2|. | 519 // Returns number of matching initial bits between the addresses |a1| and |a2|. |
502 unsigned CommonPrefixLength(const IPAddressNumber& a1, | 520 unsigned CommonPrefixLength(const IPAddressNumber& a1, |
503 const IPAddressNumber& a2); | 521 const IPAddressNumber& a2); |
504 | 522 |
505 // Computes the number of leading 1-bits in |mask|. | 523 // Computes the number of leading 1-bits in |mask|. |
506 unsigned MaskPrefixLength(const IPAddressNumber& mask); | 524 unsigned MaskPrefixLength(const IPAddressNumber& mask); |
507 | 525 |
508 // Differentiated Services Code Point. | 526 // Differentiated Services Code Point. |
509 // See http://tools.ietf.org/html/rfc2474 for details. | 527 // See http://tools.ietf.org/html/rfc2474 for details. |
510 enum DiffServCodePoint { | 528 enum DiffServCodePoint { |
(...skipping 20 matching lines...) Expand all Loading... | |
531 DSCP_CS5 = 40, // Video | 549 DSCP_CS5 = 40, // Video |
532 DSCP_EF = 46, // Voice | 550 DSCP_EF = 46, // Voice |
533 DSCP_CS6 = 48, // Voice | 551 DSCP_CS6 = 48, // Voice |
534 DSCP_CS7 = 56, // Control messages | 552 DSCP_CS7 = 56, // Control messages |
535 DSCP_LAST = DSCP_CS7 | 553 DSCP_LAST = DSCP_CS7 |
536 }; | 554 }; |
537 | 555 |
538 } // namespace net | 556 } // namespace net |
539 | 557 |
540 #endif // NET_BASE_NET_UTIL_H_ | 558 #endif // NET_BASE_NET_UTIL_H_ |
OLD | NEW |